Dillo
|
An interface to encapsulate some platform dependencies. More...
#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. More... | |
virtual void | attachView (View *view)=0 |
This methods notifies the platform, that a view has been attached to the related layout. More... | |
virtual void | detachView (View *view)=0 |
This methods notifies the platform, that a view has been detached from the related layout. More... | |
virtual int | textWidth (style::Font *font, const char *text, int len)=0 |
Return the width of a text, with a given length and font. More... | |
virtual char * | textToUpper (const char *text, int len)=0 |
Return the string resulting from transforming text to uppercase. More... | |
virtual char * | textToLower (const char *text, int len)=0 |
Return the string resulting from transforming text to lowercase. More... | |
virtual int | nextGlyph (const char *text, int idx)=0 |
Return the index of the next glyph in string text. More... | |
virtual int | prevGlyph (const char *text, int idx)=0 |
Return the index of the previous glyph in string text. More... | |
virtual float | dpiX ()=0 |
Return screen resolution in x-direction. More... | |
virtual float | dpiY ()=0 |
Return screen resolution in y-direction. More... | |
virtual int | addIdle (void(Layout::*func)())=0 |
Add an idle function. More... | |
virtual void | removeIdle (int idleId)=0 |
Remove an idle function, which has not been processed yet. More... | |
virtual style::Font * | createFont (style::FontAttrs *attrs, bool tryEverything)=0 |
Create a (platform dependent) font. More... | |
virtual bool | fontExists (const char *name)=0 |
virtual style::Color * | createColor (int color)=0 |
Create a color resource for a given 0xrrggbb value. More... | |
virtual style::Tooltip * | createTooltip (const char *text)=0 |
Create a tooltip. More... | |
virtual void | cancelTooltip ()=0 |
Cancel a tooltip (either shown or requested) More... | |
virtual Imgbuf * | createImgbuf (Imgbuf::Type type, int width, int height, double gamma)=0 |
Create a (platform speficic) image buffer. More... | |
virtual void | copySelection (const char *text)=0 |
Copy selected text (0-terminated). More... | |
virtual ui::ResourceFactory * | getResourceFactory ()=0 |
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. More... | |
virtual bool | equals (Object *other) |
Returns, whether two objects are equal. More... | |
virtual int | hashValue () |
Return a hash value for the object. More... | |
virtual Object * | clone () |
Return an exact copy of the object. More... | |
virtual void | intoStringBuffer (misc::StringBuffer *sb) |
Store a textual representation of the object in a misc::StringBuffer. More... | |
const char * | toString () |
Use object::Object::intoStringBuffer to return a textual representation of the object. More... | |
virtual size_t | sizeOf () |
Return the number of bytes, this object totally uses. More... | |
An interface to encapsulate some platform dependencies.
|
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.
|
pure virtual |
This methods notifies the platform, that a view has been attached to the related layout.
Implemented in dw::fltk::FltkPlatform.
|
pure virtual |
Cancel a tooltip (either shown or requested)
Implemented in dw::fltk::FltkPlatform.
Referenced by dw::core::Layout::cancelTooltip().
|
pure virtual |
Copy selected text (0-terminated).
Implemented in dw::fltk::FltkPlatform.
Referenced by dw::core::Layout::copySelection().
|
pure virtual |
Create a color resource for a given 0xrrggbb value.
Implemented in dw::fltk::FltkPlatform.
Referenced by dw::core::Layout::createColor().
|
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().
|
pure virtual |
Create a (platform speficic) image buffer.
"gamma" is the value by which the image data is gamma-encoded.
Implemented in dw::fltk::FltkPlatform.
Referenced by dw::core::Layout::createImgbuf().
|
pure virtual |
Create a tooltip.
Implemented in dw::fltk::FltkPlatform.
Referenced by dw::core::Layout::createTooltip().
|
pure virtual |
This methods notifies the platform, that a view has been detached from the related layout.
Implemented in dw::fltk::FltkPlatform.
|
pure virtual |
Return screen resolution in x-direction.
Implemented in dw::fltk::FltkPlatform.
Referenced by dw::core::Layout::dpiX().
|
pure virtual |
Return screen resolution in y-direction.
Implemented in dw::fltk::FltkPlatform.
Referenced by dw::core::Layout::dpiY().
|
pure virtual |
Implemented in dw::fltk::FltkPlatform.
Referenced by dw::core::Layout::fontExists().
|
pure virtual |
|
pure virtual |
Return the index of the next glyph in string text.
Implemented in dw::fltk::FltkPlatform.
Referenced by dw::Hyphenator::hyphenateWord(), and dw::core::Layout::nextGlyph().
|
pure virtual |
Return the index of the previous glyph in string text.
Implemented in dw::fltk::FltkPlatform.
Referenced by dw::core::Layout::prevGlyph().
|
pure virtual |
Remove an idle function, which has not been processed yet.
Implemented in dw::fltk::FltkPlatform.
|
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().
|
pure virtual |
Return the string resulting from transforming text to lowercase.
Implemented in dw::fltk::FltkPlatform.
Referenced by dw::Hyphenator::hyphenateWord(), and dw::core::Layout::textToLower().
|
pure virtual |
Return the string resulting from transforming text to uppercase.
Implemented in dw::fltk::FltkPlatform.
Referenced by dw::core::Layout::textToUpper().
|
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().