#include <layout.h>
Inheritance diagram for Wt::Layout:
Public Types | |
typedef std::list< Object * > | List |
Public Member Functions | |
Layout (Widget *parent, int margin=0, int spacing=-1, const std::string &name="Layout::anon") | |
Layout (Layout *parentLayout, int margin=0, int spacing=-1, const std::string &name="Layout::anon") | |
Layout (int spacing=-1, const std::string &name="Layout::anon") | |
virtual | ~Layout () |
Widget * | mainWidget () const |
bool | isTopLevel () const |
virtual Size | sizeHint () const |
virtual Size | minimumSize () const |
virtual void | addItem (LayoutItem *li) |
virtual bool | removeItem (LayoutItem *li) |
returns true if a layoutitem is actually removed | |
virtual bool | eventFilter (Object *, Event *) |
virtual void | setGeometry (const Rect &r) |
Object * | parent () const |
const List & | children () const |
List & | children () |
bool | isDescendant (const Object *p) const |
virtual void | insertChild (Object *obj) |
virtual void | removeChild (Object *obj) |
void | reparent (Object *new_parent) |
template<typename T> | |
void | deleteFirstChild () |
template<typename T> | |
void | deleteLastChild () |
template<typename T> | |
void | deleteAllChildren () |
Object * | topParent () const |
returns top level parent: it may return itself | |
const std::string & | name () const |
void | installEventFilter (const Object *filterObj) |
void | removeEventFilter (const Object *obj) |
int | startTimer (int interval) |
void | killTimer (int id) |
void | killTimers () |
virtual bool | event (Event *e) |
event handling | |
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 |
virtual const Rect & | geometry () const |
return the widget's geometry relative to its parent | |
virtual bool | isEmpty () const |
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 |
Public Attributes | |
WVar< int > | margin |
WVar< int > | spacing |
WVar< bool > | autoAdd |
Signal01< void, const Object * > | destroyed |
signals | |
WVar< int > | alignment |
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 Member Functions | |
virtual bool | onAboutToChangeAutoAdd (bool auto_add) |
virtual int | onSpacingOverride (int spacing) |
void | adjustMaximumSize (int margin) |
virtual bool | exists (const LayoutItem *li) const =0 |
void | markDeleted (LayoutItem *li) |
bool | isDeleted (LayoutItem *li) const |
void | enforce () |
enforces the layout in the mainWidget() children and layouts | |
void | postLayoutHintEvent () |
void | setWidthasPrimaryLength (bool width=true) |
bool | isWidthPrimaryLength () const |
template<typename TYPE> | |
int | primaryLength (const TYPE &t) const |
int | preferredLength (const LayoutItem *li, bool expand) const |
template<typename TYPE> | |
int | secondaryLength (const TYPE &t) const |
template<typename TYPE> | |
int | primaryOffset (const TYPE &t) const |
template<typename TYPE> | |
int | secondaryOffset (const TYPE &t) const |
Point | getPoint (int primary_offset, int secondary_offset) const |
Size | getSize (int primary, int secondary) const |
Rect | getRect (int primary_offset, int secondary_offset, int primary_size, int secondary_size) const |
int | primaryStretch (const SizePolicy &sp) const |
bool | mayGrowPrimally (const SizePolicy &sp) const |
bool | mayShrinkPrimally (const SizePolicy &sp) const |
bool | expandingPrimally (const SizePolicy &sp) 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 |
virtual void | setSizeHint (const Size &size) |
Private Member Functions | |
void | on_wobject_item_death (const Object *obj) |
void | init () |
Private Attributes | |
LayoutItem * | deleted_li_ |
bool | width_as_primary_length |
The Layout class takes ownership of child layouts (Objects), and other layoutitems that are not widgets. Widgets have their own ierarchy and so a Layout absolutely does not delete Widgets, in any way.
Layouts will be deleted when the parent layout dies or when they are explictely deleted. The rest of the layout items (spacer) will be deleted on Layout::remove() and/or ~Layout().
In the mean time however, we keep track of all these pointers into our container layout and layout actively syncronizes the list when a child is deleted.
In short: Layout contains LayoutItems. LayoutItems can be Layouts, Widgets and Spacers. Layouts are also children to parent Layout.
Layout Widgets Spacer Deleted on remove y n y Deleted on ~Layout y n y removed on deletion y y *
don't do that. That objects are now belong to Layout and cannot be deleted safely since they are not Objects. If you want them to be deleted remove them from the Layout via Layout::remove()
Definition at line 272 of file layout.h.
typedef std::list<Object*> Wt::Object::List [inherited] |
Wt::Layout::Layout | ( | Widget * | parent, | |
int | margin = 0 , |
|||
int | spacing = -1 , |
|||
const std::string & | name = "Layout::anon" | |||
) |
Definition at line 77 of file layout.cpp.
References init(), Wt::Object::parent(), and Wt::Application::sendPostedEvents().
00079 : Object(parent, name), 00080 LayoutItem(), 00081 margin(margin), 00082 spacing(spacing), 00083 autoAdd(false), 00084 deleted_li_(0), 00085 width_as_primary_length(true) { 00086 init(); 00087 if (parent) 00088 parent->setLayout(this); 00089 Application::sendPostedEvents(); 00090 }
Here is the call graph for this function:
Wt::Layout::Layout | ( | Layout * | parentLayout, | |
int | margin = 0 , |
|||
int | spacing = -1 , |
|||
const std::string & | name = "Layout::anon" | |||
) |
Definition at line 92 of file layout.cpp.
References init(), Wt::Object::parent(), and Wt::Application::sendPostedEvents().
00094 : Object(parent, name), 00095 LayoutItem(), 00096 margin(margin), 00097 spacing(spacing), 00098 autoAdd(false), 00099 deleted_li_(0), 00100 width_as_primary_length(true) { 00101 init(); 00102 parent->addItem(this); 00103 Application::sendPostedEvents(); 00104 }
Here is the call graph for this function:
Wt::Layout::Layout | ( | int | spacing = -1 , |
|
const std::string & | name = "Layout::anon" | |||
) |
Definition at line 106 of file layout.cpp.
References init(), and Wt::Application::sendPostedEvents().
00107 : Object(0, name), 00108 LayoutItem(), 00109 margin(0), 00110 spacing(spacing), 00111 autoAdd(false), 00112 deleted_li_(0), 00113 width_as_primary_length(true) { 00114 init(); 00115 Application::sendPostedEvents(); 00116 }
Here is the call graph for this function:
virtual Wt::Layout::~Layout | ( | ) | [inline, virtual] |
Definition at line 279 of file layout.h.
References markDeleted(), Wt::Object::parent(), and removeItem().
00279 { 00280 Layout *l = dynamic_cast<Layout *>(parent()); 00281 if (l) { 00282 l->markDeleted(this); 00283 l->removeItem(this); 00284 } 00285 }
Here is the call graph for this function:
void Wt::Layout::addItem | ( | LayoutItem * | li | ) | [virtual] |
Reimplemented in Wt::GridLayout, Wt::LayoutStdContainer< Container >, Wt::BoxLayout, Wt::LayoutStdContainer< Wt::Matrix< MatrixLayoutItemCompound > >, Wt::LayoutStdContainer< std::list< CascadeLayoutItemCompound > >, and Wt::LayoutStdContainer< std::list< BoxLayoutItemCompound > >.
Definition at line 143 of file layout.cpp.
References Wt::Object::destroyed, exists(), on_wobject_item_death(), postLayoutHintEvent(), Wt::Object::reparent(), and Wt::LayoutItem::type().
Referenced by Wt::Box::add(), Wt::LayoutStdContainer< std::list< BoxLayoutItemCompound > >::addItem(), Wt::GridLayout::addItem(), Wt::BoxLayout::appendItem(), eventFilter(), and Wt::BoxLayout::prependItem().
00143 { 00144 assert(!exists(li)); 00145 00146 // Here we care only for rogue add statements of fully created 00147 // objects and if they are layouts we put them under our 00148 // ownership. If li is already children of this then reparent 00149 // is a nop 00150 Layout *l; 00151 Object *child; 00152 if ((l = li->type<Layout *>())) { 00153 l->reparent(this); 00154 } else if ((child = li->type<Object *>())) { 00155 child->destroyed.connect( 00156 sigc::slot1<void, const Object *>( 00157 sigc::mem_fun(*this, &Layout::on_wobject_item_death))); 00158 } 00159 postLayoutHintEvent(); 00160 }
Here is the call graph for this function:
void Wt::Layout::adjustMaximumSize | ( | int | margin | ) | [protected] |
Definition at line 50 of file layout.cpp.
References margin, Wt::LayoutItem::maximumSize(), and Wt::LayoutItem::setMaximumSize().
Referenced by init().
00050 { 00051 setMaximumSize(maximumSize() >> margin); 00052 }
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().
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 }
virtual void Wt::Object::customEvent | ( | CustomEvent * | ) | [inline, protected, virtual, inherited] |
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:
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:
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::Layout::enforce | ( | ) | [protected] |
enforces the layout in the mainWidget() children and layouts
it can be only called if there is a main widget
Definition at line 336 of file layout.cpp.
References Wt::LayoutItem::geometry(), Wt::LayoutItem::invalidateRecursively(), mainWidget(), minimumSize(), setGeometry(), sizeHint(), and Wt::Widget::updateGeometry().
Referenced by eventFilter().
00336 { 00337 const Rect rect = geometry(); 00338 const Size min_size = minimumSize(); 00339 const Size hint_size = sizeHint(); 00340 00341 // top downn invalidate across one widget only 00342 invalidateRecursively(); 00343 // calls the virtual reimplementations 00344 setGeometry(rect); 00345 // this will notify parent of mainWidget() if exists 00346 if (rect != geometry() || 00347 hint_size != sizeHint() || 00348 min_size != minimumSize()) { 00349 mainWidget()->updateGeometry(); 00350 } 00351 }
Here is the call graph for this function:
bool Wt::Object::event | ( | Event * | e | ) | [virtual, inherited] |
event handling
Reimplemented in Wt::Application, and Wt::Widget.
Definition at line 173 of file object.cpp.
References Wt::Object::childEvent(), Wt::Event::ChildInserted, Wt::Event::ChildRemoved, Wt::Object::customEvent(), Wt::Object::filterEvent(), Wt::SDLTimer::scheduleNext(), Wt::Object::timer(), Wt::Event::Timer, Wt::Object::timerEvent(), Wt::Event::type(), and Wt::Event::User.
Referenced by Wt::Widget::event(), Wt::Application::notify(), and Wt::Application::postEvent().
00173 { 00174 bool handled = true; 00175 00176 if (filterEvent(e)) 00177 return true; 00178 00179 switch (e->type()) { 00180 case Event::Timer: { 00181 TimerEvent *te = static_cast<TimerEvent *>(e); 00182 int id = te->timerid(); 00183 if (timer(id)) { 00184 timerEvent(te); 00185 } 00186 // if it is signle shot it may have been killed 00187 // during eventhandling 00188 SDLTimer *t = timer(id); 00189 if (t) 00190 t->scheduleNext(); 00191 } 00192 break; 00193 case Event::ChildInserted: 00194 case Event::ChildRemoved: 00195 childEvent(static_cast<ChildEvent *>(e)); 00196 break; 00197 default: 00198 if (e->type() >= Event::User) { 00199 customEvent(static_cast<CustomEvent *>(e)); 00200 } else { 00201 handled = false; 00202 } 00203 break; 00204 } 00205 00206 return handled; 00207 }
Here is the call graph for this function:
we get events from the mainWidget only if exists. The type of events are:
The following uses cases has to be covered:
// we monitor the managed widgets // top level layout grabs it (if tll exists) Layout::eventFilter() { // on layoutHint event calls Layout::enforce(); // on resize calls Layout::setGeometry(r); // on child insert / remove in mainWidget // this implies enforce called in the next event processing Application::postEvent(mainWidget(), new LayoutHintEvent()); }
Reimplemented from Wt::Object.
Definition at line 228 of file layout.cpp.
References addItem(), autoAdd, Wt::ChildEvent::child(), Wt::Event::ChildInserted, Wt::Event::ChildRemoved, enforce(), Wt::Object::eventFilter(), Wt::LayoutItem::geometry(), Wt::Event::LayoutHint, Wt::Event::Move, removeItem(), Wt::Event::Resize, Wt::LayoutItem::setGeometry(), setGeometry(), trace, and Wt::Event::type().
00228 { 00229 Widget *w; 00230 00231 switch (e->type()) { 00232 case Event::ChildInserted: 00233 if (autoAdd) { 00234 ChildEvent *ce = static_cast<ChildEvent *>(e); 00235 Object *child = ce->child(); 00236 // It is not possible to add other widgets layout. They will 00237 // be toplevels and that means we are dead 00238 LayoutItem *li = dynamic_cast<LayoutItem *>(child); 00239 00240 //assert(li == this); 00241 // we can only insert Widget items as childs of our mainWidget 00242 const bool is_window_frame = dynamic_cast<Window::Frame *>(child); 00243 const Window *wnd = dynamic_cast<Window *>(child); 00244 const bool is_frameless_window = wnd && 00245 !dynamic_cast<Window::Frame *>(wnd->parent()); 00246 if (li != this && !is_window_frame && !is_frameless_window 00247 && (w = dynamic_cast<Widget *>(child))) { 00248 trace("layout") << "Inserting to layout " 00249 << this << " child " << w << std::endl; 00250 addItem(w); 00251 } 00252 } 00253 break; 00254 case Event::ChildRemoved: { 00255 // we have to handle the reparenting case. 00256 // delete is handled gracefully. Problem is we don't 00257 // know if it is deleted. But if it is deleted it will 00258 // have been already removed. So we use static_cast to 00259 // go up and down the inheritance tree. It is also possible 00260 // that we don't manage this child. 00261 ChildEvent *ce = static_cast<ChildEvent *>(e); 00262 w = static_cast<Widget *>(ce->child()); 00263 LayoutItem *li = static_cast<LayoutItem *>(w); 00264 // if item is already dead (removed) removeItem will do nothing 00265 removeItem(li); 00266 } 00267 break; 00268 case Event::Resize: 00269 w = dynamic_cast<Widget *>(obj); 00270 trace("layout") << "Widget Resize: " << w 00271 << " caused layout resize" << std::endl; 00272 setGeometry(w->geometry()); 00273 break; 00274 case Event::Move: 00275 w = dynamic_cast<Widget *>(obj); 00276 trace("layout") << "Widget move: " << w 00277 << " caused layout move" << std::endl; 00278 LayoutItem::setGeometry(w->geometry()); 00279 break; 00280 case Event::LayoutHint: 00281 enforce(); 00282 break; 00283 default: 00284 break; 00285 } 00286 00287 return Object::eventFilter(obj, e); 00288 }
Here is the call graph for this function:
virtual bool Wt::Layout::exists | ( | const LayoutItem * | li | ) | const [protected, pure virtual] |
virtual SizePolicy::ExpandData Wt::LayoutItem::expanding | ( | ) | const [inline, virtual, inherited] |
Reimplemented in Wt::Widget.
Definition at line 170 of file layout.h.
References Wt::SizePolicy::expandData, and Wt::LayoutItem::size_policy_.
Referenced by Wt::Widget::expanding().
00170 { 00171 return size_policy_.expandData; 00172 }
bool Wt::Layout::expandingPrimally | ( | const SizePolicy & | sp | ) | const [protected] |
Definition at line 410 of file layout.cpp.
References Wt::SizePolicy::expandingHorizontally(), Wt::SizePolicy::expandingVertically(), and width_as_primary_length.
Referenced by Wt::BoxLayout::setGeometry().
00410 { 00411 return (width_as_primary_length) ? 00412 sp.expandingHorizontally() : sp.expandingVertically(); 00413 }
Here is the call graph for this function:
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 }
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(), enforce(), 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 }
Definition at line 376 of file layout.cpp.
References width_as_primary_length.
Referenced by Wt::BoxLayout::setGeometry().
00376 { 00377 return (width_as_primary_length) ? 00378 Point(primary_offset, secondary_offset) : 00379 Point(secondary_offset, primary_offset); 00380 }
Rect Wt::Layout::getRect | ( | int | primary_offset, | |
int | secondary_offset, | |||
int | primary_size, | |||
int | secondary_size | |||
) | const [protected] |
Definition at line 388 of file layout.cpp.
References width_as_primary_length.
00389 { 00390 return (width_as_primary_length) ? 00391 Rect(primary_offset, secondary_offset, primary_size, secondary_size) : 00392 Rect(secondary_offset, primary_offset, secondary_size, primary_size); 00393 }
Definition at line 382 of file layout.cpp.
References width_as_primary_length.
Referenced by Wt::BoxLayout::setGeometry(), and Wt::BoxLayout::validate().
00382 { 00383 return (width_as_primary_length) ? 00384 Size(primary, secondary) : 00385 Size(secondary, primary); 00386 }
virtual bool Wt::LayoutItem::hasHeightForWidth | ( | ) | const [inline, virtual, inherited] |
void Wt::Layout::init | ( | ) | [private] |
Reimplemented in Wt::CascadeLayout, and Wt::GridLayout.
Definition at line 54 of file layout.cpp.
References Wt::WVarBase< VARTYPE >::aboutToChange, adjustMaximumSize(), autoAdd, Wt::WVarBase< VARTYPE >::changed, Wt::Signal012< R, ARG1, ARG2 >::connect(), Wt::Signal012M< R, ARG1, ARG2, M >::connect(), margin, onAboutToChangeAutoAdd(), onSpacingOverride(), Wt::WVarBase< VARTYPE >::override, postLayoutHintEvent(), and spacing.
Referenced by Layout().
00054 { 00055 autoAdd.aboutToChange.connect( 00056 sigc::slot1<bool, bool>( 00057 sigc::mem_fun(*this, &Layout::onAboutToChangeAutoAdd))); 00058 00059 spacing.override.connect( 00060 sigc::slot1<int, int>( 00061 sigc::mem_fun(*this, &Layout::onSpacingOverride))); 00062 00063 sigc::slot0<void> post_layouthint_slot = sigc::mem_fun(*this, 00064 &Layout::postLayoutHintEvent); 00065 00066 spacing.changed.connect(post_layouthint_slot); 00067 00068 margin.changed.connect( 00069 sigc::slot1<void, int>( 00070 sigc::mem_fun(*this, 00071 &Layout::adjustMaximumSize))); 00072 margin.changed.connect(post_layouthint_slot); 00073 00074 adjustMaximumSize(margin); 00075 }
Here is the call graph for this function:
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 minimumSize(), and 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 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:
bool Wt::LayoutItem::is | ( | ) | const [inline, inherited] |
bool Wt::Layout::isDeleted | ( | LayoutItem * | li | ) | const [inline, protected] |
Definition at line 314 of file layout.h.
References deleted_li_.
Referenced by removeItem().
00314 { 00315 return deleted_li_ == li; 00316 }
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:
virtual bool Wt::LayoutItem::isEmpty | ( | ) | const [inline, virtual, inherited] |
Reimplemented in Wt::LayoutStdContainer< Container >, Wt::Widget, Wt::LayoutStdContainer< Wt::Matrix< MatrixLayoutItemCompound > >, Wt::LayoutStdContainer< std::list< CascadeLayoutItemCompound > >, and Wt::LayoutStdContainer< std::list< BoxLayoutItemCompound > >.
Definition at line 184 of file layout.h.
Referenced by Wt::LayoutItem::isNonEmpty().
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:
bool Wt::Layout::isTopLevel | ( | ) | const |
Definition at line 129 of file layout.cpp.
References mainWidget(), and Wt::Object::parent().
Referenced by onAboutToChangeAutoAdd(), and setGeometry().
00129 { 00130 return (parent() && mainWidget() == parent()); 00131 }
Here is the call graph for this function:
bool Wt::Layout::isWidthPrimaryLength | ( | ) | const [inline, protected] |
Definition at line 321 of file layout.h.
References width_as_primary_length.
Referenced by Wt::GridLayout::calcEdge(), Wt::GridLayout::expandingPrimally(), Wt::GridLayout::mayGrowPrimally(), Wt::GridLayout::primaryCellItemLength(), Wt::GridLayout::primaryCellLength(), Wt::GridLayout::primaryHintLength(), Wt::GridLayout::primaryMinLength(), Wt::GridLayout::secondaryEdges(), Wt::GridLayout::secondaryEffectiveStretch(), Wt::GridLayout::secondaryExtraSpace(), Wt::GridLayout::secondaryStretch(), and Wt::Box::setStretchFactor().
00321 { 00322 return width_as_primary_length; 00323 }
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 setGeometry().
void Wt::Object::killTimer | ( | int | id | ) | [inherited] |
Definition at line 145 of file object.cpp.
References Wt::Object::timers_.
Referenced by Wt::Timer::stop().
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 }
Widget * Wt::Layout::mainWidget | ( | ) | const |
Definition at line 118 of file layout.cpp.
References Wt::Object::parent().
Referenced by enforce(), isTopLevel(), postLayoutHintEvent(), Wt::BoxLayout::setGeometry(), setGeometry(), Wt::GridLayout::setGeometry(), and Wt::CascadeLayout::setGeometry().
00118 { 00119 const Object *p = this; 00120 while ((p = p->parent())) { 00121 Widget *w = dynamic_cast<Widget *>(const_cast<Object *>(p)); 00122 if (w) { 00123 return w; 00124 } 00125 } 00126 return 0; 00127 }
Here is the call graph for this function:
void Wt::Layout::markDeleted | ( | LayoutItem * | li | ) | [inline, protected] |
Definition at line 311 of file layout.h.
References deleted_li_.
Referenced by on_wobject_item_death(), and ~Layout().
00311 { 00312 deleted_li_ = li; 00313 }
virtual Size Wt::LayoutItem::maximumSize | ( | ) | const [inline, virtual, inherited] |
Reimplemented in Wt::Widget.
Definition at line 155 of file layout.h.
References Wt::LayoutItem::maximum_size_.
Referenced by adjustMaximumSize(), Wt::Widget::maximumSize(), and setGeometry().
00155 { 00156 return maximum_size_; 00157 }
bool Wt::Layout::mayGrowPrimally | ( | const SizePolicy & | sp | ) | const [protected] |
Definition at line 400 of file layout.cpp.
References Wt::SizePolicy::mayGrowHorizontally(), Wt::SizePolicy::mayGrowVertically(), and width_as_primary_length.
Referenced by Wt::BoxLayout::setGeometry().
00400 { 00401 return (width_as_primary_length) ? 00402 sp.mayGrowHorizontally() : sp.mayGrowVertically(); 00403 }
Here is the call graph for this function:
bool Wt::Layout::mayShrinkPrimally | ( | const SizePolicy & | sp | ) | const [protected] |
Definition at line 405 of file layout.cpp.
References Wt::SizePolicy::mayShrinkHorizontally(), Wt::SizePolicy::mayShrinkVertically(), and width_as_primary_length.
00405 { 00406 return (width_as_primary_length) ? 00407 sp.mayShrinkHorizontally() : sp.mayShrinkVertically(); 00408 }
Here is the call graph for this function:
Size Wt::Layout::minimumSize | ( | ) | const [virtual] |
Reimplemented from Wt::LayoutItem.
Definition at line 415 of file layout.cpp.
References Wt::LayoutItem::invalidated(), and Wt::LayoutItem::minimumSize().
Referenced by Wt::GridLayout::calcEdge(), enforce(), Wt::Widget::minimumSize(), Wt::BoxLayout::setGeometry(), and setGeometry().
00415 { 00416 if (invalidated()) { 00417 Layout &self(*const_cast<Layout *>(this)); 00418 self.validate(); 00419 } 00420 return LayoutItem::minimumSize(); 00421 }
Here is the call graph for this function:
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::Layout::on_wobject_item_death | ( | const Object * | obj | ) | [private] |
Definition at line 180 of file layout.cpp.
References markDeleted(), and removeItem().
Referenced by addItem().
00180 { 00181 // we cannot do dynamic_cast because Widget does not exist anymore 00182 Widget *w = static_cast<Widget *>(const_cast<Object *>(obj)); 00183 LayoutItem *li = static_cast<LayoutItem *>(w); 00184 // do not delete this bastard. It is alerady deleted 00185 markDeleted(li); 00186 removeItem(li); 00187 }
Here is the call graph for this function:
bool Wt::Layout::onAboutToChangeAutoAdd | ( | bool | auto_add | ) | [protected, virtual] |
Definition at line 133 of file layout.cpp.
References isTopLevel().
Referenced by init().
00133 { 00134 return (auto_add && !isTopLevel()); 00135 }
Here is the call graph for this function:
Definition at line 46 of file layout.cpp.
References margin.
Referenced by init().
00046 { 00047 return (sp == -1) ? static_cast<int>(margin) : sp; 00048 }
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(), isTopLevel(), Layout(), Wt::Widget::lower(), mainWidget(), Wt::operator<<(), Wt::Widget::paintEvent(), Wt::Widget::parentWidget(), Wt::Application::postEvent(), Wt::Widget::raise(), Wt::Widget::updateGeometry(), Wt::Widget::Widget(), Wt::Window::Window(), ~Layout(), and Wt::Widget::~Widget().
00053 { 00054 return parent_; 00055 };
void Wt::Layout::postLayoutHintEvent | ( | ) | [protected] |
Definition at line 137 of file layout.cpp.
References mainWidget(), and Wt::Application::postEvent().
Referenced by addItem(), init(), Wt::CascadeLayout::init(), removeItem(), Wt::GridLayout::setColStretch(), and Wt::GridLayout::setRowStretch().
00137 { 00138 if (mainWidget()) { 00139 Application::postEvent(mainWidget(), new LayoutHintEvent()); 00140 } 00141 }
Here is the call graph for this function:
int Wt::Layout::preferredLength | ( | const LayoutItem * | li, | |
bool | expand | |||
) | const [protected] |
Definition at line 357 of file layout.cpp.
References Wt::LayoutItem::minimumSize(), primaryLength(), and Wt::LayoutItem::sizeHint().
Referenced by Wt::BoxLayout::setGeometry().
00357 { 00358 return primaryLength((expand) ? li->sizeHint() : li->minimumSize()); 00359 }
Here is the call graph for this function:
int Wt::Layout::primaryLength | ( | const TYPE & | t | ) | const [inline, protected] |
Definition at line 326 of file layout.h.
References width_as_primary_length.
Referenced by Wt::GridLayout::calcEdge(), preferredLength(), Wt::BoxLayout::setGeometry(), and Wt::BoxLayout::validate().
00326 { 00327 return (width_as_primary_length) ? t.width() : t.height(); 00328 }
int Wt::Layout::primaryOffset | ( | const TYPE & | t | ) | const [protected] |
Definition at line 367 of file layout.cpp.
References width_as_primary_length.
Referenced by Wt::BoxLayout::setGeometry().
00367 { 00368 return (width_as_primary_length) ? t.left() : t.top(); 00369 }
int Wt::Layout::primaryStretch | ( | const SizePolicy & | sp | ) | const [protected] |
Definition at line 395 of file layout.cpp.
References Wt::SizePolicy::horizontalStretch, Wt::SizePolicy::verticalStretch, and width_as_primary_length.
Referenced by Wt::BoxLayout::setGeometry().
00395 { 00396 return (width_as_primary_length) ? 00397 sp.horizontalStretch : sp.verticalStretch; 00398 }
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 }
bool Wt::Layout::removeItem | ( | LayoutItem * | li | ) | [virtual] |
returns true if a layoutitem is actually removed
Reimplemented in Wt::LayoutStdContainer< Container >, Wt::LayoutStdContainer< Wt::Matrix< MatrixLayoutItemCompound > >, Wt::LayoutStdContainer< std::list< CascadeLayoutItemCompound > >, and Wt::LayoutStdContainer< std::list< BoxLayoutItemCompound > >.
Definition at line 162 of file layout.cpp.
References exists(), Wt::LayoutItem::is(), isDeleted(), and postLayoutHintEvent().
Referenced by eventFilter(), on_wobject_item_death(), Wt::LayoutStdContainer< std::list< BoxLayoutItemCompound > >::removeItem(), and ~Layout().
00162 { 00163 bool exist = exists(li); 00164 // It is possible to be asked to remove a non existing li 00165 if (exist) { 00166 // Delete only non Objects, Objects will be deleted by ~Object() 00167 // also delete child layouts here when removed but do not delete 00168 // them again if they are already deleted 00169 00170 if (!isDeleted(li) && (li->is<Layout *>() || !li->is<Object *>()) 00171 ) { 00172 delete li; 00173 } 00174 00175 postLayoutHintEvent(); 00176 } 00177 return exist; 00178 }
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 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:
int Wt::Layout::secondaryLength | ( | const TYPE & | t | ) | const [protected] |
Definition at line 362 of file layout.cpp.
References width_as_primary_length.
Referenced by Wt::BoxLayout::setGeometry(), and Wt::BoxLayout::validate().
00362 { 00363 return (width_as_primary_length) ? t.height() : t.width(); 00364 }
int Wt::Layout::secondaryOffset | ( | const TYPE & | t | ) | const [protected] |
Definition at line 372 of file layout.cpp.
References width_as_primary_length.
Referenced by Wt::BoxLayout::setGeometry().
00372 { 00373 return (width_as_primary_length) ? t.top() : t.left(); 00374 }
void Wt::Layout::setGeometry | ( | const Rect & | r | ) | [virtual] |
Reimplemented from Wt::LayoutItem.
Reimplemented in Wt::CascadeLayout, Wt::GridLayout, and Wt::BoxLayout.
Definition at line 290 of file layout.cpp.
References Wt::Size::boundedTo(), Wt::Size::contains(), Wt::Size::expandedTo(), Wt::LayoutIterator::finish(), Wt::Widget::isHidden(), isTopLevel(), isTrace, Wt::LayoutItem::iterator(), mainWidget(), margin, Wt::LayoutItem::maximumSize(), minimumSize(), Wt::LayoutItem::setGeometry(), Wt::Widget::setGeometry(), Wt::Rect::setSize(), Wt::Rect::size(), sizeHint(), Wt::LayoutIterator::start(), and trace.
Referenced by enforce(), eventFilter(), Wt::BoxLayout::setGeometry(), Wt::GridLayout::setGeometry(), and Wt::CascadeLayout::setGeometry().
00290 { 00291 Rect widget_rect = r; 00292 00293 if (isTopLevel()) { 00294 const Rect& layout_rect = r >> margin; 00295 Size new_size = layout_rect.size(); 00296 00297 trace("layout") << "Is Widget hidden ? " 00298 << mainWidget()->isHidden() << std::endl; 00299 trace("layout") << this << " requested new_size " << new_size 00300 << " min_size " << minimumSize() 00301 << " hint_size " << sizeHint() << std::endl; 00302 00303 if (isTrace("layout")) { 00304 LayoutIterator it = iterator(); 00305 for (it.start(); !it.finish(); it++) { 00306 LayoutItem *li = *it; 00307 if (li->is<Object *>()) { 00308 trace("layout") << "Listing item " << dynamic_cast<Object *>(li) 00309 << " min_size " << li->minimumSize() 00310 << " hint_size " << li->sizeHint() << std::endl; 00311 } 00312 } 00313 } 00314 00315 if (!new_size.contains(minimumSize())) { 00316 new_size = minimumSize().expandedTo(new_size); 00317 } 00318 00319 if (!maximumSize().contains(new_size)) { 00320 new_size = new_size.boundedTo(maximumSize()); 00321 } 00322 00323 trace("layout") << this << " accepted new_size " << new_size << std::endl; 00324 00325 widget_rect.setSize(new_size << margin); 00326 mainWidget()->setGeometry(widget_rect); 00327 } 00328 trace("layout") << this << " Layout::setGeometry()" << widget_rect << std::endl; 00329 // It is weird but in the layout::LayoutItem component 00330 // we store widget's geometry (<< margin) 00331 LayoutItem::setGeometry(widget_rect); 00332 }
Here is the call graph for this function:
virtual void Wt::LayoutItem::setMaximumSize | ( | const Size & | size | ) | [inline, virtual, inherited] |
Reimplemented in Wt::Widget.
Definition at line 158 of file layout.h.
References Wt::LayoutItem::maximum_size_.
Referenced by adjustMaximumSize(), and Wt::Widget::setMaximumSize().
00158 { 00159 maximum_size_ = size; 00160 }
virtual void Wt::LayoutItem::setMinimumSize | ( | const Size & | size | ) | [inline, virtual, inherited] |
Reimplemented in Wt::Widget.
Definition at line 151 of file layout.h.
References Wt::LayoutItem::minimum_size_.
Referenced by Wt::Widget::setMinimumSize(), Wt::BoxLayout::validate(), Wt::GridLayout::validate(), and Wt::CascadeLayout::validate().
00151 { 00152 minimum_size_ = size; 00153 }
virtual void Wt::LayoutItem::setSizeHint | ( | const Size & | size | ) | [inline, protected, virtual, inherited] |
Reimplemented in Wt::Widget.
Definition at line 231 of file layout.h.
References Wt::LayoutItem::size_hint_.
Referenced by Wt::Widget::setSizeHint(), Wt::BoxLayout::validate(), Wt::GridLayout::validate(), and Wt::CascadeLayout::validate().
00231 { 00232 size_hint_ = size; 00233 }
virtual void Wt::LayoutItem::setSizePolicy | ( | const SizePolicy & | size_policy | ) | [inline, virtual, inherited] |
Reimplemented in Wt::Widget.
Definition at line 166 of file layout.h.
References Wt::LayoutItem::size_policy_.
Referenced by Wt::Widget::setSizePolicy().
00166 { 00167 size_policy_ = size_policy; 00168 }
void Wt::Layout::setWidthasPrimaryLength | ( | bool | width = true |
) | [protected] |
Definition at line 353 of file layout.cpp.
References width_as_primary_length.
Referenced by Wt::GridLayout::calcEdge().
00353 { 00354 width_as_primary_length = width; 00355 }
Size Wt::Layout::sizeHint | ( | ) | const [virtual] |
Reimplemented from Wt::LayoutItem.
Definition at line 423 of file layout.cpp.
References Wt::LayoutItem::invalidated(), and Wt::LayoutItem::sizeHint().
Referenced by Wt::GridLayout::calcEdge(), enforce(), Wt::BoxLayout::setGeometry(), setGeometry(), Wt::CascadeLayout::setGeometry(), and Wt::Widget::sizeHint().
00423 { 00424 if (invalidated()) { 00425 Layout &self(*const_cast<Layout *>(this)); 00426 self.validate(); 00427 } 00428 return LayoutItem::sizeHint(); 00429 }
Here is the call graph for this function:
virtual SizePolicy Wt::LayoutItem::sizePolicy | ( | ) | const [inline, virtual, inherited] |
Reimplemented in Wt::Widget.
Definition at line 162 of file layout.h.
References Wt::LayoutItem::size_policy_.
Referenced by Wt::Widget::sizePolicy().
00162 { 00163 return size_policy_; 00164 }
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().
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 }
TEST_TYPE Wt::LayoutItem::type | ( | ) | const [inline, inherited] |
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 }
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().
WVar<bool> Wt::Layout::autoAdd |
Definition at line 304 of file layout.h.
Referenced by Wt::Box::Box(), Wt::Cascade::Cascade(), eventFilter(), Wt::Grid::Grid(), and init().
const int Wt::LayoutItem::default_hint_size = 100 [static, inherited] |
const int Wt::LayoutItem::default_max_size = ((int) ((unsigned int) (~0) >> 1)) [static, inherited] |
const int Wt::LayoutItem::default_min_size = 30 [static, inherited] |
LayoutItem* Wt::Layout::deleted_li_ [private] |
Signal01<void, const Object *> Wt::Object::destroyed [inherited] |
signals
Definition at line 139 of file object.h.
Referenced by addItem(), Wt::Object::installEventFilter(), and Wt::Object::~Object().
Definition at line 302 of file layout.h.
Referenced by adjustMaximumSize(), init(), Wt::Widget::maximumSize(), Wt::Widget::minimumSize(), Wt::Frame::onLayoutChange(), onSpacingOverride(), Wt::BoxLayout::setGeometry(), setGeometry(), Wt::GridLayout::setGeometry(), Wt::CascadeLayout::setGeometry(), Wt::Widget::setMaximumSize(), Wt::Widget::setMinimumSize(), and Wt::Widget::sizeHint().
Definition at line 303 of file layout.h.
Referenced by init(), Wt::Frame::onLayoutChange(), Wt::BoxLayout::setGeometry(), Wt::GridLayout::setGeometry(), Wt::BoxLayout::validate(), and Wt::GridLayout::validate().
bool Wt::Layout::width_as_primary_length [private] |
Definition at line 356 of file layout.h.
Referenced by expandingPrimally(), getPoint(), getRect(), getSize(), isWidthPrimaryLength(), mayGrowPrimally(), mayShrinkPrimally(), primaryLength(), primaryOffset(), primaryStretch(), secondaryLength(), secondaryOffset(), and setWidthasPrimaryLength().
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.