view dw/alignedtextblock.hh @ 2104:3e7e5395f0bc

non-ASCII keybindings Alexander Voigt has kindly done some testing, and it seems that this makes bindings to most keys on a German keyboard possible -- except those that need AltGr don't work yet.
author corvid <>
date Thu, 23 Jun 2011 19:24:11 +0000
parents 4704ad910042
line wrap: on
line source

#include "core.hh"
#include "textblock.hh"

namespace dw {

 * \brief Base widget for all textblocks (sub classes of dw::Textblock), which
 *    are positioned vertically and aligned horizontally.
class AlignedTextblock: public Textblock
   class List
      lout::misc::SimpleVector <AlignedTextblock*> *textblocks;
      lout::misc::SimpleVector <int> *values;
      int maxValue, refCount;

      ~List ();

      List ();
      inline int add (AlignedTextblock *textblock);
      void unref (int pos);

      inline int getMaxValue () { return maxValue; }
      inline void setMaxValue (int maxValue) { this->maxValue = maxValue; }

      inline int size () { return textblocks->size (); }
      inline AlignedTextblock *getTextblock (int pos) {
         return textblocks->get (pos); }
      inline int getValue (int pos) {return values->get (pos); }
      inline void setValue (int pos, int value) {
         return values->set (pos, value); }

   List *list;
   int listPos;

   AlignedTextblock(bool limitTextWidth);

   virtual int getValue () = 0;
   virtual void setMaxValue (int maxValue, int value) = 0;

   void setRefTextblock (AlignedTextblock *ref);
   void updateValue ();

   static int CLASS_ID;


} // namespace dw