wex v24.10.0
Public Member Functions | Static Public Member Functions | List of all members
wex::statusbar Class Reference

Offers a status bar that calls virtual methods from wex::frame, and allows you to address panes by name instead of number. More...

#include <wex/ui/statusbar.h>

Inherits wxStatusBar.

Public Member Functions

 statusbar (factory::frame *parent, const data::window &data=data::window().style(wxSTB_DEFAULT_STYLE))
 Constructor.
 
const statusbar_paneget_pane (int n) const
 Returns the statusbar_pane representing the n-th pane.
 
const std::string get_statustext (const std::string &pane) const
 Returns the status text on specified pane.
 
bool pane_show (const std::string &pane, bool show)
 Shows or hides the pane.
 
bool set_statustext (const std::string &text, const std::string &pane=std::string())
 Sets text on specified pane.
 

Static Public Member Functions

static statusbarsetup (factory::frame *frame, const std::vector< statusbar_pane > &panes, long style=wxST_SIZEGRIP, const std::string &name="statusBar")
 Sets up the statusbar.
 

Detailed Description

Offers a status bar that calls virtual methods from wex::frame, and allows you to address panes by name instead of number.

Constructor & Destructor Documentation

◆ statusbar()

wex::statusbar::statusbar ( factory::frame * parent,
const data::window & data = data::window().style(wxSTB_DEFAULT_STYLE) )

Constructor.

Parameters
parentparent
datastyle
  • wxSTB_DEFAULT_STYLE (wxSTB_SIZEGRIP|wxSTB_ELLIPSIZE_END|wxSTB_SHOW_TIPS|wxFULL_REPAINT_ON_RESIZE)
  • wxSTB_ELLIPSIZE_END
  • wxSTB_ELLIPSIZE_MIDDLE
  • wxSTB_ELLIPSIZE_START
  • wxSTB_SHOW_TIPS
  • wxSTB_SIZEGRIP

Member Function Documentation

◆ get_statustext()

const std::string wex::statusbar::get_statustext ( const std::string & pane) const

Returns the status text on specified pane.

Returns empty string if pane does not exist or is not shown.

◆ pane_show()

bool wex::statusbar::pane_show ( const std::string & pane,
bool show )

Shows or hides the pane.

Returns true if pane visibility actually changed.

◆ set_statustext()

bool wex::statusbar::set_statustext ( const std::string & text,
const std::string & pane = std::string() )

Sets text on specified pane.

Returns false if pane does not exist or is not shown.

Parameters
texttext
panepane, default pane text pane,

◆ setup()

static statusbar * wex::statusbar::setup ( factory::frame * frame,
const std::vector< statusbar_pane > & panes,
long style = wxST_SIZEGRIP,
const std::string & name = "statusBar" )
static

Sets up the statusbar.

The status pane reserved for display status text messages is automatically added by the framework as the first pane. The next panes are used by the framework:

  • PaneFileType, shows file types
  • PaneInfo, shows info for control, e.g. lines
  • PaneLexer, shows lexer Returns created statusbar.