sptk2 logo
SPTK Home Page
Public Member Functions | Static Public Member Functions | List of all members
sptk::CMenuBar Class Reference

Menu bar. More...

#include <CMenuBar.h>

Inheritance diagram for sptk::CMenuBar:
sptk::CLayoutClient

Public Member Functions

 CMenuBar ()
 
bool preferredSize (int &w, int &h) override
 
String className () const override
 Returns widget class name (internal SPTK RTTI). More...
 
- Public Member Functions inherited from sptk::CLayoutClient
 CLayoutClient (Fl_Widget *widget, int layoutSize, CLayoutAlign ca)
 
virtual ~CLayoutClient ()
 
CLayoutAlign layoutAlign () const
 
void layoutAlign (CLayoutAlign al)
 
int layoutSize () const
 
void layoutSize (int ls)
 
virtual void label (const String &l)
 
virtual const Stringlabel () const
 
void name (const char *aname)
 
void name (const String &aname)
 
const Stringname () const
 
virtual bool preferredSize (int &w, int &h)
 
virtual bool computeSize (int &w, int &h)
 
virtual String className () const
 
Fl_Widget * widget () const
 
virtual void load (const xdoc::SNode &node, CLayoutXMLmode xmlMode)
 
virtual void load (const std::shared_ptr< xdoc::Node > &node)
 
virtual void save (const std::shared_ptr< xdoc::Node > &node, CLayoutXMLmode xmlMode) const
 

Static Public Member Functions

static CLayoutClientcreator (const xdoc::SNode &node)
 Creates a widget based on the XML node information. More...
 

Additional Inherited Members

- Protected Member Functions inherited from sptk::CLayoutClient
int lastPreferredH () const
 
int lastPreferredW () const
 
void lastPreferredH (int height)
 
void lastPreferredW (int width)
 
- Protected Attributes inherited from sptk::CLayoutClient
Fl_Widget * m_widget
 
String m_name
 
String m_label
 
CLayoutAlign m_layoutAlign
 

Detailed Description

Menu bar.

Extended version of FLTK's standard Fl_Menu_Bar. Added the CLayoutClient interface and preferred size computations.

Constructor & Destructor Documentation

◆ CMenuBar()

sptk::CMenuBar::CMenuBar ( )
inline

Default constructor

References TOP.

Member Function Documentation

◆ className()

String sptk::CMenuBar::className ( ) const
inlineoverridevirtual

Returns widget class name (internal SPTK RTTI).

Reimplemented from sptk::CLayoutClient.

◆ creator()

static CLayoutClient * sptk::CMenuBar::creator ( const xdoc::SNode &  node)
inlinestatic

Creates a widget based on the XML node information.

Parameters
nodexml::Node*, an XML node with widget information

References LAYOUTDATA, and sptk::CLayoutClient::load().

◆ preferredSize()

bool sptk::CMenuBar::preferredSize ( int &  w,
int &  h 
)
inlineoverridevirtual

Computes the optimal menu size

Parameters
wint&, input - width offered by the program, output - width required by widget
hint&, input - height offered by the program, output - height required by widget

Reimplemented from sptk::CLayoutClient.


The documentation for this class was generated from the following file:

Fri Oct 14 2022 09:58:38: SPTK 5.4.1