wlmaker
|
#include <libbase/libbase.h>
#include "buffer.h"
#include "element.h"
#include "env.h"
#include "style.h"
Go to the source code of this file.
Classes | |
struct | _wlmtk_menu_item_style_t |
struct | _wlmtk_menu_item_vmt_t |
struct | _wlmtk_menu_item_t |
struct | wlmtk_fake_menu_item_t |
Typedefs | |
typedef struct _wlmtk_menu_item_t | wlmtk_menu_item_t |
typedef struct _wlmtk_menu_item_vmt_t | wlmtk_menu_item_vmt_t |
typedef struct _wlmtk_menu_item_style_t | wlmtk_menu_item_style_t |
Enumerations | |
enum | wlmtk_menu_item_state_t { MENU_ITEM_ENABLED , MENU_ITEM_HIGHLIGHTED , MENU_ITEM_DISABLED } |
Functions | |
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) |
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) |
void | wlmtk_menu_item_fini (wlmtk_menu_item_t *menu_item_ptr) |
bool | wlmtk_menu_item_set_text (wlmtk_menu_item_t *menu_item_ptr, const char *text_ptr) |
void | wlmtk_menu_item_set_enabled (wlmtk_menu_item_t *menu_item_ptr, bool enabled) |
bs_dllist_node_t * | wlmtk_dlnode_from_menu_item (wlmtk_menu_item_t *menu_item_ptr) |
wlmtk_menu_item_t * | wlmtk_menu_item_from_dlnode (bs_dllist_node_t *dlnode_ptr) |
wlmtk_element_t * | wlmtk_menu_item_element (wlmtk_menu_item_t *menu_item_ptr) |
wlmtk_fake_menu_item_t * | wlmtk_fake_menu_item_create (void) |
void | wlmtk_fake_menu_item_destroy (wlmtk_fake_menu_item_t *fake_menu_item_ptr) |
Variables | |
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.
typedef struct _wlmtk_menu_item_style_t wlmtk_menu_item_style_t |
Forward declaration: Style of a menu item.
typedef struct _wlmtk_menu_item_t wlmtk_menu_item_t |
Forward declaration: State of the menu item.
typedef struct _wlmtk_menu_item_vmt_t wlmtk_menu_item_vmt_t |
Forward declaration: Virtual method table of the menu item.
States a menu item can be in.
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 |
|
extern |
Unit test cases.