Wt::FocusData Class Reference

#include <focusdata.h>

Inheritance diagram for Wt::FocusData:

Inheritance graph
[legend]
Collaboration diagram for Wt::FocusData:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Widget * focusWidget () const
Widget * home ()
Widget * next ()
Widget * prev ()
Widget * first () const
Widget * last () const
int count () const

Protected Member Functions

 FocusData ()
Widget * setFocus (const Widget *w)
void looseFocus ()
 stop being clever and loose the damn focus

Private Attributes

WidgetList::iterator current_it_
WidgetList::iterator it_

Friends

class Widget

Detailed Description

Definition at line 31 of file focusdata.h.


Constructor & Destructor Documentation

Wt::FocusData::FocusData (  )  [inline, protected]

Definition at line 80 of file focusdata.h.

00080                 :
00081             current_it_(end()),
00082     it_(end()) {}


Member Function Documentation

int Wt::FocusData::count (  )  const [inline]

Definition at line 74 of file focusdata.h.

00074                       {
00075         return size();
00076     }

Widget* Wt::FocusData::first (  )  const [inline]

Definition at line 62 of file focusdata.h.

00062                           {
00063         if (!size())
00064             return 0;
00065         return front();
00066     }

Widget* Wt::FocusData::focusWidget (  )  const [inline]

Definition at line 33 of file focusdata.h.

References current_it_.

Referenced by Wt::Widget::focusWidget(), home(), and setFocus().

00033                                 {
00034         return (current_it_ != end()) ? *current_it_ : 0;
00035     }

Widget* Wt::FocusData::home (  )  [inline]

Definition at line 37 of file focusdata.h.

References current_it_, focusWidget(), and it_.

00037                    {
00038         it_ = current_it_;
00039         return focusWidget();
00040     }

Here is the call graph for this function:

Widget* Wt::FocusData::last (  )  const [inline]

Definition at line 68 of file focusdata.h.

00068                          {
00069         if (!size())
00070             return 0;
00071         return back();
00072     }

void Wt::FocusData::looseFocus (  )  [inline, protected]

stop being clever and loose the damn focus

Definition at line 91 of file focusdata.h.

References current_it_, and it_.

Referenced by Wt::Widget::~Widget().

00091                       {
00092         current_it_ = end();
00093         it_ = begin();
00094     }

Widget* Wt::FocusData::next (  )  [inline]

Definition at line 42 of file focusdata.h.

References it_.

00042                    {
00043         if (it_ == end())
00044             return 0;
00045         ++it_;
00046         if (it_ == end())
00047             it_ = begin();
00048         return *it_;
00049     }

Widget* Wt::FocusData::prev (  )  [inline]

Definition at line 51 of file focusdata.h.

References it_.

00051                    {
00052         if (it_ == end())
00053             return 0;
00054         if (it_ == begin())
00055             it_ = end();
00056         else {
00057             --it_;
00058         }
00059         return *it_;
00060     }

Widget* Wt::FocusData::setFocus ( const Widget *  w  )  [inline, protected]

Definition at line 84 of file focusdata.h.

References current_it_, focusWidget(), and it_.

Referenced by Wt::Widget::setFocus().

00084                                       {
00085         it_ = find(begin(), end(), w);
00086         current_it_ = it_;
00087         return focusWidget();
00088     }

Here is the call graph for this function:


Friends And Related Function Documentation

friend class Widget [friend]

Definition at line 79 of file focusdata.h.


Member Data Documentation

WidgetList::iterator Wt::FocusData::current_it_ [private]

Definition at line 97 of file focusdata.h.

Referenced by focusWidget(), home(), looseFocus(), and setFocus().

WidgetList::iterator Wt::FocusData::it_ [private]

Definition at line 97 of file focusdata.h.

Referenced by home(), looseFocus(), next(), prev(), and setFocus().


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

Generated Fri Jul 28 19:28:39 2006.
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.