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

jAPIcomponents.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------------------
00002 
00003 #ifndef jAPIcomponentsH
00004 #define jAPIcomponentsH
00005 //---------------------------------------------------------------------------
00006 
00007 #include <vector.h>
00008 #include <grids.hpp>
00009 
00010 typedef enum { alGauche, alCentre, alDroite } TAlignTStringGrid;
00011 
00012 /* jCMPalignTStringGridCell
00013 @description EN : set the text alignement of  a cell of a stringGrid
00014 @description FR : définit l'alignement du texte dans une cellule d'un stringgrid
00015 @author : Rémi VERNAY (srvremi@fr.st)
00016 @param _stringGrid : the StringGrid to apply the change to
00017 @param _col : the colunm of the cell
00018 @param _row : the row of the cell
00019 @param _alignement : the alignement choosen
00020 @param _rect : the Cell rectangle to be redrawn
00021 */
00022 void __fastcall jCMPalignTStringGridCell(TStringGrid * _stringGrid,int _col, int _row, TAlignTStringGrid _alignement, TRect * _rect = NULL);
00023 
00024 int __fastcall jCMPdeleteFromList(TStrings * _list, int _currentPos);
00025 int __fastcall jCMPinsertToList(TStrings * _list, int _currentPos, AnsiString _value, TObject * _object);
00026 int __fastcall jCMPkeyPressedInList(TStrings * _list, int _currentPos, char & _Key);
00027 int __fastcall jCMPkeyDownInList(TStrings * _list, int _currentPos, char & _Key);
00028 int __fastcall jCMPmoveUpInList(TStrings * _list, int _currentPos);
00029 int __fastcall jCMPmoveDownInList(TStrings * _list, int _currentPos);
00030 
00031 
00032 bool __fastcall jCOMcopy(TControl * dst, TControl * src, int _groupIndex = -1);
00033 
00034 class jCMPlist; 
00035 
00036 class jCOMline
00037 {
00038         friend class jCMPlist;
00039 
00040         private:
00041         jCMPlist * Parent;
00042         vector<TControl * >   components;
00043 
00044         int TotalWidth;
00045 
00046         TControl *      __fastcall CreateComponent(TComponent * owner, TControl * parent, AnsiString name, int left, int width);
00047         bool            __fastcall SetTop(int _top);
00048         bool            __fastcall RemoveComponents();        
00049 
00050         public:
00051         jCOMline();
00052         ~jCOMline();
00053 
00054         bool            __fastcall SetParent(jCMPlist * _parent);
00055         TControl *      __fastcall AddComponent(TComponent * owner, TControl * parent, AnsiString name, int width);
00056         bool            __fastcall Copy(jCOMline & line, int top, int height, int _groupIndex = -1);
00057 
00058         TControl *      __fastcall At(unsigned int _num);
00059         unsigned int    __fastcall Count();
00060 };
00061 
00062 class jCMPlist
00063 {
00064         friend class jCOMline;
00065 
00066         private:
00067         TScrollBox *            ScrollBox;
00068         void            __fastcall OnClickPrivate(TObject * Sender);           
00069 
00070         public:
00071         jCOMline                Reference;
00072         vector<jCOMline>        Lines;
00073         int                     HeightSize;
00074         int                     InterLine;
00075         bool                    GroupIndex;
00076         int                     ItemIndex;
00077 
00078         jCMPlist(TScrollBox * sb);
00079 
00080         TControl *      __fastcall AddType(AnsiString name, int width);
00081         jCOMline *      __fastcall AddLine();
00082         bool            __fastcall AddLines(int num);
00083         TControl *      __fastcall At(unsigned int _lig, unsigned int _col);
00084         int             __fastcall GetIndex(void * _object, unsigned int _col);
00085         int             __fastcall Size();
00086         jCOMline *      __fastcall Last();
00087         bool            __fastcall Remove(unsigned int _lig);
00088         unsigned int    __fastcall Count();
00089         bool            __fastcall Clear();
00090 
00091         void ( __closure __fastcall *OnClick )(TObject * Sender);
00092 };
00093 
00094 class jCMPprogressBar
00095 {
00096         bool freezed;
00097         
00098         vector<int> steps;
00099         int position;
00100         int min;
00101         int max;
00102         
00103         TColor stepColor;
00104         
00105         Graphics::TBitmap * background;
00106         Graphics::TBitmap * foreground;
00107 
00108         Graphics::TBitmap * backbuffer;        
00109 
00110         TPaintBox * paintbox;
00111 
00112         void refresh();
00113 
00114         public:
00115         jCMPprogressBar(TPaintBox * _paintBox);
00116         ~jCMPprogressBar();
00117 
00118         bool clear();
00119                 
00120         bool setSteps(const vector<int> & _steps);
00121         void setPosition(int _position);
00122         void setMin(int _min);
00123         void setMax(int _max);
00124 
00125         int  getPosition();
00126         void setBackground(Graphics::TBitmap * _baskground);
00127         void setBackground(TColor _color);
00128         void setForeground(Graphics::TBitmap * _baskground);
00129         void setForeground(TColor _color);
00130         void setStepColor(TColor _color);
00131 
00132         void __fastcall onPaint(TObject * Sender);
00133 };
00134 
00135 #endif
00136 

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