Wt::Frame Class Reference

#include <frame.h>

Inheritance diagram for Wt::Frame:

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

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

 Frame (Widget *parent=0, const std::string &name="Frame::anon", int wflags=0)
virtual ~Frame ()
int frameWidth () const
Rect contentsRect () const
const ColorlineColor () const
void setLineColor (const Color &color)
WidgetparentWidget () const
 parents are guaranteed to be widgets and not general wobjects
WidgettopParentWidget () const
void reparent (Widget *new_parent)
void reparent (Object *new_parent)
int width () const
int height () const
Size size () const
Rect rect () const
Point mapToGlobal (const Point &pos) const
Region mapToGlobal (const Region &region) const
Point mapFromGlobal (const Point &pos) const
Point mapToParent (const Point &pos) const
Region mapToParent (const Region &region) const
Point mapFromParent (const Point &pos) 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)
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

Static Public Member Functions

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

Public Attributes

WVar< intlineWidth
WVar< intmargin
WVar< intspacing
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 draw (Painter *p, const Region &region)
 widget should be able to draw itself
virtual void drawFrame (Painter *p)
virtual void drawContents (Painter *p)
void onLayoutChange ()
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 *)
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

Color line_color_

Detailed Description

Definition at line 30 of file frame.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 [inherited]

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::Frame::Frame ( Widget parent = 0,
const std::string &  name = "Frame::anon",
int  wflags = 0 
)

Reimplemented in Wt::Window::Frame.

Definition at line 35 of file frame.cpp.

References Wt::WVarBase< VARTYPE >::changed, Wt::Signal012< R, ARG1, ARG2 >::connect(), Wt::Widget::layoutChanged, lineWidth, onLayoutChange(), and Wt::Widget::update().

00036         : Widget(parent, name, wflags),
00037         lineWidth(1),
00038         margin(1),
00039         spacing(-1),
00040 line_color_("gray90") {
00041 
00042     void (Widget::*update)() = &Widget::update;
00043     sigc::slot0<void> update_slot = sigc::mem_fun(*this, update);
00044     lineWidth.changed.connect(update_slot);
00045 
00046     layoutChanged.connect(
00047         sigc::slot0<void>(
00048             sigc::mem_fun(*this, &Frame::onLayoutChange)));
00049 }

Here is the call graph for this function:

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

Definition at line 51 of file frame.cpp.

00051 {}


Member Function Documentation

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

Definition at line 248 of file widget.h.

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

Referenced by Wt::Widget::erase(), and Wt::Widget::paintEvent().

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

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

Definition at line 244 of file widget.h.

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

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

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

const Color & Wt::Widget::backgroundColor (  )  const [inherited]

Reimplemented in Wt::Window::Frame.

Definition at line 168 of file widget.cpp.

References Wt::Painter::backgroundColor(), and Wt::Widget::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, inherited]

Definition at line 102 of file widget.h.

References Wt::Widget::bg_pixmap_.

00102                                            {
00103         return bg_pixmap_;
00104     }

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

Definition at line 108 of file widget.h.

References Wt::Widget::bg_alignment.

00108                                           {
00109         return bg_alignment;
00110     }

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

Definition at line 105 of file widget.h.

References Wt::Widget::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, inherited]

Definition at line 176 of file widget.h.

References Wt::Widget::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 [inherited]

Definition at line 673 of file widget.cpp.

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

Referenced by Wt::Widget::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(), Wt::Widget::childAt(), Wt::Object::deleteAllChildren(), Wt::Object::deleteFirstChild(), Wt::Object::deleteLastChild(), Wt::Widget::focusNextPrevChild(), Wt::Widget::fontChange(), Wt::Widget::lower(), Wt::postLayoutHintEventRecursively(), and Wt::Widget::raise().

00057                                  {
00058         return children_;
00059     }

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

Definition at line 912 of file widget.cpp.

References Wt::W::DestructiveClose, Wt::Widget::hide(), Wt::CloseEvent::isAccepted(), Wt::Application::sendEvent(), and Wt::Widget::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 (  )  [inherited]

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, inherited]

Definition at line 422 of file widget.cpp.

References Wt::CloseEvent::accept().

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

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

Here is the call graph for this function:

Rect Wt::Frame::contentsRect (  )  const

Definition at line 57 of file frame.cpp.

References margin, and Wt::Widget::rect().

Referenced by Wt::Label::drawContents().

00057                                {
00058     return rect() >> margin;
00059 }

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, inherited]

Definition at line 896 of file widget.cpp.

References Wt::Widget::enabled.

Referenced by Wt::Widget::setDisabled(), and Wt::Widget::setEnabled().

00896                      {
00897     enabled = false;
00898 }

void Wt::Frame::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 from Wt::Widget.

Definition at line 91 of file frame.cpp.

References Wt::Widget::draw(), drawContents(), and drawFrame().

00091                                             {
00092     Widget::draw(p, r);
00093     drawFrame(p);
00094     drawContents(p);
00095 }

Here is the call graph for this function:

void Wt::Frame::drawContents ( Painter p  )  [protected, virtual]

Reimplemented in Wt::Label.

Definition at line 87 of file frame.cpp.

Referenced by draw(), and Wt::Label::drawContents().

00087                                   {
00088     //p->fillRect(contentsRect(), Color("yellow"));
00089 }

void Wt::Frame::drawFrame ( Painter p  )  [protected, virtual]

Definition at line 70 of file frame.cpp.

References Wt::Painter::drawHorizontalLine(), Wt::Painter::drawVerticalLine(), Wt::Widget::height(), lineColor(), lineWidth, Wt::Painter::restore(), Wt::Painter::save(), Wt::Painter::setPen(), and Wt::Widget::width().

Referenced by draw().

00070                                 {
00071     int lw = lineWidth;
00072     int x2 = width() - 1;
00073     int y2 = height() - 1;
00074     int lw2 = y2 - lw;
00075 
00076     p->save();
00077     p->setPen(lineColor());
00078     for (int i = 0; i < lw; i++) {
00079         p->drawHorizontalLine(0, x2, i);
00080         p->drawHorizontalLine(0, x2, y2 - i);
00081         p->drawVerticalLine(i, lw, lw2);
00082         p->drawVerticalLine(x2 - i, lw, lw2);
00083     }
00084     p->restore();
00085 }

Here is the call graph for this function:

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

Definition at line 669 of file widget.cpp.

References Wt::Painter::drawText(), and Wt::Widget::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 
) [inherited]

Definition at line 665 of file widget.cpp.

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

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

Here is the call graph for this function:

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

Definition at line 892 of file widget.cpp.

References Wt::Widget::enabled.

Referenced by Wt::Widget::setDisabled(), and Wt::Widget::setEnabled().

00892                     {
00893     enabled = true;
00894 }

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

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

Definition at line 346 of file widget.cpp.

References trace.

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

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

void Wt::Widget::erase (  )  [inherited]

Definition at line 627 of file widget.cpp.

References Wt::Widget::rect().

Referenced by Wt::Widget::erase(), and Wt::Widget::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 
) [inherited]

Definition at line 631 of file widget.cpp.

References Wt::Widget::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  )  [inherited]

Definition at line 613 of file widget.cpp.

References Wt::Widget::autoclip(), Wt::Painter::begin(), Wt::Widget::bg_pixmap_, Wt::Painter::end(), Wt::Widget::erase(), Wt::Painter::eraseRegion(), Wt::Widget::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  )  [inherited]

Definition at line 594 of file widget.cpp.

References Wt::Rect::align(), Wt::Widget::autoclip(), Wt::Painter::begin(), Wt::Widget::bg_alignment, Wt::Widget::bg_flags, Wt::Widget::bg_pixmap_, Wt::Widget::bg_scaled_, Wt::Painter::drawPixmap(), Wt::Painter::end(), Wt::Painter::eraseRect(), Wt::SDLRect::left(), Wt::Widget::painter_, Wt::Widget::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, inherited]

event handling

Reimplemented from Wt::Object.

Definition at line 212 of file widget.cpp.

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

Reimplemented from Wt::LayoutItem.

Definition at line 994 of file widget.cpp.

References Wt::LayoutItem::expanding(), and Wt::Widget::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, inherited]

Definition at line 259 of file widget.h.

References Wt::Widget::focus_data_.

00259                                  {
00260         return &focus_data_;
00261     }

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

Reimplemented in Wt::Button.

Definition at line 330 of file widget.cpp.

References trace.

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

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

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

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(), Wt::Widget::focusNextPrevChild(), Wt::Widget::focusWidget(), Wt::Object::parent(), Wt::Widget::parentWidget(), Wt::Widget::setFocus(), Wt::FocusEvent::Tab, and trace.

Referenced by Wt::Widget::event(), Wt::Widget::focusNextPrevChild(), Wt::Widget::wheelEvent(), and Wt::Widget::~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, inherited]

Reimplemented in Wt::Button.

Definition at line 334 of file widget.cpp.

References trace.

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

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

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

Definition at line 180 of file widget.h.

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

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

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

Here is the call graph for this function:

const Font & Wt::Widget::font (  )  const [inherited]

Reimplemented in Wt::Window::Frame.

Definition at line 635 of file widget.cpp.

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

Referenced by Wt::Label::calc_size_hint(), Wt::PushButton::drawButtonLabel(), Wt::Label::drawContents(), Wt::Label::effectiveIndent(), Wt::Window::Frame::font(), Wt::Widget::font(), Wt::Widget::fontChange(), Wt::Widget::reparent(), Wt::PushButton::setButtonSize(), Wt::Widget::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, inherited]

Reimplemented in Wt::Label.

Definition at line 651 of file widget.cpp.

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

Referenced by Wt::Widget::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 [inherited]

Reimplemented in Wt::Window::Frame.

Definition at line 179 of file widget.cpp.

References Wt::Pen::color(), Wt::Widget::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:

int Wt::Frame::frameWidth (  )  const

Definition at line 53 of file frame.cpp.

References margin, and Wt::Widget::width().

Referenced by Wt::Label::effectiveIndent().

00053                             {
00054     return width() - margin;
00055 }

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(), Wt::Widget::height(), Wt::Widget::mapFromGlobal(), Wt::Widget::mapFromParent(), Wt::Widget::mapToGlobal(), Wt::Widget::mapToParent(), Wt::Window::Frame::mousePressEvent(), Wt::Widget::move(), Wt::Widget::resize(), Wt::Widget::setGeometry(), Wt::BoxLayout::setGeometry(), Wt::GridLayout::setGeometry(), Wt::CascadeLayout::setGeometry(), Wt::Widget::size(), Wt::Widget::width(), and Wt::Widget::~Widget().

00175                                          {
00176         return geometry_rect_;
00177     }

void Wt::Widget::grabKeyboard (  )  [inherited]

Definition at line 1000 of file widget.cpp.

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

Referenced by Wt::Widget::show(), and Wt::Widget::Widget().

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

Here is the call graph for this function:

void Wt::Widget::grabMouse (  )  [inherited]

Definition at line 1013 of file widget.cpp.

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

Referenced by Wt::Widget::show(), and Wt::Widget::Widget().

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

Here is the call graph for this function:

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

Definition at line 184 of file widget.h.

References Wt::Widget::focusWidget().

Referenced by Wt::Widget::mousePressEvent(), Wt::Widget::wheelEvent(), and Wt::Widget::~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, inherited]

Definition at line 75 of file widget.h.

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

Referenced by Wt::Label::drawContents(), drawFrame(), Wt::Widget::rect(), and Wt::Widget::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, inherited]

Definition at line 830 of file widget.cpp.

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

Referenced by Wt::Widget::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, inherited]

Reimplemented in Wt::Window.

Definition at line 857 of file widget.cpp.

References Wt::Widget::hidden, Wt::Widget::releaseKeyboard(), and Wt::Widget::releaseMouse().

Referenced by Wt::Widget::close(), Wt::Widget::setHidden(), and Wt::Widget::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, inherited]

Definition at line 420 of file widget.cpp.

Referenced by Wt::Widget::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 Wt::Widget::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, inherited]

Definition at line 881 of file widget.cpp.

References Wt::Widget::enabled, and Wt::Widget::parentWidget().

Referenced by Wt::Widget::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, inherited]

Definition at line 844 of file widget.cpp.

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

Referenced by Wt::Widget::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, inherited]

Reimplemented from Wt::LayoutItem.

Definition at line 147 of file widget.h.

References Wt::Widget::isHidden().

00147                          {
00148         return isHidden();
00149     }

Here is the call graph for this function:

bool Wt::Widget::isFocusEnabled ( int  reason  )  const [inherited]

Definition at line 708 of file widget.cpp.

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

Referenced by Wt::Widget::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, inherited]

Definition at line 144 of file widget.h.

References Wt::Widget::hidden.

Referenced by Wt::RootWindow::blit_region(), Wt::RootWindow::blit_region_ex(), Wt::Widget::childAt(), Wt::Widget::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, inherited]

Definition at line 141 of file widget.h.

References Wt::Widget::hidden.

Referenced by Wt::Widget::~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, inherited]

Definition at line 1009 of file widget.cpp.

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

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

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

Here is the call graph for this function:

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

Reimplemented in Wt::Button.

Definition at line 338 of file widget.cpp.

References trace.

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

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

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

Reimplemented in Wt::Button.

Definition at line 342 of file widget.cpp.

References trace.

Referenced by Wt::Widget::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, inherited]

Definition at line 161 of file widget.h.

References Wt::Widget::layout_.

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

00161                            {
00162         return layout_;
00163     }

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

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

Definition at line 349 of file widget.cpp.

References trace.

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

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

const Color & Wt::Frame::lineColor (  )  const

Definition at line 61 of file frame.cpp.

References line_color_.

Referenced by drawFrame().

00061                                     {
00062     return line_color_;
00063 }

void Wt::Widget::lower (  )  [inherited]

Reimplemented in Wt::Window.

Definition at line 565 of file widget.cpp.

References Wt::Object::children(), Wt::Object::parent(), and Wt::Widget::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 [inherited]

Definition at line 125 of file widget.cpp.

References Wt::LayoutItem::geometry(), Wt::Widget::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 [inherited]

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 [inherited]

Definition at line 143 of file widget.cpp.

References Wt::Region::boundingRect(), Wt::Widget::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 [inherited]

Definition at line 115 of file widget.cpp.

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

Referenced by Wt::Widget::mapToGlobal(), and Wt::Widget::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 [inherited]

Definition at line 152 of file widget.cpp.

References Wt::Region::boundingRect(), Wt::Widget::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 [inherited]

Definition at line 135 of file widget.cpp.

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

Referenced by Wt::Widget::event(), Wt::Widget::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, inherited]

Reimplemented from Wt::LayoutItem.

Definition at line 965 of file widget.cpp.

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

Referenced by Wt::Widget::resize(), and Wt::Widget::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, inherited]

Reimplemented from Wt::LayoutItem.

Definition at line 945 of file widget.cpp.

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

Referenced by Wt::Widget::resize(), Wt::RootWindow::resize(), Wt::Widget::setMinimumSize(), and Wt::Widget::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, inherited]

Definition at line 323 of file widget.cpp.

References trace.

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

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

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

Definition at line 1022 of file widget.cpp.

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

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

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

Here is the call graph for this function:

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

Reimplemented in Wt::Window::Frame.

Definition at line 326 of file widget.cpp.

References trace.

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

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

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

event handling specialization

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

Definition at line 314 of file widget.cpp.

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

Referenced by Wt::Widget::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, inherited]

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

Definition at line 320 of file widget.cpp.

References trace.

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

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

void Wt::Widget::move ( const Point p  )  [inherited]

Definition at line 532 of file widget.cpp.

References Wt::Widget::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, inherited]

Definition at line 511 of file widget.cpp.

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

Referenced by Wt::Window::Frame::mouseMoveEvent(), Wt::Widget::move(), and Wt::Widget::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, inherited]

Definition at line 416 of file widget.cpp.

Referenced by Wt::Widget::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::Frame::onLayoutChange (  )  [protected]

Definition at line 26 of file frame.cpp.

References Wt::WVarBase< VARTYPE >::connect(), Wt::Widget::layout(), Wt::Layout::margin, margin, Wt::Layout::spacing, and spacing.

Referenced by Frame().

00026                            {
00027     Layout *l = layout();
00028 
00029     if (l) {
00030         margin.connect(l->margin);
00031         spacing.connect(l->spacing);
00032     }
00033 }

Here is the call graph for this function:

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

Reimplemented in Wt::RootWindow.

Definition at line 377 of file widget.cpp.

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

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

00053                            {
00054         return parent_;
00055     };

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

parents are guaranteed to be widgets and not general wobjects

Definition at line 61 of file widget.h.

References Wt::Object::parent().

Referenced by Wt::Widget::focusNextPrevChild(), Wt::Widget::font(), Wt::Widget::is_enabled(), Wt::Widget::mapFromGlobal(), Wt::Widget::mapToGlobal(), Wt::Widget::move(), Wt::Widget::resize(), and Wt::Widget::~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 (  )  [inherited]

Reimplemented in Wt::Window.

Definition at line 555 of file widget.cpp.

References Wt::Object::children(), Wt::Object::parent(), and Wt::Widget::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, inherited]

Reimplemented from Wt::PixmapOf< SDLPixmap >.

Definition at line 82 of file widget.h.

References Wt::Widget::height(), and Wt::Widget::width().

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

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

Here is the call graph for this function:

void Wt::Widget::releaseKeyboard (  )  [inherited]

Definition at line 1004 of file widget.cpp.

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

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

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

Here is the call graph for this function:

void Wt::Widget::releaseMouse (  )  [inherited]

Definition at line 1017 of file widget.cpp.

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

Referenced by Wt::Widget::hide(), and Wt::Widget::~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 (  )  [inherited]

Definition at line 476 of file widget.cpp.

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

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

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

void Wt::Widget::repaint ( bool  erase  )  [inherited]

Definition at line 472 of file widget.cpp.

References Wt::Widget::rect(), and Wt::Widget::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 
) [inherited]

Definition at line 468 of file widget.cpp.

References Wt::Widget::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 
) [inherited]

Definition at line 462 of file widget.cpp.

References Wt::Widget::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 
) [inherited]

Definition at line 456 of file widget.cpp.

References Wt::Widget::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(), Wt::Widget::reparent(), and Wt::Widget::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  )  [inherited]

Definition at line 109 of file widget.cpp.

References Wt::Widget::font(), Wt::Widget::ownFont, Wt::Widget::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  )  [inherited]

Reimplemented from Wt::PixmapOf< SDLPixmap >.

Definition at line 507 of file widget.cpp.

References Wt::Size::height(), Wt::Widget::resize(), Wt::Widget::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, inherited]

Reimplemented in Wt::RootWindow.

Definition at line 480 of file widget.cpp.

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

Referenced by Wt::Widget::resize(), Wt::RootWindow::resize(), Wt::RootWindow::RootWindow(), Wt::Widget::setGeometry(), and Wt::Widget::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, inherited]

Definition at line 412 of file widget.cpp.

References Wt::Widget::updateBackground().

Referenced by Wt::Widget::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 Wt::Widget::updateBackground().

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

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

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

Definition at line 161 of file widget.cpp.

References Wt::Painter::backgroundColor(), Wt::Widget::painter_, Wt::Painter::setBackgroundColor(), and Wt::Widget::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, inherited]

Definition at line 199 of file widget.cpp.

References Wt::LayoutItem::alignment, Wt::Widget::bg_pixmap_, Wt::Widget::setBackgroundPixmapFlags(), Wt::Widget::update(), and Wt::Widget::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, inherited]

Definition at line 183 of file widget.cpp.

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

Referenced by Wt::Widget::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  )  [inherited]

Definition at line 904 of file widget.cpp.

References Wt::Widget::disable(), and Wt::Widget::enable().

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

Here is the call graph for this function:

void Wt::Widget::setEnabled ( bool  do_enable = true  )  [inherited]

Definition at line 900 of file widget.cpp.

References Wt::Widget::disable(), and Wt::Widget::enable().

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

Here is the call graph for this function:

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

Definition at line 734 of file widget.cpp.

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

Referenced by Wt::Widget::focusNextPrevChild(), Wt::Widget::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, inherited]

Reimplemented in Wt::Window::Frame.

Definition at line 640 of file widget.cpp.

References Wt::Widget::font(), Wt::Widget::fontChange(), Wt::Widget::ownFont, Wt::Widget::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, inherited]

Reimplemented in Wt::Window::Frame.

Definition at line 172 of file widget.cpp.

References Wt::Pen::color(), Wt::Widget::painter_, Wt::Painter::pen(), Wt::Painter::setPen(), and Wt::Widget::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, inherited]

Reimplemented from Wt::LayoutItem.

Definition at line 543 of file widget.cpp.

References Wt::SDLRect::height(), Wt::SDLRect::left(), Wt::Widget::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, inherited]

Definition at line 536 of file widget.cpp.

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

Referenced by Wt::Widget::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  )  [inherited]

Definition at line 873 of file widget.cpp.

References Wt::Widget::hide(), and Wt::Widget::show().

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

Here is the call graph for this function:

void Wt::Widget::setLayout ( Layout layout  )  [inherited]

Definition at line 575 of file widget.cpp.

References Wt::Object::installEventFilter(), Wt::Widget::layout(), Wt::Widget::layout_, Wt::Widget::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::Frame::setLineColor ( const Color color  ) 

Definition at line 65 of file frame.cpp.

References line_color_, and Wt::Widget::update().

00065                                            {
00066     line_color_ = color;
00067     update();
00068 }

Here is the call graph for this function:

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

Reimplemented from Wt::LayoutItem.

Definition at line 970 of file widget.cpp.

References Wt::Widget::layout_, Wt::Layout::margin, Wt::Widget::maximumSize(), Wt::LayoutItem::setMaximumSize(), Wt::Widget::size(), and Wt::Widget::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, inherited]

Reimplemented from Wt::LayoutItem.

Definition at line 950 of file widget.cpp.

References Wt::Size::expandedTo(), Wt::Widget::layout_, Wt::Layout::margin, Wt::Widget::minimumSize(), Wt::LayoutItem::setMinimumSize(), Wt::Widget::setSizeHint(), Wt::Widget::size(), and Wt::Widget::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  )  [inherited]

Definition at line 877 of file widget.cpp.

References Wt::Widget::hide(), and Wt::Widget::show().

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

Here is the call graph for this function:

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

Reimplemented from Wt::LayoutItem.

Definition at line 932 of file widget.cpp.

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

Referenced by Wt::PushButton::setButtonSize(), Wt::Widget::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, inherited]

Reimplemented from Wt::LayoutItem.

Definition at line 985 of file widget.cpp.

References Wt::Widget::layout_, Wt::LayoutItem::setSizePolicy(), Wt::Widget::sizePolicy(), and Wt::Widget::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, inherited]

Reimplemented in Wt::Window.

Definition at line 864 of file widget.cpp.

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

Referenced by Wt::Widget::setHidden(), and Wt::Widget::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, inherited]

Definition at line 418 of file widget.cpp.

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

00418 {}

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

Reimplemented from Wt::PixmapOf< SDLPixmap >.

Definition at line 78 of file widget.h.

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

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

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

Here is the call graph for this function:

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

Reimplemented from Wt::LayoutItem.

Definition at line 927 of file widget.cpp.

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

Referenced by Wt::RootWindow::resize(), Wt::Widget::setSizeHint(), and Wt::Widget::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, inherited]

Reimplemented from Wt::LayoutItem.

Definition at line 979 of file widget.cpp.

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

Referenced by Wt::Widget::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 Wt::Widget::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, inherited]

Definition at line 65 of file widget.h.

References Wt::Object::topParent().

Referenced by Wt::Widget::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 (  )  [inherited]

Definition at line 647 of file widget.cpp.

References Wt::Widget::ownFont.

00647                        {
00648     ownFont = false;
00649 }

void Wt::Widget::update (  )  [inherited]

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

Definition at line 448 of file widget.cpp.

References Wt::Widget::rect().

Referenced by Frame(), Wt::Widget::hiddenChanged(), Wt::Widget::lower(), Wt::Widget::move(), Wt::Widget::paintEvent(), Wt::Application::postEvent(), Wt::Widget::raise(), Wt::Widget::resize(), Wt::Widget::setBackgroundColor(), Wt::Widget::setBackgroundPixmap(), Wt::Widget::setForegroundColor(), setLineColor(), Wt::Widget::update(), Wt::Label::update(), Wt::Button::update(), Wt::Widget::Widget(), and Wt::Widget::~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 
) [inherited]

Definition at line 452 of file widget.cpp.

References Wt::Widget::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  )  [inherited]

Definition at line 443 of file widget.cpp.

References Wt::Widget::need_redraw_, and Wt::Widget::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, inherited]

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

Definition at line 365 of file widget.cpp.

References Wt::Widget::autoerase(), Wt::Application::postEvent(), Wt::Widget::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, inherited]

Definition at line 395 of file widget.cpp.

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

Referenced by Wt::Widget::resizeEvent(), and Wt::Widget::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 (  )  [inherited]

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(), Wt::Widget::hiddenChanged(), Wt::Widget::setMaximumSize(), Wt::Widget::setMinimumSize(), Wt::Widget::setSizeHint(), and Wt::Widget::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, inherited]

Definition at line 352 of file widget.cpp.

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

Referenced by Wt::Widget::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, inherited]

Definition at line 72 of file widget.h.

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

Referenced by Wt::Label::drawContents(), drawFrame(), frameWidth(), Wt::Widget::rect(), and Wt::Widget::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(), Wt::Widget::setBackgroundPixmap(), Wt::Widget::setBackgroundPixmapFlags(), and Wt::CascadeLayout::setGeometry().

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 [inherited]

Definition at line 216 of file widget.h.

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

WVar<int> Wt::Widget::focusPolicy [inherited]

Definition at line 218 of file widget.h.

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

WVar<bool> Wt::Widget::hidden [inherited]

public attributes

Definition at line 215 of file widget.h.

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

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

Definition at line 255 of file widget.h.

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

Color Wt::Frame::line_color_ [private]

Definition at line 53 of file frame.h.

Referenced by lineColor(), and setLineColor().

WVar<int> Wt::Frame::lineWidth

Definition at line 41 of file frame.h.

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

WVar<int> Wt::Frame::margin

Definition at line 42 of file frame.h.

Referenced by Wt::Label::calc_size_hint(), contentsRect(), Wt::Window::Frame::Frame(), frameWidth(), and onLayoutChange().

WVar<bool> Wt::Widget::mouseTracking [inherited]

Definition at line 217 of file widget.h.

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

WVar<int> Wt::Widget::ownFont [inherited]

Definition at line 219 of file widget.h.

Referenced by Wt::Widget::font(), Wt::Widget::reparent(), Wt::Widget::setFont(), and Wt::Widget::unsetFont().

WVar<int> Wt::Frame::spacing

Definition at line 43 of file frame.h.

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


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

Generated Fri Jul 28 19:29:07 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.