home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 25: Programming / pc_actual_25.iso / C_C++ / VisualProgrammingArmoury / data1.cab / MyFileGroup / INCLUDE / PfQuery.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1999-06-23  |  7.5 KB  |  221 lines

  1. #ifndef _INC_PFQUERY_HPP
  2. #define _INC_PFQUERY_HPP
  3.  
  4. // **********************************************************************
  5. class TC_CPfSearchParam 
  6.     : public TC_CWindow
  7. {
  8.     public:  TC_CString m_Name ;
  9.     public:  TCPsQryOperType m_OprType ;
  10.     public:  int m_CtrlType ;
  11.     public:  int m_PushType ;
  12.     public:  int m_Align ;
  13.     public:  int m_VisChrs ;
  14.     public:  int m_MaxLen ;
  15.     public:  TC_CString m_Label ;
  16.     public:  char * m_PushText ;
  17.     public:  TC_CIDataType * m_DataType ;
  18.     public:  TC_CPsAttribInfo m_AttrInfo ;
  19.     public:  TC_CPsAttribInfo m_RelAttrInfo ;
  20.     protected:  void * m_Rsc ;
  21.     public:   TC_CPfSearchParam ()  ;
  22.     public:   TC_CPfSearchParam (TC_CPsAttribInfo ai)  ;
  23.     public:   TC_CPfSearchParam (TC_CPsAttribInfo ai, TC_CPsAttribInfo ai_rel)  ;
  24.     public:   TC_CPfSearchParam (TC_CPsAttribInfo ai, TCPsQryOperType op)  ;
  25.     public:   ~TC_CPfSearchParam ()  ;
  26.     public:  void Init (TC_Former &f)  ;
  27.     public:  TCPsQryOperType _OprType (TC_CPsAttribInfo ai)  ;
  28.     public:  int _Align (TC_CPsAttribInfo ai)  ;
  29.     public:  int _VisChrs (TC_CPsAttribInfo ai)  ;
  30.     public:  BOOL Ev_Aid (TC_Event*)  ;
  31.     public:  BOOL Ev_Calendar (TC_Event*)  ;
  32.     public:  BOOL Ev_Fmt (TC_Event_WIN *e)  ;
  33.     public:  BOOL Ev_DrawItem (TC_Event_WIN *ev)  ;
  34.     public:  void FillFormer (TC_Former &f)  ;
  35.     public:  BOOL Validate ()  ;
  36.     public:  char* InFmt ()  ;
  37.     public:  char* OutFmt ()  ;
  38.     public: virtual BOOL IsPredTerm ()  ;
  39.     public: virtual TC_CPsPredTerm _PsPredTerm ()  ;
  40.     public:  TC_CPsBuffer _PsBuffer ()  ;
  41.     public:  TC_CPsAttribUIData* AttribData ()  ;
  42.     public:  BOOL HasValSet ()  ;
  43.     public:  int ValSetCount ()  ;
  44.     public:  const char * RscName ()  ;
  45.     public:  TC_CString GetValue ()  ;
  46.     public:  void SetValue (LPCSTR s)  ;
  47.  
  48. }; // end of class TC_CPfSearchParam
  49.  
  50. // **********************************************************************
  51.  
  52. // **********************************************************************
  53. class TC_CPfSearch 
  54.     : public TC_CWindow
  55. {
  56.     protected:  TC_CPfTable * m_Tbl ;
  57.     protected:  TC_TArrayPTR<TC_CPfSearchParam> m_Items ;
  58.     protected:  TC_TArrayC<TC_Former> m_Formers ;
  59.     protected:  TC_CPsPredicate m_Predicate ;
  60.     public:   TC_CPfSearch ()  ;
  61.     public:  void Init (TC_CPfTable *tbl)  ;
  62.     public:  int AddParam (TC_CPfSearchParam *p)  ;
  63.     public:  BOOL DelParam (LPCSTR name)  ;
  64.     public:  void FillParams ()  ;
  65.     public:  BOOL Ev_Create (TC_Event*)  ;
  66.     public:  BOOL Ev_Command (TC_Event_WIN *e)  ;
  67.     public:  BOOL Validate ()  ;
  68.     public:  TC_CPsPredicate& Condition ()  ;
  69.     public:  void Store ()  ;
  70.     public:  void Restore ()  ;
  71.     public:  void Clear ()  ;
  72.     protected:  void RegPath (TC_CString &path)  ;
  73.     protected:  TC_CString RTDEntry ()  ;
  74.  
  75. }; // end of class TC_CPfSearch
  76.  
  77. // **********************************************************************
  78.  
  79. // **********************************************************************
  80. class TC_CPfSortParam 
  81. {
  82.     public:  TC_CString m_Name ;
  83.     public:  TC_CString m_Label ;
  84.     public:   TC_CPfSortParam ()  ;
  85.     public:   TC_CPfSortParam (TC_CPsAttribInfo ai)  ;
  86.     public:   TC_CPfSortParam (TC_CPsAttribInfo ai, TC_CPsAttribInfo ai_rel)  ;
  87.     public:   ~TC_CPfSortParam ()  ;
  88.  
  89. }; // end of class TC_CPfSortParam
  90.  
  91. // **********************************************************************
  92.  
  93. // **********************************************************************
  94. class TC_CPfSortSrv 
  95. {
  96. friend class TC_CPfSort;
  97.     protected:  TC_CPfTable * m_Tbl ;
  98.     protected:  TC_TArrayPTR<TC_CPfSortParam> m_Items ;
  99.     protected:  TC_CPsSort m_Sort ;
  100.     protected:  TC_TArrayC<TC_CPfSortParam*> m_Sels ;
  101.     protected:  TC_TArrayC<TCPsQryOrderType> m_Dirs ;
  102.     public:   TC_CPfSortSrv ()  ;
  103.     public:   ~TC_CPfSortSrv ()  ;
  104.     public:  void Init (TC_CPfTable *tbl)  ;
  105.     public:  int AddParam (TC_CPfSortParam *p)  ;
  106.     public:  BOOL DelParam (LPCSTR name)  ;
  107.     public:  TC_CPsSort& Condition ()  ;
  108.     public:  void Store ()  ;
  109.     public:  void Restore ()  ;
  110.     public:  void Clear ()  ;
  111.     protected:  void RegPath (TC_CString &path)  ;
  112.  
  113. }; // end of class TC_CPfSortSrv
  114.  
  115. // **********************************************************************
  116.  
  117. // **********************************************************************
  118. class TC_CPfSort 
  119.     : public TC_CWindow
  120. {
  121.     protected:  TC_CPfTable * m_Tbl ;
  122.     public:  TC_CPfSortSrv m_Srv ;
  123.     public:   TC_CPfSort ()  ;
  124.     public:   ~TC_CPfSort ()  ;
  125.     public:  void Init (TC_CPfTable *tbl)  ;
  126.     public:  int AddParam (TC_CPfSortParam *p)  ;
  127.     public:  BOOL DelParam (LPCSTR name)  ;
  128.     public:  void FillParams ()  ;
  129.     public: static char bmpSelOne [];
  130.     public: static char bmpDelOne [];
  131.     public: static char bmpDelAll [];
  132.     public: static char bmpDirs [];
  133.     public: static char bmpAsc [];
  134.     public: static char bmpDesc [];
  135.     public: static char bmpShiftUp [];
  136.     public: static char bmpShiftDown [];
  137.     public: virtual BOOL Form_Creator (TC_CWindow * frame)  ;
  138.     public: TC_CWindow * mc_Lb_AvItems;
  139.     public: TC_CWindow * mc_Pb_SelOne;
  140.     public: TC_CWindow * mc_Pb_DeselOne;
  141.     public: TC_CWindow * mc_Pb_DeselAll;
  142.     public: TC_CWindow * mc_Lb_SelItems;
  143.     public: TC_CWindow * mc_Pb_Asc;
  144.     public: TC_CWindow * mc_Pb_Desc;
  145.     public: TC_CWindow * mc_Pb_ShiftUp;
  146.     public: TC_CWindow * mc_Pb_ShiftDown;
  147.     public:  BOOL Ev_DrawSelItem (TC_Event_WIN *e)  ;
  148.     public:  BOOL Ev_SelOne (TC_Event*)  ;
  149.     public:  BOOL Ev_DeselOne (TC_Event*)  ;
  150.     public:  BOOL Ev_DeselAll (TC_Event*)  ;
  151.     public:  BOOL Ev_Asc (TC_Event*)  ;
  152.     public:  BOOL Ev_Desc (TC_Event*)  ;
  153.     public:  BOOL Ev_ShiftDown (TC_Event*)  ;
  154.     public:  BOOL Ev_ShiftUp (TC_Event*)  ;
  155.     public:  TC_CPsSort& Condition ()  ;
  156.     public:  void Store ()  ;
  157.     public:  void Restore ()  ;
  158.     public:  void Clear ()  ;
  159.  
  160. }; // end of class TC_CPfSort
  161.  
  162. // **********************************************************************
  163.  
  164. // **********************************************************************
  165. class TC_CPfQuery 
  166.     : public TC_CWindow
  167. {
  168.     protected:  TC_CPfTable* m_Tbl ;
  169.     protected:  TC_CToolbarMaster* m_TbMaster ;
  170. public: 
  171.     enum  {
  172.     TbBtn_Execute,
  173.     TbBtn_CriteriaSave,
  174.     TbBtn_CriteriaRestore,
  175.     TbBtn_CriteriaClear,
  176.     };
  177.     protected: static char bmpToolbar [];
  178.     public:   TC_CPfQuery ()  ;
  179.     public:   ~TC_CPfQuery ()  ;
  180.     public:  void Init (TC_CPfTable *tbl)  ;
  181.     public:  void Init1 (TC_CPfTable *tbl)  ;
  182.     public:  void Init2 ()  ;
  183.     public:  int AddSearchParam (TC_CPfSearchParam *p)  ;
  184.     public:  int AddSortParam (TC_CPfSortParam *p)  ;
  185.     public:  void DelSearchParam (LPCSTR name)  ;
  186.     public:  void DelSortParam (LPCSTR name)  ;
  187.     public: virtual BOOL Form_Creator (TC_CWindow * frame)  ;
  188.     public: AWindow * mc_Area;
  189.     public: TC_CPfSearch * mc_Search;
  190.     public: TC_CPfSort * mc_Sort;
  191.     public:  void ToolbarMaker ()  ;
  192.     public:  BOOL Ev_Accel (TC_Event_WIN *e)  ;
  193.     public:  BOOL Ev_ToolbarCmd (TC_Event *e)  ;
  194.     public:  void Execute ()  ;
  195.     public:  BOOL TrySet ()  ;
  196.     public:  void Store ()  ;
  197.     public:  void Restore ()  ;
  198.     public:  void Clear ()  ;
  199.  
  200. }; // end of class TC_CPfQuery
  201.  
  202. // **********************************************************************
  203.  
  204. // **********************************************************************
  205. class TC_CPfSortDlg 
  206.     : public TC_CWindow
  207. {
  208.     private:  TC_CPfTable * m_Tbl ;
  209.     public:   TC_CPfSortDlg (TC_CPfTable *tbl)  ;
  210.     public: virtual BOOL Form_Creator (TC_CWindow * frame)  ;
  211.     public: TC_CPfSort * mc_Sort;
  212.     public: virtual BOOL Form_OnCreate ()  ;
  213.     public:  BOOL EvDestroy (TC_Event *)  ;
  214.     public: static int Run (TC_CPfTable *tbl)  ;
  215.  
  216. }; // end of class TC_CPfSortDlg
  217.  
  218. // **********************************************************************
  219.  
  220. #endif // _INC_PFQUERY_HPP
  221.