|
PieDock 1.4.3
|
#include <PieMenu.h>


Public Member Functions | |
| PieMenu (Application *, Surface &) | |
| const bool | cursorInCenter () const |
| const int & | getRadius () const |
| Blender * | getBlender () |
| virtual bool | update (std::string="") |
| virtual bool | isObsolete (int, int) |
| virtual void | draw (int, int) |
| virtual void | turn (double) |
| virtual void | turn (int) |
| virtual void | setTwistForSelection () |
Protected Member Functions | |
| virtual double | getAngleDifference (double a, double b) |
| virtual double | getValidAngle (double a) |
Protected Attributes | |
| Blender | blender |
| int | size |
| int | maxRadius |
| int | radius |
| double | twist |
| int | centerX |
| int | centerY |
| int | lastX |
| int | lastY |
| double * | turnStack |
| double * | turnBy |
Static Protected Attributes | |
| static const double | radiansPerCircle = M_PI+M_PI |
| static const double | turnSteps [] |
Realize a pie menu
| PieMenu::PieMenu | ( | Application * | a, |
| Surface & | s | ||
| ) |
Initialize menu
| a | - application |
| s | - surface to draw menu into |
| void PieMenu::draw | ( | int | x, |
| int | y | ||
| ) | [virtual] |
Draw menu
| 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 | ||
| ) | [inline, protected, virtual] |
Return the difference of two angles in radians; implemented here to ensure the method will be compiled inline
| a | - angle in radians |
| b | - angle in radians |
Referenced by draw().
| virtual double PieDock::PieMenu::getValidAngle | ( | double | a | ) | [inline, protected, virtual] |
Recalculate angle to be within a valid range; implemented here to ensure the method will be compiled inline
| a | - angle in radians |
Referenced by draw().
| bool PieMenu::isObsolete | ( | int | x, |
| int | y | ||
| ) | [virtual] |
Returns true if menu needs to be redrawn
| 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 | ( | int | c | ) | [virtual] |
Turn menu by the given number of cells
| c | - cells to turn |
| void PieMenu::turn | ( | double | r | ) | [virtual] |
| bool PieMenu::update | ( | std::string | n = "" | ) | [virtual] |
Reset and update menu
| n | - menu name (optional) |
Reimplemented from PieDock::Menu.
Referenced by PieDock::PieMenuWindow::appear().
const double PieMenu::turnSteps [static, protected] |
{
.1,
.3,
.4,
.5,
.7,
.9,
.7,
.5,
.3,
.1,
.0 }
1.7.3