XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Enumerations | Functions
border_layout.h File Reference
#include "..\window.h"
#include "..\list.h"
#include <_xeneva.h>
Include dependency graph for border_layout.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ChBorderItem
 
struct  _ChBorderLayout_
 

Macros

#define CH_WIDEGT_BORDERLAYOUT   0x20
 

Typedefs

typedef struct _ChBorderLayout_ ChBorderLayout
 

Enumerations

enum  ChBorderAlignment {
  CH_BORDER_ALIGN_CENTER = 0 , CH_BORDER_ALIGN_TOP , CH_BORDER_ALIGN_BOTTOM , CH_BORDER_ALIGN_LEFT ,
  CH_BORDER_ALIGN_RIGHT
}
 

Functions

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

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

◆ CH_WIDEGT_BORDERLAYOUT

#define CH_WIDEGT_BORDERLAYOUT   0x20

Typedef Documentation

◆ ChBorderLayout

Enumeration Type Documentation

◆ ChBorderAlignment

Enumerator
CH_BORDER_ALIGN_CENTER 
CH_BORDER_ALIGN_TOP 
CH_BORDER_ALIGN_BOTTOM 
CH_BORDER_ALIGN_LEFT 
CH_BORDER_ALIGN_RIGHT 

Function Documentation

◆ ChBorderLayoutAdd()

XE_EXPORT 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()

XE_EXPORT void ChBorderLayoutDoLayout ( ChBorderLayout *  l)

ChBorderLayoutDoLayout – reorganise/refresh sel.

Parameters
l– Pointer to border layout

NORTH : following java.swing styled border layout

◆ ChBorderLayoutResize()

XE_EXPORT 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()

XE_EXPORT 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()

XE_EXPORT 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()

XE_EXPORT 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