30#include <sptk5/Exception.h>
31#include <sptk5/gui/CFrame.h>
32#include <sptk5/gui/CLayoutClient.h>
33#include <sptk5/xdoc/Node.h>
104 friend class CLayoutManagerInitializer;
158 bool autoLayout(
int x,
int y,
int& w,
int& h,
bool resizeWidgets)
const;
189 return m_layoutSpacing;
198 m_layoutSpacing = ls;
208 m_layoutGrowMode = gm;
217 return m_layoutGrowMode;
234 m_frameDrawBackground = drawBackground;
Frame information class.
Definition: CFrame.h:48
Definition: CLayoutClient.h:82
Layout Manager.
Definition: CLayoutManager.h:103
virtual void paintBackground()
void layoutGrowMode(CLayoutGrowMode gm=CLayoutGrowMode::LGM_AUTO_GROW)
Definition: CLayoutManager.h:206
void layoutSpacing(int ls)
Definition: CLayoutManager.h:196
CFrame * m_frame
Definition: CLayoutManager.h:125
void frame(CFrame *frame, bool drawBackground=true)
Defines frame.
Definition: CLayoutManager.h:231
void noXml(bool noXml)
Sets flag of blocking XML processing.
Definition: CLayoutManager.h:295
CLayoutManager(Fl_Group *group, int layoutSize, CLayoutAlign ca)
virtual void saveLayout(const xdoc::SNode &node, CLayoutXMLmode xmlMode) const
Saves group controls data into XML node.
virtual void loadLayout(const xdoc::SNode &node, CLayoutXMLmode xmlMode)
Loads group controls data from XML node.
const CFrame * frame() const
Returnes the current frame.
Definition: CLayoutManager.h:240
int m_layoutSpacing
Definition: CLayoutManager.h:110
bool noXml() const
Returns flag of blocking XML processing.
Definition: CLayoutManager.h:282
bool autoLayout(int x, int y, int &w, int &h, bool resizeWidgets) const
static std::map< std::string, Fl_Boxtype > m_boxTypeNames
Definition: CLayoutManager.h:141
static void registerControl(std::string typeName, createControlCallback creator) noexcept
Register control type for loading layouts.
int layoutSpacing() const
Definition: CLayoutManager.h:187
static createControlCallbackMap controlCreator
Definition: CLayoutManager.h:146
virtual void clear()
Removes all the children.
void nameIndex(CWidgetNamesMap &index, bool recursive, bool clean=true) const
Builds an index of internal widget names.
uint32_t frameWidth() const
Returns frame width.
CLayoutGrowMode m_layoutGrowMode
Definition: CLayoutManager.h:115
bool m_noXml
Definition: CLayoutManager.h:135
Fl_Group * m_group
Definition: CLayoutManager.h:120
static const std::map< std::string, Fl_Boxtype > & boxTypeNames()
Returns a read-only map of box type names and corresponding constants.
~CLayoutManager() override=default
CLayoutGrowMode layoutGrowMode() const
Definition: CLayoutManager.h:215
bool m_frameDrawBackground
Definition: CLayoutManager.h:130
std::map< std::string, createControlCallback > createControlCallbackMap
A callback map that stores type names and control create functions.
Definition: CLayoutManager.h:55
std::map< std::string, Fl_Widget * > CWidgetNamesMap
a map of widget names to widgets
Definition: CLayoutManager.h:60
CLayoutAlign
Definition: CLayoutClient.h:44
CLayoutXMLmode
Definition: CLayoutClient.h:57
CLayoutClient *(*)(const xdoc::SNode &node) createControlCallback
A callback that creates a control of the required type.
Definition: CLayoutManager.h:50
CLayoutGrowMode
Layout manager grow mode.
Definition: CLayoutManager.h:69