Dillo v3.1.1-111-gd4f56d0d
|
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. | |
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 char * | textToUpper (const char *text, int len)=0 |
Return the string resulting from transforming text to uppercase. | |
virtual char * | textToLower (const char *text, int len)=0 |
Return the string resulting from transforming text to lowercase. | |
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, double gamma)=0 |
Create a (platform speficic) image buffer. | |
virtual void | copySelection (const char *text)=0 |
Copy selected text (0-terminated). | |
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. | |
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. | |
const 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. | |
An interface to encapsulate some platform dependencies.
Definition at line 16 of file platform.hh.
|
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().
|
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().
|
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", "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.
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.
Referenced by dw::core::Layout::detachView().
|
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::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.
Referenced by dw::core::Layout::updateAnchor(), and dw::core::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().
|
pure virtual |
Return the string resulting from transforming text to lowercase.
Implemented in dw::fltk::FltkPlatform.
Referenced by 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().