#include <CLayoutClient.h>
Base layout manager client.
Allows CLayoutManager objects to move and resize the CLayoutClient objects in accordancy with they preferredSize() and layout alignment.
◆ CLayoutClient()
sptk::CLayoutClient::CLayoutClient |
( |
Fl_Widget * |
widget, |
|
|
int |
layoutSize, |
|
|
CLayoutAlign |
ca |
|
) |
| |
Constructor
- Parameters
-
widget | Fl_Widget*, widget to control |
layoutSize | int, the size of the widget in layout. See m_layoutSize for more information. |
ca | CLayoutAlign, widget align in layout |
◆ ~CLayoutClient()
virtual sptk::CLayoutClient::~CLayoutClient |
( |
| ) |
|
|
inlinevirtual |
◆ className()
virtual String sptk::CLayoutClient::className |
( |
| ) |
const |
|
inlinevirtual |
Returns widget class name (internal SPTK RTTI).
Reimplemented in sptk::CSplitter, sptk::CTabs, sptk::CToolBar, sptk::CBox, sptk::CBaseButton, sptk::CCheckButtons, sptk::CComboBox, sptk::CListBox, sptk::CControl, sptk::CDateIntervalInput, sptk::CDateInput, sptk::CTimeInput, sptk::CDateTimeInput, sptk::CDialog, sptk::CFloatInput, sptk::CFontComboBox, sptk::CGroup, sptk::CHtmlBox, sptk::CInput, sptk::CIntegerInput, sptk::CListView, sptk::CMemoInput, sptk::CMenuBar, sptk::CPhoneNumberInput, sptk::CRadioButtons, sptk::CScroll, sptk::CScrollBar, sptk::CTreeItem, sptk::CTreeControl, sptk::CTreeView, and sptk::CWindow.
◆ computeSize()
virtual bool sptk::CLayoutClient::computeSize |
( |
int & |
w, |
|
|
int & |
h |
|
) |
| |
|
inlinevirtual |
Computes widget's preferred size, and stores size values internally as cache
Used internally by CLayoutManager.
- Parameters
-
w | int&, input/output widget preferred width |
h | int&, input/output widget preferred height |
◆ label() [1/2]
virtual const String & sptk::CLayoutClient::label |
( |
| ) |
const |
|
inlinevirtual |
◆ label() [2/2]
virtual void sptk::CLayoutClient::label |
( |
const String & |
l | ) |
|
|
inlinevirtual |
◆ lastPreferredH() [1/2]
int sptk::CLayoutClient::lastPreferredH |
( |
| ) |
const |
|
protected |
- Returns
- last preferred height
◆ lastPreferredH() [2/2]
void sptk::CLayoutClient::lastPreferredH |
( |
int |
height | ) |
|
|
protected |
Set last preferred height
- Parameters
-
◆ lastPreferredW() [1/2]
int sptk::CLayoutClient::lastPreferredW |
( |
| ) |
const |
|
protected |
- Returns
- last preferred width
◆ lastPreferredW() [2/2]
void sptk::CLayoutClient::lastPreferredW |
( |
int |
width | ) |
|
|
protected |
Set last preferred width
- Parameters
-
◆ layoutAlign() [1/2]
Returns widget's layout align
- See also
- CLayoutAlign
◆ layoutAlign() [2/2]
Sets widget's layout align
- See also
- CLayoutAlign
◆ layoutSize() [1/2]
int sptk::CLayoutClient::layoutSize |
( |
| ) |
const |
|
inline |
Returns widget's layout size
◆ layoutSize() [2/2]
void sptk::CLayoutClient::layoutSize |
( |
int |
ls | ) |
|
|
inline |
Sets widget's layout size
◆ load() [1/2]
virtual void sptk::CLayoutClient::load |
( |
const std::shared_ptr< xdoc::Node > & |
node | ) |
|
|
inlinevirtual |
Loads layout client information from XML node
Layout information may also include widget size and position, as well as visible() and active() states
- Parameters
-
Reimplemented in sptk::CWindow.
References LAYOUT.
◆ load() [2/2]
virtual void sptk::CLayoutClient::load |
( |
const xdoc::SNode & |
node, |
|
|
CLayoutXMLmode |
xmlMode |
|
) |
| |
|
virtual |
◆ name() [1/3]
const String & sptk::CLayoutClient::name |
( |
| ) |
const |
|
inline |
◆ name() [2/3]
void sptk::CLayoutClient::name |
( |
const char * |
aname | ) |
|
|
inline |
Sets the new widget name
- Parameters
-
aname | const char*, new widget name |
◆ name() [3/3]
void sptk::CLayoutClient::name |
( |
const String & |
aname | ) |
|
|
inline |
Sets the new widget name
- Parameters
-
◆ preferredSize()
virtual bool sptk::CLayoutClient::preferredSize |
( |
int & |
w, |
|
|
int & |
h |
|
) |
| |
|
inlinevirtual |
Computes widget's preferred size.
Should be overriten in derived widget if it has any ideas about it's size limits. Widget may want to change none, one, or both preferred width and height suggested by the CLayoutManager.
- Parameters
-
w | int&, input/output widget preferred width |
h | int&, input/output widget preferred height |
- Returns
- true if the size is stable (doesn't depend on input sizes)
Reimplemented in sptk::CToolBar, sptk::CBox, sptk::CBaseButton, sptk::CButtonGroup, sptk::CCheckButton, sptk::CBaseListBox, sptk::CDBDropDownList, sptk::CEditor, sptk::CGroup, sptk::CHtmlBox, sptk::CInput_, sptk::CInput, sptk::CListView, sptk::CMemoInput, sptk::CMenuBar, sptk::CProgressBar, sptk::CScroll, sptk::CScrollBar, sptk::CTreeItem, and sptk::CWindow.
◆ save()
Saves layout client information from XML node
Layout information may also include widget size and position, as well as visible() and active() states
- Parameters
-
node | the XML node |
xmlMode | the mode defining how the layout and/or data should be stored |
Reimplemented in sptk::CButton, and sptk::CWindow.
◆ widget()
Fl_Widget * sptk::CLayoutClient::widget |
( |
| ) |
const |
|
inline |
Returns widget handled by that object
◆ m_label
String sptk::CLayoutClient::m_label |
|
protected |
◆ m_layoutAlign
◆ m_name
String sptk::CLayoutClient::m_name |
|
protected |
◆ m_widget
Fl_Widget* sptk::CLayoutClient::m_widget |
|
protected |
The documentation for this class was generated from the following file: