Dillo
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 
7 namespace dw {
8 
14 {
15 private:
16  class List
17  {
18  private:
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 
42  int listPos;
43 
44 protected:
46 
47  virtual int getValue () = 0;
48  virtual void setMaxValue (int maxValue, int value) = 0;
49 
51  void updateValue ();
52 
53 public:
54  static int CLASS_ID;
55 
57 };
58 
59 } // namespace dw
60 
61 #endif // __DW_ALIGNEDTEXTBLOCK_HH__
void set(int i, T t)
Store an object in the vector.
Definition: misc.hh:246
A Widget for rendering text blocks, i.e. paragraphs or sequences of paragraphs.
Definition: textblock.hh:205
AlignedTextblock(bool limitTextWidth)
Definition: alignedtextblock.cc:63
int size()
Definition: alignedtextblock.hh:33
AlignedTextblock * getTextblock(int pos)
Definition: alignedtextblock.hh:34
int refCount
Definition: alignedtextblock.hh:21
void unref(int pos)
Definition: alignedtextblock.cc:51
int size() const
Return the number of elements put into this vector.
Definition: misc.hh:141
static int CLASS_ID
Definition: alignedtextblock.hh:54
void setMaxValue(int maxValue)
Definition: alignedtextblock.hh:31
~AlignedTextblock()
Definition: alignedtextblock.cc:81
void updateValue()
Definition: alignedtextblock.cc:87
bool limitTextWidth
Definition: textblock.hh:573
lout::misc::SimpleVector< int > * values
Definition: alignedtextblock.hh:20
int add(AlignedTextblock *textblock)
Definition: alignedtextblock.cc:42
lout::misc::SimpleVector< AlignedTextblock * > * textblocks
Definition: alignedtextblock.hh:19
virtual void setMaxValue(int maxValue, int value)=0
Simple (simpler than container::untyped::Vector and container::typed::Vector) template based vector...
Definition: misc.hh:93
T get(int i) const
Return the one element, explicitly.
Definition: misc.hh:201
virtual int getValue()=0
int getMaxValue()
Definition: alignedtextblock.hh:30
int getValue(int pos)
Definition: alignedtextblock.hh:36
Definition: alignedtextblock.hh:16
int maxValue
Definition: alignedtextblock.hh:21
Dw is in this namespace, or sub namespaces of this one.
Definition: alignedtablecell.cc:28
Base widget for all textblocks (sub classes of dw::Textblock), which are positioned vertically and al...
Definition: alignedtextblock.hh:13
~List()
Definition: alignedtextblock.cc:36
int listPos
Definition: alignedtextblock.hh:42
List * list
Definition: alignedtextblock.hh:41
void setRefTextblock(AlignedTextblock *ref)
Definition: alignedtextblock.cc:70
List()
Definition: alignedtextblock.cc:28
void setValue(int pos, int value)
Definition: alignedtextblock.hh:37