A simple X window to allow online manipulation of preferences values. More...
#include <GUI/PrefsWindow.H>
Public Member Functions | |
PrefsWindow (const std::string &wintitle="preferences", const SimpleFont &font=SimpleFont::FIXED(10)) | |
Construct with a list of prefence descriptors. | |
void | setValueNumChars (int n) |
Specify the number of characters in the value editing area. | |
void | setFont (const SimpleFont &font) |
Change the window's font. | |
void | update () |
Call this periodically to retrieve new values of the preferences. | |
void | addPrefForParam (ModelParamBase *mp, ModelComponent *comp) |
Add preference items corresponding to the editable params of comp. | |
void | addPrefsForComponent (ModelComponent *comp, bool recurse=false) |
Add preference items corresponding to the editable params of comp. | |
Friends | |
class | PrefItem |
A simple X window to allow online manipulation of preferences values.
The window will show a list of your preference items. One of the items will always be the current item, highlighted by a different color.
In "scrolling" mode, the default mode, you can do the following:
In "editing" mode, you can do the following:
See PrefItem, PrefItemNum and PrefItemStr for useful preference item types that can be used with PrefsWindow.
Definition at line 74 of file PrefsWindow.H.
PrefsWindow::PrefsWindow | ( | const std::string & | wintitle = "preferences" , |
|
const SimpleFont & | font = SimpleFont::FIXED(10) | |||
) |
Construct with a list of prefence descriptors.
Definition at line 252 of file PrefsWindow.C.
void PrefsWindow::addPrefForParam | ( | ModelParamBase * | mp, | |
ModelComponent * | comp | |||
) |
Add preference items corresponding to the editable params of comp.
Definition at line 361 of file PrefsWindow.C.
Referenced by addPrefsForComponent().
void PrefsWindow::addPrefsForComponent | ( | ModelComponent * | comp, | |
bool | recurse = false | |||
) |
Add preference items corresponding to the editable params of comp.
Definition at line 405 of file PrefsWindow.C.
References addPrefForParam(), ModelParamBase::allowsOnlineChanges(), ModelComponent::getModelParam(), ModelComponent::getNumModelParams(), ModelComponent::numSubComp(), and ModelComponent::subComponent().
void PrefsWindow::setFont | ( | const SimpleFont & | font | ) |
Change the window's font.
Definition at line 293 of file PrefsWindow.C.
void PrefsWindow::setValueNumChars | ( | int | n | ) |
Specify the number of characters in the value editing area.
Definition at line 280 of file PrefsWindow.C.
void PrefsWindow::update | ( | ) |
Call this periodically to retrieve new values of the preferences.
Definition at line 303 of file PrefsWindow.C.
References ASSERT, XWinManaged::getLastButtonEvent(), and XWinManaged::getLastKeySym().