32 #ifndef TBX_ICONITEMRENDERER_H_
33 #define TBX_ICONITEMRENDERER_H_
35 #include "itemrenderer.h"
54 bool _use_client_area;
64 virtual std::string
text(
unsigned int index)
const;
65 virtual std::string
sprite_name(
unsigned int index)
const;
91 virtual unsigned int width(
unsigned int index)
const;
92 virtual unsigned int height(
unsigned int index)
const;
93 virtual Size size(
unsigned int index)
const;
virtual void render(const ItemRenderer::Info &info)
Called to render each item that needs drawing.
Definition: iconitemrenderer.cc:149
Information on what needs to be redrawn.
Definition: itemrenderer.h:64
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:35
void get_sprite_box(unsigned int index, const Size &size, BBox &sbox) const
Gets sprite box relative to bottom left corner.
Definition: iconitemrenderer.cc:313
virtual bool intersects(unsigned int index, const Size &size, const BBox &box) const
Check if the given rectangle intersects the content of the cell rather than a margin or background.
Definition: iconitemrenderer.cc:295
virtual Size size(unsigned int index) const
Called to get the size of the item.
Definition: iconitemrenderer.cc:233
IconItemRenderer(bool use_client=true)
Protected constructor for derived renderer which must provide the text() and sprite_name() overrides.
Definition: iconitemrenderer.cc:57
virtual bool hit_test(unsigned int index, const Size &size, const Point &pos) const
Check if the point given hits content of the cell rather then a margin or background.
Definition: iconitemrenderer.cc:267
virtual bool use_client_sprite_area(unsigned int index) const
Returns true to use the client sprite area to retrieve the sprite to display, or false for the wimp s...
Definition: iconitemrenderer.h:75
virtual std::string sprite_name(unsigned int index) const
Return the sprite name for the icon.
Definition: iconitemrenderer.cc:116
Class to represent a two dimensional bounding box.
Definition: bbox.h:38
Class to render an icon with text similar to the normal view in the filer.
Definition: iconitemrenderer.h:52
Class to represent a two-dimensional size.
Definition: size.h:35
virtual std::string text(unsigned int index) const
Return the text for the icon.
Definition: iconitemrenderer.cc:104
virtual unsigned int width(unsigned int index) const
Return the width of the given item.
Definition: iconitemrenderer.cc:215
Class to represent a position in two dimensional space.
Definition: point.h:37
static tbx::Size standard_size(unsigned int width=160, unsigned int sprite_height=68)
Return standard size for an icon with the given text width and sprite height.
Definition: iconitemrenderer.cc:128
void get_text_box(unsigned int index, const Size &size, BBox &sbox) const
Get text box relative to bottom left corner.
Definition: iconitemrenderer.cc:336
virtual unsigned int height(unsigned int index) const
Return height of item.
Definition: iconitemrenderer.cc:223
Base class for item renderer that work on a specific type and use an ItemViewValue object to return t...
Definition: itemrenderer.h:160