wlmaker
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions | Variables
box.h File Reference
#include <stdbool.h>
#include "libbase/libbase.h"
#include "container.h"
#include "element.h"
#include "style.h"
Include dependency graph for box.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _wlmtk_box_t
 

Typedefs

typedef struct _wlmtk_box_t wlmtk_box_t
 

Enumerations

enum  wlmtk_box_orientation_t { WLMTK_BOX_HORIZONTAL , WLMTK_BOX_VERTICAL }
 

Functions

bool wlmtk_box_init (wlmtk_box_t *box_ptr, wlmtk_box_orientation_t orientation, const wlmtk_margin_style_t *style_ptr)
 
void wlmtk_box_fini (wlmtk_box_t *box_ptr)
 
void wlmtk_box_add_element_front (wlmtk_box_t *box_ptr, wlmtk_element_t *element_ptr)
 
void wlmtk_box_add_element_back (wlmtk_box_t *box_ptr, wlmtk_element_t *element_ptr)
 
void wlmtk_box_remove_element (wlmtk_box_t *box_ptr, wlmtk_element_t *element_ptr)
 
wlmtk_element_twlmtk_box_element (wlmtk_box_t *box_ptr)
 

Variables

const bs_test_case_t wlmtk_box_test_cases []
 

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

◆ wlmtk_box_t

typedef struct _wlmtk_box_t wlmtk_box_t

Forward declaration: Box.

Enumeration Type Documentation

◆ wlmtk_box_orientation_t

Orientation of the box.

Enumerator
WLMTK_BOX_HORIZONTAL 

Horizontal box layout. The container's "front" is on the left.

WLMTK_BOX_VERTICAL 

Vertical box layout. The container's "front" is the top.

Function Documentation

◆ wlmtk_box_add_element_back()

void wlmtk_box_add_element_back ( wlmtk_box_t box_ptr,
wlmtk_element_t element_ptr 
)

Adds element_ptr to the back of the box.

Parameters
box_ptr
element_ptr

◆ wlmtk_box_add_element_front()

void wlmtk_box_add_element_front ( wlmtk_box_t box_ptr,
wlmtk_element_t element_ptr 
)

Adds element_ptr to the front of the box.

Parameters
box_ptr
element_ptr

◆ wlmtk_box_element()

wlmtk_element_t * wlmtk_box_element ( wlmtk_box_t box_ptr)
Returns
Pointer to the superclass' wlmtk_element_t of box_ptr.

◆ wlmtk_box_fini()

void wlmtk_box_fini ( wlmtk_box_t box_ptr)

Un-initializes the box.

Parameters
box_ptr

◆ wlmtk_box_init()

bool wlmtk_box_init ( wlmtk_box_t box_ptr,
wlmtk_box_orientation_t  orientation,
const wlmtk_margin_style_t style_ptr 
)

Initializes the box with the provided virtual method table.

Parameters
box_ptr
orientation
style_ptr
Returns
true on success.

◆ wlmtk_box_remove_element()

void wlmtk_box_remove_element ( wlmtk_box_t box_ptr,
wlmtk_element_t element_ptr 
)

Removes element_ptr from the box.

Requires that element_ptr is an element of the box.

Parameters
box_ptr
element_ptr

Variable Documentation

◆ wlmtk_box_test_cases

const bs_test_case_t wlmtk_box_test_cases[]
extern

Unit tests.