Wt::Widget Class Reference

#include <widget.h>

Inheritance diagram for Wt::Widget:

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

Collaboration graph
[legend]
List of all members.

Public Types

 NoFocus = 0
 TabFocus = 1 << 0
 ClickFocus = 1 << 1
 StrongFocus = TabFocus | ClickFocus
 WheelFocus = 1 << 2 | StrongFocus
enum  FocusPolicy {
  NoFocus = 0, TabFocus = 1 << 0, ClickFocus = 1 << 1, StrongFocus = TabFocus | ClickFocus,
  WheelFocus = 1 << 2 | StrongFocus
}
typedef std::list< Object * > List
 NoOptim
 BestOptim
 DefaultOptim = BestOptim
enum  Optimization { NoOptim, BestOptim, DefaultOptim = BestOptim }

Public Member Functions

 Widget (Widget *parent=0, const std::string &name="Widget::anon", int Wflags=0)
virtual ~Widget ()
WidgetparentWidget () const
 parents are guaranteed to be widgets and not general wobjects
WidgettopParentWidget () const
void reparent (Widget *new_parent)
int width () const
int height () const
Size size () const
Rect rect () const
Point mapToGlobal (const Point &pos) const
Point mapFromGlobal (const Point &pos) const
Point mapToParent (const Point &pos) const
Point mapFromParent (const Point &pos) const
Region mapToGlobal (const Region &region) const
Region mapToParent (const Region &region) const
virtual void setBackgroundColor (const Color &c)
const ColorbackgroundColor () const
virtual void setForegroundColor (const Color &c)
const ColorforegroundColor () const
virtual bool setBackgroundPixmapFlags (int flags, int alignment)
virtual void setBackgroundPixmap (const Pixmap &pixmap, int flags=0, int alignment=0)
const PixmapbackgroundPixmap () const
int backgroundPixmapFlags () const
int backgroundPixmapAlignment () const
const Fontfont () const
virtual void setFont (const Font &font)
void unsetFont ()
virtual bool event (Event *e)
 event handling
virtual void resize (int w, int h)
void resize (const Size &size)
virtual void move (int x, int y)
void move (const Point &p)
virtual void setGeometry (int x, int y, int w, int h)
virtual void setGeometry (const Rect &r)
void update (const Rect &r)
void update (int x, int y, int w, int h)
void update ()
void repaint (const Rect &r, bool erase=true)
void repaint (const Region &r, bool erase=true)
void repaint (int x, int y, int w, int h, bool erase=true)
void repaint (bool erase)
void repaint ()
void updateGeometry ()
void raise ()
void lower ()
bool isShown () const
bool isHidden () const
bool isEmpty () const
virtual Size sizeHint () const
virtual void setSizeHint (const Size &size)
virtual Size minimumSize () const
virtual void setMinimumSize (const Size &size)
virtual Size maximumSize () const
virtual void setMaximumSize (const Size &size)
virtual SizePolicy sizePolicy () const
virtual void setSizePolicy (const SizePolicy &size_policy)
virtual SizePolicy::ExpandData expanding () const
Layoutlayout () const
void setLayout (Layout *layout)
void erase (const Rect &r)
void erase (const Region &r)
void erase (int x, int y, int w, int h)
void erase ()
void drawText (int x, int y, const std::string &text)
void drawText (const Point &p, const std::string &text)
WidgetchildAt (const Point &p, bool self_include=false) const
WidgetchildAt (int x, int y, bool self_include=false) const
WidgetfocusWidget () const
bool hasFocus () const
bool isFocusEnabled (int reason) const
virtual void setFocus (int reason)
void grabKeyboard ()
void releaseKeyboard ()
void grabMouse ()
void releaseMouse ()
virtual void hide ()
virtual void show ()
bool close ()
virtual bool close (bool destroy)
void setHidden (bool do_hide=true)
void setShown (bool do_show=true)
virtual void enable ()
virtual void disable ()
void setEnabled (bool do_enable=true)
void setDisabled (bool do_disable=true)
Objectparent () const
const Listchildren () const
Listchildren ()
bool isDescendant (const Object *p) const
virtual void insertChild (Object *obj)
virtual void removeChild (Object *obj)
void reparent (Object *new_parent)
template<typename T>
void deleteFirstChild ()
template<typename T>
void deleteLastChild ()
template<typename T>
void deleteAllChildren ()
ObjecttopParent () const
 returns top level parent: it may return itself
const std::string & name () const
void installEventFilter (const Object *filterObj)
void removeEventFilter (const Object *obj)
virtual bool eventFilter (Object *, Event *)
int startTimer (int interval)
void killTimer (int id)
void killTimers ()
virtual const Rectgeometry () const
 return the widget's geometry relative to its parent
bool isNonEmpty () const
virtual bool hasHeightForWidth () const
virtual int heightForWidth (int) const
virtual LayoutIterator iterator ()
template<typename TEST_TYPE>
TEST_TYPE type () const
template<typename TEST_TYPE>
bool is () const
void fill (const Color &color=Color("white"))
void fill (const Rect &dst, const Color &color=Color("white"))
void fill (const Region &dst, const Color &color=Color("white"))
void blend (const Color &color=Color("white"), int alpha_blend_factor=Color::Transparent)
void blend (const Rect &dst, const Color &color=Color("white"), int alpha_blend_factor=Color::Transparent)
void blend (const Region &dst, const Color &color=Color("white"), int alpha_blend_factor=Color::Transparent)
int blit (const Point &p, const PixmapBase &src)
int blit (const Point &p, const PixmapBase &src, const Rect &src_rect)
int blitAlphaCopy (const Point &p, const PixmapBase &src)
int blitAlphaCopy (const Point &p, const PixmapBase &src, const Rect &src_rect)
int blitAlphaBlend (int x, int y, const PixmapBase &src, const Rect &src_rect, int alpha_blend_factor=Color::Transparent)
 copy to from src rect with alpha blending
int blitAlphaBlend (const PixmapBase &src, int alpha_blend_factor=Color::Transparent)
 copy to from src with alpha blending
int blitAlphaBlend (int x, int y, const PixmapBase &src, int alpha_blend_factor=Color::Transparent)
 copy to from src with alpha blending
int blitAlphaBlend (const Point &p, const PixmapBase &src, int alpha_blend_factor=Color::Transparent)
int blitAlphaBlend (const Point &p, const PixmapBase &src, const Rect &src_rect, int alpha_blend_factor=Color::Transparent)
PixmapBase scale (const Size &size, SDLSurface::ScaleMode mode=SDLSurface::ScaleFree) const
PixmapBase smoothScale (const Size &size, SDLSurface::ScaleMode mode=SDLSurface::ScaleFree) const
int pixel (const Point &p) const
Color pixelColor (const Point &p) const
void setPixel (const Point &p, int pixel_value)
void setPixelColor (const Point &p, const SDLColor &color)
PixmapBase copy () const
PixmapBase copy (int x, int y, int w, int h) const
PixmapBase copy (const Rect &r) const
Informative methods
bool isNull () const

Static Public Member Functions

static void update (Widget *w, const Region &region)
static WidgetkeyboardGrabber ()
static WidgetmouseGrabber ()

Public Attributes

WVar< bool > hidden
 public attributes
WVar< bool > enabled
WVar< bool > mouseTracking
WVar< intfocusPolicy
WVar< intownFont
Signal01< void, const Object * > destroyed
 signals
WVar< intalignment

Static Public Attributes

static const int default_max_size = ((int) ((unsigned int) (~0) >> 1))
static const int default_min_size = 30
static const int default_hint_size = 100

Protected Types

typedef PixmapOf< SDLSurfacePixmapBase

Protected Member Functions

virtual void mousePressEvent (MouseEvent *)
 event handling specialization
virtual void mouseReleaseEvent (MouseEvent *)
virtual void mouseDoubleClickEvent (MouseEvent *)
virtual void mouseMoveEvent (MouseEvent *)
virtual void wheelEvent (WheelEvent *)
virtual void focusInEvent (FocusEvent *)
virtual void focusOutEvent (FocusEvent *)
virtual void keyPressEvent (KeyEvent *)
virtual void keyReleaseEvent (KeyEvent *)
virtual void enterEvent (Event *)
virtual void leaveEvent (Event *)
virtual void paintEvent (PaintEvent *)
virtual void resizeEvent (ResizeEvent *)
virtual void moveEvent (MoveEvent *)
virtual void showEvent (ShowEvent *)
virtual void hideEvent (HideEvent *)
virtual void closeEvent (CloseEvent *)
virtual void draw (Painter *p, const Region &region)
 widget should be able to draw itself
bool autoerase ()
bool autoclip ()
virtual void fontChange (const Font &oldFont)
void updateBackground ()
FocusDatafocusData () const
virtual bool focusNextPrevChild (bool next)
 cycles focus amongs widgets
void hiddenChanged (bool hidden_new)
bool is_hidden (bool val) const
bool is_enabled (bool val) const
virtual void childEvent (ChildEvent *)
 event handling specialization
virtual void customEvent (CustomEvent *)
virtual void timerEvent (TimerEvent *)
bool filterEvent (Event *)
void invalidateRecursively ()
virtual void validate ()
bool invalidated () const

Protected Attributes

Signal01< void, Layout * > layoutChanged

Private Attributes

int wflags_
bool need_redraw_
Pixmap bg_pixmap_
Pixmap bg_scaled_
int bg_flags
int bg_alignment
Painterpainter_
Layoutlayout_
Size l_size_hint_
Size l_min_size_
Size l_max_size_

Static Private Attributes

static FocusData focus_data_

Detailed Description

Definition at line 46 of file widget.h.


Member Typedef Documentation

typedef std::list<Object*> Wt::Object::List [inherited]

Definition at line 47 of file object.h.

template<typename SDLPixmap>
typedef PixmapOf<SDLSurface> Wt::PixmapOf< SDLPixmap >::PixmapBase [protected, inherited]

Definition at line 36 of file pixmap.h.


Member Enumeration Documentation

enum Wt::Widget::FocusPolicy

Enumerator:
NoFocus 
TabFocus 
ClickFocus 
StrongFocus 
WheelFocus 

Definition at line 48 of file widget.h.

00048                   {
00049         NoFocus = 0,
00050         TabFocus = 1 << 0,
00051         ClickFocus = 1 << 1,
00052         StrongFocus = TabFocus | ClickFocus,
00053         WheelFocus = 1 << 2 | StrongFocus
00054     } FocusPolicy;

enum Wt::Pixmap::Optimization [inherited]

Enumerator:
NoOptim 
BestOptim 
DefaultOptim 

Definition at line 290 of file pixmap.h.

00290                  {
00291         NoOptim,
00292         BestOptim,
00293         DefaultOptim = BestOptim
00294     } Optimization;


Constructor & Destructor Documentation

Wt::Widget::Widget ( Widget parent = 0,
const std::string &  name = "Widget::anon",
int  Wflags = 0 
) [explicit]

Todo:
document why we need explicit?

Definition at line 35 of file widget.cpp.

References Wt::WVarBase< VARTYPE >::changed, Wt::Signal012< R, ARG1, ARG2 >::connect(), enabled, focus_data_, grabKeyboard(), grabMouse(), hidden, hiddenChanged(), is_enabled(), is_hidden(), Wt::WVarBase< VARTYPE >::override, painter_, Wt::Object::parent(), resize(), Wt::Application::sendPostedEvents(), Wt::Painter::setFont(), Wt::W::ShowModal, sizeHint(), and update().

00036         : Object(parent, name),
00037         LayoutItem(),
00038         Pixmap(0, 0, -1, wflags),
00039         hidden(false),
00040         enabled(true),
00041         mouseTracking(false),
00042         focusPolicy(NoFocus),
00043         ownFont(false),
00044         wflags_(wflags),
00045         need_redraw_(false),
00046         bg_flags(0),
00047         bg_alignment(0),
00048         painter_(new Painter),
00049 layout_(0) {
00050     hidden.override.connect(sigc::mem_fun(*this, &Widget::is_hidden));
00051     // connect to layout recalc
00052     sigc::slot1<void, bool> hidden_slot =
00053         sigc::mem_fun(*this, &Widget::hiddenChanged);
00054     hidden.changed.connect(hidden_slot);
00055 
00056     enabled.override.connect(sigc::mem_fun(*this, &Widget::is_enabled));
00057 
00058     void (Widget::*update)() = &Widget::update;
00059     sigc::slot0<void> update_slot = sigc::mem_fun(*this, update);
00060     enabled.changed.connect(update_slot);
00061 
00062     // let's put on focus widget's list
00063     focus_data_.push_back(this);
00064 
00065     if (wflags & W::ShowModal) {
00066         grabKeyboard();
00067         grabMouse();
00068     }
00069 
00070     // we are goint to paint it anyway on resizeEvent
00071     resize(sizeHint());
00072     if (parent)
00073         painter_->setFont(parent->font());
00074     Application::sendPostedEvents();
00075 }

Here is the call graph for this function:

Wt::Widget::~Widget (  )  [virtual]

Definition at line 81 of file widget.cpp.

References focus_data_, focusNextPrevChild(), Wt::LayoutItem::geometry(), hasFocus(), isShown(), Wt::isWidget(), Wt::FocusData::looseFocus(), painter_, Wt::Object::parent(), parentWidget(), releaseKeyboard(), releaseMouse(), and update().

00081                 {
00082     if (isShown()) {
00083         /// \todo if we are transparent we should be able to avoid this
00084         update(parentWidget(), geometry());
00085     }
00086 
00087     releaseKeyboard();
00088     releaseMouse();
00089 
00090     if (hasFocus()) {
00091         /// \todo In case parent is not dead we can do it properly.
00092         /// The else guards us from a recursive nasty crash that
00093         /// shouldn't happen if we had a real tree instead of the
00094         /// focusNextPrevChild() abomination.
00095         if (isWidget(parent())) {
00096             focusNextPrevChild(true);
00097         } else {
00098             /* this is getting worse and worst. We have to check
00099             both sides off the list in order to avoid null dereferencing */
00100             focus_data_.looseFocus();
00101         }
00102     }
00103 
00104     focus_data_.remove(this);
00105 
00106     delete painter_;
00107 }

Here is the call graph for this function:


Member Function Documentation

bool Wt::Widget::autoclip (  )  [inline, protected]

Definition at line 248 of file widget.h.

References Wt::W::PaintUnclipped, and wflags_.

Referenced by erase(), and paintEvent().

00248                     {
00249         return !(wflags_ & W::PaintUnclipped);
00250     }

bool Wt::Widget::autoerase (  )  [inline, protected]

Definition at line 244 of file widget.h.

References Wt::W::NoAutoErase, and wflags_.

Referenced by update().

00244                      {
00245         return !(wflags_ & W::NoAutoErase);
00246     }

const Color & Wt::Widget::backgroundColor (  )  const

Reimplemented in Wt::Window::Frame.

Definition at line 168 of file widget.cpp.

References Wt::Painter::backgroundColor(), and painter_.

Referenced by Wt::Window::Frame::backgroundColor(), and Wt::Window::titleBarColor().

00168                                            {
00169     return painter_->backgroundColor();
00170 }

Here is the call graph for this function:

const Pixmap& Wt::Widget::backgroundPixmap (  )  const [inline]

Definition at line 102 of file widget.h.

References bg_pixmap_.

00102                                            {
00103         return bg_pixmap_;
00104     }

int Wt::Widget::backgroundPixmapAlignment (  )  const [inline]

Definition at line 108 of file widget.h.

References bg_alignment.

00108                                           {
00109         return bg_alignment;
00110     }

int Wt::Widget::backgroundPixmapFlags (  )  const [inline]

Definition at line 105 of file widget.h.

References bg_flags.

00105                                       {
00106         return bg_flags;
00107     }

template<typename SDLPixmap>
void Wt::PixmapOf< SDLPixmap >::blend ( const Region dst,
const Color color = Color("white"),
int  alpha_blend_factor = Color::Transparent 
) [inline, inherited]

Definition at line 138 of file pixmap.h.

00139                                                           {
00140         const RectArray& ra = dst.rects();
00141         const int n = ra.size();
00142 
00143         for (int i = 0; i < n; i++) {
00144             blend(ra[i], color, alpha_blend_factor);
00145         }
00146     }

template<typename SDLPixmap>
void Wt::PixmapOf< SDLPixmap >::blend ( const Rect dst,
const Color color = Color("white"),
int  alpha_blend_factor = Color::Transparent 
) [inline, inherited]

Definition at line 96 of file pixmap.h.

00097                                                           {
00098 
00099         switch(color.alpha()) {
00100         case Color::Transparent:
00101             return;
00102         case Color::Opaque:
00103             fill(dst, color);
00104             return;
00105         default:
00106             break;
00107         }
00108 
00109         const Rect overlap = dst.intersect(SDLPixmap::clipRect());
00110         if(overlap.isEmpty())
00111             return;
00112 
00113         int new_part, old_part;
00114         Color::calcBlendFactors(color.alpha(), new_part, old_part);
00115         int alpha_new_part, alpha_old_part;
00116         Color::calcBlendFactors(alpha_blend_factor, alpha_new_part, alpha_old_part);
00117 
00118         SDLPixmap::lock()
00119             ;
00120         const int bpp = SDLPixmap::pixelFormat().bytesPerPixel();
00121         for(int y = overlap.y(); y < overlap.y() + overlap.height(); y++) {
00122             int offset = SDLPixmap::pixelOffset(overlap.x(), y);
00123             for(int x = overlap.x(); x < overlap.x() + overlap.width(); x++) {
00124 
00125                 Color c = SDLPixmap::pixelColor(offset);
00126                 c = Color::blend(c, old_part, color, new_part,
00127                                  alpha_new_part, alpha_old_part);
00128 
00129                 SDLPixmap::setPixelColor(offset, c);
00130                 offset += bpp;
00131             }
00132         }
00133         SDLPixmap::unlock();
00134 
00135         return;
00136     }

template<typename SDLPixmap>
void Wt::PixmapOf< SDLPixmap >::blend ( const Color color = Color("white"),
int  alpha_blend_factor = Color::Transparent 
) [inline, inherited]

Definition at line 91 of file pixmap.h.

Referenced by Wt::PixmapOf< Wt::SDLSurface >::blend(), Wt::Painter::blendRect(), and Wt::Painter::blendRegion().

00092                                                           {
00093         blend(rect(), SDLPixmap::pixelFormat().mapToPixelValue(color), alpha_blend_factor);
00094     }

template<typename SDLPixmap>
int Wt::PixmapOf< SDLPixmap >::blit ( const Point p,
const PixmapBase src,
const Rect src_rect 
) [inline, inherited]

Definition at line 152 of file pixmap.h.

00152                                                                           {
00153         return blit(p.x(), p.y(), src, src_rect);
00154     }

template<typename SDLPixmap>
int Wt::PixmapOf< SDLPixmap >::blit ( const Point p,
const PixmapBase src 
) [inline, inherited]

Definition at line 149 of file pixmap.h.

Referenced by Wt::PixmapOf< Wt::SDLSurface >::blit(), Wt::RootWindow::blit_region(), Wt::PixmapOf< Wt::SDLSurface >::copy(), Wt::Painter::drawPixmap(), Wt::Painter::drawText(), and Wt::Painter::drawTiledPixmap().

00149                                                     {
00150         return blit(p.x(), p.y(), src);
00151     }

template<typename SDLPixmap>
int Wt::PixmapOf< SDLPixmap >::blitAlphaBlend ( const Point p,
const PixmapBase src,
const Rect src_rect,
int  alpha_blend_factor = Color::Transparent 
) [inline, inherited]

Definition at line 230 of file pixmap.h.

00231                                                                   {
00232         return blitAlphaBlend(p.x(), p.y(), src, src_rect, alpha_blend_factor);
00233     }

template<typename SDLPixmap>
int Wt::PixmapOf< SDLPixmap >::blitAlphaBlend ( const Point p,
const PixmapBase src,
int  alpha_blend_factor = Color::Transparent 
) [inline, inherited]

Definition at line 226 of file pixmap.h.

00227                                                                   {
00228         return blitAlphaBlend(p.x(), p.y(), src, alpha_blend_factor);
00229     }

template<typename SDLPixmap>
int Wt::PixmapOf< SDLPixmap >::blitAlphaBlend ( int  x,
int  y,
const PixmapBase src,
int  alpha_blend_factor = Color::Transparent 
) [inline, inherited]

copy to from src with alpha blending

Definition at line 220 of file pixmap.h.

00221                                                                   {
00222         return blitAlphaBlend(x, y, src,
00223                               Rect(0, 0, src.width(), src.height()),
00224                               alpha_blend_factor);
00225     }

template<typename SDLPixmap>
int Wt::PixmapOf< SDLPixmap >::blitAlphaBlend ( const PixmapBase src,
int  alpha_blend_factor = Color::Transparent 
) [inline, inherited]

copy to from src with alpha blending

Definition at line 213 of file pixmap.h.

00214                                                                   {
00215         return blitAlphaBlend(0, 0, src,
00216                               Rect(0, 0, src.width(), src.height()),
00217                               alpha_blend_factor);
00218     }

template<typename SDLPixmap>
int Wt::PixmapOf< SDLPixmap >::blitAlphaBlend ( int  x,
int  y,
const PixmapBase src,
const Rect src_rect,
int  alpha_blend_factor = Color::Transparent 
) [inline, inherited]

copy to from src rect with alpha blending

if alpha_blend_factor = Color::Transparent (default) we keep the destination alpha (blit semantics). If it is set to Color::Opaque we replace alpha values with the new one (blitAlphaCopy semantics).

The blending of the color happens anyway.

Definition at line 172 of file pixmap.h.

Referenced by Wt::PixmapOf< Wt::SDLSurface >::blitAlphaBlend().

00174                                                                   {
00175         const Rect dst = Rect(x, y, src_rect.width(), src_rect.height());
00176         const Rect overlap = dst.intersect(SDLPixmap::clipRect());
00177 
00178         if(overlap.isEmpty())
00179             return 0;
00180 
00181         assert(SDLPixmap::depth() == src.depth());
00182 
00183         const int bpp = SDLPixmap::pixelFormat().bytesPerPixel();
00184         const int src_bpp = src.pixelFormat().bytesPerPixel();
00185 
00186         int alpha_new_part, alpha_old_part;
00187         Color::calcBlendFactors(alpha_blend_factor, alpha_new_part, alpha_old_part);
00188         SDLPixmap::lock()
00189             ;
00190         for(int y = overlap.y(); y < overlap.y() + overlap.height(); y++) {
00191             int offset = SDLPixmap::pixelOffset(overlap.x(), y);
00192             int src_offset = src.pixelOffset(src_rect.x(), src_rect.y() + y - overlap.y());
00193             for(int x = overlap.x(); x < overlap.x() + overlap.width(); x++) {
00194                 Color c = pixelColor(offset);
00195                 Color src_c = src.pixelColor(src_offset);
00196 
00197                 int new_part, old_part;
00198                 Color::calcBlendFactors(src_c.alpha(), new_part, old_part);
00199                 c = Color::blend(c, old_part, src_c, new_part,
00200                                  alpha_new_part, alpha_old_part);
00201                 SDLPixmap::setPixelColor(offset, c);
00202 
00203                 offset += bpp;
00204                 src_offset += src_bpp;
00205             }
00206         }
00207         SDLPixmap::unlock();
00208 
00209         return 0;
00210     }

template<typename SDLPixmap>
int Wt::PixmapOf< SDLPixmap >::blitAlphaCopy ( const Point p,
const PixmapBase src,
const Rect src_rect 
) [inline, inherited]

Definition at line 160 of file pixmap.h.

00160                                                                                    {
00161         return blitAlphaCopy(p.x(), p.y(), src, src_rect);
00162     }

template<typename SDLPixmap>
int Wt::PixmapOf< SDLPixmap >::blitAlphaCopy ( const Point p,
const PixmapBase src 
) [inline, inherited]

Definition at line 157 of file pixmap.h.

Referenced by Wt::PixmapOf< Wt::SDLSurface >::blitAlphaCopy(), and Wt::Painter::drawText().

00157                                                              {
00158         return blitAlphaCopy(p.x(), p.y(), src);
00159     }

Widget* Wt::Widget::childAt ( int  x,
int  y,
bool  self_include = false 
) const [inline]

Definition at line 176 of file widget.h.

References childAt().

00176                                                                    {
00177         return childAt(Point(x, y), self_include);
00178     }

Here is the call graph for this function:

Widget * Wt::Widget::childAt ( const Point p,
bool  self_include = false 
) const

Definition at line 673 of file widget.cpp.

References childAt(), Wt::Object::children(), Wt::Rect::contains(), isHidden(), and rect().

Referenced by childAt(), and Wt::SDLInput::EventInfo::EventInfo().

00673                                                                {
00674     Widget *result = 0;
00675     const Rect& r = rect();
00676     if (isHidden() || !r.contains(p)) {
00677         return result;
00678     }
00679     // we got it. Now let's see if it is spot on some child
00680     for (Object::List::const_iterator child(children().begin()),
00681             end(children().end()); child != end; ++child) {
00682         const Widget* w = dynamic_cast<Widget *>(*child);
00683         // guard against a non widget (e.g. layout) child.
00684         if (w) {
00685             const Point& wp(w->mapFromParent(p));
00686             Widget *ww = w->childAt(wp, true);
00687             // this ensures we keep the last non NULL one (most raised)
00688             if (ww)
00689                 result = ww;
00690         }
00691     }
00692     if (!result && self_include) {
00693         result = const_cast<Widget *>(this);
00694     }
00695     return result;
00696 }

Here is the call graph for this function:

virtual void Wt::Object::childEvent ( ChildEvent  )  [inline, protected, virtual, inherited]

event handling specialization

Reimplemented in Wt::Window::Frame.

Definition at line 146 of file object.h.

Referenced by Wt::Object::event().

00146 {}

List& Wt::Object::children (  )  [inline, inherited]

Definition at line 61 of file object.h.

References Wt::Object::children_.

00061                      {
00062         return children_;
00063     }

const List& Wt::Object::children (  )  const [inline, inherited]

Definition at line 57 of file object.h.

References Wt::Object::children_.

Referenced by Wt::RootWindow::blit_region_ex(), childAt(), Wt::Object::deleteAllChildren(), Wt::Object::deleteFirstChild(), Wt::Object::deleteLastChild(), focusNextPrevChild(), fontChange(), lower(), Wt::postLayoutHintEventRecursively(), and raise().

00057                                  {
00058         return children_;
00059     }

bool Wt::Widget::close ( bool  destroy  )  [virtual]

Definition at line 912 of file widget.cpp.

References Wt::W::DestructiveClose, hide(), Wt::CloseEvent::isAccepted(), Wt::Application::sendEvent(), and wflags_.

00912                                {
00913     CloseEvent ce;
00914     Application::sendEvent(this, ce);
00915     if (!ce.isAccepted())
00916         return false;
00917 
00918     const bool kill = destroy || (wflags_ & W::DestructiveClose);
00919     if (!kill)
00920         hide();
00921     else
00922         delete this;
00923 
00924     return true;
00925 }

Here is the call graph for this function:

bool Wt::Widget::close (  ) 

Definition at line 908 of file widget.cpp.

Referenced by Wt::Dialog::exec().

00908                    {
00909     return close(false);
00910 }

void Wt::Widget::closeEvent ( CloseEvent  )  [protected, virtual]

Definition at line 422 of file widget.cpp.

References Wt::CloseEvent::accept().

Referenced by event().

00422                                      {
00423     e->accept();
00424 }

Here is the call graph for this function:

template<typename SDLPixmap>
PixmapBase Wt::PixmapOf< SDLPixmap >::copy ( const Rect r  )  const [inline, inherited]

Definition at line 280 of file pixmap.h.

00280                                          {
00281         PixmapBase p(r.width(), r.height());
00282         p.convertTo(*this);
00283         p.blit(0, 0, *this, r);
00284         return p;
00285     }

template<typename SDLPixmap>
PixmapBase Wt::PixmapOf< SDLPixmap >::copy ( int  x,
int  y,
int  w,
int  h 
) const [inline, inherited]

Definition at line 276 of file pixmap.h.

00276                                                       {
00277         return copy(Rect(x, y, w, h));
00278     }

template<typename SDLPixmap>
PixmapBase Wt::PixmapOf< SDLPixmap >::copy (  )  const [inline, inherited]

Definition at line 272 of file pixmap.h.

Referenced by Wt::PixmapOf< Wt::SDLSurface >::copy().

00272                             {
00273         return copy(rect());
00274     }

virtual void Wt::Object::customEvent ( CustomEvent  )  [inline, protected, virtual, inherited]

Definition at line 147 of file object.h.

Referenced by Wt::Object::event().

00147 {}

template<typename T>
void Wt::Object::deleteAllChildren (  )  [inline, inherited]

Definition at line 106 of file object.h.

References Wt::Object::children().

00106                              {
00107         List::iterator it(children().begin());
00108         List::iterator end(children().end());
00109 
00110         while (it != end) {
00111             T *t = dynamic_cast<T *>(*it);
00112             // before iteration invalidation
00113             ++it;
00114             // this will invalidate the iterator
00115             if (t) {
00116                 delete t;
00117             }
00118         }
00119     }

Here is the call graph for this function:

template<typename T>
void Wt::Object::deleteFirstChild (  )  [inline, inherited]

Definition at line 72 of file object.h.

References Wt::Object::children().

00072                             {
00073         List::iterator it(children().begin());
00074         List::iterator end(children().end());
00075 
00076         while (it != end) {
00077             T *t = dynamic_cast<T *>(*it);
00078             // before iteration invalidation
00079             ++it;
00080             // this will invalidate the iterator
00081             if (t) {
00082                 delete t;
00083                 break;
00084             }
00085         }
00086     }

Here is the call graph for this function:

template<typename T>
void Wt::Object::deleteLastChild (  )  [inline, inherited]

Definition at line 89 of file object.h.

References Wt::Object::children().

00089                            {
00090         List::reverse_iterator it(children().rbegin());
00091         List::reverse_iterator end(children().rend());
00092 
00093         while (it != end) {
00094             T *t = dynamic_cast<T *>(*it);
00095             // before iteration invalidation
00096             ++it;
00097             // this will invalidate the iterator
00098             if (t) {
00099                 delete t;
00100                 break;
00101             }
00102         }
00103     }

Here is the call graph for this function:

void Wt::Widget::disable (  )  [virtual]

Definition at line 896 of file widget.cpp.

References enabled.

Referenced by setDisabled(), and setEnabled().

00896                      {
00897     enabled = false;
00898 }

void Wt::Widget::draw ( Painter p,
const Region region 
) [protected, virtual]

widget should be able to draw itself

A clever widget can draw only the parts of it that are specified in the region argument. A not so clever widget can safely ignore the region argument and draw the entire widget area.

Keep in mind that double buffering is already implemented and you can't gain anything by reimplementing it again at this level.

Reimplemented in Wt::Button, and Wt::Frame.

Definition at line 436 of file widget.cpp.

References need_redraw_, and trace.

Referenced by Wt::Frame::draw(), Wt::Button::draw(), and paintEvent().

00436                                           {
00437     trace("draw") << "drawing: " << this << std::endl;
00438     //after drawing the widget does not need repainting
00439     need_redraw_ = false;
00440     return;
00441 }

void Wt::Widget::drawText ( const Point p,
const std::string &  text 
)

Definition at line 669 of file widget.cpp.

References Wt::Painter::drawText(), and painter_.

00669                                                            {
00670     painter_->drawText(p, text);
00671 }

Here is the call graph for this function:

void Wt::Widget::drawText ( int  x,
int  y,
const std::string &  text 
)

Definition at line 665 of file widget.cpp.

References Wt::Painter::drawText(), and painter_.

00665                                                          {
00666     painter_->drawText(x, y, text);
00667 }

Here is the call graph for this function:

void Wt::Widget::enable (  )  [virtual]

Definition at line 892 of file widget.cpp.

References enabled.

Referenced by setDisabled(), and setEnabled().

00892                     {
00893     enabled = true;
00894 }

void Wt::Widget::enterEvent ( Event  )  [protected, virtual]

Reimplemented in Wt::Button, and Wt::Window::Frame.

Definition at line 346 of file widget.cpp.

References trace.

Referenced by Wt::Button::enterEvent(), and event().

00346                                 {
00347     trace("mouse") << "enterEvent for " << this << std::endl;
00348 }

void Wt::Widget::erase (  ) 

Definition at line 627 of file widget.cpp.

References rect().

Referenced by erase(), and paintEvent().

00627                    {
00628     erase(rect());
00629 }

Here is the call graph for this function:

void Wt::Widget::erase ( int  x,
int  y,
int  w,
int  h 
)

Definition at line 631 of file widget.cpp.

References erase().

00631                                              {
00632     erase(Rect(x, y, w, h));
00633 }

Here is the call graph for this function:

void Wt::Widget::erase ( const Region r  ) 

Definition at line 613 of file widget.cpp.

References autoclip(), Wt::Painter::begin(), bg_pixmap_, Wt::Painter::end(), erase(), Wt::Painter::eraseRegion(), painter_, and Wt::Region::rects().

00613                                   {
00614     if (bg_pixmap_) {
00615         const RectArray& ra = r.rects();
00616         const int n = ra.size();
00617         for (int i = 0; i < n; i++) {
00618             erase(ra[i]);
00619         }
00620     } else {
00621         painter_->begin(this, autoclip());
00622         painter_->eraseRegion(r);
00623         painter_->end();
00624     }
00625 }

Here is the call graph for this function:

void Wt::Widget::erase ( const Rect r  ) 

Definition at line 594 of file widget.cpp.

References Wt::Rect::align(), autoclip(), Wt::Painter::begin(), bg_alignment, bg_flags, bg_pixmap_, bg_scaled_, Wt::Painter::drawPixmap(), Wt::Painter::end(), Wt::Painter::eraseRect(), Wt::SDLRect::left(), painter_, rect(), Wt::PixmapOf< SDLPixmap >::size(), Wt::SDLRect::top(), and Wt::Unscaled.

00594                                 {
00595     painter_->begin(this, autoclip());
00596 
00597     painter_->eraseRect(r);
00598 
00599     if (bg_pixmap_) {
00600         if (bg_flags == Unscaled) {
00601             Rect aligned = Rect::align(rect(),
00602                                        bg_pixmap_.size(), bg_alignment);
00603             Point p(std::max(aligned.left(), r.left()),
00604                     std::max(aligned.top(), r.top()));
00605             painter_->drawPixmap(p, bg_pixmap_);
00606         } else {
00607             painter_->drawPixmap(Point(0, 0), bg_scaled_);
00608         }
00609     }
00610     painter_->end();
00611 }

Here is the call graph for this function:

bool Wt::Widget::event ( Event e  )  [virtual]

event handling

Reimplemented from Wt::Object.

Definition at line 212 of file widget.cpp.

References Wt::Event::Close, closeEvent(), Wt::WheelEvent::delta(), Wt::Event::Enter, enterEvent(), Wt::Object::event(), Wt::Event::FocusIn, focusInEvent(), focusNextPrevChild(), Wt::Event::FocusOut, focusOutEvent(), Wt::Event::Hide, hideEvent(), Wt::InputEvent::isAccepted(), Wt::KeyEvent::key(), Wt::Key_Backtab, Wt::Key_Tab, Wt::Event::KeyPress, keyPressEvent(), Wt::Event::KeyRelease, keyReleaseEvent(), Wt::Event::Leave, leaveEvent(), mapToParent(), Wt::Event::MouseButtonDblClick, Wt::Event::MouseButtonPress, Wt::Event::MouseButtonRelease, mouseDoubleClickEvent(), Wt::Event::MouseMove, mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), Wt::Event::Move, moveEvent(), Wt::Event::Paint, paintEvent(), Wt::Object::parent(), Wt::MouseEvent::pos(), Wt::Event::Resize, resizeEvent(), Wt::Application::sendEvent(), Wt::Event::Show, showEvent(), Wt::InputEvent::state(), Wt::Event::Wheel, and wheelEvent().

00212                            {
00213     bool handled = true;
00214 
00215     //check if the event is claimed by someone else
00216     if (Object::event(e))
00217         return true;
00218 
00219     switch (e->type()) {
00220     case Event::MouseButtonPress:
00221     case Event::MouseButtonRelease:
00222     case Event::MouseButtonDblClick:
00223     case Event::MouseMove: {
00224             MouseEvent *me = static_cast<MouseEvent *>(e);
00225             switch (e->type()) {
00226             case Event::MouseButtonPress:
00227                 mousePressEvent(me);
00228                 break;
00229             case Event::MouseButtonRelease:
00230                 mouseReleaseEvent(me);
00231                 break;
00232             case Event::MouseButtonDblClick:
00233                 mouseDoubleClickEvent(me);
00234                 break;
00235             case Event::MouseMove:
00236                 mouseMoveEvent(me);
00237                 break;
00238             }
00239             handled = me->isAccepted();
00240             if (parent() && !handled) {
00241                 MouseEvent me_new(me->type(), mapToParent(me->pos()),
00242                                   me->globalPos(), me->button(), me->state());
00243                 handled = Application::sendEvent(parent(), me_new);
00244             }
00245         }
00246         break;
00247     case Event::KeyPress: {
00248             KeyEvent *kep = static_cast<KeyEvent *>(e);
00249             if (kep->key() == Key_Tab) {
00250                 focusNextPrevChild(true);
00251             } else if (kep->key() == Key_Backtab) {
00252                 focusNextPrevChild(false);
00253             } else {
00254                 keyPressEvent(kep);
00255             }
00256         }
00257         break;
00258     case Event::KeyRelease: {
00259             KeyEvent *ker = static_cast<KeyEvent *>(e);
00260             if (ker->key() != Key_Tab && ker->key() != Key_Backtab) {
00261                 keyReleaseEvent(ker);
00262             }
00263         }
00264         break;
00265     case Event::FocusIn:
00266         focusInEvent(static_cast<FocusEvent *>(e));
00267         break;
00268     case Event::FocusOut:
00269         focusOutEvent(static_cast<FocusEvent *>(e));
00270         break;
00271     case Event::Enter:
00272         enterEvent(e);
00273         break;
00274     case Event::Leave:
00275         leaveEvent(e);
00276         break;
00277     case Event::Wheel: {
00278             WheelEvent *we = static_cast<WheelEvent *>(e);
00279             wheelEvent(we);
00280             handled = we->isAccepted();
00281             if (parent() && !handled) {
00282                 WheelEvent we_new(mapToParent(we->pos()),
00283                                   we->delta(), we->state());
00284                 handled = Application::sendEvent(parent(), we_new);
00285             }
00286         }
00287         break;
00288     case Event::Paint:
00289         paintEvent(static_cast<PaintEvent *>(e));
00290         break;
00291     case Event::Resize:
00292         resizeEvent(static_cast<ResizeEvent *>(e));
00293         break;
00294     case Event::Move:
00295         moveEvent(static_cast<MoveEvent *>(e));
00296         break;
00297     case Event::Show:
00298         showEvent(static_cast<ShowEvent *>(e));
00299         break;
00300     case Event::Hide:
00301         hideEvent(static_cast<HideEvent *>(e));
00302         break;
00303     case Event::Close:
00304         closeEvent(static_cast<CloseEvent *>(e));
00305         break;
00306     default:
00307         handled = false;
00308         break;
00309     }
00310 
00311     return handled;
00312 }

Here is the call graph for this function:

virtual bool Wt::Object::eventFilter ( Object ,
Event  
) [inline, virtual, inherited]

Reimplemented in Wt::Layout.

Definition at line 130 of file object.h.

Referenced by Wt::Layout::eventFilter().

00130                                                 {
00131         return false;
00132     }

SizePolicy::ExpandData Wt::Widget::expanding (  )  const [virtual]

Reimplemented from Wt::LayoutItem.

Definition at line 994 of file widget.cpp.

References Wt::LayoutItem::expanding(), and layout_.

00994                                              {
00995     if (layout_)
00996         return layout_->expanding();
00997     return LayoutItem::expanding();
00998 }

Here is the call graph for this function:

template<typename SDLPixmap>
void Wt::PixmapOf< SDLPixmap >::fill ( const Region dst,
const Color color = Color("white") 
) [inline, inherited]

Definition at line 82 of file pixmap.h.

00082                                                                       {
00083         const RectArray& ra = dst.rects();
00084         const int n = ra.size();
00085 
00086         for (int i = 0; i < n; i++) {
00087             fill(ra[i], color);
00088         }
00089     }

template<typename SDLPixmap>
void Wt::PixmapOf< SDLPixmap >::fill ( const Rect dst,
const Color color = Color("white") 
) [inline, inherited]

Definition at line 78 of file pixmap.h.

00078                                                                     {
00079         fill(dst, SDLPixmap::pixelFormat().mapToPixelValue(color));
00080     }

template<typename SDLPixmap>
void Wt::PixmapOf< SDLPixmap >::fill ( const Color color = Color("white")  )  [inline, inherited]

Definition at line 75 of file pixmap.h.

Referenced by Wt::PixmapOf< Wt::SDLSurface >::blend(), Wt::PixmapOf< Wt::SDLSurface >::fill(), Wt::Painter::fillRect(), and Wt::Painter::fillRegion().

00075                                                    {
00076         fill(SDLPixmap::pixelFormat().mapToPixelValue(color));
00077     }

bool Wt::Object::filterEvent ( Event  )  [protected, inherited]

Definition at line 164 of file object.cpp.

References Wt::Object::eventFilters_.

Referenced by Wt::Object::event(), and Wt::Application::event().

00164                                  {
00165     for (List::iterator filter(eventFilters_.begin()),
00166             end(eventFilters_.end()); filter != end; ++filter) {
00167         if ((*filter)->eventFilter(this, e))
00168             return true;
00169     }
00170     return false;
00171 }

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

Definition at line 259 of file widget.h.

References focus_data_.

00259                                  {
00260         return &focus_data_;
00261     }

void Wt::Widget::focusInEvent ( FocusEvent  )  [protected, virtual]

Reimplemented in Wt::Button.

Definition at line 330 of file widget.cpp.

References trace.

Referenced by event(), and Wt::Button::focusInEvent().

00330                                       {
00331     trace("focus") << "FocusInEvent for " << this << std::endl;
00332 }

bool Wt::Widget::focusNextPrevChild ( bool  next  )  [protected, virtual]

cycles focus amongs widgets

Todo:
use Boost graph or tree in order to make this simple function and FocusData to carry the meat of the implementation instead the other way around
Bug:
Backtab is working unexpectedly
Bug:
focusNextPrevChild is not working right for widgets with children

Definition at line 757 of file widget.cpp.

References Wt::FocusEvent::Backtab, Wt::Object::children(), Wt::Object::children_, Wt::findNextWidget(), focusNextPrevChild(), focusWidget(), Wt::Object::parent(), parentWidget(), setFocus(), Wt::FocusEvent::Tab, and trace.

Referenced by event(), focusNextPrevChild(), wheelEvent(), and ~Widget().

00757                                          {
00758     Widget *w = focusWidget(), *w2;
00759     const Object::List& children_ = children();
00760 
00761     trace("focus") << "focusNextPrevChild() for " << this << std::endl;
00762 
00763     if (w == this) {
00764         // we got the focus. We have to iterate in children
00765         goto start_cycle;
00766     } else if (w->parent() == this) {
00767         // current focusWidget is our child
00768         if (next) {
00769             Object::List::const_iterator it_;
00770             it_ = find(children_.begin(),
00771                        children_.end(), w);
00772             // must exist
00773             assert(it_ != children_.end());
00774             w2 = findNextWidget(++it_, children_.end());
00775         } else {
00776             Object::List::const_reverse_iterator rit_;
00777             rit_ = find(children_.rbegin(),
00778                         children_.rend(), w);
00779             // must exist
00780             assert(rit_ != children_.rend());
00781             w2 = findNextWidget(++rit_, children_.rend());
00782         }
00783 
00784         if (!w2) {
00785             // cannot continue cycle
00786             if (!parent()) {
00787                 // we didn't d find it and we have nowhere to go
00788                 // case: rootwindow with children (end of cycle)
00789                 goto start_cycle;
00790             }
00791             // cannot continue cycle let's try father
00792             goto pass_to_parent;
00793         }
00794     } else {
00795         // current focusWidget is not our child
00796         // so let's start cycling starting from this
00797         w2 = this;
00798     }
00799 
00800 change_focus:
00801     w2->setFocus((next) ? FocusEvent::Tab : FocusEvent::Backtab);
00802     return true;
00803 
00804 start_cycle:
00805     w2 = (next) ?
00806          findNextWidget(children_.begin(), children_.end()) :
00807          findNextWidget(children_.rbegin(), children_.rend());
00808     if (w2)
00809         goto change_focus;
00810 pass_to_parent:
00811     if (parent()) {
00812         Widget *wp = parentWidget();
00813         return wp->focusNextPrevChild(next);
00814     }
00815     return false;
00816 }

Here is the call graph for this function:

void Wt::Widget::focusOutEvent ( FocusEvent  )  [protected, virtual]

Reimplemented in Wt::Button.

Definition at line 334 of file widget.cpp.

References trace.

Referenced by event(), and Wt::Button::focusOutEvent().

00334                                        {
00335     trace("focus") << "FocusOutEvent for " << this << std::endl;
00336 }

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

Definition at line 180 of file widget.h.

References focus_data_, and Wt::FocusData::focusWidget().

Referenced by focusNextPrevChild(), Wt::SDLInput::handleKeyEvent(), hasFocus(), and setFocus().

00180                                 {
00181         return focus_data_.focusWidget();
00182     }

Here is the call graph for this function:

const Font & Wt::Widget::font (  )  const

Reimplemented in Wt::Window::Frame.

Definition at line 635 of file widget.cpp.

References Wt::Painter::font(), font(), ownFont, painter_, and parentWidget().

Referenced by Wt::Label::calc_size_hint(), Wt::PushButton::drawButtonLabel(), Wt::Label::drawContents(), Wt::Label::effectiveIndent(), Wt::Window::Frame::font(), font(), fontChange(), reparent(), Wt::PushButton::setButtonSize(), setFont(), Wt::Window::setTitleFont(), and Wt::Window::titleFont().

00635                                {
00636     const Widget *p = parentWidget();
00637     return (p && !ownFont) ? p->font() : painter_->font();
00638 }

Here is the call graph for this function:

void Wt::Widget::fontChange ( const Font oldFont  )  [protected, virtual]

Reimplemented in Wt::Label.

Definition at line 651 of file widget.cpp.

References Wt::Object::children(), and font().

Referenced by setFont().

00651                                             {
00652     for (Object::List::const_iterator child(children().begin()),
00653             end(children().end()); child != end; ++child) {
00654         Widget* w = dynamic_cast<Widget *>(*child);
00655         // guard against a non widget (e.g. layout) child.
00656         if (w && !w->ownFont) {
00657             w->painter_->setFont(font());
00658             w->fontChange(old_font);
00659         }
00660     }
00661     updateGeometry();
00662     update();
00663 }

Here is the call graph for this function:

const Color & Wt::Widget::foregroundColor (  )  const

Reimplemented in Wt::Window::Frame.

Definition at line 179 of file widget.cpp.

References Wt::Pen::color(), painter_, and Wt::Painter::pen().

Referenced by Wt::Window::Frame::foregroundColor(), and Wt::Window::titleColor().

00179                                            {
00180     return painter_->pen().color();
00181 }

Here is the call graph for this function:

virtual const Rect& Wt::LayoutItem::geometry (  )  const [inline, virtual, inherited]

return the widget's geometry relative to its parent

Definition at line 175 of file layout.h.

References Wt::LayoutItem::geometry_rect_.

Referenced by Wt::Label::drawContents(), Wt::Layout::enforce(), Wt::Layout::eventFilter(), Wt::Window::frameGeometry(), height(), mapFromGlobal(), mapFromParent(), mapToGlobal(), mapToParent(), Wt::Window::Frame::mousePressEvent(), move(), resize(), setGeometry(), Wt::BoxLayout::setGeometry(), Wt::GridLayout::setGeometry(), Wt::CascadeLayout::setGeometry(), size(), width(), and ~Widget().

00175                                          {
00176         return geometry_rect_;
00177     }

void Wt::Widget::grabKeyboard (  ) 

Definition at line 1000 of file widget.cpp.

References Wt::Singleton< DERIVED >::instance().

Referenced by show(), and Widget().

01000                           {
01001     SDLInput::instance()->setKeyboardGrabber(this);
01002 }

Here is the call graph for this function:

void Wt::Widget::grabMouse (  ) 

Definition at line 1013 of file widget.cpp.

References Wt::Singleton< DERIVED >::instance().

Referenced by show(), and Widget().

01013                        {
01014     SDLInput::instance()->setMouseGrabber(this);
01015 }

Here is the call graph for this function:

bool Wt::Widget::hasFocus (  )  const [inline]

Definition at line 184 of file widget.h.

References focusWidget().

Referenced by mousePressEvent(), wheelEvent(), and ~Widget().

00184                           {
00185         return (focusWidget() == this);
00186     }

Here is the call graph for this function:

virtual bool Wt::LayoutItem::hasHeightForWidth (  )  const [inline, virtual, inherited]

Definition at line 192 of file layout.h.

00192                                            {
00193         return false;
00194     }

int Wt::Widget::height (  )  const [inline]

Definition at line 75 of file widget.h.

References Wt::LayoutItem::geometry(), and Wt::SDLRect::height().

Referenced by Wt::Label::drawContents(), Wt::Frame::drawFrame(), rect(), and resize().

00075                        {
00076         return geometry().height();
00077     }

Here is the call graph for this function:

virtual int Wt::LayoutItem::heightForWidth ( int   )  const [inline, virtual, inherited]

Definition at line 195 of file layout.h.

00195                                           {
00196         return -1;
00197     }

void Wt::Widget::hiddenChanged ( bool  hidden_new  )  [protected]

Definition at line 830 of file widget.cpp.

References Wt::Application::postEvent(), Wt::postLayoutHintEventRecursively(), update(), and updateGeometry().

Referenced by Widget().

00830                                           {
00831     if (hidden_new) {
00832         Application::postEvent(this, new HideEvent());
00833     } else {
00834         // notify layout subsystem since layout hint event
00835         // were disabled while top level widget was hidden
00836         postLayoutHintEventRecursively(this);
00837         Application::postEvent(this, new ShowEvent());
00838     }
00839     updateGeometry();
00840     // force a repaint
00841     update();
00842 }

Here is the call graph for this function:

void Wt::Widget::hide (  )  [virtual]

Reimplemented in Wt::Window.

Definition at line 857 of file widget.cpp.

References hidden, releaseKeyboard(), and releaseMouse().

Referenced by close(), setHidden(), and setShown().

00857                   {
00858     releaseKeyboard();
00859     releaseMouse();
00860 
00861     hidden = true;
00862 }

Here is the call graph for this function:

void Wt::Widget::hideEvent ( HideEvent  )  [protected, virtual]

Definition at line 420 of file widget.cpp.

Referenced by event().

00420 {}

void Wt::Object::insertChild ( Object obj  )  [virtual, inherited]

Definition at line 81 of file object.cpp.

References Wt::Event::ChildInserted, Wt::Object::children_, Wt::Object::parent_, and Wt::Application::postEvent().

Referenced by Wt::Object::Object(), and Wt::Object::reparent().

00081                                     {
00082     children_.push_back(obj);
00083     obj->parent_ = this;
00084     Event *child_event = new ChildEvent(Event::ChildInserted, obj);
00085     Application::postEvent(this, child_event);
00086 }

Here is the call graph for this function:

void Wt::Object::installEventFilter ( const Object filterObj  )  [inherited]

Definition at line 124 of file object.cpp.

References Wt::Object::destroyed, Wt::Object::eventFilters_, and Wt::Object::removeEventFilter().

Referenced by setLayout().

00124                                                        {
00125     // we have to deconstify here. We cannot deliver event to const objects
00126     Object *obj = const_cast<Object *>(filterObj);
00127     eventFilters_.push_back(obj);
00128     obj->destroyed.connect(sigc::slot1<void, const Object *>(
00129                                sigc::mem_fun(*this, &Object::removeEventFilter)));
00130 }

Here is the call graph for this function:

bool Wt::LayoutItem::invalidated (  )  const [inline, protected, inherited]

Definition at line 227 of file layout.h.

References Wt::LayoutItem::invalidated_.

Referenced by Wt::Layout::minimumSize(), and Wt::Layout::sizeHint().

00227                              {
00228         return invalidated_;
00229     }

void Wt::LayoutItem::invalidateRecursively (  )  [protected, inherited]

Definition at line 28 of file layout.cpp.

References Wt::LayoutIterator::finish(), Wt::LayoutItem::invalidated_, Wt::LayoutItem::isNonEmpty(), Wt::LayoutItem::iterator(), Wt::LayoutIterator::start(), and trace.

Referenced by Wt::Layout::enforce().

00028                                        {
00029     // if null means empty item. don't bother (used on Grid)
00030     // we can't handle it in isEmpty() because it is virtual
00031     // and the null dereference crashes
00032     trace("layout") << "Trying to invalidate " << this
00033     << " == "  << dynamic_cast<Object *>(this) << std::endl;
00034     if (isNonEmpty()) {
00035         trace("layout") << "Invalidating " << this << std::endl;
00036         LayoutIterator it = iterator();
00037         invalidated_ = true;
00038         for (it.start(); !it.finish(); it++) {
00039             LayoutItem *li = *it;
00040             li->invalidateRecursively();
00041         }
00042         trace("layout") << "Invalidation finished " << this << std::endl;
00043     }
00044 }

Here is the call graph for this function:

template<typename TEST_TYPE>
bool Wt::LayoutItem::is (  )  const [inline, inherited]

Definition at line 209 of file layout.h.

Referenced by Wt::Cascade::pop(), and Wt::Layout::removeItem().

00209                     {
00210         return (type<TEST_TYPE>() != 0);
00211     }

bool Wt::Widget::is_enabled ( bool  val  )  const [protected]

Definition at line 881 of file widget.cpp.

References enabled, and parentWidget().

Referenced by Widget().

00881                                       {
00882     if (!val)
00883         return false;
00884 
00885     const Widget *p = parentWidget();
00886     if (p && !p->enabled)
00887         return false;
00888 
00889     return true;
00890 }

Here is the call graph for this function:

bool Wt::Widget::is_hidden ( bool  val  )  const [protected]

Definition at line 844 of file widget.cpp.

References hidden, and Wt::Object::parent().

Referenced by Widget().

00844                                      {
00845     if (val)
00846         return true;
00847 
00848     // during parent's death parentWidget() is not
00849     // reliable anymore (parent is a simple Object)
00850     const Widget *p = dynamic_cast<Widget *>(parent());
00851     if (p && p->hidden)
00852         return true;
00853 
00854     return false;
00855 }

Here is the call graph for this function:

bool Wt::Object::isDescendant ( const Object p  )  const [inherited]

Definition at line 67 of file object.cpp.

References Wt::Object::parent().

Referenced by Wt::SDLInput::EventInfo::EventInfo(), and Wt::SDLInput::handleKeyEvent().

00067                                                {
00068     if (!p)
00069         return false;
00070 
00071     const Object *q = this;
00072 
00073     do {
00074         if (p == q)
00075             return true;
00076     } while ((q = q->parent()));
00077 
00078     return false;
00079 }

Here is the call graph for this function:

bool Wt::Widget::isEmpty (  )  const [inline, virtual]

Reimplemented from Wt::LayoutItem.

Definition at line 147 of file widget.h.

References isHidden().

00147                          {
00148         return isHidden();
00149     }

Here is the call graph for this function:

bool Wt::Widget::isFocusEnabled ( int  reason  )  const

Definition at line 708 of file widget.cpp.

References Wt::FocusEvent::ActiveWindow, Wt::FocusEvent::Backtab, ClickFocus, enabled, focusPolicy, Wt::FocusEvent::Mouse, NoFocus, Wt::FocusEvent::Other, Wt::FocusEvent::Popup, Wt::FocusEvent::Shortcut, Wt::FocusEvent::Tab, and TabFocus.

Referenced by setFocus().

00708                                             {
00709     bool allow_focus;
00710 
00711     if (!enabled)
00712         return false;
00713 
00714     switch (reason) {
00715     case FocusEvent::Mouse:
00716         allow_focus = (focusPolicy & ClickFocus);
00717         break;
00718     case FocusEvent::Tab:
00719     case FocusEvent::Backtab:
00720         allow_focus = (focusPolicy & TabFocus);
00721         break;
00722     case FocusEvent::ActiveWindow:
00723     case FocusEvent::Popup:
00724     case FocusEvent::Shortcut:
00725     case FocusEvent::Other:
00726     default:
00727         allow_focus = (focusPolicy != NoFocus);
00728         break;
00729     }
00730 
00731     return allow_focus;
00732 }

bool Wt::Widget::isHidden (  )  const [inline]

Definition at line 144 of file widget.h.

References hidden.

Referenced by Wt::RootWindow::blit_region(), Wt::RootWindow::blit_region_ex(), childAt(), isEmpty(), and Wt::Layout::setGeometry().

00144                           {
00145         return hidden;
00146     }

bool Wt::LayoutItem::isNonEmpty (  )  const [inline, inherited]

Definition at line 188 of file layout.h.

References Wt::LayoutItem::isEmpty().

Referenced by Wt::LayoutItem::invalidateRecursively().

00188                             {
00189         return (this) ? !isEmpty() : false;
00190     }

Here is the call graph for this function:

template<typename SDLPixmap>
bool Wt::PixmapOf< SDLPixmap >::isNull (  )  const [inline, inherited]

Definition at line 61 of file pixmap.h.

00061                         {
00062         return (!*this || (SDLPixmap::width() == 0 && SDLPixmap::height() == 0));
00063     }

bool Wt::Widget::isShown (  )  const [inline]

Definition at line 141 of file widget.h.

References hidden.

Referenced by ~Widget().

00141                           {
00142         return !hidden;
00143     }

virtual LayoutIterator Wt::LayoutItem::iterator (  )  [inline, virtual, inherited]

Reimplemented in Wt::LayoutStdContainer< Container >, Wt::LayoutStdContainer< Wt::Matrix< MatrixLayoutItemCompound > >, Wt::LayoutStdContainer< std::list< CascadeLayoutItemCompound > >, and Wt::LayoutStdContainer< std::list< BoxLayoutItemCompound > >.

Definition at line 199 of file layout.h.

Referenced by Wt::LayoutItem::invalidateRecursively(), and Wt::Layout::setGeometry().

00199                                       {
00200         return LayoutIterator(new NullLayoutIterator());
00201     }

Widget * Wt::Widget::keyboardGrabber (  )  [static]

Definition at line 1009 of file widget.cpp.

References Wt::Singleton< DERIVED >::instance().

Referenced by releaseKeyboard().

01009                                 {
01010     return SDLInput::instance()->keyboardGrabber();
01011 }

Here is the call graph for this function:

void Wt::Widget::keyPressEvent ( KeyEvent  )  [protected, virtual]

Reimplemented in Wt::Button.

Definition at line 338 of file widget.cpp.

References trace.

Referenced by event(), and Wt::Button::keyPressEvent().

00338                                      {
00339     trace("key") << "keyPressEvent for " << this << std::endl;
00340 }

void Wt::Widget::keyReleaseEvent ( KeyEvent  )  [protected, virtual]

Reimplemented in Wt::Button.

Definition at line 342 of file widget.cpp.

References trace.

Referenced by event(), and Wt::Button::keyReleaseEvent().

00342                                        {
00343     trace("key") << "keyReleaseEvent for " << this << std::endl;
00344 }

void Wt::Object::killTimer ( int  id  )  [inherited]

Definition at line 145 of file object.cpp.

References Wt::Object::timers_.

Referenced by Wt::Timer::stop().

00145                              {
00146     delete timers_[id];
00147     timers_.erase(id);
00148 }

void Wt::Object::killTimers (  )  [inherited]

Definition at line 150 of file object.cpp.

References Wt::Object::timers_.

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

00150                         {
00151     uint n = timers_.size() + 1;
00152     for (uint i = 1; i < n; i++) {
00153         delete timers_[i];
00154     }
00155     timers_.clear();
00156 }

Layout* Wt::Widget::layout (  )  const [inline]

Definition at line 161 of file widget.h.

References layout_.

Referenced by Wt::Box::add(), Wt::Cascade::Cascade(), Wt::Cascade::cascadeLayout(), Wt::Grid::gridLayout(), Wt::Frame::onLayoutChange(), Wt::Cascade::setAlignment(), setLayout(), and Wt::Box::setStretchFactor().

00161                            {
00162         return layout_;
00163     }

void Wt::Widget::leaveEvent ( Event  )  [protected, virtual]

Reimplemented in Wt::Button, and Wt::Window::Frame.

Definition at line 349 of file widget.cpp.

References trace.

Referenced by event(), and Wt::Button::leaveEvent().

00349                                 {
00350     trace("mouse") << "leaveEvent for " << this << std::endl;
00351 }

void Wt::Widget::lower (  ) 

Reimplemented in Wt::Window.

Definition at line 565 of file widget.cpp.

References Wt::Object::children(), Wt::Object::parent(), and update().

00565                    {
00566     Object *p = parent();
00567     if (!p)
00568         return;
00569     Object::List& list(p->children());
00570     list.remove(this);
00571     list.push_front(this);
00572     update();
00573 }

Here is the call graph for this function:

Point Wt::Widget::mapFromGlobal ( const Point pos  )  const

Definition at line 125 of file widget.cpp.

References Wt::LayoutItem::geometry(), parentWidget(), and Wt::Rect::topLeft().

Referenced by Wt::RootWindow::blit_region(), and Wt::SDLInput::handleMouseEvent().

00125                                                    {
00126     const Widget *p = this;
00127     Point q(pos);
00128 
00129     do {
00130         q -= p->geometry().topLeft();
00131     } while ((p = p->parentWidget()));
00132     return q;
00133 }

Here is the call graph for this function:

Point Wt::Widget::mapFromParent ( const Point pos  )  const

Definition at line 139 of file widget.cpp.

References Wt::LayoutItem::geometry(), and Wt::Rect::topLeft().

00139                                                    {
00140     return pos - geometry().topLeft();
00141 }

Here is the call graph for this function:

Region Wt::Widget::mapToGlobal ( const Region region  )  const

Definition at line 143 of file widget.cpp.

References Wt::Region::boundingRect(), mapToGlobal(), Wt::Rect::topLeft(), Wt::Region::translate(), Wt::Point::x(), and Wt::Point::y().

00143                                                       {
00144     Region mapped_region(region);
00145     const Point p1(region.boundingRect().topLeft());
00146     const Point p2(mapToGlobal(p1));
00147     const Point dp = p2 - p1;
00148     mapped_region.translate(dp.x(), dp.y());
00149     return mapped_region;
00150 }

Here is the call graph for this function:

Point Wt::Widget::mapToGlobal ( const Point pos  )  const

Definition at line 115 of file widget.cpp.

References Wt::LayoutItem::geometry(), parentWidget(), and Wt::Rect::topLeft().

Referenced by mapToGlobal(), and paintEvent().

00115                                                  {
00116     const Widget *p = this;
00117     Point q(pos);
00118 
00119     do {
00120         q += p->geometry().topLeft();
00121     } while ((p = p->parentWidget()));
00122     return q;
00123 }

Here is the call graph for this function:

Region Wt::Widget::mapToParent ( const Region region  )  const

Definition at line 152 of file widget.cpp.

References Wt::Region::boundingRect(), mapToParent(), Wt::Rect::topLeft(), Wt::Region::translate(), Wt::Point::x(), and Wt::Point::y().

00152                                                       {
00153     Region mapped_region(region);
00154     const Point p1(region.boundingRect().topLeft());
00155     const Point p2(mapToParent(p1));
00156     const Point dp = p2 - p1;
00157     mapped_region.translate(dp.x(), dp.y());
00158     return mapped_region;
00159 }

Here is the call graph for this function:

Point Wt::Widget::mapToParent ( const Point pos  )  const

Definition at line 135 of file widget.cpp.

References Wt::LayoutItem::geometry(), and Wt::Rect::topLeft().

Referenced by event(), mapToParent(), and Wt::Application::postEvent().

00135                                                  {
00136     return pos + geometry().topLeft();
00137 }

Here is the call graph for this function:

Size Wt::Widget::maximumSize (  )  const [virtual]

Reimplemented from Wt::LayoutItem.

Definition at line 965 of file widget.cpp.

References layout_, Wt::Layout::margin, and Wt::LayoutItem::maximumSize().

Referenced by resize(), and setMaximumSize().

00965                                {
00966     return (layout_ ? layout_->maximumSize() << layout_->margin :
00967             LayoutItem::maximumSize());
00968 }

Here is the call graph for this function:

Size Wt::Widget::minimumSize (  )  const [virtual]

Reimplemented from Wt::LayoutItem.

Definition at line 945 of file widget.cpp.

References layout_, Wt::Layout::margin, Wt::LayoutItem::minimumSize(), and Wt::Layout::minimumSize().

Referenced by resize(), Wt::RootWindow::resize(), setMinimumSize(), and setSizeHint().

00945                                {
00946     return (layout_ ? layout_->minimumSize() << layout_->margin :
00947             LayoutItem::minimumSize());
00948 }

Here is the call graph for this function:

void Wt::Widget::mouseDoubleClickEvent ( MouseEvent  )  [protected, virtual]

Definition at line 323 of file widget.cpp.

References trace.

Referenced by event().

00323                                                 {
00324     trace("mouse") << "mouseDoubleClickEvent for " << this << std::endl;
00325 }

Widget * Wt::Widget::mouseGrabber (  )  [static]

Definition at line 1022 of file widget.cpp.

References Wt::Singleton< DERIVED >::instance().

Referenced by releaseMouse().

01022                              {
01023     return SDLInput::instance()->mouseGrabber();
01024 }

Here is the call graph for this function:

void Wt::Widget::mouseMoveEvent ( MouseEvent  )  [protected, virtual]

Reimplemented in Wt::Window::Frame.

Definition at line 326 of file widget.cpp.

References trace.

Referenced by event().

00326                                          {
00327     trace("mouse") << "mouseMoveEvent for " << this << std::endl;
00328 }

void Wt::Widget::mousePressEvent ( MouseEvent  )  [protected, virtual]

event handling specialization

Reimplemented in Wt::Button, and Wt::Window::Frame.

Definition at line 314 of file widget.cpp.

References Wt::InputEvent::accept(), hasFocus(), Wt::FocusEvent::Mouse, setFocus(), and trace.

Referenced by event(), and Wt::Button::mousePressEvent().

00314                                            {
00315     trace("mouse") << "mousePressEvent for " << this << std::endl;
00316     setFocus(FocusEvent::Mouse);
00317     if (hasFocus())
00318         me->accept();
00319 }

Here is the call graph for this function:

void Wt::Widget::mouseReleaseEvent ( MouseEvent  )  [protected, virtual]

Reimplemented in Wt::Button, and Wt::Window::Frame.

Definition at line 320 of file widget.cpp.

References trace.

Referenced by event(), and Wt::Button::mouseReleaseEvent().

00320                                            {
00321     trace("mouse") << "mouseReleaseEvent for " << this << std::endl;
00322 }

void Wt::Widget::move ( const Point p  ) 

Definition at line 532 of file widget.cpp.

References move(), Wt::Point::x(), and Wt::Point::y().

00532                                 {
00533     move(p.x(), p.y());
00534 }

Here is the call graph for this function:

void Wt::Widget::move ( int  x,
int  y 
) [virtual]

Definition at line 511 of file widget.cpp.

References Wt::LayoutItem::geometry(), Wt::Rect::moveTopLeft(), parentWidget(), Wt::Application::postEvent(), Wt::LayoutItem::setGeometry(), trace, and update().

Referenced by Wt::Window::Frame::mouseMoveEvent(), move(), and setGeometry().

00511                               {
00512     const Point newp(x, y);
00513     const Point oldp(geometry().topLeft());
00514 
00515     if (newp == oldp)
00516         return;
00517 
00518     Region exposed(geometry());
00519     Rect r(geometry());
00520     r.moveTopLeft(newp);
00521     LayoutItem::setGeometry(r);
00522     exposed -= geometry();
00523 
00524     trace("geometry") << this <<
00525     " Widget::setGeometry() setting geometry to " << r << std::endl;
00526 
00527     Application::postEvent(this, new MoveEvent(newp, oldp));
00528     update(parentWidget(), exposed);
00529     update();
00530 }

Here is the call graph for this function:

void Wt::Widget::moveEvent ( MoveEvent  )  [protected, virtual]

Definition at line 416 of file widget.cpp.

Referenced by event().

00416 {}

const std::string& Wt::Object::name (  )  const [inline, inherited]

Definition at line 124 of file object.h.

References Wt::Object::name_.

Referenced by Wt::operator<<(), Wt::Application::parseArgs(), and Wt::PushButton::setButtonSize().

00124                                   {
00125         return name_;
00126     }

void Wt::Widget::paintEvent ( PaintEvent  )  [protected, virtual]

Reimplemented in Wt::RootWindow.

Definition at line 377 of file widget.cpp.

References autoclip(), Wt::Painter::begin(), draw(), Wt::Painter::end(), erase(), Wt::PaintEvent::erased(), mapToGlobal(), need_redraw_, painter_, Wt::Object::parent(), Wt::PaintEvent::region(), topParentWidget(), trace, and update().

Referenced by event(), and Wt::RootWindow::paintEvent().

00377                                      {
00378     // notify top ancestor to redraw us and our children
00379     Region region(e->region());
00380     trace("paint") << "paintEvent: " << this << " region: " << region << std::endl;
00381     if (need_redraw_) {
00382         if (e->erased()) {
00383             trace("paint") << "paintEvent: Erasing " << this << " region: " << region << std::endl;
00384             erase();
00385         }
00386         painter_->begin(this, autoclip());
00387         draw(painter_, region);
00388         painter_->end();
00389     }
00390     if (parent()) {
00391         update(topParentWidget(), mapToGlobal(region));
00392     }
00393 }

Here is the call graph for this function:

Object* Wt::Object::parent (  )  const [inline, inherited]

Definition at line 53 of file object.h.

References Wt::Object::parent_.

Referenced by event(), focusNextPrevChild(), Wt::Window::Frame::Frame(), is_hidden(), Wt::Object::isDescendant(), Wt::Layout::isTopLevel(), Wt::Layout::Layout(), lower(), Wt::Layout::mainWidget(), Wt::operator<<(), paintEvent(), parentWidget(), Wt::Application::postEvent(), raise(), updateGeometry(), Widget(), Wt::Window::Window(), Wt::Layout::~Layout(), and ~Widget().

00053                            {
00054         return parent_;
00055     };

Widget* Wt::Widget::parentWidget (  )  const [inline]

parents are guaranteed to be widgets and not general wobjects

Definition at line 61 of file widget.h.

References Wt::Object::parent().

Referenced by focusNextPrevChild(), font(), is_enabled(), mapFromGlobal(), mapToGlobal(), move(), resize(), and ~Widget().

00061                                  {
00062         return static_cast<Widget *>(parent());
00063     }

Here is the call graph for this function:

template<typename SDLPixmap>
int Wt::PixmapOf< SDLPixmap >::pixel ( const Point p  )  const [inline, inherited]

Definition at line 253 of file pixmap.h.

Referenced by Wt::PixmapOf< Wt::SDLSurface >::pixel(), and Wt::Painter::rop().

00253                                     {
00254         return pixel(p.x(), p.y());
00255     }

template<typename SDLPixmap>
Color Wt::PixmapOf< SDLPixmap >::pixelColor ( const Point p  )  const [inline, inherited]

Definition at line 258 of file pixmap.h.

Referenced by Wt::PixmapOf< Wt::SDLSurface >::blitAlphaBlend(), and Wt::PixmapOf< Wt::SDLSurface >::pixelColor().

00258                                            {
00259         return pixelColor(p.x(), p.y());
00260     }

void Wt::Widget::raise (  ) 

Reimplemented in Wt::Window.

Definition at line 555 of file widget.cpp.

References Wt::Object::children(), Wt::Object::parent(), and update().

00555                    {
00556     Object *p = parent();
00557     if (!p)
00558         return;
00559     Object::List& list(p->children());
00560     list.remove(this);
00561     list.push_back(this);
00562     update();
00563 }

Here is the call graph for this function:

Rect Wt::Widget::rect (  )  const [inline]

Reimplemented from Wt::PixmapOf< SDLPixmap >.

Definition at line 82 of file widget.h.

References height(), and width().

Referenced by childAt(), Wt::Frame::contentsRect(), Wt::PushButton::drawButtonLabel(), erase(), repaint(), Wt::RootWindow::RootWindow(), update(), and updateBackground().

00082                       {
00083         return Rect(0, 0, width(), height());
00084     }

Here is the call graph for this function:

void Wt::Widget::releaseKeyboard (  ) 

Definition at line 1004 of file widget.cpp.

References Wt::Singleton< DERIVED >::instance(), and keyboardGrabber().

Referenced by hide(), and ~Widget().

01004                              {
01005     if (keyboardGrabber() == this)
01006         SDLInput::instance()->releaseKeyboardGrab();
01007 }

Here is the call graph for this function:

void Wt::Widget::releaseMouse (  ) 

Definition at line 1017 of file widget.cpp.

References Wt::Singleton< DERIVED >::instance(), and mouseGrabber().

Referenced by hide(), and ~Widget().

01017                           {
01018     if (mouseGrabber() == this)
01019         SDLInput::instance()->releaseMouseGrab();
01020 }

Here is the call graph for this function:

void Wt::Object::removeChild ( Object obj  )  [virtual, inherited]

Definition at line 88 of file object.cpp.

References Wt::Event::ChildRemoved, Wt::Object::children_, Wt::Object::parent_, and Wt::Application::postEvent().

Referenced by Wt::Object::reparent(), and Wt::Object::~Object().

00088                                     {
00089     List::iterator end = children_.end();
00090     List::iterator p = find(children_.begin(), end, obj);
00091 
00092     if (p != end) {
00093         children_.erase(p);
00094         obj->parent_ = 0;
00095         Event *child_event = new ChildEvent(Event::ChildRemoved, obj);
00096         Application::postEvent(this, child_event);
00097     }
00098 }

Here is the call graph for this function:

void Wt::Object::removeEventFilter ( const Object obj  )  [inherited]

Definition at line 132 of file object.cpp.

References Wt::Object::eventFilters_.

Referenced by Wt::Object::installEventFilter().

00132                                                 {
00133     List::iterator p, end(eventFilters_.end());
00134     p = find(eventFilters_.begin(), end, obj);
00135     if (p != end)
00136         eventFilters_.erase(p);
00137 }

void Wt::Widget::repaint (  ) 

Definition at line 476 of file widget.cpp.

References Wt::W::NoAutoErase, and wflags_.

Referenced by repaint().

00476                      {
00477     repaint(!(wflags_ & W::NoAutoErase));
00478 }

void Wt::Widget::repaint ( bool  erase  ) 

Definition at line 472 of file widget.cpp.

References rect(), and repaint().

00472                                {
00473     repaint(rect(), erase);
00474 }

Here is the call graph for this function:

void Wt::Widget::repaint ( int  x,
int  y,
int  w,
int  h,
bool  erase = true 
)

Definition at line 468 of file widget.cpp.

References repaint().

00468                                                            {
00469     repaint(Rect(x, y, w, h), erase);
00470 }

Here is the call graph for this function:

void Wt::Widget::repaint ( const Region r,
bool  erase = true 
)

Definition at line 462 of file widget.cpp.

References need_redraw_, and Wt::Application::sendEvent().

00462                                                 {
00463     PaintEvent e(r, erase);
00464     need_redraw_ = true;
00465     Application::sendEvent(this, e);
00466 }

Here is the call graph for this function:

void Wt::Widget::repaint ( const Rect r,
bool  erase = true 
)

Definition at line 456 of file widget.cpp.

References need_redraw_, and Wt::Application::sendEvent().

00456                                               {
00457     PaintEvent e(r, erase);
00458     need_redraw_ = true;
00459     Application::sendEvent(this, e);
00460 }

Here is the call graph for this function:

void Wt::Object::reparent ( Object new_parent  )  [inherited]

Definition at line 100 of file object.cpp.

References Wt::Object::insertChild(), Wt::Object::parent_, Wt::Object::removeChild(), and trace.

Referenced by Wt::Layout::addItem(), reparent(), and setLayout().

00100                                         {
00101     if (parent_ == new_parent)
00102         return;
00103     trace("obj") << "Reparenting " <<  this << std::endl;
00104 
00105     if (parent_) {
00106         trace("obj") << "   Leaving parent " <<  parent_ << std::endl;
00107         parent_->removeChild(this);
00108     }
00109     if (new_parent) {
00110         trace("obj") << "   Going to new parent " <<  new_parent << std::endl;
00111         new_parent->insertChild(this);
00112     }
00113     parent_ = new_parent;
00114 }

Here is the call graph for this function:

void Wt::Widget::reparent ( Widget new_parent  ) 

Definition at line 109 of file widget.cpp.

References font(), ownFont, painter_, Wt::Object::reparent(), and Wt::Painter::setFont().

Referenced by Wt::Window::Frame::Frame(), and Wt::Window::Window().

00109                                         {
00110     Object::reparent(new_parent);
00111     if (new_parent && !ownFont)
00112         painter_->setFont(new_parent->font());
00113 }

Here is the call graph for this function:

void Wt::Widget::resize ( const Size size  ) 

Reimplemented from Wt::PixmapOf< SDLPixmap >.

Definition at line 507 of file widget.cpp.

References Wt::Size::height(), resize(), size(), and Wt::Size::width().

00507                                     {
00508     resize(size.width(), size.height());
00509 }

Here is the call graph for this function:

void Wt::Widget::resize ( int  w,
int  h 
) [virtual]

Reimplemented in Wt::RootWindow.

Definition at line 480 of file widget.cpp.

References Wt::LayoutItem::geometry(), height(), maximumSize(), minimumSize(), parentWidget(), Wt::Application::postEvent(), Wt::PixmapOf< SDLPixmap >::resize(), Wt::LayoutItem::setGeometry(), Wt::Rect::setSize(), Wt::Size::setSize(), size(), trace, update(), and width().

Referenced by resize(), Wt::RootWindow::resize(), Wt::RootWindow::RootWindow(), setGeometry(), and Widget().

00480                                 {
00481     Size newsize(w, h);
00482     Size oldsize(size());
00483 
00484     if (newsize == oldsize)
00485         return;
00486 
00487     w = std::max(w, minimumSize().width());
00488     w = std::min(w, maximumSize().width());
00489     h = std::max(h, minimumSize().height());
00490     h = std::min(h, maximumSize().height());
00491     newsize.setSize(w, h);
00492 
00493     Pixmap::resize(w, h);
00494     Region exposed(geometry());
00495     Rect r(geometry());
00496     r.setSize(newsize);
00497     LayoutItem::setGeometry(r);
00498     exposed -= geometry();
00499     trace("geometry") << this <<
00500     " Widget::setGeometry() setting geometry to " << r << std::endl;
00501 
00502     Application::postEvent(this, new ResizeEvent(newsize, oldsize));
00503     update(parentWidget(), exposed);
00504     update();
00505 }

Here is the call graph for this function:

void Wt::Widget::resizeEvent ( ResizeEvent  )  [protected, virtual]

Definition at line 412 of file widget.cpp.

References updateBackground().

Referenced by event().

00412                                       {
00413     updateBackground();
00414 }

Here is the call graph for this function:

template<typename SDLPixmap>
PixmapBase Wt::PixmapOf< SDLPixmap >::scale ( const Size size,
SDLSurface::ScaleMode  mode = SDLSurface::ScaleFree 
) const [inline, inherited]

Definition at line 241 of file pixmap.h.

Referenced by Wt::Painter::drawPixmap(), Wt::PixmapOf< Wt::SDLSurface >::scale(), and updateBackground().

00242                                                                            {
00243         return scale(size.width(), size.height(), mode);
00244     }

void Wt::Widget::setBackgroundColor ( const Color c  )  [virtual]

Reimplemented in Wt::Window, and Wt::Window::Frame.

Definition at line 161 of file widget.cpp.

References Wt::Painter::backgroundColor(), painter_, Wt::Painter::setBackgroundColor(), and update().

Referenced by Wt::Window::Frame::Frame(), Wt::Window::setBackgroundColor(), and Wt::Window::Frame::setBackgroundColor().

00161                                                   {
00162     if (painter_->backgroundColor() != color) {
00163         painter_->setBackgroundColor(color);
00164         update();
00165     }
00166 }

Here is the call graph for this function:

void Wt::Widget::setBackgroundPixmap ( const Pixmap pixmap,
int  flags = 0,
int  alignment = 0 
) [virtual]

Definition at line 199 of file widget.cpp.

References Wt::LayoutItem::alignment, bg_pixmap_, setBackgroundPixmapFlags(), update(), and updateBackground().

00199                                                                                {
00200     bool changed = (bg_pixmap_ != pixmap);
00201 
00202     bg_pixmap_ = pixmap;
00203 
00204     changed = setBackgroundPixmapFlags(flags, alignment) || changed;
00205 
00206     if (changed) {
00207         updateBackground();
00208         update();
00209     }
00210 }

Here is the call graph for this function:

bool Wt::Widget::setBackgroundPixmapFlags ( int  flags,
int  alignment 
) [virtual]

Definition at line 183 of file widget.cpp.

References Wt::LayoutItem::alignment, bg_alignment, and bg_flags.

Referenced by setBackgroundPixmap().

00183                                                               {
00184     bool changed = false;
00185 
00186     if (bg_flags != flags) {
00187         bg_flags = flags;
00188         changed = true;
00189     }
00190 
00191     if (bg_alignment != alignment) {
00192         bg_alignment = alignment;
00193         changed = true;
00194     }
00195 
00196     return changed;
00197 }

void Wt::Widget::setDisabled ( bool  do_disable = true  ) 

Definition at line 904 of file widget.cpp.

References disable(), and enable().

00904                                         {
00905     (do_disable) ? disable() : enable();
00906 }

Here is the call graph for this function:

void Wt::Widget::setEnabled ( bool  do_enable = true  ) 

Definition at line 900 of file widget.cpp.

References disable(), and enable().

00900                                       {
00901     (do_enable) ? enable() : disable();
00902 }

Here is the call graph for this function:

void Wt::Widget::setFocus ( int  reason  )  [virtual]

Definition at line 734 of file widget.cpp.

References focus_data_, Wt::Event::FocusIn, Wt::Event::FocusOut, focusWidget(), isFocusEnabled(), Wt::Application::postEvent(), and Wt::FocusData::setFocus().

Referenced by focusNextPrevChild(), mousePressEvent(), and Wt::RootWindow::RootWindow().

00734                                 {
00735     Widget *old_focus = focusWidget();
00736     if (old_focus == this || !isFocusEnabled(reason))
00737         return;
00738     if (old_focus) {
00739         Application::postEvent(old_focus,
00740                                new FocusEvent(Event::FocusOut, reason));
00741     }
00742     focus_data_.setFocus(this);
00743     Application::postEvent(this,
00744                            new FocusEvent(Event::FocusIn, reason));
00745 }

Here is the call graph for this function:

void Wt::Widget::setFont ( const Font font  )  [virtual]

Reimplemented in Wt::Window::Frame.

Definition at line 640 of file widget.cpp.

References font(), fontChange(), ownFont, painter_, and Wt::Painter::setFont().

Referenced by Wt::Window::Frame::setFont().

00640                                          {
00641     Font old_font = font();
00642     painter_->setFont(new_font);
00643     ownFont = true;
00644     fontChange(old_font);
00645 }

Here is the call graph for this function:

void Wt::Widget::setForegroundColor ( const Color c  )  [virtual]

Reimplemented in Wt::Window::Frame.

Definition at line 172 of file widget.cpp.

References Wt::Pen::color(), painter_, Wt::Painter::pen(), Wt::Painter::setPen(), and update().

Referenced by Wt::Window::Frame::setForegroundColor().

00172                                                   {
00173     if (painter_->pen().color() != color) {
00174         painter_->setPen(color);
00175         update();
00176     }
00177 }

Here is the call graph for this function:

void Wt::Widget::setGeometry ( const Rect r  )  [virtual]

Reimplemented from Wt::LayoutItem.

Definition at line 543 of file widget.cpp.

References Wt::SDLRect::height(), Wt::SDLRect::left(), setGeometry(), Wt::SDLRect::top(), and Wt::SDLRect::width().

00543                                       {
00544     setGeometry(r.left(), r.top(), r.width(), r.height());
00545 }

Here is the call graph for this function:

void Wt::Widget::setGeometry ( int  x,
int  y,
int  w,
int  h 
) [virtual]

Definition at line 536 of file widget.cpp.

References Wt::LayoutItem::geometry(), move(), resize(), and trace.

Referenced by setGeometry(), and Wt::Layout::setGeometry().

00536                                                    {
00537     move(x, y);
00538     resize(w, h);
00539     trace("geometry") << this <<
00540     " Widget::setGeometry() setting geometry to " << geometry() << std::endl;
00541 }

Here is the call graph for this function:

void Wt::Widget::setHidden ( bool  do_hide = true  ) 

Definition at line 873 of file widget.cpp.

References hide(), and show().

00873                                    {
00874     (do_hide) ? hide() : show();
00875 }

Here is the call graph for this function:

void Wt::Widget::setLayout ( Layout layout  ) 

Definition at line 575 of file widget.cpp.

References Wt::Object::installEventFilter(), layout(), layout_, layoutChanged, Wt::Application::postEvent(), and Wt::Object::reparent().

00575                                      {
00576     if (layout_ == layout)
00577         return;
00578 
00579     if (layout_) {
00580         delete layout_;
00581     }
00582 
00583     layout_ = layout;
00584 
00585     if (layout) {
00586         layout->reparent(this);
00587         installEventFilter(layout);
00588     }
00589     // emit signal
00590     layoutChanged(layout);
00591     Application::postEvent(this, new LayoutHintEvent());
00592 }

Here is the call graph for this function:

void Wt::Widget::setMaximumSize ( const Size size  )  [virtual]

Reimplemented from Wt::LayoutItem.

Definition at line 970 of file widget.cpp.

References layout_, Wt::Layout::margin, maximumSize(), Wt::LayoutItem::setMaximumSize(), size(), and updateGeometry().

00970                                             {
00971     if (size == maximumSize())
00972         return;
00973     if (layout_)
00974         layout_->setMaximumSize(size >> layout_->margin);
00975     LayoutItem::setMaximumSize(size);
00976     updateGeometry();
00977 }

Here is the call graph for this function:

void Wt::Widget::setMinimumSize ( const Size size  )  [virtual]

Reimplemented from Wt::LayoutItem.

Definition at line 950 of file widget.cpp.

References Wt::Size::expandedTo(), layout_, Wt::Layout::margin, minimumSize(), Wt::LayoutItem::setMinimumSize(), setSizeHint(), size(), and updateGeometry().

Referenced by Wt::PushButton::setButtonSize(), and Wt::Label::update().

00950                                             {
00951     if (size == minimumSize())
00952         return;
00953 
00954     if (layout_)
00955         layout_->setMinimumSize(size >> layout_->margin);
00956     LayoutItem::setMinimumSize(size);
00957 
00958     // sizeHint can't be < minmumSize()
00959     Size hint_size = size.expandedTo(minimumSize());
00960     setSizeHint(hint_size);
00961 
00962     updateGeometry();
00963 }

Here is the call graph for this function:

template<typename SDLPixmap>
void Wt::PixmapOf< SDLPixmap >::setPixel ( const Point p,
int  pixel_value 
) [inline, inherited]

Definition at line 263 of file pixmap.h.

Referenced by Wt::Painter::rop(), and Wt::PixmapOf< Wt::SDLSurface >::setPixel().

00263                                                    {
00264         setPixel(p.x(), p.y(), pixel_value);
00265     }

template<typename SDLPixmap>
void Wt::PixmapOf< SDLPixmap >::setPixelColor ( const Point p,
const SDLColor color 
) [inline, inherited]

Definition at line 268 of file pixmap.h.

Referenced by Wt::PixmapOf< Wt::SDLSurface >::setPixelColor().

00268                                                               {
00269         setPixelColor(p.x(), p.y(), color);
00270     }

void Wt::Widget::setShown ( bool  do_show = true  ) 

Definition at line 877 of file widget.cpp.

References hide(), and show().

00877                                   {
00878     (do_show) ? show() : hide();
00879 }

Here is the call graph for this function:

void Wt::Widget::setSizeHint ( const Size size  )  [virtual]

Reimplemented from Wt::LayoutItem.

Definition at line 932 of file widget.cpp.

References Wt::Size::expandedTo(), layout_, minimumSize(), Wt::LayoutItem::setSizeHint(), size(), sizeHint(), and updateGeometry().

Referenced by Wt::PushButton::setButtonSize(), setMinimumSize(), and Wt::Label::update().

00932                                          {
00933     if (size == sizeHint())
00934         return;
00935     // sizeHint can't be < minmumSize()
00936     Size hint_size = size.expandedTo(minimumSize());
00937 
00938     // we can't set sizeHint in a widget with a layout
00939     if (layout_)
00940         return;
00941     LayoutItem::setSizeHint(hint_size);
00942     updateGeometry();
00943 }

Here is the call graph for this function:

void Wt::Widget::setSizePolicy ( const SizePolicy size_policy  )  [virtual]

Reimplemented from Wt::LayoutItem.

Definition at line 985 of file widget.cpp.

References layout_, Wt::LayoutItem::setSizePolicy(), sizePolicy(), and updateGeometry().

Referenced by Wt::Window::Frame::Frame(), Wt::PushButton::setButtonSize(), and Wt::Box::setStretchFactor().

00985                                                         {
00986     if (size_policy == sizePolicy())
00987         return;
00988     if (layout_)
00989         layout_->setSizePolicy(size_policy);
00990     LayoutItem::setSizePolicy(size_policy);
00991     updateGeometry();
00992 }

Here is the call graph for this function:

void Wt::Widget::show (  )  [virtual]

Reimplemented in Wt::Window.

Definition at line 864 of file widget.cpp.

References grabKeyboard(), grabMouse(), hidden, Wt::W::ShowModal, and wflags_.

Referenced by setHidden(), and setShown().

00864                   {
00865     if (wflags_ & W::ShowModal) {
00866         grabKeyboard();
00867         grabMouse();
00868     }
00869 
00870     hidden = false;
00871 }

Here is the call graph for this function:

void Wt::Widget::showEvent ( ShowEvent  )  [protected, virtual]

Definition at line 418 of file widget.cpp.

Referenced by event().

00418 {}

Size Wt::Widget::size (  )  const [inline]

Reimplemented from Wt::PixmapOf< SDLPixmap >.

Definition at line 78 of file widget.h.

References Wt::LayoutItem::geometry(), and Wt::Rect::size().

Referenced by resize(), setMaximumSize(), setMinimumSize(), setSizeHint(), Wt::Label::update(), and updateBackground().

00078                       {
00079         return geometry().size();
00080     }

Here is the call graph for this function:

Size Wt::Widget::sizeHint (  )  const [virtual]

Reimplemented from Wt::LayoutItem.

Definition at line 927 of file widget.cpp.

References layout_, Wt::Layout::margin, Wt::LayoutItem::sizeHint(), and Wt::Layout::sizeHint().

Referenced by Wt::RootWindow::resize(), setSizeHint(), and Widget().

00927                             {
00928     return (layout_ ? layout_->sizeHint() << layout_->margin :
00929             LayoutItem::sizeHint());
00930 }

Here is the call graph for this function:

SizePolicy Wt::Widget::sizePolicy (  )  const [virtual]

Reimplemented from Wt::LayoutItem.

Definition at line 979 of file widget.cpp.

References layout_, and Wt::LayoutItem::sizePolicy().

Referenced by setSizePolicy(), and Wt::Box::setStretchFactor().

00979                                     {
00980     if (layout_)
00981         return layout_->sizePolicy();
00982     return LayoutItem::sizePolicy();
00983 }

Here is the call graph for this function:

template<typename SDLPixmap>
PixmapBase Wt::PixmapOf< SDLPixmap >::smoothScale ( const Size size,
SDLSurface::ScaleMode  mode = SDLSurface::ScaleFree 
) const [inline, inherited]

Definition at line 247 of file pixmap.h.

Referenced by Wt::PixmapOf< Wt::SDLSurface >::smoothScale().

00248                                                                                  {
00249         return smoothScale(size.width(), size.height(), mode);
00250     }

int Wt::Object::startTimer ( int  interval  )  [inherited]

Definition at line 139 of file object.cpp.

References Wt::Object::timers_.

Referenced by Wt::Timer::start().

00139                                    {
00140     int id = timers_.size() + 1;
00141     timers_[id] = new SDLTimer(this, id, interval);
00142     return id;
00143 }

virtual void Wt::Object::timerEvent ( TimerEvent  )  [inline, protected, virtual, inherited]

Reimplemented in Wt::Timer.

Definition at line 148 of file object.h.

Referenced by Wt::Object::event(), and Wt::Timer::timerEvent().

00148 {}

Object * Wt::Object::topParent (  )  const [inherited]

returns top level parent: it may return itself

Definition at line 116 of file object.cpp.

References Wt::Object::parent_.

Referenced by topParentWidget().

00116                                 {
00117     const Object *p = this;
00118     while (p->parent_) {
00119         p = p->parent_;
00120     }
00121     return const_cast<Object *>(p);
00122 }

Widget* Wt::Widget::topParentWidget (  )  const [inline]

Definition at line 65 of file widget.h.

References Wt::Object::topParent().

Referenced by paintEvent().

00065                                     {
00066         return static_cast<Widget *>(topParent());
00067     }

Here is the call graph for this function:

template<typename TEST_TYPE>
TEST_TYPE Wt::LayoutItem::type (  )  const [inline, inherited]

Definition at line 204 of file layout.h.

Referenced by Wt::Layout::addItem().

00204                            {
00205         return dynamic_cast<TEST_TYPE>(const_cast<LayoutItem *>(this));
00206     }

void Wt::Widget::unsetFont (  ) 

Definition at line 647 of file widget.cpp.

References ownFont.

00647                        {
00648     ownFont = false;
00649 }

void Wt::Widget::update (  ) 

Reimplemented in Wt::Button, and Wt::Label.

Definition at line 448 of file widget.cpp.

References rect().

Referenced by Wt::Frame::Frame(), hiddenChanged(), lower(), move(), paintEvent(), Wt::Application::postEvent(), raise(), resize(), setBackgroundColor(), setBackgroundPixmap(), setForegroundColor(), Wt::Frame::setLineColor(), update(), Wt::Label::update(), Wt::Button::update(), Widget(), and ~Widget().

00448                     {
00449     update(rect());
00450 }

Here is the call graph for this function:

void Wt::Widget::update ( int  x,
int  y,
int  w,
int  h 
)

Definition at line 452 of file widget.cpp.

References update().

00452                                               {
00453     update(Rect(x, y, w, h));
00454 }

Here is the call graph for this function:

void Wt::Widget::update ( const Rect r  ) 

Definition at line 443 of file widget.cpp.

References need_redraw_, and update().

00443                                  {
00444     need_redraw_ = true;
00445     update(this, r);
00446 }

Here is the call graph for this function:

void Wt::Widget::update ( Widget w,
const Region region 
) [static]

Parameters:
w widget to send clipped paint event
region should be in w coordinates

Definition at line 365 of file widget.cpp.

References autoerase(), Wt::Application::postEvent(), rect(), and trace.

00365                                                    {
00366     if (w) {
00367         Region r(region);
00368         // clip to parent
00369         trace("paint") << "before clip: " << r << std::endl;
00370         trace("paint") << "clip against: " << w->rect() << std::endl;
00371         r &= w->rect();
00372         trace("paint") << "after clip: " << r << std::endl;
00373         Application::postEvent(w, new PaintEvent(r, w->autoerase()));
00374     }
00375 }

Here is the call graph for this function:

void Wt::Widget::updateBackground (  )  [protected]

Definition at line 395 of file widget.cpp.

References bg_flags, bg_pixmap_, bg_scaled_, Wt::Painter::drawTiledPixmap(), Wt::Pixmap::Pixmap(), rect(), Wt::PixmapOf< SDLPixmap >::scale(), Wt::Scaled, size(), Wt::Tiled, Wt::Unscaled, and Warn.

Referenced by resizeEvent(), and setBackgroundPixmap().

00395                               {
00396     if (bg_pixmap_) {
00397         if (bg_flags != Unscaled) {
00398             bg_scaled_ = Pixmap();
00399             if (bg_flags == Scaled) {
00400                 bg_scaled_ = bg_pixmap_.scale(size());
00401             } else if (bg_flags == Tiled) {
00402                 bg_scaled_ = Pixmap(size());
00403                 Painter p(&bg_scaled_);
00404                 p.drawTiledPixmap(rect(), bg_pixmap_);
00405             } else {
00406                 Warn("Unknown BackgroundImageFlag %d\n", bg_flags);
00407             }
00408         }
00409     }
00410 }

Here is the call graph for this function:

void Wt::Widget::updateGeometry (  ) 

Widget::updateGeometry() should call Widget::setGeometry() if there is no parent

Definition at line 549 of file widget.cpp.

References Wt::Object::parent(), and Wt::Application::postEvent().

Referenced by Wt::Layout::enforce(), hiddenChanged(), setMaximumSize(), setMinimumSize(), setSizeHint(), and setSizePolicy().

00549                             {
00550     if (parent()) {
00551         Application::postEvent(parent(), new LayoutHintEvent());
00552     }
00553 }

Here is the call graph for this function:

virtual void Wt::LayoutItem::validate (  )  [inline, protected, virtual, inherited]

Reimplemented in Wt::CascadeLayout, Wt::GridLayout, and Wt::BoxLayout.

Definition at line 223 of file layout.h.

References Wt::LayoutItem::invalidated_.

Referenced by Wt::BoxLayout::validate(), Wt::GridLayout::validate(), and Wt::CascadeLayout::validate().

00223                             {
00224         invalidated_ = false;
00225     }

void Wt::Widget::wheelEvent ( WheelEvent  )  [protected, virtual]

Definition at line 352 of file widget.cpp.

References Wt::InputEvent::accept(), Wt::WheelEvent::delta(), focusNextPrevChild(), focusPolicy, hasFocus(), StrongFocus, and trace.

Referenced by event().

00352                                        {
00353     trace("mouse") << "wheelEvent for " << this << std::endl;
00354     if (focusPolicy > StrongFocus && hasFocus()) {
00355         focusNextPrevChild((we->delta() > 0));
00356         we->accept();
00357     }
00358 }

Here is the call graph for this function:

int Wt::Widget::width (  )  const [inline]

Definition at line 72 of file widget.h.

References Wt::LayoutItem::geometry(), and Wt::SDLRect::width().

Referenced by Wt::Label::drawContents(), Wt::Frame::drawFrame(), Wt::Frame::frameWidth(), rect(), and resize().

00072                       {
00073         return geometry().width();
00074     }

Here is the call graph for this function:


Member Data Documentation

WVar<int> Wt::LayoutItem::alignment [inherited]

Reimplemented in Wt::Label.

Definition at line 218 of file layout.h.

Referenced by Wt::PushButton::drawButtonLabel(), Wt::CascadeLayout::init(), Wt::Cascade::setAlignment(), setBackgroundPixmap(), setBackgroundPixmapFlags(), and Wt::CascadeLayout::setGeometry().

int Wt::Widget::bg_alignment [private]

Definition at line 276 of file widget.h.

Referenced by backgroundPixmapAlignment(), erase(), and setBackgroundPixmapFlags().

int Wt::Widget::bg_flags [private]

Definition at line 275 of file widget.h.

Referenced by backgroundPixmapFlags(), erase(), setBackgroundPixmapFlags(), and updateBackground().

Pixmap Wt::Widget::bg_pixmap_ [private]

Definition at line 273 of file widget.h.

Referenced by backgroundPixmap(), erase(), setBackgroundPixmap(), and updateBackground().

Pixmap Wt::Widget::bg_scaled_ [private]

Definition at line 274 of file widget.h.

Referenced by erase(), and updateBackground().

const int Wt::LayoutItem::default_hint_size = 100 [static, inherited]

Definition at line 216 of file layout.h.

const int Wt::LayoutItem::default_max_size = ((int) ((unsigned int) (~0) >> 1)) [static, inherited]

Definition at line 214 of file layout.h.

const int Wt::LayoutItem::default_min_size = 30 [static, inherited]

Definition at line 215 of file layout.h.

Signal01<void, const Object *> Wt::Object::destroyed [inherited]

signals

Definition at line 139 of file object.h.

Referenced by Wt::Layout::addItem(), Wt::Object::installEventFilter(), and Wt::Object::~Object().

WVar<bool> Wt::Widget::enabled

Definition at line 216 of file widget.h.

Referenced by disable(), Wt::PushButton::drawButton(), Wt::PushButton::drawButtonLabel(), enable(), is_enabled(), isFocusEnabled(), Wt::Application::notify(), and Widget().

FocusData Wt::Widget::focus_data_ [static, private]

Definition at line 284 of file widget.h.

Referenced by focusData(), focusWidget(), setFocus(), Widget(), and ~Widget().

WVar<int> Wt::Widget::focusPolicy

Definition at line 218 of file widget.h.

Referenced by Wt::Button::Button(), isFocusEnabled(), Wt::RootWindow::RootWindow(), and wheelEvent().

WVar<bool> Wt::Widget::hidden

public attributes

Definition at line 215 of file widget.h.

Referenced by hide(), is_hidden(), isHidden(), isShown(), show(), and Widget().

Size Wt::Widget::l_max_size_ [private]

Definition at line 282 of file widget.h.

Size Wt::Widget::l_min_size_ [private]

Definition at line 281 of file widget.h.

Size Wt::Widget::l_size_hint_ [private]

Definition at line 280 of file widget.h.

Layout* Wt::Widget::layout_ [private]

Definition at line 279 of file widget.h.

Referenced by expanding(), layout(), maximumSize(), minimumSize(), setLayout(), setMaximumSize(), setMinimumSize(), setSizeHint(), setSizePolicy(), sizeHint(), and sizePolicy().

Signal01<void, Layout *> Wt::Widget::layoutChanged [protected]

Definition at line 255 of file widget.h.

Referenced by Wt::Frame::Frame(), and setLayout().

WVar<bool> Wt::Widget::mouseTracking

Definition at line 217 of file widget.h.

Referenced by Wt::SDLInput::handleMouseEvent().

bool Wt::Widget::need_redraw_ [private]

Definition at line 272 of file widget.h.

Referenced by draw(), paintEvent(), repaint(), and update().

WVar<int> Wt::Widget::ownFont

Definition at line 219 of file widget.h.

Referenced by font(), reparent(), setFont(), and unsetFont().

Painter* Wt::Widget::painter_ [private]

Definition at line 277 of file widget.h.

Referenced by backgroundColor(), drawText(), erase(), font(), foregroundColor(), paintEvent(), reparent(), setBackgroundColor(), setFont(), setForegroundColor(), Widget(), and ~Widget().

int Wt::Widget::wflags_ [private]

Definition at line 271 of file widget.h.

Referenced by autoclip(), autoerase(), close(), repaint(), and show().


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

Generated Fri Jul 28 19:33:30 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.