Dillo v3.1.1-98-g318d1f14
Loading...
Searching...
No Matches
alignedtextblock.hh
Go to the documentation of this file.
1#ifndef __DW_ALIGNEDTEXTBLOCK_HH__
2#define __DW_ALIGNEDTEXTBLOCK_HH__
3
4#include "core.hh"
5#include "textblock.hh"
6
7namespace dw {
8
14{
15private:
16 class List
17 {
18 private:
19 lout::misc::SimpleVector <AlignedTextblock*> *textblocks;
20 lout::misc::SimpleVector <int> *values;
22
23 ~List ();
24
25 public:
26 List ();
27 inline int add (AlignedTextblock *textblock);
28 void unref (int pos);
29
30 inline int getMaxValue () { return maxValue; }
31 inline void setMaxValue (int maxValue) { this->maxValue = maxValue; }
32
33 inline int size () { return textblocks->size (); }
34 inline AlignedTextblock *getTextblock (int pos) {
35 return textblocks->get (pos); }
36 inline int getValue (int pos) {return values->get (pos); }
37 inline void setValue (int pos, int value) {
38 return values->set (pos, value); }
39 };
40
43
44protected:
46
47 virtual int getValue () = 0;
48 virtual void setMaxValue (int maxValue, int value) = 0;
49
51 void updateValue ();
52
53public:
54 static int CLASS_ID;
55
57};
58
59} // namespace dw
60
61#endif // __DW_ALIGNEDTEXTBLOCK_HH__
void setMaxValue(int maxValue)
lout::misc::SimpleVector< AlignedTextblock * > * textblocks
lout::misc::SimpleVector< int > * values
AlignedTextblock * getTextblock(int pos)
void setValue(int pos, int value)
int add(AlignedTextblock *textblock)
Base widget for all textblocks (sub classes of dw::Textblock), which are positioned vertically and al...
virtual int getValue()=0
virtual void setMaxValue(int maxValue, int value)=0
void setRefTextblock(AlignedTextblock *ref)
A Widget for rendering text blocks, i.e.
Definition textblock.hh:206
bool limitTextWidth
Definition textblock.hh:572
void set(int i, T t)
Store an object in the vector.
Definition misc.hh:267
T get(int i) const
Return the one element, explicitly.
Definition misc.hh:222
Dw is in this namespace, or sub namespaces of this one.