Componentes.Terceros.DevExp.../official/x.26/ExpressQuantumTreeList 4/Demos/CBuilder/StylesMultiDemo/StylesMultiDemoMain.h
2007-09-09 11:27:27 +00:00

112 lines
4.3 KiB
C++

//---------------------------------------------------------------------------
#ifndef StylesMultiDemoMainH
#define StylesMultiDemoMainH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "cxClasses.hpp"
#include "cxControls.hpp"
#include "cxCustomData.hpp"
#include "cxData.hpp"
#include "cxDBData.hpp"
#include "cxEdit.hpp"
#include "cxFilter.hpp"
#include "cxGraphics.hpp"
#include "cxStyles.hpp"
#include <ActnList.hpp>
#include <ComCtrls.hpp>
#include <DB.hpp>
#include <ImgList.hpp>
#include <Menus.hpp>
#include "cxLookAndFeels.hpp"
#include "DemoBasicMain.h"
#include "cxButtons.hpp"
#include "cxCalc.hpp"
#include "cxCheckBox.hpp"
#include "cxDBLookupComboBox.hpp"
#include "cxDBTL.hpp"
#include "cxInplaceContainer.hpp"
#include "cxLookAndFeelPainters.hpp"
#include "cxMaskEdit.hpp"
#include "cxMemo.hpp"
#include "cxRadioGroup.hpp"
#include "cxTextEdit.hpp"
#include "cxTL.hpp"
#include "cxTLData.hpp"
#include "cxStyleSheetEditor.hpp"
#include <Dialogs.hpp>
#include <ExtCtrls.hpp>
//---------------------------------------------------------------------------
enum TcxStyleRepositoryType {shtNone, shtPredefined, shtUserDefined};
class TStylesMultiDemoMainForm : public TDemoBasicMainForm
{
__published: // IDE-managed Components
TMenuItem *miFlat;
TMenuItem *miUltraFlat;
TMenuItem *miStandard;
TMenuItem *miNativeStyle;
TPanel *pnlLeft;
TGroupBox *gbUserDefined;
TcxButton *btnLoad;
TcxButton *btnSave;
TcxButton *btnEdit;
TGroupBox *gbPredefined;
TcxTreeList *tlStyleSheets;
TcxTreeListColumn *clnRadio;
TcxTreeListColumn *clnGroupName;
TPanel *pnlCurrentStyleSheet;
TSplitter *Splitter;
TcxDBTreeList *cxDBTreeList;
TcxDBTreeListColumn *cxDBTreeListID;
TcxDBTreeListColumn *cxDBTreeListPARENTID;
TcxDBTreeListColumn *cxDBTreeListNAME;
TcxDBTreeListColumn *cxDBTreeListPHONE;
TcxDBTreeListColumn *cxDBTreeListFAX;
TcxDBTreeListColumn *cxDBTreeListBUDGET;
TcxDBTreeListColumn *cxDBTreeListVACANCY;
TcxDBTreeListColumn *cxDBTreeListManager;
TcxDBTreeListColumn *cxDBTreeListManagerPhone;
TcxDBTreeListColumn *cxDBTreeListManagerEmail;
TcxDBTreeListColumn *cxDBTreeListManagerAdress;
TOpenDialog *OpenDialog;
TSaveDialog *SaveDialog;
void __fastcall FormShow(TObject *Sender);
void __fastcall LookAndFeelChange(TObject *Sender);
void __fastcall FormCreate(TObject *Sender);
void __fastcall actSaveToFileExecute(TObject *Sender);
void __fastcall actLoadFromFileExecute(TObject *Sender);
void __fastcall actEditStyleSheetExecute(TObject *Sender);
void __fastcall FormActivate(TObject *Sender);
void __fastcall tlStyleSheetsIsGroupNode(TObject *Sender,
TcxTreeListNode *ANode, bool &IsGroup);
void __fastcall tlStyleSheetsStylesGetContentStyle(TObject *Sender,
TObject *AItem, TcxTreeListNode *ANode, TcxStyle *&AStyle);
void __fastcall tlStyleSheetsStylesGetNodeIndentStyle(TObject *Sender,
TcxTreeListNode *ANode, int ALevel, TcxStyle *&AStyle);
void __fastcall tlStyleSheetsSelectionChanged(TObject *Sender);
void __fastcall cxDBTreeListInitInsertingRecord(TObject *Sender,
TcxTreeListDataNode *AFocusedNode, bool &AHandled);
void __fastcall cxDBTreeListDragOver(TObject *Sender,
TObject *Source, int X, int Y, TDragState State, bool &Accept);
private:
TcxTreeListStyleSheet* __fastcall GetCurrentStyleSheet();
void __fastcall CreateStyleSheetsList(TcxStyleRepositoryType AStyleRepositoryType);
void __fastcall UpdateGridStyleSheets(TcxTreeListStyleSheet *AStyleSheet);
void __fastcall ChangeVisibility(TcxStyleRepositoryType AType);
void __fastcall ClearUserDefinedStyleSheets();
void __fastcall LoadUserDefinedStyleSheets(TFileName AFileName);
void __fastcall SaveUserDefinedStyleSheets(TFileName AFileName);
void __fastcall SelectFistChild(TcxStyleRepositoryType AStyleRepositoryType);
void __fastcall SetCheckedNode(TcxTreeListNode *ANode);
public: // User declarations
__fastcall TStylesMultiDemoMainForm(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TStylesMultiDemoMainForm *StylesMultiDemoMainForm;
//---------------------------------------------------------------------------
#endif