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

jAPIbitmapListBox.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------------------
00002 
00003 #ifndef jAPIbitmapListBoxH
00004 #define jAPIbitmapListBoxH
00005 //---------------------------------------------------------------------------
00006 
00007 #include <vcl>
00008 #include "jAPIcollectors.h"
00009 #include <vector.h>
00010 
00011 class jBitmap;
00012 
00013 class jCMPbitmapListBox
00014 {
00015         public:
00016 
00017         enum Direction
00018         {
00019                 vertical=0,
00020                 horizontal,
00021         };
00022 
00023         private:
00024 
00025         Direction direction;
00026 
00027         jBitmap * background;
00028         TPaintBox * paintbox;
00029         int offset;
00030         TTimer * timer;
00031 
00032         bool transparency;
00033         int alphaTransparency;
00034         int cellHeight;
00035         int cellWidth;                
00036 
00037         vector<int>  references;
00038         BitmapVector bitmaps;
00039 
00040         bool __fastcall draw();
00041         void __fastcall paint();
00042         void __fastcall onMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
00043         void __fastcall onTimer(TObject * Sender);
00044         void __fastcall onPaint(TObject * Sender);
00045 
00046         public:
00047         int itemIndex;
00048 
00049         jCMPbitmapListBox(TPaintBox * _paintbox, Direction _direction);
00050         ~jCMPbitmapListBox();
00051 
00052         void __fastcall setAlphaTransparency(int _transparency);
00053         void __fastcall setTransparency(bool _transparency);
00054         void __fastcall setCellWidth(int _width);
00055         void __fastcall setCellHeight(int _height);
00056         void __fastcall setBackgroundColor(TColor _color);
00057 
00058         int  __fastcall getSelected();
00059         bool __fastcall setSelected(int _index);
00060 
00061         int  __fastcall count();
00062         bool __fastcall clear();
00063         bool __fastcall add(jBitmap * _bmp, int _ref = -1);
00064         int  __fastcall getRef(int _index);
00065         bool __fastcall remove(int _index);
00066 
00067         void __fastcall refresh();
00068 
00069         void __fastcall scrollForward(int _speed);
00070         void __fastcall scrollBackward(int _speed);
00071 
00072         void ( __closure __fastcall *evtMouseDown )(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
00073 };
00074 
00075 #endif

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