XenevaOS
Loading...
Searching...
No Matches
Macros | Functions
border_layout.cpp File Reference
#include "border_layout.h"
Include dependency graph for border_layout.cpp:

Macros

#define GET_NUM_BORDER_ITEM_COUNT(l)   ((l)->items->pointer)
 

Functions

void ChBorderLayoutDoLayout (ChBorderLayout *l)
 ChBorderLayoutDoLayout – reorganise/refresh sel.
 
void ChBorderLayoutSetPreferred (ChBorderLayout *l, ChWidget *w, int pw, int ph)
 ChBorderLayoutSetPreferred – set preferred border width and height for widget geometry.
 
void ChBorderLayoutSetDefaults (ChBorderLayout *l, int sideW, int barH)
 ChBorderLayoutSetDefaults – set default border geometry.
 
void ChBorderLayoutAdd (ChBorderLayout *l, ChWidget *w, ChBorderAlignment align)
 ChBorderLayoutAdd – add a widget to the border layout by its alignment.
 
void ChBorderLayoutResize (ChBorderLayout *l, int x, int y, int w, int h)
 ChBorderLayoutResize – resize the border layout with given parameter.
 
ChBorderLayout * ChCreateBorderLayout (int x, int y, int w, int h, int hgap, int vgap)
 ChCreateBorderLayout – create a new border layout with given parameters.
 

Detailed Description

BSD 2-Clause License

Copyright (c) 2022-2026, Manas Kamal Choudhury All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Macro Definition Documentation

◆ GET_NUM_BORDER_ITEM_COUNT

#define GET_NUM_BORDER_ITEM_COUNT (   l)    ((l)->items->pointer)

Function Documentation

◆ ChBorderLayoutAdd()

void ChBorderLayoutAdd ( ChBorderLayout *  l,
ChWidget *  w,
ChBorderAlignment  align 
)

ChBorderLayoutAdd – add a widget to the border layout by its alignment.

Parameters
l– Pointer to border layout
w– Pointer to the widget to add
align– alignment number

◆ ChBorderLayoutDoLayout()

void ChBorderLayoutDoLayout ( ChBorderLayout *  l)

ChBorderLayoutDoLayout – reorganise/refresh sel.

Parameters
l– Pointer to border layout

NORTH : following java.swing styled border layout

◆ ChBorderLayoutResize()

void ChBorderLayoutResize ( ChBorderLayout *  l,
int  x,
int  y,
int  w,
int  h 
)

ChBorderLayoutResize – resize the border layout with given parameter.

Parameters
l– Pointer to border layout
x– x location of the border layout
y– y location of the border layout
w– new width of the border layout
h– new height of the border layout

◆ ChBorderLayoutSetDefaults()

void ChBorderLayoutSetDefaults ( ChBorderLayout *  l,
int  sideW,
int  barH 
)

ChBorderLayoutSetDefaults – set default border geometry.

Parameters
l– Pointer to Border Layout
sideW– side width
barH– bar height

◆ ChBorderLayoutSetPreferred()

void ChBorderLayoutSetPreferred ( ChBorderLayout *  l,
ChWidget *  w,
int  pw,
int  ph 
)

ChBorderLayoutSetPreferred – set preferred border width and height for widget geometry.

Parameters
l– Pointer to Border Layout
w– Pointer to widget
pw– Preferred width
ph– preferred height

◆ ChCreateBorderLayout()

ChBorderLayout * ChCreateBorderLayout ( int  x,
int  y,
int  w,
int  h,
int  hgap,
int  vgap 
)

ChCreateBorderLayout – create a new border layout with given parameters.

Parameters
x– Border Layout X position
y– Border Layout Y position
w– Width of the Border Layout
h– height of the Border Layout
hgap– Horizontal padding between each alignment
vgap– Verical padding between each alignment