PieDock  1.6.3
Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
PieDock::Settings Class Reference

#include <Settings.h>

Classes

struct  ButtonFunction
 
struct  CartoucheSettings
 
struct  KeyFunction
 
struct  Trigger
 
struct  WorkspaceDisplaySettings
 

Public Types

enum  Action {
  NoAction, Launch, ShowNext, ShowPrevious,
  ShowWindows, Hide, Close, SpinUp,
  SpinDown, SpinNext, SpinPrevious, Disappear
}
 
enum  CenterAction { CenterIgnore, CenterNearestIcon, CenterDisappear }
 
typedef struct
PieDock::Settings::Trigger 
Key
 
typedef struct
PieDock::Settings::Trigger 
Button
 
typedef std::vector< Key > Keys
 
typedef std::vector< Button > Buttons
 
typedef std::vector
< ButtonFunction > 
ButtonFunctions
 
typedef std::vector< KeyFunction > KeyFunctions
 
typedef std::map< std::string,
MenuItems > 
Menus
 
typedef std::map< std::string,
bool > 
WindowsToIgnore
 

Public Member Functions

const std::string & getConfigurationFile () const
 
void setConfigurationFile (std::string s)
 
const int & getWidth () const
 
const int & getHeight () const
 
Keys & getKeys ()
 
Buttons & getButtons ()
 
KeyFunctions & getKeyFunctions ()
 
IconMap & getIconMap ()
 
MenuItems * getMenu (std::string s)
 
bool ignoreWindow (std::string s)
 
ActiveIndicator & getActiveIndicator ()
 
const int & getFocusedAlpha () const
 
const int & getUnfocusedAlpha () const
 
const double & getStartRadius () const
 
const bool & isFitts () const
 
const double & getZoomModifier () const
 
const CenterAction & getCenterAction () const
 
const double & getSpinStep () const
 
const bool & getShowTitle () const
 
const Text::Font & getTitleFont () const
 
const CartoucheSettings & getCartoucheSettings () const
 
const int & getMinimumNumber () const
 
const WorkspaceDisplaySettings & getWorkspaceDisplaySettings () const
 
virtual void setConfigurationFileFromBinary (std::string)
 
virtual ButtonFunctions getButtonFunctions (const std::string &menu=std::string(), MenuItem *item=0)
 
virtual void load (Display *d)
 

Protected Member Functions

virtual int readMenu (std::istream &, int, std::string)
 
virtual void clearMenus ()
 
virtual Action resolveActionString (const std::string &) const
 
virtual unsigned int resolveButtonCode (const std::string &) const
 
virtual void throwParsingError (const char *, unsigned int) const
 
virtual void presizeIcon (Icon *, int, int, int, int, int, int)
 

Detailed Description

Settings

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

Member Function Documentation

void Settings::clearMenus ( )
protectedvirtual

Delete menu items

Referenced by load().

Settings::ButtonFunctions Settings::getButtonFunctions ( const std::string &  menu = std::string(),
MenuItem *  item = 0 
)
virtual

Returns the mouse button functions for the given menu and icon

Parameters
menu- currently active menu name
item- currently selected item

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

void Settings::load ( Display *  d)
virtual
void Settings::presizeIcon ( Icon *  icon,
int  fromWidth,
int  fromHeight,
int  toWidth,
int  toHeight,
int  xStep,
int  yStep 
)
protectedvirtual

Presize icon

Parameters
icon- icon to presize
fromWidth- width in pixels of smallest size
fromHeight- height in pixels of smallest size
toWidth- width in pixels of biggest size
toHeight- height in pixels of biggest size
xStep- horizontal step in pixels
yStep- vertical step in pixels

Referenced by load().

int Settings::readMenu ( std::istream &  in,
int  line,
std::string  menuName 
)
protectedvirtual

Read a menu structure

Parameters
in- in stream
line- in which line the menu starts
menuName- name of this menu

References resolveActionString(), resolveButtonCode(), and throwParsingError().

Referenced by load().

Settings::Action Settings::resolveActionString ( const std::string &  s) const
protectedvirtual

Resolve action string

Parameters
s- name of action to resolve

Referenced by load(), and readMenu().

unsigned int Settings::resolveButtonCode ( const std::string &  s) const
protectedvirtual

Resolve X11 mouse button code

Parameters
s- button number as string

Referenced by load(), and readMenu().

void Settings::setConfigurationFileFromBinary ( std::string  b)
virtual

Set configuration file from binary

Parameters
b- name of binary

References PieDock::Environment::getHome().

void Settings::throwParsingError ( const char *  message,
unsigned int  line 
) const
protectedvirtual

Throw a parsing error

Parameters
message- error message
line- line number

Referenced by load(), and readMenu().


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