#include <platform.hh>
Public Member Functions | |
| virtual void | setLayout (Layout *layout)=0 |
| This methods notifies the platform, that it has been attached to a layout. | |
| virtual void | attachView (View *view)=0 |
| This methods notifies the platform, that a view has been attached to the related layout. | |
| virtual void | detachView (View *view)=0 |
| This methods notifies the platform, that a view has been detached from the related layout. | |
| virtual int | textWidth (style::Font *font, const char *text, int len)=0 |
| Return the width of a text, with a given length and font. | |
| virtual int | nextGlyph (const char *text, int idx)=0 |
| Return the index of the next glyph in string text. | |
| virtual int | prevGlyph (const char *text, int idx)=0 |
| Return the index of the previous glyph in string text. | |
| virtual float | dpiX ()=0 |
| Return screen resolution in x-direction. | |
| virtual float | dpiY ()=0 |
| Return screen resolution in y-direction. | |
| virtual int | addIdle (void(Layout::*func)())=0 |
| Add an idle function. | |
| virtual void | removeIdle (int idleId)=0 |
| Remove an idle function, which has not been processed yet. | |
| virtual style::Font * | createFont (style::FontAttrs *attrs, bool tryEverything)=0 |
| Create a (platform dependent) font. | |
| virtual bool | fontExists (const char *name)=0 |
| virtual style::Color * | createColor (int color)=0 |
| Create a color resource for a given 0xrrggbb value. | |
| virtual style::Tooltip * | createTooltip (const char *text)=0 |
| Create a tooltip. | |
| virtual void | cancelTooltip ()=0 |
| Cancel a tooltip (either shown or requested). | |
| virtual Imgbuf * | createImgbuf (Imgbuf::Type type, int width, int height)=0 |
| virtual void | copySelection (const char *text)=0 |
| Copy selected text (0-terminated). | |
| virtual ui::ResourceFactory * | getResourceFactory ()=0 |
| virtual int dw::core::Platform::addIdle | ( | void(Layout::*)() | func | ) | [pure virtual] |
Add an idle function.
An idle function is called once, when no other tasks are to be done (e.g. there are no events to process), and then removed from the queue. The return value is a number, which can be used in removeIdle below.
Referenced by dw::core::Layout::queueResize(), and dw::core::Layout::scrollTo0().
| virtual void dw::core::Platform::attachView | ( | View * | view | ) | [pure virtual] |
This methods notifies the platform, that a view has been attached to the related layout.
Implemented in dw::fltk::FltkPlatform.
Referenced by dw::core::Layout::attachView().
| virtual void dw::core::Platform::cancelTooltip | ( | ) | [pure virtual] |
Cancel a tooltip (either shown or requested).
Implemented in dw::fltk::FltkPlatform.
Referenced by dw::core::Layout::cancelTooltip().
| virtual void dw::core::Platform::copySelection | ( | const char * | text | ) | [pure virtual] |
Copy selected text (0-terminated).
Implemented in dw::fltk::FltkPlatform.
Referenced by dw::core::Layout::copySelection().
| virtual style::Color* dw::core::Platform::createColor | ( | int | color | ) | [pure virtual] |
Create a color resource for a given 0xrrggbb value.
Implemented in dw::fltk::FltkPlatform.
Referenced by dw::core::Layout::createColor().
| virtual style::Font* dw::core::Platform::createFont | ( | style::FontAttrs * | attrs, | |
| bool | tryEverything | |||
| ) | [pure 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.
Implemented in dw::fltk::FltkPlatform.
Referenced by dw::core::Layout::createFont().
| virtual Imgbuf* dw::core::Platform::createImgbuf | ( | Imgbuf::Type | type, | |
| int | width, | |||
| int | height | |||
| ) | [pure virtual] |
| virtual style::Tooltip* dw::core::Platform::createTooltip | ( | const char * | text | ) | [pure virtual] |
Create a tooltip.
Implemented in dw::fltk::FltkPlatform.
Referenced by dw::core::Layout::createTooltip().
| virtual void dw::core::Platform::detachView | ( | View * | view | ) | [pure virtual] |
This methods notifies the platform, that a view has been detached from the related layout.
Implemented in dw::fltk::FltkPlatform.
Referenced by dw::core::Layout::detachView().
| virtual float dw::core::Platform::dpiX | ( | ) | [pure virtual] |
Return screen resolution in x-direction.
Implemented in dw::fltk::FltkPlatform.
Referenced by dw::core::Layout::dpiX().
| virtual float dw::core::Platform::dpiY | ( | ) | [pure virtual] |
Return screen resolution in y-direction.
Implemented in dw::fltk::FltkPlatform.
Referenced by dw::core::Layout::dpiY().
| virtual bool dw::core::Platform::fontExists | ( | const char * | name | ) | [pure virtual] |
| virtual ui::ResourceFactory* dw::core::Platform::getResourceFactory | ( | ) | [pure virtual] |
| virtual int dw::core::Platform::nextGlyph | ( | const char * | text, | |
| int | idx | |||
| ) | [pure virtual] |
Return the index of the next glyph in string text.
Implemented in dw::fltk::FltkPlatform.
Referenced by dw::core::Layout::nextGlyph().
| virtual int dw::core::Platform::prevGlyph | ( | const char * | text, | |
| int | idx | |||
| ) | [pure virtual] |
Return the index of the previous glyph in string text.
Implemented in dw::fltk::FltkPlatform.
Referenced by dw::core::Layout::prevGlyph().
| virtual void dw::core::Platform::removeIdle | ( | int | idleId | ) | [pure virtual] |
Remove an idle function, which has not been processed yet.
Implemented in dw::fltk::FltkPlatform.
Referenced by dw::core::Layout::updateAnchor(), and dw::core::Layout::~Layout().
| virtual void dw::core::Platform::setLayout | ( | Layout * | layout | ) | [pure virtual] |
This methods notifies the platform, that it has been attached to a layout.
Implemented in dw::fltk::FltkPlatform.
Referenced by dw::core::Layout::Layout().
| virtual int dw::core::Platform::textWidth | ( | style::Font * | font, | |
| const char * | text, | |||
| int | len | |||
| ) | [pure virtual] |
Return the width of a text, with a given length and font.
Implemented in dw::fltk::FltkPlatform.
Referenced by dw::core::Layout::textWidth().
1.5.9