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

ndk::engine Class Reference

Collaboration diagram for ndk::engine:

Collaboration graph
List of all members.

Public Types

typedef functor< event::result,
typedef functor< event::result,
typedef functor< event::result,

Public Member Functions

 engine (engine *parent, ncurses::panel *geometry)
 engine ()
 ~engine ()
void exec ()
void get ()
void in_focus (engine *)
void switch_to (engine *item)
void set_accept (bool)
bool accept () const
void quit ()
void emit (event::type)
void rat (const mouse &)
event::result kbd (const keyboard &)
event::result system (const event &)
void on_mouse (const mouse_event &, bool front=false)
void on_keyboard (const keyboard_event &, bool front=false)
void on_system (const system_event &, bool front=false)

Protected Member Functions

void add_child (engine *item)
void del_child (engine *item)
void process (const keyboard &)
event::result process_system (const event &)
void big_switch (engine *item)
enginecurrent ()

Protected Attributes


Private Types

typedef std::deque< engine * > child_items
typedef std::deque< mouse_eventms_events
typedef std::deque< keyboard_eventkbd_events
typedef std::deque< system_eventsys_events

Private Member Functions

 engine (const engine &)
engineoperator= (const engine &)
void find_over (const mouse &ev, child_items *list)
void find_leafs (child_items *list)
enginehead ()
void little_switch (engine *item)
void process (const mouse &)
void leave_all ()
void enter_all ()

Private Attributes

child_items childs_
ms_events mouse_
kbd_events keyboard_
sys_events system_
ncurses::panel * geometry_
bool loop_
bool accept_


bool higher (engine *lhs, engine *rhs)

Detailed Description

event transport subsystem in NDK engine unfortunaly this transport system need to know ncurses::panel object, 'cause mouse works global over all widgets

Member Typedef Documentation

typedef std::deque<engine*> ndk::engine::child_items [private]

typedef std::deque<keyboard_event> ndk::engine::kbd_events [private]

typedef functor<event::result, keyboard> ndk::engine::keyboard_event

typedef functor<event::result, mouse> ndk::engine::mouse_event

typedef std::deque<mouse_event> ndk::engine::ms_events [private]

typedef std::deque<system_event> ndk::engine::sys_events [private]

typedef functor<event::result, event> ndk::engine::system_event

Constructor & Destructor Documentation

engine::engine engine parent,
ncurses::panel *  geometry

create parent-child tree structure

engine::engine  ) 

empty contsructor to the head of object's tree

engine::~engine  ) 

ndk::engine::engine const engine  )  [inline, private]

Member Function Documentation

bool engine::accept  )  const

this widget don't accept focus

void engine::add_child engine item  )  [protected]

create Transports tree, add child

void engine::big_switch engine item  )  [protected]

big focus switching

engine* ndk::engine::current  )  [protected]

current self-focused subwidget

void engine::del_child engine item  )  [protected]

update Transports tree, remove child from the list

void engine::emit event::type   ) 

emit system event

void engine::enter_all  )  [private]

void engine::exec  ) 

modal loop: get and process events

void engine::find_leafs child_items list  )  [private]

void engine::find_over const mouse ev,
child_items list

void engine::get  ) 

get next event from the user

engine * engine::head  )  [private]

return head of the Transport event support tree

void engine::in_focus engine  ) 

event::result engine::kbd const keyboard  ) 

void engine::leave_all  )  [private]

void engine::little_switch engine item  )  [private]

simple switch focus to other widget

void engine::on_keyboard const keyboard_event ,
bool  front = false

register keyboard event callback

main head of the transport tree

void engine::on_mouse const mouse_event ,
bool  front = false

register mouse event callback

void engine::on_system const system_event ,
bool  front = false

register system event callback

engine& ndk::engine::operator= const engine  )  [inline, private]

void engine::process const mouse  )  [private]

default work of switching focus here

void engine::process const keyboard  )  [protected]

default work of switching focus here

event::result engine::process_system const event  )  [protected]

default work of passing event between objects here

void engine::quit  ) 

exit modal loop

void engine::rat const mouse  ) 

void engine::set_accept bool   ) 

void engine::switch_to engine item  ) 

delegate focus to other object

event::result engine::system const event  ) 

Friends And Related Function Documentation

bool higher engine lhs,
engine rhs

Member Data Documentation

bool ndk::engine::accept_ [private]

child_items ndk::engine::childs_ [private]

ncurses::panel* ndk::engine::geometry_ [private]

geometry for the mouse events

engine* ndk::engine::in_focus_ [private]

are this widget in focus now

kbd_events ndk::engine::keyboard_ [private]

keyboard event callback

bool ndk::engine::loop_ [private]

modal loop control

ms_events ndk::engine::mouse_ [private]

mouse event callback

engine* ndk::engine::parent_ [protected]

parent object

sys_events ndk::engine::system_ [private]

registered system event callbacks

The documentation for this class was generated from the following files:
Generated on Fri Jun 4 16:21:04 2004 for NDK++ by doxygen 1.3.6