Model Railroad System 2.2.2
Public Member Functions | Private Attributes | List of all members
mainwindow Class Reference

A widget that is heavily extended from the BWidget MainFrame windget. More...

Public Member Functions

 buttons_add (...)
 Method to add a button to the button menu. More...
 
 buttons_delete (index)
 Method to delete a button from the button menu. More...
 
 buttons_insert (index,...)
 Method to insert a button to the button menu. More...
 
 buttons_itemconfigure (index,...)
 Method to configure a button in the button menu. More...
 
 buttons_hide ()
 Method to hide the button menu. More...
 
 buttons_show ()
 Method to show the button menu. More...
 
 slideout_add (name)
 Method to add a new slideout frame to the main window. More...
 
 slideout_show (name)
 Method to show (display) a slideout frame. More...
 
 slideout_hide (name)
 Method to hide a slideout frame. More...
 
 slideout_getframe (name)
 Method to get the frame of a slideout frame. More...
 
 slideout_isshownp (name)
 Method to test to see if the named slideout is being shown. More...
 
 slideout_list ()
 Method to return a list of defined slideout frames. More...
 
 slideout_reqwidth (name)
 Method to return the requested width of the named slideout frame. More...
 
 toolbar_add (name)
 Method to add a toolbar to the main frame. More...
 
 toolbar_show (name)
 Method to show a toolbar. More...
 
 toolbar_hide (name)
 Method to hide a toolbar. More...
 
 toolbar_setbuttonstate (name, state)
 Method to set the state of the buttons in a toolbar. More...
 
 toolbar_addbutton (name, bname,...)
 Method to add a button to a toolbar. More...
 
 toolbar_buttonconfigure (name, bname,...)
 Method to configure a button on a toolbar. More...
 
 toolbar_buttoncget (name, bname, option)
 Method to get a configuration option of a button on a toolbar. More...
 
 menu_activate (menuid, index)
 Method to activate a menu on the main frame. More...
 
 menu_add (menuid, entrytype,...)
 Method to add a menu entry to a menu on the main frame. More...
 
 menu_delete (menuid, index,...)
 Method to delete an entry from a menu. More...
 
 menu_entrycget (menuid, index, option)
 Method to get an option value of a menu entry. More...
 
 menu_entryconfigure (menuid, index,...)
 Method to configure options of a menu entry. More...
 
 menu_sethelpvar (menuid)
 Method to set the bind the status line to the help variable of the menu. More...
 
 menu_index (menuid, index)
 Method to get the index of a menu entry. More...
 
 menu_insert (menuid, index, entrytype,...)
 Method to insert a menu entry to a menu on the main frame. More...
 
 menu_invoke (menuid, index)
 Method to invoke a menu entry. More...
 
 menu_type (menuid, index)
 Method to return the type of a menu entry. More...
 
 showit (extraX=0)
 Method to show the main window. More...
 
 setstatus (statusmessage)
 Method to set the status message. More...
 
 setprogress (progressvalue)
 Method to set the progress bar value. More...
 
 mainwindow (name,...)
 Constructor build a full featured main window. More...
 

Private Attributes

 scrollwindow
 ScrollWindow component. More...
 
 wipmessage
 Work-In-Progress message component. More...
 
 buttons
 Right button box. More...
 
 panewindow
 PaneWindow holding the main area and the right widgets (command buttons and the slideouts). More...
 
 slideouts
 Slideout map. More...
 
 toolbars
 Toolbar map. More...
 
 numtoolbars
 The number of toolbars. More...
 
 progress
 The value of the progreee bar. More...
 
 status
 Status value. More...
 

Detailed Description

A widget that is heavily extended from the BWidget MainFrame windget.

This widget starts with a MainFrame, and adds a paned window with a scrolled window and a button menu, and zero or more slide out frames. also management methods for toolbars and for menus.

Parameters
pathThe widget path.
...Options:
  • -menu The basic MainFrame -menu option. Defaults to the Motif standard set of menus (File, Edit, View, Options, and Help).
  • -extramenus Like the basic MainFrame -menu option, but can be used when the just additional menus need to be added to the standard set.
  • -height Widget height. Delegated to the hull (MainFrame) widget.
  • -width Widget width. Delegated to the hull (MainFrame) widget.
  • -separator Include a separator between windows on the MainFrame widget.
  • -dontwithdraw Boolean to suppress withdrawing the toplevel while it is being built.
  • -scrolling Boolean to enable the scrollwindow.
Author
Robert Heller <heller@deepsoft.com>

Package provided

MainWindow 1.0

Constructor & Destructor Documentation

◆ mainwindow()

mainwindow::mainwindow ( name  ,
  ... 
)

Constructor build a full featured main window.

Parameters
...Option value list.

Member Function Documentation

◆ buttons_add()

mainwindow::buttons_add (   ...)

Method to add a button to the button menu.

See the ButtonBox add method.

Parameters
...Arguments passed to the ButtonBox add method.

◆ buttons_delete()

mainwindow::buttons_delete ( index  )

Method to delete a button from the button menu.

See the ButtonBox delete method.

Parameters
indexPassed to the ButtonBox delete method.

◆ buttons_hide()

mainwindow::buttons_hide ( )

Method to hide the button menu.

◆ buttons_insert()

mainwindow::buttons_insert ( index  ,
  ... 
)

Method to insert a button to the button menu.

See the ButtonBox insert method.

Parameters
...Arguments passed to the ButtonBox insert method.

◆ buttons_itemconfigure()

mainwindow::buttons_itemconfigure ( index  ,
  ... 
)

Method to configure a button in the button menu.

See the ButtonBox itemconfigure method.

Parameters
indexArgument passed to the ButtonBox itemconfigure method.
...Arguments passed to the ButtonBox itemconfigure method.

◆ buttons_show()

mainwindow::buttons_show ( )

Method to show the button menu.

◆ menu_activate()

mainwindow::menu_activate ( menuid  ,
index   
)

Method to activate a menu on the main frame.

Parameters
menuidMenu id.
indexMenu item index.

◆ menu_add()

mainwindow::menu_add ( menuid  ,
entrytype  ,
  ... 
)

Method to add a menu entry to a menu on the main frame.

Parameters
menuidMenu id.
entrytypeThe type of entry.
...The arguments to pass to the entry creation command.

◆ menu_delete()

mainwindow::menu_delete ( menuid  ,
index  ,
  ... 
)

Method to delete an entry from a menu.

Parameters
menuidMenu id.
indexMenu item index.
...The arguments to pass to the menu delete command.

◆ menu_entrycget()

mainwindow::menu_entrycget ( menuid  ,
index  ,
option   
)

Method to get an option value of a menu entry.

Parameters
menuidMenu id.
indexMenu item index.
optionThe option to fetch.

◆ menu_entryconfigure()

mainwindow::menu_entryconfigure ( menuid  ,
index  ,
  ... 
)

Method to configure options of a menu entry.

Parameters
menuidMenu id.
indexMenu item index.
...The arguments to pass on to entryconfigure.

◆ menu_index()

mainwindow::menu_index ( menuid  ,
index   
)

Method to get the index of a menu entry.

Parameters
menuidMenu id.
indexThe index of the menu entry.

◆ menu_insert()

mainwindow::menu_insert ( menuid  ,
index  ,
entrytype  ,
  ... 
)

Method to insert a menu entry to a menu on the main frame.

Parameters
menuidMenu id.
indexThe index to insert before.
entrytypeThe type of entry.
...The arguments to pass to the entry creation command.

◆ menu_invoke()

mainwindow::menu_invoke ( menuid  ,
index   
)

Method to invoke a menu entry.

Parameters
menuidMenu id.
indexThe index to invoke.

◆ menu_sethelpvar()

mainwindow::menu_sethelpvar ( menuid  )

Method to set the bind the status line to the help variable of the menu.

Parameters
menuidMenu id.

◆ menu_type()

mainwindow::menu_type ( menuid  ,
index   
)

Method to return the type of a menu entry.

Parameters
menuidMenu id.
indexThe index to get the type of.

◆ setprogress()

mainwindow::setprogress ( progressvalue  )

Method to set the progress bar value.

Parameters
progressvalueThe amount of the progress.

◆ setstatus()

mainwindow::setstatus ( statusmessage  )

Method to set the status message.

Parameters
statusmessageThe status message to display.

◆ showit()

mainwindow::showit ( extraX  = 0)

Method to show the main window.

Parameters
extraXExtra width to add when computing the position to map the window at. Defaults to 0.

◆ slideout_add()

mainwindow::slideout_add ( name  )

Method to add a new slideout frame to the main window.

A slide out frame is a frame that can be packed and unpacked as needed and is shown in the right pane of the pane window.

Parameters
nameThe name of the slideout frame.

◆ slideout_getframe()

mainwindow::slideout_getframe ( name  )

Method to get the frame of a slideout frame.

Parameters
nameThe name of the slideout.

◆ slideout_hide()

mainwindow::slideout_hide ( name  )

Method to hide a slideout frame.

Parameters
nameThe name of the slideout.

◆ slideout_isshownp()

mainwindow::slideout_isshownp ( name  )

Method to test to see if the named slideout is being shown.

Parameters
nameThe name of the slideout.

◆ slideout_list()

mainwindow::slideout_list ( )

Method to return a list of defined slideout frames.

◆ slideout_reqwidth()

mainwindow::slideout_reqwidth ( name  )

Method to return the requested width of the named slideout frame.

Parameters
nameThe name of the slideout.

◆ slideout_show()

mainwindow::slideout_show ( name  )

Method to show (display) a slideout frame.

Parameters
nameThe name of the slideout.

◆ toolbar_add()

mainwindow::toolbar_add ( name  )

Method to add a toolbar to the main frame.

Parameters
nameThe name of the new toolbar.

◆ toolbar_addbutton()

mainwindow::toolbar_addbutton ( name  ,
bname  ,
  ... 
)

Method to add a button to a toolbar.

Parameters
nameThe name of the toolbar.
bnameThe name of the button.
...Button configuration options (passed to Button).

◆ toolbar_buttoncget()

mainwindow::toolbar_buttoncget ( name  ,
bname  ,
option   
)

Method to get a configuration option of a button on a toolbar.

Parameters
nameThe name of the toolbar.
bnameThe name of the button.
optionButton configuration option (passed to cget).

◆ toolbar_buttonconfigure()

mainwindow::toolbar_buttonconfigure ( name  ,
bname  ,
  ... 
)

Method to configure a button on a toolbar.

Parameters
nameThe name of the toolbar.
bnameThe name of the button.
...Button configuration options (passed to configure).

◆ toolbar_hide()

mainwindow::toolbar_hide ( name  )

Method to hide a toolbar.

Parameters
nameThe name of the toolbar.

◆ toolbar_setbuttonstate()

mainwindow::toolbar_setbuttonstate ( name  ,
state   
)

Method to set the state of the buttons in a toolbar.

Parameters
nameThe name of the toolbar.

◆ toolbar_show()

mainwindow::toolbar_show ( name  )

Method to show a toolbar.

Parameters
nameThe name of the toolbar.

Member Data Documentation

◆ buttons

mainwindow::buttons
private

Right button box.

◆ numtoolbars

mainwindow::numtoolbars
private

The number of toolbars.

◆ panewindow

mainwindow::panewindow
private

PaneWindow holding the main area and the right widgets (command buttons and the slideouts).

◆ progress

mainwindow::progress
private

The value of the progreee bar.

◆ scrollwindow

mainwindow::scrollwindow
private

ScrollWindow component.

◆ slideouts

mainwindow::slideouts
private

Slideout map.

◆ status

mainwindow::status
private

Status value.

◆ toolbars

mainwindow::toolbars
private

Toolbar map.

◆ wipmessage

mainwindow::wipmessage
private

Work-In-Progress message component.