|
Dillo v3.2.0-170-gacf511bb
|
#include <fltkplatform.hh>
Classes | |
| class | FltkResourceFactory |
| class | IdleFunc |
Public Member Functions | |
| FltkPlatform () | |
| ~FltkPlatform () | |
| void | generalIdle () |
| 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. | |
| char * | textToUpper (const char *text, int len) |
| Return the string resulting from transforming text to uppercase. | |
| char * | textToLower (const char *text, int len) |
| Return the string resulting from transforming text to lowercase. | |
| 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, double gamma) |
| Create a (platform specific) image buffer. | |
| void | copySelection (const char *text, int destination) |
| Copy selected text (0-terminated). | |
| core::ui::ResourceFactory * | getResourceFactory () |
| ... | |
| void | attachResource (ui::FltkResource *resource) |
| void | detachResource (ui::FltkResource *resource) |
Public Member Functions inherited from dw::core::Platform | |
| virtual int | addIdle (void(Layout::*func)())=0 |
| Add an idle function. | |
Public Member Functions inherited from lout::object::Object | |
| virtual | ~Object () |
| The destructor is defined as virtual (but not abstract), so that destruction of Object's works properly. | |
| virtual bool | equals (Object *other) |
| Returns, whether two objects are equal. | |
| virtual int | hashValue () |
| Return a hash value for the object. | |
| virtual Object * | clone () |
| Return an exact copy of the object. | |
| virtual void | intoStringBuffer (misc::StringBuffer *sb) |
| Store a textual representation of the object in a misc::StringBuffer. | |
| char * | toString () |
| Use object::Object::intoStringBuffer to return a textual representation of the object. | |
| virtual size_t | sizeOf () |
| Return the number of bytes, this object totally uses. | |
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 |
Definition at line 112 of file fltkplatform.hh.
| dw::fltk::FltkPlatform::FltkPlatform | ( | ) |
Definition at line 459 of file fltkplatform.cc.
References DBG_OBJ_CREATE, idleFuncId, idleFuncRunning, idleQueue, layout, resourceFactory, resources, dw::fltk::FltkPlatform::FltkResourceFactory::setPlatform(), and view.
| dw::fltk::FltkPlatform::~FltkPlatform | ( | ) |
Definition at line 474 of file fltkplatform.cc.
References DBG_OBJ_DELETE, generalStaticIdle(), idleFuncRunning, idleQueue, and resources.
| int dw::fltk::FltkPlatform::addIdle | ( | void(core::Layout::*)() | func | ) |
Definition at line 654 of file fltkplatform.cc.
References dw::fltk::FltkPlatform::IdleFunc::func, generalStaticIdle(), dw::fltk::FltkPlatform::IdleFunc::id, idleFuncId, idleFuncRunning, and idleQueue.
| void dw::fltk::FltkPlatform::attachResource | ( | ui::FltkResource * | resource | ) |
Definition at line 727 of file fltkplatform.cc.
References dw::fltk::ui::FltkResource::attachView(), resources, and view.
Referenced by dw::fltk::ui::FltkResource::init().
|
virtual |
This methods notifies the platform, that a view has been attached to the related layout.
Implements dw::core::Platform.
Definition at line 491 of file fltkplatform.cc.
References dw::fltk::ui::FltkResource::attachView(), MSG_ERR, resources, and view.
|
virtual |
Cancel a tooltip (either shown or requested)
Implements dw::core::Platform.
Definition at line 342 of file fltkplatform.cc.
References dw::fltk::FltkTooltip::cancel().
|
virtual |
Copy selected text (0-terminated).
Implements dw::core::Platform.
Definition at line 710 of file fltkplatform.cc.
|
virtual |
Create a color resource for a given 0xrrggbb value.
Implements dw::core::Platform.
Definition at line 700 of file fltkplatform.cc.
References dw::fltk::FltkColor::create().
|
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", "zeroWidth" 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.
Definition at line 693 of file fltkplatform.cc.
References dw::fltk::FltkFont::create().
|
virtual |
Create a (platform specific) image buffer.
"gamma" is the value by which the image data is gamma-encoded.
Implements dw::core::Platform.
Definition at line 715 of file fltkplatform.cc.
|
virtual |
Create a tooltip.
Implements dw::core::Platform.
Definition at line 705 of file fltkplatform.cc.
References dw::fltk::FltkTooltip::create().
| void dw::fltk::FltkPlatform::detachResource | ( | ui::FltkResource * | resource | ) |
Definition at line 733 of file fltkplatform.cc.
References resources.
Referenced by dw::fltk::ui::FltkResource::~FltkResource().
|
virtual |
This methods notifies the platform, that a view has been detached from the related layout.
Implements dw::core::Platform.
Definition at line 505 of file fltkplatform.cc.
References dw::fltk::ui::FltkResource::detachView(), MSG_ERR, resources, and view.
|
virtual |
Return screen resolution in x-direction.
Implements dw::core::Platform.
Definition at line 611 of file fltkplatform.cc.
|
virtual |
Return screen resolution in y-direction.
Implements dw::core::Platform.
Definition at line 619 of file fltkplatform.cc.
|
virtual |
Implements dw::core::Platform.
Definition at line 208 of file fltkplatform.cc.
References dw::fltk::FltkFont::fontExists(), and dw::core::style::FontAttrs::name.
| void dw::fltk::FltkPlatform::generalIdle | ( | ) |
Definition at line 632 of file fltkplatform.cc.
References dw::fltk::FltkPlatform::IdleFunc::func, generalStaticIdle(), idleFuncRunning, idleQueue, and layout.
Referenced by a_UIcmd_finish_loading().
|
staticprivate |
Definition at line 627 of file fltkplatform.cc.
Referenced by addIdle(), generalIdle(), removeIdle(), and ~FltkPlatform().
|
virtual |
...
Implements dw::core::Platform.
Definition at line 721 of file fltkplatform.cc.
References resourceFactory.
|
virtual |
Return the index of the next glyph in string text.
Implements dw::core::Platform.
Definition at line 601 of file fltkplatform.cc.
Referenced by textWidth().
|
virtual |
Return the index of the previous glyph in string text.
Implements dw::core::Platform.
Definition at line 606 of file fltkplatform.cc.
|
virtual |
Remove an idle function, which has not been processed yet.
Implements dw::core::Platform.
Definition at line 675 of file fltkplatform.cc.
References generalStaticIdle(), lout::container::typed::Iterator< T >::getNext(), lout::container::typed::Iterator< T >::hasNext(), dw::fltk::FltkPlatform::IdleFunc::id, idleFuncRunning, and idleQueue.
|
virtual |
This methods notifies the platform, that it has been attached to a layout.
Implements dw::core::Platform.
Definition at line 484 of file fltkplatform.cc.
References DBG_OBJ_ASSOC_CHILD, and layout.
|
virtual |
Return the string resulting from transforming text to lowercase.
Implements dw::core::Platform.
Definition at line 586 of file fltkplatform.cc.
|
virtual |
Return the string resulting from transforming text to uppercase.
Implements dw::core::Platform.
Definition at line 571 of file fltkplatform.cc.
|
virtual |
Return the width of a text, with a given length and font.
Implements dw::core::Platform.
Definition at line 520 of file fltkplatform.cc.
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.
|
private |
Definition at line 158 of file fltkplatform.hh.
Referenced by addIdle(), and FltkPlatform().
|
private |
Definition at line 157 of file fltkplatform.hh.
Referenced by addIdle(), FltkPlatform(), generalIdle(), removeIdle(), and ~FltkPlatform().
|
private |
Definition at line 156 of file fltkplatform.hh.
Referenced by addIdle(), FltkPlatform(), generalIdle(), removeIdle(), and ~FltkPlatform().
|
private |
Definition at line 154 of file fltkplatform.hh.
Referenced by FltkPlatform(), generalIdle(), and setLayout().
|
private |
Definition at line 145 of file fltkplatform.hh.
Referenced by FltkPlatform(), and getResourceFactory().
|
private |
Definition at line 163 of file fltkplatform.hh.
Referenced by attachResource(), attachView(), detachResource(), detachView(), FltkPlatform(), and ~FltkPlatform().
|
private |
Definition at line 162 of file fltkplatform.hh.
Referenced by attachResource(), attachView(), detachView(), and FltkPlatform().