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

wftk::Focus Class Reference

Singleton class for handling the current widget that owns keyboard focus. More...

#include <focus.h>

List of all members.

Public Member Functions

bool release (Widget *w)
 Attempt to release keyboard focus on the Widget w.
bool grab (Widget *w)
 Attempt to bless keyboard focus upon the Widget w.
bool haveFocus () const
 true if any widgets have keyboard focus
WidgetcurrentFocus () const
 returns a pointer to the widget with current focus
WidgetnextFocus ()
 Pointer to the next widget capable of handling text focus.
WidgetprevFocus ()
 Pointer to the previous widget capable of handling text focus.
void addFocusable (Widget *)
 Make Focus object aware of a new text / keyboard focus region (append to the end of the list).
void removeFocusable (Widget *)
 Remove the passed widget from the list of possible focus targets.
bool handleEvent (const SDL_Event *)
 Handle a keyboard event, called from the mainloop.

Static Public Member Functions

Focusinstance ()
 Fetch the singleton instance.

Public Attributes

SigC::Signal2< bool, const
SDL_keysym &, bool, BoolMarshal
keystroke
 Keypress Signal object.
SigC::Signal0< bool, BoolMarshallostFocus
 application has lost window focus
SigC::Signal0< bool, BoolMarshalgotFocus
 application has gained window focus
Timer CursorSparkle
 CursorSparkle keeps our cursor blinking.


Detailed Description

Singleton class for handling the current widget that owns keyboard focus.


Member Data Documentation

SigC::Signal2<bool,const SDL_keysym&,bool,BoolMarshal> wftk::Focus::keystroke
 

Keypress Signal object.

Emitted whenever a key is pressed. Slots connected to this signal may swallow the event by returning true, or pass the event to other listeners by returning false. bool value is true for pressed, false for released


The documentation for this class was generated from the following files:

Generated Mon Sep 6 21:58:16 2004.
Copyright © 1998-2003 by the respective authors.

This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.