[ Lit Window Library at SourceForge[ Lit Window Productions Homepage ]  [ wxWidgets Tips&Tricks ]  [  wxVisualSetup ]

Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

RapidUI Class Reference

Collaboration diagram for RapidUI:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void AddData (const accessor &data, string name=string())
void AddDefaultRules ()
void AddRules (rules_function_t r)
void AddWindow (wxWindow *w)
rule_baseAssign (const accessor &value, const accessor &data)
rule_baseAssign (rule_base *rule)
void AssignTwoWay (const accessor &value, const accessor &data)
void AssignTwoWay (wxWindow *w, const accessor &a)
void AssignTwoWay (const string &windowName, const string &dataName)
void Clear ()
accessor GetAccessor (string name)
 Get an accessor for the variable 'name'.
accessor GetWindowAccessor (string name, bool addChangeMonitor=true)
 Get an accessor for a window attribute.
RapidUIoperator<< (rules_function_t r)
RapidUIoperator<< (const accessor &data)
RapidUIoperator<< (wxWindow *w)
void Pause ()
 Pause the RapidUI mechanism.
 RapidUI (void)
void RemoveWindow (wxWindow *w)
void Resume ()
 Resume the RapidUI mechanism.
void SetDataPrefix (string dataPrefix)
 Set the data prefix for names.
void SetWindowPrefix (string wndPrefix)
 Set the window prefix for names.
void Start ()
bool ValueChanged (const const_accessor &value, bool recursive, bool solve_immediately=true)
 Tells the solver that a value has changed.
 ~RapidUI (void)

Protected Types

typedef vector< accessor > DataList
typedef vector< string > DataName
typedef vector< rules_function_tRulesList
typedef vector< wxWindow * > WindowList

Protected Member Functions

void AddDefaultRulesForWindow (wxWindow *w)
wxWindow * FindWindow (wxWindow *searchThis, const wxString &name, bool recursive) const
wxWindow * FindWindow (const string &name, bool recursive=true) const
accessor GetDataAccessor (const string &name, bool recursive=true) const
accessor GetWindowAccessor (wxWindow *w, const string &attributeName)
accessor GetWindowAccessor (wxWindow *w)
accessor GetWindowDefaultValueAccessor (wxWindow *w)
virtual accessor lookup_variable (const string &name)
string MakeUniqueName (const accessor &a) const
 Create a unique name for accessor 'a'.

Protected Attributes

DataList m_dataList
DataName m_dataName
string m_dataNamespace
string m_dataPrefix
bool m_defaultRulesAdded
 true if the default rules have been added.
RulesList m_rulesList
constraint_solver m_solver
WindowList m_windowList
string m_wndNamespace
string m_wndPrefix

Member Typedef Documentation

typedef vector<accessor> DataList [protected]
 

typedef vector<string> DataName [protected]
 

typedef vector<rules_function_t> RulesList [protected]
 

typedef vector<wxWindow*> WindowList [protected]
 


Constructor & Destructor Documentation

RapidUI void   ) 
 

~RapidUI void   ) 
 


Member Function Documentation

void AddData const accessor &  data,
string  name = string()
 

void AddDefaultRules  ) 
 

void AddDefaultRulesForWindow wxWindow *  w  )  [protected]
 

void AddRules rules_function_t  r  ) 
 

void AddWindow wxWindow *  w  ) 
 

rule_base * Assign const accessor &  value,
const accessor &  data
 

rule_base * Assign rule_base rule  ) 
 

void AssignTwoWay const accessor &  value,
const accessor &  data
 

void AssignTwoWay wxWindow *  w,
const accessor &  a
 

void AssignTwoWay const string &  windowName,
const string &  dataName
 

void Clear  ) 
 

wxWindow * FindWindow wxWindow *  searchThis,
const wxString &  name,
bool  recursive
const [protected]
 

wxWindow * FindWindow const string &  name,
bool  recursive = true
const [protected]
 

accessor GetAccessor string  name  ) 
 

Resolve optional scope rules and look up the name in the corresponding window or data list. Scope rules are:

  • "wnd::" prefix restricts search to the window storage
  • "data::" prefix restricts search to the data storage
  • If the name starts with the windows prefix, search the window storage.
  • If the name starts with the data prefix, search in the data storage.
  • If the name does not start with any prefix, search first in the window then in the data storage.

accessor GetDataAccessor const string &  name,
bool  recursive = true
const [protected]
 

accessor GetWindowAccessor wxWindow *  w,
const string &  attributeName
[protected]
 

accessor GetWindowAccessor wxWindow *  w  )  [protected]
 

accessor GetWindowAccessor string  name,
bool  addChangeMonitor = true
 

Passing a string in the form 'name.attribute' to the method returns an accessor to the attribute of a window of that name. If addEventMonitor is true, a change monitor will be added for the attribute so that ValueChanged will be called when this attribute changes.

accessor GetWindowDefaultValueAccessor wxWindow *  w  )  [protected]
 

virtual accessor lookup_variable const string &  name  )  [protected, virtual]
 

string MakeUniqueName const accessor &  a  )  const [protected]
 

RapidUI& operator<< rules_function_t  r  ) 
 

RapidUI& operator<< const accessor &  data  ) 
 

RapidUI& operator<< wxWindow *  w  ) 
 

void Pause  ) 
 

void RemoveWindow wxWindow *  w  ) 
 

void Resume  ) 
 

void SetDataPrefix string  dataPrefix  ) 
 

Names beginning with this prefix are as assumed to be located in the data storage.

void SetWindowPrefix string  wndPrefix  ) 
 

Names beginning with this prefix are as assumed to be located in the window storage.

void Start  ) 
 

bool ValueChanged const const_accessor &  value,
bool  recursive,
bool  solve_immediately = true
 

Returns:
true if the value could be changed without violating constraints. false if a conflict occurred.


Member Data Documentation

DataList m_dataList [protected]
 

DataName m_dataName [protected]
 

string m_dataNamespace [protected]
 

string m_dataPrefix [protected]
 

bool m_defaultRulesAdded [protected]
 

RulesList m_rulesList [protected]
 

constraint_solver m_solver [protected]
 

WindowList m_windowList [protected]
 

string m_wndNamespace [protected]
 

string m_wndPrefix [protected]
 


Copyright 2004, Hajo Kirchhoff, Lit Window Productions