Milo  0.1
Milo:EquationManipulationProgram
Static Public Member Functions | Static Protected Attributes | List of all members
UI::MiloPanel Class Referenceabstract

#include <ui.h>

Inheritance diagram for UI::MiloPanel:
Inheritance graph
[legend]

Public Member Functions

Constructors and Virtual Destructor
 MiloPanel ()
 
 ~MiloPanel ()
 
Virtual Public Member Functions
virtual void doKey (const UI::KeyEvent &key)=0
 
virtual void doMouse (const UI::MouseEvent &mouse)=0
 
virtual bool doMenu (const std::string &menuFunctionName)=0
 
virtual void doDraw ()=0
 
virtual void pushUndo ()=0
 
virtual void popUndo ()=0
 
virtual void saveState (std::ostream &fs)=0
 
virtual void loadState (std::istream &is)=0
 
void saveState (const std::string &filename)
 
void loadState (const std::string &filename)
 
virtual bool blink ()=0
 
virtual void getCursorOrig (int &x, int &y)=0
 

Static Public Member Functions

static MiloPanelPtr makePanel (const std::string &name, const std::string &init)
 

Static Protected Attributes

static std::unordered_map< std::string, panel_factory > panel_map
 Map of name to panel create functions.
 

Detailed Description

MiloPanel is an abstract base class interface for all milo panels. This will provide hooks into the user interface.

Constructor & Destructor Documentation

UI::MiloPanel::MiloPanel ( )
inline

Constructor for MiloPanel initializing graphics context

UI::MiloPanel::~MiloPanel ( )
inline

Virtual deconstructor for MiloPanel initializing graphics context

Member Function Documentation

virtual bool UI::MiloPanel::blink ( )
pure virtual

Check where there is an active input in this panel.

Returns
If true, there is an active input.

Implemented in UI::EqnPanel.

virtual void UI::MiloPanel::doDraw ( )
pure virtual

Handle redraw event

Implemented in UI::EqnPanel.

virtual void UI::MiloPanel::doKey ( const UI::KeyEvent &  key)
pure virtual

Handle key event for panel

Parameters
keyKey event

Implemented in UI::EqnPanel.

virtual bool UI::MiloPanel::doMenu ( const std::string &  menuFunctionName)
pure virtual

Execute panel specific function based on its name. Used for menu handling.

Parameters
menuFunctionNameName of menu function to be executed.
Returns
True if menuFunctionName found.

Implemented in UI::EqnPanel.

virtual void UI::MiloPanel::doMouse ( const UI::MouseEvent &  mouse)
pure virtual

Handle mouse event for panel

Parameters
mouseMouse event

Implemented in UI::EqnPanel.

virtual void UI::MiloPanel::getCursorOrig ( int &  x,
int &  y 
)
pure virtual

Get coordinates of current active input.

Parameters
[out]xHorizontal origin of curosr.
[out]yVertical origin cursor.

Implemented in UI::EqnPanel.

virtual void UI::MiloPanel::loadState ( std::istream &  is)
pure virtual

Load panel from XML stream.

Parameters
isinput stream

Implemented in UI::EqnPanel.

void UI::MiloPanel::loadState ( const std::string &  filename)
inline

Load panel from file

Parameters
filenameName of file
MiloPanelPtr MiloPanel::makePanel ( const std::string &  name,
const std::string &  init 
)
static

Get a smart pointer to a panel class object by name.

Parameters
nameName of panel class object to create
initInitilization xml string
Returns
Smart pointer to panel class object
virtual void UI::MiloPanel::popUndo ( )
pure virtual

Restore state of panel on top of undo stack.

Implemented in UI::EqnPanel.

virtual void UI::MiloPanel::pushUndo ( )
pure virtual

Push state of panel to undo stack.

Implemented in UI::EqnPanel.

virtual void UI::MiloPanel::saveState ( std::ostream &  fs)
pure virtual

Save panel to XML stream

Parameters

Implemented in UI::EqnPanel.

void UI::MiloPanel::saveState ( const std::string &  filename)
inline

Save panel to file

Parameters
filenameName of file

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