Dispatcher Class Reference

List of all members.

Detailed Description

This a is singleton that dispatches events and signals to listeners.

This can still change. Q: Should this be a singleton? or should we allow the creation of multiple dispatchers? Q: Should this be moved to DUIObject? Q: Should this be moved to the base objectG?


Public Member Functions

int addIdleListener (IdleListener listener)
 Adds a idle listener to an object.
int addIdleListener (IdleListener listener, int priority)
 Adds a idle listener to an object.
void removeIdleListener (int idleID)
 Removes a idle listener by idle id.
guint addTimeoutListener (TimeoutListener listener, guint32 interval)
 When the listener returns false ends the timeout cycle.
void addButtonClickedListener (ButtonClickedListener listener, Button button, String action)
 Add a listener to a clickable button with a click action name.
void addButtonClickedListener (void delegate() listener, Button button)
 Add a listener to a clickable button using the object defaul action name.
void addButtonClickedListener (ButtonClickedListener listener, Button button)
 Add a listener to a clickable button using the object defaul action name.
void addMenuItemListener (MenuItemListener listener, MenuItem menuItem, String action)
 Add a listener to a clickable menu item with a click action name.
void addMenuItemListener (MenuItemListener listener, MenuItem menuItem)
 Add a listener to a clickable menu item with a click action name.
void addMouseButtonListener (MouseButtonListener listener, Widget widget)
 Adds a mouse button listener to an object.
void addMouseMotionListener (MouseMotionListener listener, Widget widget)
 Adds a mouse movement listener to an object.
void addMouseEnterListener (MouseEnterListener listener, Widget widget)
 Adds a mouse enter and exit listener to an object.
void addWindowListener (WindowListener listener, Window window)
 Adds a window listener to an object.
void addFocusListener (FocusListener listener, Widget widget)
 Adds a focus listener to an object.
void addKeyListener (KeyListener listener, Widget widget)
 Adds a key listener to an object.
 extern (C)
void addExposeListener (ExposeListener listener, Widget widget)
 Adds a exposed wareness to a widget.
void addConfigureListener (ConfigureListener listener, Widget widget)
 Adds configuration changes wareness to a widget.
void addVisibilityListener (VisibilityListener listener, Widget widget)
 Adds visibility changes wareness to a widget.
void addMapListener (MapListener listener, Widget widget)
 Adds a map wareness to a widget.
void addRealizeListener (RealizeListener listener, Widget widget)
 Adds a realize wareness to a widget.
void addNotebookSwitchPageListener (NotebookSwitchPageListener listener, Widget widget)
 Adds a notebook switch page listener.
void addNotebookListener (NotebookListener listener, Widget widget)
 Adds a notebook listener.
void addCalendarListener (CalendarListener listener, Widget widget)
 Adds a calendar listener.
void addCalendarListener (TreeModelListener listener, TreeModel model)
 Adds a TreeModel listener.
void addTextChangedListener (TextChangedListener listener, TextBuffer textBuffer)
 Add TextChangedListener.
void addCellListener (CellListener listener, CellRenderer renderer, TreeModel model, int column)
 Add cell listener.
void addEntryChangeListener (EntryChangeListener listener, Entry entry)
 Adds a entry change listener.
void addEntryInsertListener (EntryInsertListener listener, Entry entry)
 Adds a entry insert listener.
void addEntryListener (EntryListener listener, Entry entry)
 Adds a entry listener.
void addTreeViewListener (TreeViewListener listener, TreeView treeView)

Static Public Member Functions

Dispatcher getDispatcher ()
 Gets the dispatcher for this application.


Member Function Documentation

void Dispatcher.addButtonClickedListener ButtonClickedListener  listener,
Button  button
 

Add a listener to a clickable button using the object defaul action name.

Parameters:
listener the listener
button the button that generates a click

All the button clicked actions will be distributed from here.

void Dispatcher.addButtonClickedListener void delegate()  listener,
Button  button
 

Add a listener to a clickable button using the object defaul action name.

Parameters:
listener the listener
button the button that generates a click

All the button clicked actions will be distributed from here.

void Dispatcher.addButtonClickedListener ButtonClickedListener  listener,
Button  button,
String  action
 

Add a listener to a clickable button with a click action name.

Parameters:
listener the listener
button the button that generates a click
action the action name

void Dispatcher.addCalendarListener TreeModelListener  listener,
TreeModel  model
 

Adds a TreeModel listener.

Parameters:
listener the TreeModel listener
model the treeModel that generated the event

void Dispatcher.addCalendarListener CalendarListener  listener,
Widget  widget
 

Adds a calendar listener.

Parameters:
listener the Calendar listener
widget the widget that generated the event

void Dispatcher.addCellListener CellListener  listener,
CellRenderer  renderer,
TreeModel  model,
int  column
 

Add cell listener.

void Dispatcher.addConfigureListener ConfigureListener  listener,
Widget  widget
 

Adds configuration changes wareness to a widget.

Parameters:
listener the configureListener
widget the widget that needs to know about configure events

void Dispatcher.addEntryChangeListener EntryChangeListener  listener,
Entry  entry
 

Adds a entry change listener.

Parameters:
listener the entry listener
entry the entry that generated the event

void Dispatcher.addEntryInsertListener EntryInsertListener  listener,
Entry  entry
 

Adds a entry insert listener.

Parameters:
listener the entry listener
entry the widget that generated the event

void Dispatcher.addEntryListener EntryListener  listener,
Entry  entry
 

Adds a entry listener.

Parameters:
listener the listener
entry the entry widget

void Dispatcher.addExposeListener ExposeListener  listener,
Widget  widget
 

Adds a exposed wareness to a widget.

Usaly the exposed event is processed by the GTK and we don't need to know about it. An example of usage is the refresh a DrawingArea.

Parameters:
listener the exposeListener
widget the widget that needs to know about expose events

void Dispatcher.addFocusListener FocusListener  listener,
Widget  widget
 

Adds a focus listener to an object.

Parameters:
listener the focus listener
widget the widget that generated the even

int Dispatcher.addIdleListener IdleListener  listener,
int  priority
 

Adds a idle listener to an object.

Parameters:
listener the IdleListener object
priority ???
Returns:
the idle id. The idle id can be used to remove the idle listener

int Dispatcher.addIdleListener IdleListener  listener  ) 
 

Adds a idle listener to an object.

Parameters:
listener the IdleListener object
Returns:
the idle id. The idle id can be used to remove the idle listener

void Dispatcher.addKeyListener KeyListener  listener,
Widget  widget
 

Adds a key listener to an object.

Parameters:
listener the key listener
widget the widget that generated the even

void Dispatcher.addMapListener MapListener  listener,
Widget  widget
 

Adds a map wareness to a widget.

After mapped a widget should have a window so we can change properties that depend on the window, an example is the cursor

Parameters:
listener the map events
widget the widget generated the map event

void Dispatcher.addMenuItemListener MenuItemListener  listener,
MenuItem  menuItem
 

Add a listener to a clickable menu item with a click action name.

Parameters:
listener the listener
menuItem the menu item that generates a click

void Dispatcher.addMenuItemListener MenuItemListener  listener,
MenuItem  menuItem,
String  action
 

Add a listener to a clickable menu item with a click action name.

Parameters:
listener the listener
menuItem the menu item that generates a click
action the action name

void Dispatcher.addMouseButtonListener MouseButtonListener  listener,
Widget  widget
 

Adds a mouse button listener to an object.

Parameters:
listener the listener
widget the widget that generates mouse button events

void Dispatcher.addMouseEnterListener MouseEnterListener  listener,
Widget  widget
 

Adds a mouse enter and exit listener to an object.

Parameters:
listener the listener
widget the widget that generates mouse enter/exit events

void Dispatcher.addMouseMotionListener MouseMotionListener  listener,
Widget  widget
 

Adds a mouse movement listener to an object.

Parameters:
listener the listener
widget the widget that generates mouse motion events

void Dispatcher.addNotebookListener NotebookListener  listener,
Widget  widget
 

Adds a notebook listener.

Parameters:
listener the notebook listener
widget the widget that generated the event

void Dispatcher.addNotebookSwitchPageListener NotebookSwitchPageListener  listener,
Widget  widget
 

Adds a notebook switch page listener.

Parameters:
listener the notebook listener
widget the widget that generated the event

void Dispatcher.addRealizeListener RealizeListener  listener,
Widget  widget
 

Adds a realize wareness to a widget.

Parameters:
listener the realize events listener
widget the widget generated the realize event

void Dispatcher.addTextChangedListener TextChangedListener  listener,
TextBuffer  textBuffer
 

Add TextChangedListener.

guint Dispatcher.addTimeoutListener TimeoutListener  listener,
guint32  interval
 

When the listener returns false ends the timeout cycle.

void Dispatcher.addTreeViewListener TreeViewListener  listener,
TreeView  treeView
 

Todo:
Adds a entry listener
Parameters:
listener the listener
treeView the Treeview

void Dispatcher.addVisibilityListener VisibilityListener  listener,
Widget  widget
 

Adds visibility changes wareness to a widget.

Parameters:
listener the VisibilityListener
widget the widget that needs to know about visilibity events
Bug:
this one a kind of broken : visibility never gets called back...

void Dispatcher.addWindowListener WindowListener  listener,
Window  window
 

Adds a window listener to an object.

Parameters:
listener the window listener
window the window that generated the event

Dispatcher.extern  ) 
 

Key press callback

Parameters:
event the key press event
gtkwidget the widget that generated the event
data the callback data that was set the the listener

Key release callback

Parameters:
event the key press event
gtkwidget the widget that generated the event
data the callback data that was set the the listener

Dispatcher Dispatcher.getDispatcher  )  [static]
 

Gets the dispatcher for this application.

Only one dispatcher is created by application

void Dispatcher.removeIdleListener int  idleID  ) 
 

Removes a idle listener by idle id.

Parameters:
idleID the idleID id to remove.


SourceForge.net Logo DSource.org Logo digitalmars.com Logo