home *** CD-ROM | disk | FTP | other *** search
- #ifndef _INC_PFQUERY_HPP
- #define _INC_PFQUERY_HPP
-
- // **********************************************************************
- class TC_CPfSearchParam
- : public TC_CWindow
- {
- public: TC_CString m_Name ;
- public: TCPsQryOperType m_OprType ;
- public: int m_CtrlType ;
- public: int m_PushType ;
- public: int m_Align ;
- public: int m_VisChrs ;
- public: int m_MaxLen ;
- public: TC_CString m_Label ;
- public: char * m_PushText ;
- public: TC_CIDataType * m_DataType ;
- public: TC_CPsAttribInfo m_AttrInfo ;
- public: TC_CPsAttribInfo m_RelAttrInfo ;
- protected: void * m_Rsc ;
- public: TC_CPfSearchParam () ;
- public: TC_CPfSearchParam (TC_CPsAttribInfo ai) ;
- public: TC_CPfSearchParam (TC_CPsAttribInfo ai, TC_CPsAttribInfo ai_rel) ;
- public: TC_CPfSearchParam (TC_CPsAttribInfo ai, TCPsQryOperType op) ;
- public: ~TC_CPfSearchParam () ;
- public: void Init (TC_Former &f) ;
- public: TCPsQryOperType _OprType (TC_CPsAttribInfo ai) ;
- public: int _Align (TC_CPsAttribInfo ai) ;
- public: int _VisChrs (TC_CPsAttribInfo ai) ;
- public: BOOL Ev_Aid (TC_Event*) ;
- public: BOOL Ev_Calendar (TC_Event*) ;
- public: BOOL Ev_Fmt (TC_Event_WIN *e) ;
- public: BOOL Ev_DrawItem (TC_Event_WIN *ev) ;
- public: void FillFormer (TC_Former &f) ;
- public: BOOL Validate () ;
- public: char* InFmt () ;
- public: char* OutFmt () ;
- public: virtual BOOL IsPredTerm () ;
- public: virtual TC_CPsPredTerm _PsPredTerm () ;
- public: TC_CPsBuffer _PsBuffer () ;
- public: TC_CPsAttribUIData* AttribData () ;
- public: BOOL HasValSet () ;
- public: int ValSetCount () ;
- public: const char * RscName () ;
- public: TC_CString GetValue () ;
- public: void SetValue (LPCSTR s) ;
-
- }; // end of class TC_CPfSearchParam
-
- // **********************************************************************
-
- // **********************************************************************
- class TC_CPfSearch
- : public TC_CWindow
- {
- protected: TC_CPfTable * m_Tbl ;
- protected: TC_TArrayPTR<TC_CPfSearchParam> m_Items ;
- protected: TC_TArrayC<TC_Former> m_Formers ;
- protected: TC_CPsPredicate m_Predicate ;
- public: TC_CPfSearch () ;
- public: void Init (TC_CPfTable *tbl) ;
- public: int AddParam (TC_CPfSearchParam *p) ;
- public: BOOL DelParam (LPCSTR name) ;
- public: void FillParams () ;
- public: BOOL Ev_Create (TC_Event*) ;
- public: BOOL Ev_Command (TC_Event_WIN *e) ;
- public: BOOL Validate () ;
- public: TC_CPsPredicate& Condition () ;
- public: void Store () ;
- public: void Restore () ;
- public: void Clear () ;
- protected: void RegPath (TC_CString &path) ;
- protected: TC_CString RTDEntry () ;
-
- }; // end of class TC_CPfSearch
-
- // **********************************************************************
-
- // **********************************************************************
- class TC_CPfSortParam
- {
- public: TC_CString m_Name ;
- public: TC_CString m_Label ;
- public: TC_CPfSortParam () ;
- public: TC_CPfSortParam (TC_CPsAttribInfo ai) ;
- public: TC_CPfSortParam (TC_CPsAttribInfo ai, TC_CPsAttribInfo ai_rel) ;
- public: ~TC_CPfSortParam () ;
-
- }; // end of class TC_CPfSortParam
-
- // **********************************************************************
-
- // **********************************************************************
- class TC_CPfSortSrv
- {
- friend class TC_CPfSort;
- protected: TC_CPfTable * m_Tbl ;
- protected: TC_TArrayPTR<TC_CPfSortParam> m_Items ;
- protected: TC_CPsSort m_Sort ;
- protected: TC_TArrayC<TC_CPfSortParam*> m_Sels ;
- protected: TC_TArrayC<TCPsQryOrderType> m_Dirs ;
- public: TC_CPfSortSrv () ;
- public: ~TC_CPfSortSrv () ;
- public: void Init (TC_CPfTable *tbl) ;
- public: int AddParam (TC_CPfSortParam *p) ;
- public: BOOL DelParam (LPCSTR name) ;
- public: TC_CPsSort& Condition () ;
- public: void Store () ;
- public: void Restore () ;
- public: void Clear () ;
- protected: void RegPath (TC_CString &path) ;
-
- }; // end of class TC_CPfSortSrv
-
- // **********************************************************************
-
- // **********************************************************************
- class TC_CPfSort
- : public TC_CWindow
- {
- protected: TC_CPfTable * m_Tbl ;
- public: TC_CPfSortSrv m_Srv ;
- public: TC_CPfSort () ;
- public: ~TC_CPfSort () ;
- public: void Init (TC_CPfTable *tbl) ;
- public: int AddParam (TC_CPfSortParam *p) ;
- public: BOOL DelParam (LPCSTR name) ;
- public: void FillParams () ;
- public: static char bmpSelOne [];
- public: static char bmpDelOne [];
- public: static char bmpDelAll [];
- public: static char bmpDirs [];
- public: static char bmpAsc [];
- public: static char bmpDesc [];
- public: static char bmpShiftUp [];
- public: static char bmpShiftDown [];
- public: virtual BOOL Form_Creator (TC_CWindow * frame) ;
- public: TC_CWindow * mc_Lb_AvItems;
- public: TC_CWindow * mc_Pb_SelOne;
- public: TC_CWindow * mc_Pb_DeselOne;
- public: TC_CWindow * mc_Pb_DeselAll;
- public: TC_CWindow * mc_Lb_SelItems;
- public: TC_CWindow * mc_Pb_Asc;
- public: TC_CWindow * mc_Pb_Desc;
- public: TC_CWindow * mc_Pb_ShiftUp;
- public: TC_CWindow * mc_Pb_ShiftDown;
- public: BOOL Ev_DrawSelItem (TC_Event_WIN *e) ;
- public: BOOL Ev_SelOne (TC_Event*) ;
- public: BOOL Ev_DeselOne (TC_Event*) ;
- public: BOOL Ev_DeselAll (TC_Event*) ;
- public: BOOL Ev_Asc (TC_Event*) ;
- public: BOOL Ev_Desc (TC_Event*) ;
- public: BOOL Ev_ShiftDown (TC_Event*) ;
- public: BOOL Ev_ShiftUp (TC_Event*) ;
- public: TC_CPsSort& Condition () ;
- public: void Store () ;
- public: void Restore () ;
- public: void Clear () ;
-
- }; // end of class TC_CPfSort
-
- // **********************************************************************
-
- // **********************************************************************
- class TC_CPfQuery
- : public TC_CWindow
- {
- protected: TC_CPfTable* m_Tbl ;
- protected: TC_CToolbarMaster* m_TbMaster ;
- public:
- enum {
- TbBtn_Execute,
- TbBtn_CriteriaSave,
- TbBtn_CriteriaRestore,
- TbBtn_CriteriaClear,
- };
- protected: static char bmpToolbar [];
- public: TC_CPfQuery () ;
- public: ~TC_CPfQuery () ;
- public: void Init (TC_CPfTable *tbl) ;
- public: void Init1 (TC_CPfTable *tbl) ;
- public: void Init2 () ;
- public: int AddSearchParam (TC_CPfSearchParam *p) ;
- public: int AddSortParam (TC_CPfSortParam *p) ;
- public: void DelSearchParam (LPCSTR name) ;
- public: void DelSortParam (LPCSTR name) ;
- public: virtual BOOL Form_Creator (TC_CWindow * frame) ;
- public: AWindow * mc_Area;
- public: TC_CPfSearch * mc_Search;
- public: TC_CPfSort * mc_Sort;
- public: void ToolbarMaker () ;
- public: BOOL Ev_Accel (TC_Event_WIN *e) ;
- public: BOOL Ev_ToolbarCmd (TC_Event *e) ;
- public: void Execute () ;
- public: BOOL TrySet () ;
- public: void Store () ;
- public: void Restore () ;
- public: void Clear () ;
-
- }; // end of class TC_CPfQuery
-
- // **********************************************************************
-
- // **********************************************************************
- class TC_CPfSortDlg
- : public TC_CWindow
- {
- private: TC_CPfTable * m_Tbl ;
- public: TC_CPfSortDlg (TC_CPfTable *tbl) ;
- public: virtual BOOL Form_Creator (TC_CWindow * frame) ;
- public: TC_CPfSort * mc_Sort;
- public: virtual BOOL Form_OnCreate () ;
- public: BOOL EvDestroy (TC_Event *) ;
- public: static int Run (TC_CPfTable *tbl) ;
-
- }; // end of class TC_CPfSortDlg
-
- // **********************************************************************
-
- #endif // _INC_PFQUERY_HPP
-