Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

jAPItextListBox.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------------------
00002 
00003 #ifndef jAPItextListBoxH
00004 #define jAPItextListBoxH
00005 
00006 #include <vcl>
00007 
00008 class jBitmap;
00009 
00010 enum JasType {jasNone, jasBottom, jasTop};
00011 
00012 class jCMPtextListBox
00013 {
00014         bool linesCreated;
00015         bool enabled;
00016 
00017         jBitmap * background;
00018         TPaintBox * paintbox;
00019         int     offset;
00020         TTimer * timer;
00021 
00022         bool    transparency;
00023         int     alphaTransparency;
00024         int     cellHeight;
00025         int     cellWidth;
00026 
00027         JasType autoScrollDirection;
00028         int     autoScrollSpeed;                
00029 
00030         TStrings * lines;
00031 
00032         bool __fastcall draw();
00033         void __fastcall paint();
00034         void __fastcall onMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
00035         void __fastcall onTimer(TObject * Sender);
00036         void __fastcall onPaint(TObject * Sender);
00037 
00038         public:
00039         int itemIndex;
00040 
00041         jCMPtextListBox(TPaintBox * _paintbox, TStrings * _lines, bool _timered=true);        
00042         jCMPtextListBox(TPaintBox * _paintbox, bool _timered=true);
00043         ~jCMPtextListBox();
00044 
00045         bool __fastcall init(TPaintBox * _paintbox, TStrings * _lines = NULL, bool _timered=true);
00046 
00047         void __fastcall setAlphaTransparency(int _transparency);
00048         void __fastcall setTransparency(bool _transparency);
00049         void __fastcall setCellWidth(int _width);
00050         void __fastcall setCellHeight(int _height);
00051         void __fastcall setBackgroundColor(TColor _color);
00052         void __fastcall setAutoScroll(JasType _type, int _speed);
00053         void __fastcall setText(AnsiString _text);
00054         void __fastcall setEnabled(bool _enabled);                
00055 
00056         void __fastcall setFont(TFont * _font);
00057         TFont * __fastcall getFont();
00058 
00059         int  __fastcall getSelected();
00060         bool __fastcall setSelected(int _index);
00061 
00062         int  __fastcall count();
00063         bool __fastcall clear();
00064         bool __fastcall add(AnsiString _str, int _ref = -1);
00065         int  __fastcall getRef(int _index);
00066         bool __fastcall remove(int _index);
00067 
00068         void __fastcall refresh();
00069 
00070         void __fastcall scrollDown(int _speed);
00071         void __fastcall scrollUp(int _speed);
00072         void __fastcall scrollTo(int _pos);
00073         void __fastcall scrollToLine(int _num);                  
00074 };
00075 
00076 #endif

Generated on Sat Nov 15 10:52:34 2003 for JAPI by doxygen 1.3.4