#include <fltkplatform.hh>
Classes | |
| class | FltkResourceFactory |
| class | IdleFunc |
Public Member Functions | |
| FltkPlatform () | |
| ~FltkPlatform () | |
| void | setLayout (core::Layout *layout) |
| This methods notifies the platform, that it has been attached to a layout. | |
| void | attachView (core::View *view) |
| This methods notifies the platform, that a view has been attached to the related layout. | |
| void | detachView (core::View *view) |
| This methods notifies the platform, that a view has been detached from the related layout. | |
| int | textWidth (core::style::Font *font, const char *text, int len) |
| Return the width of a text, with a given length and font. | |
| int | nextGlyph (const char *text, int idx) |
| Return the index of the next glyph in string text. | |
| int | prevGlyph (const char *text, int idx) |
| Return the index of the previous glyph in string text. | |
| float | dpiX () |
| Return screen resolution in x-direction. | |
| float | dpiY () |
| Return screen resolution in y-direction. | |
| int | addIdle (void(core::Layout::*func)()) |
| void | removeIdle (int idleId) |
| Remove an idle function, which has not been processed yet. | |
| core::style::Font * | createFont (core::style::FontAttrs *attrs, bool tryEverything) |
| Create a (platform dependent) font. | |
| bool | fontExists (const char *name) |
| core::style::Color * | createColor (int color) |
| Create a color resource for a given 0xrrggbb value. | |
| core::style::Tooltip * | createTooltip (const char *text) |
| Create a tooltip. | |
| void | cancelTooltip () |
| Cancel a tooltip (either shown or requested). | |
| core::Imgbuf * | createImgbuf (core::Imgbuf::Type type, int width, int height) |
| void | copySelection (const char *text) |
| Copy selected text (0-terminated). | |
| core::ui::ResourceFactory * | getResourceFactory () |
| void | attachResource (ui::FltkResource *resource) |
| void | detachResource (ui::FltkResource *resource) |
Private Member Functions | |
| void | generalIdle () |
Static Private Member Functions | |
| static void | generalStaticIdle (void *data) |
Private Attributes | |
| FltkResourceFactory | resourceFactory |
| core::Layout * | layout |
| lout::container::typed::List < IdleFunc > * | idleQueue |
| bool | idleFuncRunning |
| int | idleFuncId |
| FltkView * | view |
| lout::container::typed::List < ui::FltkResource > * | resources |
| dw::fltk::FltkPlatform::FltkPlatform | ( | ) |
| dw::fltk::FltkPlatform::~FltkPlatform | ( | ) |
References generalStaticIdle(), idleFuncRunning, idleQueue, and resources.
| int dw::fltk::FltkPlatform::addIdle | ( | void(core::Layout::*)() | func | ) |
References lout::container::typed::List< T >::append(), dw::fltk::FltkPlatform::IdleFunc::func, generalStaticIdle(), dw::fltk::FltkPlatform::IdleFunc::id, idleFuncId, idleFuncRunning, and idleQueue.
| void dw::fltk::FltkPlatform::attachResource | ( | ui::FltkResource * | resource | ) |
References lout::container::typed::List< T >::append(), dw::fltk::ui::FltkResource::attachView(), resources, and view.
Referenced by dw::fltk::ui::FltkResource::init().
| void dw::fltk::FltkPlatform::attachView | ( | core::View * | view | ) | [virtual] |
This methods notifies the platform, that a view has been attached to the related layout.
Implements dw::core::Platform.
References dw::fltk::ui::FltkResource::attachView(), lout::container::typed::Collection< T >::iterator(), and resources.
| void dw::fltk::FltkPlatform::cancelTooltip | ( | ) | [virtual] |
Cancel a tooltip (either shown or requested).
Implements dw::core::Platform.
References dw::fltk::FltkTooltip::cancel().
| void dw::fltk::FltkPlatform::copySelection | ( | const char * | text | ) | [virtual] |
| core::style::Color * dw::fltk::FltkPlatform::createColor | ( | int | color | ) | [virtual] |
Create a color resource for a given 0xrrggbb value.
Implements dw::core::Platform.
References dw::fltk::FltkColor::create().
| core::style::Font * dw::fltk::FltkPlatform::createFont | ( | core::style::FontAttrs * | attrs, | |
| bool | tryEverything | |||
| ) | [virtual] |
Create a (platform dependent) font.
Typically, within a platform, a sub class of dw::core::style::Font is defined, which holds more platform dependent data.
Also, this method must fill the attributes "font" (when needed), "ascent", "descent", "spaceSidth" and "xHeight". If "tryEverything" is true, several methods should be used to use another font, when the requested font is not available. Passing false is typically done, if the caller wants to test different variations.
Implements dw::core::Platform.
References dw::fltk::FltkFont::create().
| core::Imgbuf * dw::fltk::FltkPlatform::createImgbuf | ( | core::Imgbuf::Type | type, | |
| int | width, | |||
| int | height | |||
| ) | [virtual] |
Implements dw::core::Platform.
| core::style::Tooltip * dw::fltk::FltkPlatform::createTooltip | ( | const char * | text | ) | [virtual] |
| void dw::fltk::FltkPlatform::detachResource | ( | ui::FltkResource * | resource | ) |
References lout::container::typed::List< T >::removeRef(), and resources.
Referenced by dw::fltk::ui::FltkResource::~FltkResource().
| void dw::fltk::FltkPlatform::detachView | ( | core::View * | view | ) | [virtual] |
This methods notifies the platform, that a view has been detached from the related layout.
Implements dw::core::Platform.
References dw::fltk::ui::FltkResource::detachView(), lout::container::typed::Collection< T >::iterator(), and resources.
| float dw::fltk::FltkPlatform::dpiX | ( | ) | [virtual] |
| float dw::fltk::FltkPlatform::dpiY | ( | ) | [virtual] |
| bool dw::fltk::FltkPlatform::fontExists | ( | const char * | name | ) | [virtual] |
Implements dw::core::Platform.
| void dw::fltk::FltkPlatform::generalIdle | ( | ) | [private] |
| void dw::fltk::FltkPlatform::generalStaticIdle | ( | void * | data | ) | [static, private] |
Referenced by addIdle(), generalIdle(), removeIdle(), and ~FltkPlatform().
| core::ui::ResourceFactory * dw::fltk::FltkPlatform::getResourceFactory | ( | ) | [virtual] |
| int dw::fltk::FltkPlatform::nextGlyph | ( | const char * | text, | |
| int | idx | |||
| ) | [virtual] |
Return the index of the next glyph in string text.
Implements dw::core::Platform.
Referenced by textWidth().
| int dw::fltk::FltkPlatform::prevGlyph | ( | const char * | text, | |
| int | idx | |||
| ) | [virtual] |
| void dw::fltk::FltkPlatform::removeIdle | ( | int | idleId | ) | [virtual] |
Remove an idle function, which has not been processed yet.
Implements dw::core::Platform.
References generalStaticIdle(), lout::container::typed::Iterator< T >::getNext(), lout::container::typed::Iterator< T >::hasNext(), dw::fltk::FltkPlatform::IdleFunc::id, idleFuncRunning, idleQueue, lout::container::typed::List< T >::isEmpty(), lout::container::typed::Collection< T >::iterator(), and lout::container::typed::List< T >::removeRef().
| void dw::fltk::FltkPlatform::setLayout | ( | core::Layout * | layout | ) | [virtual] |
This methods notifies the platform, that it has been attached to a layout.
Implements dw::core::Platform.
| int dw::fltk::FltkPlatform::textWidth | ( | core::style::Font * | font, | |
| const char * | text, | |||
| int | len | |||
| ) | [virtual] |
Return the width of a text, with a given length and font.
Implements dw::core::Platform.
References dw::fltk::FltkFont::font, dw::core::style::FONT_VARIANT_SMALL_CAPS, dw::core::style::FontAttrs::fontVariant, dw::core::style::FontAttrs::letterSpacing, nextGlyph(), lout::misc::roundInt(), and dw::core::style::FontAttrs::size.
int dw::fltk::FltkPlatform::idleFuncId [private] |
Referenced by addIdle(), and FltkPlatform().
bool dw::fltk::FltkPlatform::idleFuncRunning [private] |
Referenced by addIdle(), FltkPlatform(), generalIdle(), removeIdle(), and ~FltkPlatform().
Referenced by addIdle(), FltkPlatform(), generalIdle(), removeIdle(), and ~FltkPlatform().
core::Layout* dw::fltk::FltkPlatform::layout [private] |
Referenced by FltkPlatform(), and generalIdle().
Referenced by FltkPlatform(), and getResourceFactory().
Referenced by attachResource(), attachView(), detachResource(), detachView(), FltkPlatform(), and ~FltkPlatform().
FltkView* dw::fltk::FltkPlatform::view [private] |
Referenced by attachResource(), and FltkPlatform().
1.5.9