PieDock  1.6.3
Public Member Functions | Protected Member Functions | List of all members
PieDock::PieMenu Class Reference

#include <PieMenu.h>

Inheritance diagram for PieDock::PieMenu:
Inheritance graph
[legend]
Collaboration diagram for PieDock::PieMenu:
Collaboration graph
[legend]

Public Member Functions

 PieMenu (Application *, Surface &)
 
const bool cursorInCenter () const
 
const int & getRadius () const
 
BlendergetBlender ()
 
void invalidate ()
 
virtual bool update (std::string="", Window=0)
 
virtual bool isObsolete (int, int)
 
virtual void draw (int, int)
 
virtual void turn (double)
 
virtual void turn (int)
 
virtual void setTwistForSelection ()
 
- Public Member Functions inherited from PieDock::Menu
 Menu (Application *)
 
void setWindowBelowCursor (Window w)
 
const Window & getWindowBelowCursor () const
 
MenuItemgetSelected () const
 
const std::string & getName () const
 
virtual bool change (Settings::Action=Settings::Launch)
 
virtual void execute (Settings::Action=Settings::Launch)
 
virtual std::string getItemTitle () const
 

Protected Member Functions

virtual double getAngleDifference (double a, double b)
 
virtual double getValidAngle (double a)
 
- Protected Member Functions inherited from PieDock::Menu
ApplicationgetApp () const
 
void setSelected (MenuItem *s)
 
MenuItemsgetMenuItems () const
 
virtual int run (std::string) const
 

Detailed Description

Realize a pie menu

Author
Markus Fisch mf@ma.nosp@m.rkus.nosp@m.fisch.nosp@m..de

Constructor & Destructor Documentation

PieMenu::PieMenu ( Application a,
Surface s 
)

Initialize menu

Parameters
a- application
s- surface to draw menu into

Member Function Documentation

void PieMenu::draw ( int  x,
int  y 
)
virtual

Draw menu

Parameters
x- x coordinate of cursor position within target surface
y- y coordinate of cursor position within target surface

Reimplemented from PieDock::Menu.

References PieDock::Blender::blend(), getAngleDifference(), and getValidAngle().

Referenced by PieDock::PieMenuWindow::draw().

virtual double PieDock::PieMenu::getAngleDifference ( double  a,
double  b 
)
inlineprotectedvirtual

Return the difference of two angles in radians; implemented here to ensure the method will be compiled inline

Parameters
a- angle in radians
b- angle in radians

Referenced by draw().

virtual double PieDock::PieMenu::getValidAngle ( double  a)
inlineprotectedvirtual

Recalculate angle to be within a valid range; implemented here to ensure the method will be compiled inline

Parameters
a- angle in radians

Referenced by draw().

bool PieMenu::isObsolete ( int  x,
int  y 
)
virtual

Returns true if menu needs to be redrawn

Parameters
x- x coordinate of cursor position within target surface
y- y coordinate of cursor position within target surface

Referenced by PieDock::PieMenuWindow::draw().

void PieMenu::setTwistForSelection ( )
virtual

Set twist to have the last selected item selected again

Referenced by PieDock::PieMenuWindow::appear().

void PieMenu::turn ( double  r)
virtual

Turn menu

Parameters
r- radians to turn

Referenced by PieDock::PieMenuWindow::performAction().

void PieMenu::turn ( int  c)
virtual

Turn menu by the given number of cells

Parameters
c- cells to turn
bool PieMenu::update ( std::string  n = "",
Window  w = 0 
)
virtual

Reset and update menu

Parameters
n- menu name (optional)
w- window id (optional)

Reimplemented from PieDock::Menu.

References PieDock::Menu::update().

Referenced by PieDock::PieMenuWindow::appear().


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