#include <faith/widget.h>
Inheritance diagram for Faith::Widget:

Every Widget, if it has a parent (in other words, if the parent is not 0), then it becomes a child of the specified parent and thus becomes a "control". If no parent is specified, it becomes a top-level Widget, and is usually given a border, titlebar, etc.
Like everything that inherits from the class Object, when its parent goes away, Widget will also be deleted, so manually deleting Widgets created by new is unnecessary, unless no parent is specified
| enum Faith::Widget::Flags |
| Faith::Widget::Widget | ( | Widget * | parent, | |
| const char * | name = 0, |
|||
| int | wflags = 0 | |||
| ) |
Create a widget with the given parent.
The widget will be deleted automatically if a parent is specified
| virtual Faith::Widget::~Widget | ( | ) | [virtual] |
the Widget destructor. Performs some book-keeping and also deletes all child Widgets
| Faith::String Faith::Widget::caption | ( | ) | const |
| void Faith::Widget::closed | ( | ) | [signal] |
emitted after a closeEvent()
| virtual void Faith::Widget::closeEvent | ( | Faith::CloseEvent * | ) | [virtual] |
This function is called when the user closes this (top-level) Widget. This can be done by clicking "on the little X" or pressing a keyboard shortcut, or using the taskbar, ...
| const ColorGroup& Faith::Widget::colorGroup | ( | ) | const [inline] |
| virtual void Faith::Widget::enterEvent | ( | Faith::Event * | ) | [inline, virtual] |
Reimplemented in Faith::ToolButton.
| const Faith::Pixmap* Faith::Widget::erasePixmap | ( | ) | const [inline] |
| virtual bool Faith::Widget::event | ( | Faith::Event * | event | ) | [virtual] |
Gets an event from Faith, and gives it to one of the following *Event functions as appropriate.
Faith will delete this event itself, you should not
Reimplemented from Faith::Object.
| int Faith::Widget::flags | ( | ) | const [inline] |
| virtual void Faith::Widget::focusInEvent | ( | Faith::FocusEvent * | ) | [inline, virtual] |
Reimplemented in Faith::LineEdit.
| FocusMode Faith::Widget::focusMode | ( | ) | const [inline] |
| virtual void Faith::Widget::focusOutEvent | ( | Faith::FocusEvent * | ) | [inline, virtual] |
Reimplemented in Faith::LineEdit.
| FontMetrics Faith::Widget::fontMetrics | ( | ) | const [inline] |
| Faith::Rect Faith::Widget::geometry | ( | ) | const |
| void Faith::Widget::grabMouse | ( | ) |
After calling this function, this widget will be the only one to recieve mouse events. You should rarely have to use this function as Faith will do it sensibly
| virtual Handle Faith::Widget::handle | ( | ) | [inline, virtual] |
Implements Faith::PaintDevice.
| bool Faith::Widget::hasFocus | ( | ) | const [inline] |
| int Faith::Widget::height | ( | ) | const [inline] |
| void Faith::Widget::hidden | ( | ) | [signal] |
emitted after a hideEvent()
| virtual void Faith::Widget::hide | ( | ) | [virtual, slot] |
| virtual void Faith::Widget::hideEvent | ( | Faith::Event * | ) | [inline, virtual] |
Reimplemented in Faith::PopupMenu.
| bool Faith::Widget::isVisible | ( | ) | const |
| virtual void Faith::Widget::keyPressEvent | ( | Faith::KeyPressEvent * | ) | [inline, virtual] |
Reimplemented in Faith::LineEdit.
| Faith::Layout* Faith::Widget::layout | ( | ) |
| virtual void Faith::Widget::leaveEvent | ( | Faith::Event * | ) | [inline, virtual] |
Reimplemented in Faith::MenuBar, Faith::PopupMenu, and Faith::ToolButton.
| Faith::Rect Faith::Widget::mapFromGlobal | ( | const Faith::Rect & | rect | ) | const [inline] |
| Faith::Point Faith::Widget::mapFromGlobal | ( | const Faith::Point & | pt | ) | const |
| pt | is a point relative to the entire display |
| Faith::Rect Faith::Widget::mapToGlobal | ( | const Faith::Rect & | rect | ) | const [inline] |
| Faith::Point Faith::Widget::mapToGlobal | ( | const Faith::Point & | pt | ) | const |
| pt | is a point relative to this Widget |
| Faith::Size Faith::Widget::maximumSize | ( | ) | const |
This is of course unless you call setMinimumSize
| Faith::Size Faith::Widget::minimumSize | ( | ) | const |
This is of course unless you call setMinimumSize
| virtual void Faith::Widget::mouseMoveEvent | ( | Faith::MouseEvent * | ) | [inline, virtual] |
Reimplemented in Faith::LineEdit, Faith::MenuBar, Faith::PopupMenu, Faith::PushButton, Faith::ScrollBar, and Faith::Slider.
| virtual void Faith::Widget::mousePressEvent | ( | Faith::MouseEvent * | ) | [inline, virtual] |
This function is called when the user presses the mouse while over the widget (immediately after the push down)
Reimplemented in Faith::ComboBox, Faith::LineEdit, Faith::MenuBar, Faith::PopupMenu, Faith::PushButton, Faith::ScrollBar, Faith::Slider, and Faith::ToolButton.
| virtual void Faith::Widget::mouseReleaseEvent | ( | Faith::MouseEvent * | ) | [inline, virtual] |
This function is called when the use releases the mouse after it has been clicked on this widget.
This function is called even when the mouse was not over this widget. The only condition is that a mousePressEvent was sent to this object prior
Reimplemented in Faith::PopupMenu, Faith::PushButton, Faith::ScrollBar, Faith::Slider, and Faith::ToolButton.
| void Faith::Widget::move | ( | const Faith::Point & | pt | ) | [inline] |
| void Faith::Widget::move | ( | int | x, | |
| int | y | |||
| ) |
| virtual void Faith::Widget::moveEvent | ( | Faith::MoveEvent * | ) | [inline, virtual] |
| virtual void Faith::Widget::paintEvent | ( | Faith::PaintEvent * | e | ) | [virtual] |
Reimplemented in Faith::ComboBox, Faith::Label, Faith::LineEdit, Faith::MenuBar, Faith::PopupMenu, Faith::PushButton, Faith::ScrollBar, Faith::ScrollView, Faith::Slider, Faith::ToolBar, and Faith::ToolButton.
| Faith::Color Faith::Widget::paletteBackgroundColor | ( | ) | const |
| const Faith::Widget* Faith::Widget::parentWidget | ( | ) | const [inline] |
| Faith::Widget* Faith::Widget::parentWidget | ( | ) |
get the direct parent widget of this widget. if it has a parent, but is marked as Top level, this will be zero
| virtual void Faith::Widget::polish | ( | Style * | ) | [inline, protected, virtual] |
Called with the new style, when the style is changed. This is useful to pick up new sizes of widgets
By default, this does nothing
Reimplemented in Faith::ScrollBar, and Faith::Slider.
| Faith::Rect Faith::Widget::rect | ( | ) | const |
| void Faith::Widget::releaseMouse | ( | ) |
| void Faith::Widget::repaint | ( | ) | [inline] |
generate a paintEvent, and send it to me immediately it may be more efficient to use update if there is the possibility that you will call this multiple times without re-entering the event loop.
| void Faith::Widget::resize | ( | const Faith::Size & | sz | ) | [inline] |
| void Faith::Widget::resize | ( | int | w, | |
| int | h | |||
| ) |
| virtual void Faith::Widget::resizeEvent | ( | Faith::ResizeEvent * | ) | [inline, virtual] |
Reimplemented in Faith::ComboBox, and Faith::ScrollView.
| void Faith::Widget::setActiveWindow | ( | ) |
| void Faith::Widget::setCaption | ( | const Faith::String & | title | ) | [slot] |
Specifies what text will appear in the titlebar of this Widget, if it is a top-level window.
| void Faith::Widget::setFlags | ( | int | flags | ) |
set any flags, XOred
| void Faith::Widget::setFocusMode | ( | FocusMode | mode | ) |
| void Faith::Widget::setGeometry | ( | const Rect & | r | ) | [inline] |
| void Faith::Widget::setGeometry | ( | int | x, | |
| int | y, | |||
| int | w, | |||
| int | h | |||
| ) |
| void Faith::Widget::setHeight | ( | int | h | ) | [inline] |
| void Faith::Widget::setMaximumSize | ( | const Faith::Size & | size | ) |
set a maximum size to this widget the default is an invalid size which means no limit
Setting this to an invalid value takes maximumSize back to its default behavior
| void Faith::Widget::setMinimumSize | ( | const Faith::Size & | size | ) |
set a minimum size to this widget the default is Size(0,0)
Setting this to an invalid value takes minimumSize back to its default behavior
| void Faith::Widget::setMouseTracking | ( | bool | on | ) |
enable and disable mouse tracking
when mouse tracking is enabled, this widget always receives MouseMotion events, otherwise, it receives them only when a mouse button is pressed
By default this is disabled
| void Faith::Widget::setPaletteBackgroundColor | ( | const Color & | color | ) |
set the background color, the color this widget is automatically painted to.
TODO: unsettablize this option
| void Faith::Widget::setSizePolicy | ( | SizePolicy::Policy | h, | |
| SizePolicy::Policy | v | |||
| ) | [inline] |
| void Faith::Widget::setSizePolicy | ( | const SizePolicy & | p | ) | [inline] |
| void Faith::Widget::setWidth | ( | int | w | ) | [inline] |
| virtual void Faith::Widget::show | ( | ) | [virtual, slot] |
causes the Widget to be shown immediately, or just as the event loop is entered
Reimplemented in Faith::PopupMenu.
| virtual void Faith::Widget::showEvent | ( | Faith::Event * | ) | [inline, virtual] |
Reimplemented in Faith::PopupMenu.
| void Faith::Widget::shown | ( | ) | [signal] |
emitted after a showEvent()
| Faith::Size Faith::Widget::size | ( | ) | const [inline] |
| virtual Size Faith::Widget::sizeHint | ( | ) | const [virtual] |
Reimplemented in Faith::ComboBox, Faith::Label, Faith::LineEdit, Faith::PushButton, Faith::ToolBar, and Faith::ToolButton.
| SizePolicy Faith::Widget::sizePolicy | ( | ) | const [inline] |
| const Style* Faith::Widget::style | ( | ) | const [inline] |
| Style* Faith::Widget::style | ( | ) |
| Faith::Point Faith::Widget::topLeft | ( | ) | const [inline] |
| bool Faith::Widget::topLevel | ( | ) | const |
| void Faith::Widget::update | ( | ) | [slot] |
cause this window to become invalidated, and hence repainted soon
| int Faith::Widget::width | ( | ) | const [inline] |
1.4.7