00001
00018 #ifndef INC_RVC_UIDLGSELECTRECORDSET_H
00019 #define INC_RVC_UIDLGSELECTRECORDSET_H
00020
00021 #ifndef INC_MGUI_DLGSHELL_H
00022 #include <mgui/dlgshell.h>
00023 #endif
00024
00025 #ifndef INC_MGUI_COMBOBOX_H
00026 #include <mgui/combobox.h>
00027 #endif
00028
00029 #ifndef INC_MGUI_TOOLBAR_H
00030 #include <mgui/toolbar.h>
00031 #endif
00032
00033 #ifndef INC_MGUI_GRID_H
00034 #include <mgui/grid.h>
00035 #endif
00036
00037 #ifndef INC_RVC_DBTABLE_H
00038 #include <rvc/dbtable.h>
00039 #endif
00040
00041
00042 namespace RVC {
00043 namespace UI {
00044
00045
00046
00048 class DLG_SELECT_RECORDSET : public MGUI::DLGSHELL {
00049 public:
00050
00052 DLG_SELECT_RECORDSET (
00053 const RVC::OBJITEM& ParentObjItem,
00054 ELEMTYPE ElemType
00055 );
00056
00058 virtual ~DLG_SELECT_RECORDSET ();
00059
00061 const BITSET& GetRecordSet (
00062 ) const { return (m_RecordSet); }
00063
00065 const RVC::OBJECTNAME& GetTableNameShort (
00066 ) const { return (m_TableName); }
00067
00070 void SetSelection (
00071 const RVC::OBJECTNAME& TableNameShort,
00072 const BITSET& RecordSet
00073 );
00074
00075 private:
00076 #ifndef GENERATING_DOXYGEN_OUTPUT
00077 typedef DLG_SELECT_RECORDSET THISCLASS;
00078
00079 enum CMDID {
00080 CMDID_AddSelected = 1,
00081 CMDID_AddAll,
00082 CMDID_RemoveSelected,
00083 CMDID_RemoveAll,
00084 };
00085
00086 MGUI::FORM_COMBOBOX m_CbxField;
00087 MGUI::CTRL_TOOLBAR m_ToolBar;
00088 MGUI::CTRL_GRID m_GridRecords;
00089
00090 RVC::OBJITEM m_ObjItem;
00091 RVC::DBASE m_DBaseObj;
00092 RVC::DBTABLE m_TableObj;
00093 RVC::DBTABLE::RECORD m_Record;
00094 SIMPLE_ARRAY<INT32> m_RecIndex;
00095 BITSET m_DuplicateBits;
00096 RVC::OBJECTNAME m_TableName;
00097 INT32 m_FieldNum;
00098 BITSET m_RecordSet;
00099 ELEMTYPE m_ElemType;
00100
00101 void OnCbxField ();
00102 void OnGridClickItem (int itemnum, int column, MGUI::KEYSTATE state);
00103 bool OnGridGetDispInfo (int row, int col, MGUI::CTRL_GRID::DISPINFO& dispinfo);
00104 void OnToolBar (MGUI::ID cmdid, bool ToggleOn);
00105
00106 virtual ERRVALUE v_CreateContent ();
00107
00108 #endif // GENERATING_DOXYGEN_OUTPUT
00109
00110 };
00111
00112
00113
00114 }
00115 }
00116
00117 #endif // INC_RVC_UIDLGSELECTRECORDSET_H