#include <size.h>
Collaboration diagram for Wt::Size:
Public Member Functions | |
Size (int width=0, int height=0) | |
int | width () const |
int | height () const |
bool | isValid () const |
void | setWidth (int w) |
void | setHeight (int h) |
void | setSize (int w, int h) |
bool | operator== (const Size &other) const |
Compare two Sizes for equality. | |
bool | operator!= (const Size &other) const |
Compare two Sizes. | |
bool | contains (const Size &other) const |
Size & | operator+= (const Size &other) |
increment operator | |
Size & | operator>> (int margin) |
add a margin (smaller rectangle) | |
Size & | operator<< (int margin) |
subtract a margin (bigger rectangle) | |
Size | operator>> (int margin) const |
add a margin (smaller rectangle) | |
Size | operator<< (int margin) const |
subtract a margin (bigger rectangle) | |
Size | boundedTo (const Size &other) const |
Size & | boundedTo (const Size &other) |
Size | expandedTo (const Size &other) const |
Size & | expandedTo (const Size &other) |
Private Attributes | |
int | width_ |
int | height_ |
Definition at line 28 of file size.h.
Definition at line 30 of file size.h.
Referenced by boundedTo(), expandedTo(), operator<<(), and operator>>().
bool Wt::Size::contains | ( | const Size & | other | ) | const [inline] |
Definition at line 65 of file size.h.
References height_, and width_.
Referenced by Wt::PushButton::setButtonSize(), and Wt::Layout::setGeometry().
Definition at line 112 of file size.h.
References height_, Size(), and width_.
Referenced by Wt::Layout::setGeometry(), Wt::Widget::setMinimumSize(), and Wt::Widget::setSizeHint().
00112 { 00113 int w = std::max(other.width_, width_); 00114 int h = std::max(other.height_, height_); 00115 return Size(w, h); 00116 }
Here is the call graph for this function:
int Wt::Size::height | ( | ) | const [inline] |
Definition at line 35 of file size.h.
References height_.
Referenced by Wt::Rect::align(), Wt::Label::calc_size_hint(), Wt::operator<<(), Wt::preferredHeight(), Wt::Widget::resize(), Wt::RootWindow::resize(), Wt::PixmapOf< Wt::SDLSurface >::resize(), Wt::PixmapOf< Wt::SDLSurface >::scale(), Wt::PushButton::setButtonSize(), Wt::BoxLayout::setGeometry(), Wt::GridLayout::setGeometry(), Wt::CascadeLayout::setGeometry(), Wt::Rect::setSize(), and Wt::PixmapOf< Wt::SDLSurface >::smoothScale().
00035 { 00036 return height_; 00037 };
bool Wt::Size::isValid | ( | ) | const [inline] |
bool Wt::Size::operator!= | ( | const Size & | other | ) | const [inline] |
bool Wt::Size::operator== | ( | const Size & | other | ) | const [inline] |
void Wt::Size::setHeight | ( | int | h | ) | [inline] |
Definition at line 50 of file size.h.
References setHeight(), and setWidth().
Referenced by Wt::Widget::resize().
Here is the call graph for this function:
void Wt::Size::setWidth | ( | int | w | ) | [inline] |
int Wt::Size::width | ( | ) | const [inline] |
Definition at line 32 of file size.h.
References width_.
Referenced by Wt::Rect::align(), Wt::Label::calc_size_hint(), Wt::operator<<(), Wt::preferredWidth(), Wt::Widget::resize(), Wt::RootWindow::resize(), Wt::PixmapOf< Wt::SDLSurface >::resize(), Wt::PixmapOf< Wt::SDLSurface >::scale(), Wt::PushButton::setButtonSize(), Wt::BoxLayout::setGeometry(), Wt::GridLayout::setGeometry(), Wt::CascadeLayout::setGeometry(), Wt::Rect::setSize(), and Wt::PixmapOf< Wt::SDLSurface >::smoothScale().
00032 { 00033 return width_; 00034 };
int Wt::Size::height_ [private] |
Definition at line 126 of file size.h.
Referenced by boundedTo(), contains(), expandedTo(), height(), isValid(), operator+=(), operator<<(), operator==(), operator>>(), and setHeight().
int Wt::Size::width_ [private] |
Definition at line 125 of file size.h.
Referenced by boundedTo(), contains(), expandedTo(), isValid(), operator+=(), operator<<(), operator==(), operator>>(), setWidth(), and width().
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.