Adobe Systems Incorporated

window_server_t Class Reference

#include <window_server.hpp>

List of all members.

Public Types

typedef boost::function< void(const
name_t &, const any_regular_t &)> 

Public Member Functions

void dispatch_action (name_t action, const any_regular_t &parameter)
void push_back (std::istream &data, const boost::filesystem::path &file_path, const line_position_t::getline_proc_t &getline_proc, size_enum_t dialog_size)
void push_back (const char *name, size_enum_t dialog_size)
void set_action_fallback (action_fallback_proc_t proc)
void set_widget_factory (const widget_factory_t &factory)
std::size_t size () const
eve_client_holdertop_client_holder ()
 window_server_t (sheet_t &sheet, behavior_t &behavior)
 ~window_server_t ()

Detailed Description

The window_server_t class can open Eve definitions from file and input stream, and can display them. It also looks after all of the memory allocated to display an Eve definition.

Definition at line 59 of file window_server.hpp.

Member Typedef Documentation

typedef boost::function<void (const name_t&, const any_regular_t&)> action_fallback_proc_t

Definition at line 62 of file window_server.hpp.

Constructor & Destructor Documentation

window_server_t ( sheet_t sheet,
behavior_t behavior 

This constructor tells the window_server_t where to find Eve definitions referenced in commands, and which sheet to bind against.

sheetthe sheet to bind against. This sheet should contain all of the cells referenced in the Eve file which is loaded (either via push_back or ).

Hide and release all Eve dialogs created by this window server.

Member Function Documentation

void dispatch_action ( name_t  action,
const any_regular_t parameter 

This function can be used to send an action to the open windows, however it is only useful in debug mode (where it can be used to frame and unframe visible widgets). It will probably be changed soon.

actionthe action to perform.
parameterthe parameter associated with the action.
void push_back ( const char *  name,
size_enum_t  dialog_size 

Load the given file out of the directory_path and display the dialog it contains. If the file cannot be found, or the file contains errors (e.g.: syntax errors, references non-existant widgets) then an exception is thrown.

namethe name of the Eve file inside the directory given to the constructor.
dialog_sizethe size of the dialog to create, note that individual widgets may override this value in the Eve file.
void push_back ( std::istream &  data,
const boost::filesystem::path &  file_path,
const line_position_t::getline_proc_t getline_proc,
size_enum_t  dialog_size 

Load an Eve definition from the given std::istream and display the dialog it contains. If any errors are found in the data then an exception is thrown.

dataan std::istream open on the Eve definition to be loaded.
ident_pairidentification name and callback proc (two parameters) that represents the data stream
dialog_sizethe size of the dialog to create, note that individual widgets may override this value in the Eve definition.
void set_action_fallback ( action_fallback_proc_t  proc )

Some widgets, such as buttons in UI core, have an action property. When an action is invoked (e.g.: a button with an action value) the procedure given to this function is invoked. This provides an easy way to get feedback from a GUI.

Note that some actions are automatically handled, these are: , and .

procthe function to call when a widget with an action is "activated".
void set_widget_factory ( const widget_factory_t factory )

The window server can use different widget factories if custom widgets need to be made. By default the window server will use the "default_factory" function, but an alternative function can be specified here. Note that push_back just uses the current factory, so if a custom factory is desired then it must be set before using push_back.

factorythe new widget factory to use.

Definition at line 123 of file window_server.hpp.

std::size_t size (  ) const

Return the number of windows which this window_server has open.

the number of windows which this window_server has open.

Definition at line 155 of file window_server.hpp.

eve_client_holder& top_client_holder (  )
The top eve client holder in the window list

Copyright © 2006-2007 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google