wlmaker
|
Variables | |
static const wlmtk_element_vmt_t | _wlmtk_menu_item_element_vmt |
static const wlmtk_menu_item_style_t | _wlmtk_menu_item_test_style |
static const wlmtk_menu_item_vmt_t | _wlmtk_fake_menu_item_vmt |
static const wlmtk_element_vmt_t | _wlmtk_fake_menu_item_element_vmt |
const bs_test_case_t | wlmtk_menu_item_test_cases [] |
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
static |
Implements wlmtk_menu_item_vmt_t::clicked for the fake menu item.
|
static |
Dtor: Implements wlmtk_element_vmt_t::destroy.
|
static |
Applies the state: Sets the parent buffer's content accordingly.
|
static |
Creates a wlr_buffer with the menu item drawn for the given state.
menu_item_ptr | |
state |
|
static |
Checks if the button event is a click, and calls the handler.
|
static |
Handles when the pointer enters the element: Highlights, if enabled.
|
static |
Handles when the pointer leaves the element: Ends highlight.
|
static |
Redraws the buffers for the menu item. Also updates the buffer state.
|
static |
Exercises drawing.
|
static |
Verifies desired clicks are passed to the handler.
|
static |
Exercises setup and teardown and a few accessors.
|
static |
Tests pointer entering & leaving.
bs_dllist_node_t * wlmtk_dlnode_from_menu_item | ( | wlmtk_menu_item_t * | menu_item_ptr | ) |
Returns pointer to wlmtk_menu_item_t::dlnode.
wlmtk_fake_menu_item_t * wlmtk_fake_menu_item_create | ( | void | ) |
Ctor for the fake menu item.
void wlmtk_fake_menu_item_destroy | ( | wlmtk_fake_menu_item_t * | fake_menu_item_ptr | ) |
Dtor for the fake menu item.
wlmtk_element_t * wlmtk_menu_item_element | ( | wlmtk_menu_item_t * | menu_item_ptr | ) |
Returns a pointer to the superclass wlmtk_element_t.
wlmtk_menu_item_vmt_t wlmtk_menu_item_extend | ( | wlmtk_menu_item_t * | menu_item_ptr, |
const wlmtk_menu_item_vmt_t * | menu_item_vmt_ptr ) |
Extends the menu item's virtual methods.
menu_item_ptr | |
menu_item_vmt_ptr |
void wlmtk_menu_item_fini | ( | wlmtk_menu_item_t * | menu_item_ptr | ) |
Un-initializes the menu item.
menu_item_ptr |
wlmtk_menu_item_t * wlmtk_menu_item_from_dlnode | ( | bs_dllist_node_t * | dlnode_ptr | ) |
Returns the base wlmtk_menu_item_t from dlnode_ptr
.
bool wlmtk_menu_item_init | ( | wlmtk_menu_item_t * | menu_item_ptr, |
const wlmtk_menu_item_style_t * | style_ptr, | ||
wlmtk_env_t * | env_ptr ) |
Initializes the menu item.
Note: Menu items are created as visible elements.
menu_item_ptr | |
style_ptr | |
env_ptr |
void wlmtk_menu_item_set_enabled | ( | wlmtk_menu_item_t * | menu_item_ptr, |
bool | enabled ) |
Sets whether the menu item is enabled or disabled.
menu_item_ptr | |
enabled |
bool wlmtk_menu_item_set_text | ( | wlmtk_menu_item_t * | menu_item_ptr, |
const char * | text_ptr ) |
Sets or updates the text for the menu item.
menu_item_ptr | |
text_ptr |
|
static |
Virtual method table for the fake menu item's element superclass.
|
static |
Virtual method table for the fake menu item.
|
static |
Virtual method table for the menu item's super class: Element.
|
static |
Style definition used for unit tests.
const bs_test_case_t wlmtk_menu_item_test_cases[] |
Unit test cases.