|
| Image (const char *altText) |
|
| ~Image () |
|
virtual bool | getAdjustMinWidth () |
|
core::Iterator * | iterator (core::Content::Type mask, bool atEnd) |
| Return an iterator for this widget. More...
|
|
core::Imgbuf * | getBuffer () |
|
void | setBuffer (core::Imgbuf *buffer, bool resize=false) |
| Called, when an image buffer is attached. More...
|
|
void | drawRow (int row) |
| Called, when data from a row is available and has been copied into the image buffer. More...
|
|
void | finish () |
| Called, when all image data has been retrieved. More...
|
|
void | fatal () |
| Called, when there are problems with the retrieval of image data. More...
|
|
void | setIsMap () |
| Sets image as server side image map. More...
|
|
void | setUseMap (ImageMapsList *list, Object *key) |
| Sets image as client side image map. More...
|
|
void | forceMapRedraw () |
|
void | setDeleteCallback (DW_Callback_t func, void *data) |
|
| Widget () |
|
| ~Widget () |
|
bool | resizeQueued () |
|
bool | extremesQueued () |
|
bool | needsResize () |
|
bool | needsAllocate () |
|
bool | allocateQueued () |
|
bool | extremesChanged () |
|
bool | wasAllocated () |
|
void | setParent (Widget *parent) |
|
void | setQuasiParent (Widget *quasiParent) |
|
void | setGenerator (Widget *generator) |
|
style::Style * | getStyle () |
|
Allocation * | getAllocation () |
|
bool | inAllocation (int x, int y) |
|
int | boxOffsetX () |
|
int | boxRestWidth () |
|
int | boxDiffWidth () |
|
int | boxOffsetY () |
|
int | boxRestHeight () |
|
int | boxDiffHeight () |
|
virtual int | numSizeRequestReferences () |
| See Sizes of Dillo Widgets (or Size requisitions depending on positions). More...
|
|
virtual Widget * | sizeRequestReference (int index) |
| See Sizes of Dillo Widgets (or Size requisitions depending on positions). More...
|
|
virtual int | numGetExtremesReferences () |
| See Sizes of Dillo Widgets (or Size requisitions depending on positions). More...
|
|
virtual Widget * | getExtremesReference (int index) |
| See Sizes of Dillo Widgets (or Size requisitions depending on positions). More...
|
|
void | sizeRequest (Requisition *requisition, int numPos=0, Widget **references=NULL, int *x=NULL, int *y=NULL) |
| This method is a wrapper for Widget::sizeRequestImpl(); it calls the latter only when needed. More...
|
|
void | getExtremes (Extremes *extremes, int numPos=0, Widget **references=NULL, int *x=NULL, int *y=NULL) |
| Wrapper for Widget::getExtremesImpl(). More...
|
|
void | sizeAllocate (Allocation *allocation) |
| Wrapper for Widget::sizeAllocateImpl, calls the latter only when needed. More...
|
|
void | calcExtraSpace (int numPos, Widget **references, int *x, int *y) |
| Calculates dw::core::Widget::extraSpace. More...
|
|
int | getAvailWidth (bool forceValue) |
|
int | getAvailHeight (bool forceValue) |
|
void | correctRequisition (Requisition *requisition, void(*splitHeightFun)(int, int *, int *), bool allowDecreaseWidth, bool allowDecreaseHeight) |
|
void | correctExtremes (Extremes *extremes, bool useAdjustmentWidth) |
|
int | calcWidth (style::Length cssValue, int refWidth, Widget *refWidget, int limitMinWidth, bool forceValue) |
|
void | calcFinalWidth (style::Style *style, int refWidth, Widget *refWidget, int limitMinWidth, bool forceValue, int *finalWidth) |
|
int | calcHeight (style::Length cssValue, bool usePercentage, int refHeight, Widget *refWidget, bool forceValue) |
|
virtual int | applyPerWidth (int containerWidth, style::Length perWidth) |
|
virtual int | applyPerHeight (int containerHeight, style::Length perHeight) |
|
int | getMinWidth (Extremes *extremes, bool forceValue) |
| Used to evaluate Widget::adjustMinWidth. More...
|
|
virtual bool | isBlockLevel () |
|
virtual bool | isPossibleContainer () |
|
void | containerSizeChanged () |
|
bool | intersects (Widget *refWidget, Rectangle *area, Rectangle *intersection) |
| Calculates the intersection of the visible allocation (i. e. the intersection with the visible parent allocation) and "area" (in widget coordinates referring to "refWidget"), returned in intersection (in widget coordinates). More...
|
|
void | drawInterruption (View *view, Rectangle *area, DrawingContext *context) |
|
virtual Widget * | getWidgetAtPoint (int x, int y, GettingWidgetAtPointContext *context) |
|
Widget * | getWidgetAtPointInterrupted (int x, int y, GettingWidgetAtPointContext *context) |
|
bool | buttonPress (EventButton *event) |
|
bool | buttonRelease (EventButton *event) |
|
bool | motionNotify (EventMotion *event) |
|
void | enterNotify (EventCrossing *event) |
|
void | leaveNotify (EventCrossing *event) |
|
virtual void | setStyle (style::Style *style) |
| Change the style of a widget. More...
|
|
void | setBgColor (style::Color *bgColor) |
| Set the background "behind" the widget, if it is not the background of the parent widget, e.g. the background of a table row. More...
|
|
style::Color * | getBgColor () |
| Get the actual background of a widget. More...
|
|
void | drawBox (View *view, style::Style *style, Rectangle *area, int x, int y, int width, int height, bool inverse) |
| Draw borders and background of a widget part, which allocation is given by (x, y, width, height) (widget coordinates). More...
|
|
void | drawWidgetBox (View *view, Rectangle *area, bool inverse) |
| Draw borders and background of a widget. More...
|
|
void | drawSelected (View *view, Rectangle *area) |
|
void | setButtonSensitive (bool buttonSensitive) |
|
bool | isButtonSensitive () |
|
Widget * | getParent () |
|
Widget * | getContainer () |
|
Widget * | getTopLevel () |
| Get the widget at the root of the tree, this widget is part from. More...
|
|
int | getLevel () |
| Get the level of the widget within the tree. More...
|
|
int | getGeneratorLevel () |
| Get the level of the widget within the tree, regarting the generators, not the parents. More...
|
|
Widget * | getNearestCommonAncestor (Widget *otherWidget) |
| Get the widget with the highest level, which is a direct ancestor of widget1 and widget2. More...
|
|
WidgetReference * | getWidgetReference () |
|
void | setWidgetReference (WidgetReference *widgetReference) |
|
Widget * | getGenerator () |
|
Layout * | getLayout () |
|
void | scrollTo (HPosition hpos, VPosition vpos, int x, int y, int width, int height) |
|
void | getMarginArea (int *xMar, int *yMar, int *widthMar, int *heightMar) |
|
void | getBorderArea (int *xBor, int *yBor, int *widthBor, int *heightBor) |
|
void | getPaddingArea (int *xPad, int *yPad, int *widthPad, int *heightPad) |
| Return the padding area (content plus padding). More...
|
|
virtual void | removeChild (Widget *child) |
|
| IdentifiableObject () |
|
void | intoStringBuffer (misc::StringBuffer *sb) |
| Store a textual representation of the object in a misc::StringBuffer. More...
|
|
int | getClassId () |
| Returns the class identifier. More...
|
|
const char * | getClassName () |
| Return the name, under which the class of this object was registered. More...
|
|
bool | instanceOf (int otherClassId) |
| Returns, whether this class is an instance of the class, given by otherClassId, or of a sub class of this class. More...
|
|
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...
|
|
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...
|
|
virtual | ~ImgRenderer () |
|
|
void | sizeRequestSimpl (core::Requisition *requisition) |
| Simple variant, to be implemented by widgets with sizes not depending on positions. More...
|
|
void | getExtremesSimpl (core::Extremes *extremes) |
| Simple variant, to be implemented by widgets with extremes not depending on positions. More...
|
|
void | sizeAllocateImpl (core::Allocation *allocation) |
| See Sizes of Dillo Widgets. More...
|
|
void | containerSizeChangedForChildren () |
|
void | draw (core::View *view, core::Rectangle *area, core::DrawingContext *context) |
|
bool | buttonPressImpl (core::EventButton *event) |
|
bool | buttonReleaseImpl (core::EventButton *event) |
|
void | enterNotifyImpl (core::EventCrossing *event) |
|
void | leaveNotifyImpl (core::EventCrossing *event) |
|
bool | motionNotifyImpl (core::EventMotion *event) |
|
int | contentX (core::MousePositionEvent *event) |
|
int | contentY (core::MousePositionEvent *event) |
|
int | getHeight () |
|
int | getContentWidth () |
|
int | getContentHeight () |
|
StackingContextMgr * | getNextStackingContextMgr () |
|
void | printFlag (Flags f) |
|
void | setFlags (Flags f) |
|
void | unsetFlags (Flags f) |
|
void | queueDraw () |
|
void | queueDrawArea (int x, int y, int width, int height) |
|
void | queueResize (int ref, bool extremesChanged) |
|
virtual void | sizeRequestImpl (Requisition *requisition, int numPos, Widget **references, int *x, int *y) |
| See Sizes of Dillo Widgets. More...
|
|
virtual void | getExtremesImpl (Extremes *extremes, int numPos, Widget **references, int *x, int *y) |
| See Sizes of Dillo Widgets. More...
|
|
virtual void | calcExtraSpaceImpl (int numPos, Widget **references, int *x, int *y) |
| The actual implementation for calculating dw::core::Widget::extraSpace. More...
|
|
virtual void | resizeDrawImpl () |
| Called after sizeAllocateImpl() to redraw necessary areas. By default the whole widget is redrawn. More...
|
|
virtual void | markSizeChange (int ref) |
| See Sizes of Dillo Widgets. More...
|
|
virtual void | markExtremesChange (int ref) |
| See Sizes of Dillo Widgets. More...
|
|
virtual int | getAvailWidthOfChild (Widget *child, bool forceValue) |
|
virtual int | getAvailHeightOfChild (Widget *child, bool forceValue) |
|
virtual void | correctRequisitionOfChild (Widget *child, Requisition *requisition, void(*splitHeightFun)(int, int *, int *), bool allowDecreaseWidth, bool allowDecreaseHeight) |
|
void | correctReqWidthOfChild (Widget *child, Requisition *requisition, bool allowDecreaseWidth) |
|
void | correctReqHeightOfChild (Widget *child, Requisition *requisition, void(*splitHeightFun)(int, int *, int *), bool allowDecreaseHeight) |
|
virtual void | correctExtremesOfChild (Widget *child, Extremes *extremes, bool useAdjustmentWidth) |
|
virtual bool | affectedByContainerSizeChange () |
|
virtual bool | affectsSizeChangeContainerChild (Widget *child) |
|
virtual bool | usesAvailWidth () |
| Must be implemengted by a method returning true, when getAvailWidth() is called. More...
|
|
virtual bool | usesAvailHeight () |
| Must be implemengted by a method returning true, when getAvailHeight() is called. More...
|
|
virtual void | notifySetAsTopLevel () |
| This method is called after a widget has been set as the top of a widget tree. More...
|
|
virtual void | notifySetParent () |
| This method is called after a widget has been added to a parent. More...
|
|
char * | addAnchor (const char *name) |
|
char * | addAnchor (const char *name, int y) |
|
void | changeAnchor (char *name, int y) |
|
void | removeAnchor (char *name) |
|
void | setCursor (style::Cursor cursor) |
|
bool | selectionHandleEvent (SelectionState::EventType eventType, Iterator *it, int charPos, int linkNo, MousePositionEvent *event) |
|
void | registerName (const char *className, int *classId) |
| This method must be called in the constructor for the sub class. See class comment for details. More...
|
|
Displays an instance of dw::core::Imgbuf.
The dw::core::Imgbuf is automatically scaled, when needed, but dw::Image does not keep a reference on the root buffer.
Signals
For image maps, dw::Image uses the signals defined in dw::core::Layout::LinkReceiver. For client side image maps, -1 is passed for the coordinates, for server side image maps, the respective coordinates are used. See section "Image Maps" below.
Image Maps
Client Side Image Maps
You must first create a list of image maps (dw::ImageMapList), which can be used for multiple images. The caller is responsible for freeing the dw::ImageMapList.
Adding a map is done by dw::ImageMapsList::startNewMap. The key is an instance of a sub class of object::Object. In the context of HTML, this is a URL, which defines this map globally, by combining the URL of the document, this map is defined in, with the value of the attribute "name" of the <MAP> element, as a fragment.
dw::ImageMapsList::addShapeToCurrentMap adds a shape to the current map. The link argument is a number, which is later passed to the dw::core::Layout::LinkReceiver.
This map list is then, together with the key for the image, passed to dw::Image::setUseMap. For HTML, a URL with the value of the "ismap" attribute of <IMG> should be used.
dw::Image will search the correct map, when needed. If it is not found at this time, but later defined, it will be found and used later. This is the case, when an HTML <MAP> is defined below the <IMG> in the document.
Currently, only maps defined in the same document as the image may be used, since the dw::ImageMapsList is stored in the HTML link block, and contains only the image maps defined in the document.
Server Side Image Maps
To use images for server side image maps, you must call dw::Image::setIsMap, and the dw::Image::style must contain a valid link (dw::core::style::Style::x_link). After this, motions and clicks are delegated to dw::core::Layout::LinkReceiver.
- See also
- Images and Backgrounds in Dw