wlmaker
Loading...
Searching...
No Matches
action_item.h File Reference
#include <libbase/libbase.h>
#include <stdbool.h>
#include <stddef.h>
#include "action.h"
#include "server.h"
#include "toolkit/toolkit.h"
Include dependency graph for action_item.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  wlmaker_action_item_desc_t

Typedefs

typedef struct _wlmaker_action_item_t wlmaker_action_item_t

Functions

wlmaker_action_item_twlmaker_action_item_create (const char *text_ptr, const wlmtk_menu_item_style_t *style_ptr, wlmaker_action_t action, const char *action_arg_ptr, wlmaker_server_t *server_ptr)
wlmaker_action_item_twlmaker_action_item_create_from_desc (const wlmaker_action_item_desc_t *desc_ptr, void *dest_ptr, const wlmtk_menu_item_style_t *style_ptr, wlmaker_server_t *server_ptr)
wlmtk_menu_item_twlmaker_action_item_menu_item (wlmaker_action_item_t *action_item_ptr)
bool wlmaker_menu_item_bind_action (wlmtk_menu_item_t *menu_item_ptr, wlmaker_action_t action, const char *action_arg_ptr, wlmaker_server_t *server_ptr)

Variables

const bs_test_set_t wlmaker_action_item_test_set

Detailed Description

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 Documentation

◆ wlmaker_action_item_t

Forward declaration: An action-triggering menu item.

Function Documentation

◆ wlmaker_action_item_create()

wlmaker_action_item_t * wlmaker_action_item_create ( const char * text_ptr,
const wlmtk_menu_item_style_t * style_ptr,
wlmaker_action_t action,
const char * action_arg_ptr,
wlmaker_server_t * server_ptr )

Creates a menu item that triggers a wlmaker_action_t.

Parameters
text_ptr
style_ptr
action
action_arg_ptrExtra argument. Will be duplicated.
server_ptr
Returns
Pointer to the menu item's handle or NULL on error.

◆ wlmaker_action_item_create_from_desc()

wlmaker_action_item_t * wlmaker_action_item_create_from_desc ( const wlmaker_action_item_desc_t * desc_ptr,
void * dest_ptr,
const wlmtk_menu_item_style_t * style_ptr,
wlmaker_server_t * server_ptr )

Creates a menu item triggering an action item from a descriptor.

Parameters
desc_ptr
dest_ptr
style_ptr
server_ptr
Returns
Pointer to the item's handle or NULL on error.

◆ wlmaker_action_item_menu_item()

wlmtk_menu_item_t * wlmaker_action_item_menu_item ( wlmaker_action_item_t * action_item_ptr)
Returns
pointer to the superclass wlmtk_menu_item_t.

◆ wlmaker_menu_item_bind_action()

bool wlmaker_menu_item_bind_action ( wlmtk_menu_item_t * menu_item_ptr,
wlmaker_action_t action,
const char * action_arg_ptr,
wlmaker_server_t * server_ptr )

Binds an action to a menu item.

Parameters
menu_item_ptr
action
action_arg_ptr
server_ptr
Returns
true on success.

Variable Documentation

◆ wlmaker_action_item_test_set

const bs_test_set_t wlmaker_action_item_test_set
extern

Unit test set.