// CodeGear C++Builder
// Copyright (c) 1995, 2025 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'SMDesign.pas' rev: 37.00 (Windows)

#ifndef SMDesignHPP
#define SMDesignHPP

#pragma delphiheader begin
#pragma option push
#if defined(__BORLANDC__) && !defined(__clang__)
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#endif
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>
#include <Winapi.Windows.hpp>
#include <Winapi.Messages.hpp>
#include <System.Classes.hpp>
#include <Vcl.ExtCtrls.hpp>
#include <Vcl.Graphics.hpp>
#include <Vcl.Forms.hpp>
#include <Vcl.StdCtrls.hpp>
#include <Vcl.Controls.hpp>
#include <Vcl.ComCtrls.hpp>
#include <Vcl.Buttons.hpp>
#include <Vcl.Menus.hpp>
#include <System.Types.hpp>
#include <System.UITypes.hpp>
#include <SMCombo.hpp>
#include <SMRuler.hpp>
#include <PrintSM.hpp>
#include <SMRBase.hpp>
#include <ColorBtn.hpp>
#include <SMRCnst.hpp>
#include <SMRExpl.hpp>
#include <SMROI.hpp>

//-- user supplied -----------------------------------------------------------

namespace Smdesign
{
//-- forward type declarations -----------------------------------------------
class DELPHICLASS TSMRDOptions;
class DELPHICLASS TSMRDesigner;
class DELPHICLASS TfrmReportDesigner;
//-- type declarations -------------------------------------------------------
enum DECLSPEC_DENUM TSMRDToolbar : unsigned char { rtStandard, rtFont, rtFrame, rtElement, rtAlignment };

typedef System::Set<TSMRDToolbar, TSMRDToolbar::rtStandard, TSMRDToolbar::rtAlignment> TSMRDToolbars;

class PASCALIMPLEMENTATION TSMRDOptions : public System::Classes::TPersistent
{
	typedef System::Classes::TPersistent inherited;
	
private:
	bool FDisplayGrid;
	bool FSnapToGrid;
	int FGridSizeX;
	int FGridSizeY;
	bool FShowBandTitle;
	bool FFlat;
	System::Uitypes::TColor FColor;
	bool FAutoSaveOptions;
	bool FCreateBackup;
	bool FShowExplorer;
	bool FShowInspector;
	TSMRDToolbars FToolbars;
	
public:
	int curPalette;
	
__published:
	__property bool DisplayGrid = {read=FDisplayGrid, write=FDisplayGrid, nodefault};
	__property bool SnapToGrid = {read=FSnapToGrid, write=FSnapToGrid, nodefault};
	__property int GridSizeX = {read=FGridSizeX, write=FGridSizeX, nodefault};
	__property int GridSizeY = {read=FGridSizeY, write=FGridSizeY, nodefault};
	__property bool ShowBandTitle = {read=FShowBandTitle, write=FShowBandTitle, nodefault};
	__property bool Flat = {read=FFlat, write=FFlat, nodefault};
	__property bool AutoSaveOptions = {read=FAutoSaveOptions, write=FAutoSaveOptions, nodefault};
	__property bool CreateBackup = {read=FCreateBackup, write=FCreateBackup, default=1};
	__property bool ShowExplorer = {read=FShowExplorer, write=FShowExplorer, nodefault};
	__property bool ShowInspector = {read=FShowInspector, write=FShowInspector, default=1};
	__property TSMRDToolbars Toolbars = {read=FToolbars, write=FToolbars, default=31};
	__property System::Uitypes::TColor Color = {read=FColor, write=FColor, default=14540253};
public:
	/* TPersistent.Destroy */ inline __fastcall virtual ~TSMRDOptions() { }
	
public:
	/* TObject.Create */ inline __fastcall TSMRDOptions() : System::Classes::TPersistent() { }
	
};


class PASCALIMPLEMENTATION TSMRDesigner : public System::Classes::TComponent
{
	typedef System::Classes::TComponent inherited;
	
private:
	Smrbase::TSMReport* FReport;
	TSMRDOptions* FOptions;
	System::Classes::TList* FSelected;
	System::Classes::TNotifyEvent FOnSelectedChange;
	void __fastcall SetReport(Smrbase::TSMReport* Value);
	void __fastcall SetOptions(TSMRDOptions* Value);
	
protected:
	Smrbase::TSMRControl* __fastcall GetSelected(int i);
	
public:
	__fastcall virtual TSMRDesigner(System::Classes::TComponent* AOwner);
	__fastcall virtual ~TSMRDesigner();
	virtual void __fastcall Notification(System::Classes::TComponent* AComponent, System::Classes::TOperation Operation);
	void __fastcall Execute();
	void __fastcall ClearSelected();
	void __fastcall AddSelected(Smrbase::TSMRControl* cntr);
	void __fastcall DeleteSelected(Smrbase::TSMRControl* cntr);
	void __fastcall ToggleSelected(Smrbase::TSMRControl* cntr);
	void __fastcall SelectElements(Smrbase::TSMRSelectMode SelectMode);
	__property Smrbase::TSMRControl* Selected[int Index] = {read=GetSelected};
	
__published:
	__property Smrbase::TSMReport* Report = {read=FReport, write=SetReport};
	__property TSMRDOptions* Options = {read=FOptions, write=SetOptions};
	__property System::Classes::TNotifyEvent OnSelectedChange = {read=FOnSelectedChange, write=FOnSelectedChange};
};


enum DECLSPEC_DENUM TPropertySet : unsigned char { psFrameType, psFramePen, psFrameColor, psPenStyle, psBrushStyle, psBackColor, psFontColor, psFontName, psFontSize, psFontStyle, psAlignment, psBringToFront, psSendToBack, psSelectAll };

class PASCALIMPLEMENTATION TfrmReportDesigner : public Vcl::Forms::TForm
{
	typedef Vcl::Forms::TForm inherited;
	
__published:
	Vcl::Extctrls::TPanel* pnlElements;
	Vcl::Forms::TScrollBox* ScrollBox;
	Vcl::Buttons::TSpeedButton* btnArrow;
	Smruler::TSMRuler* SMRulerUp;
	Vcl::Extctrls::TPanel* pnlToolbarContainer;
	Vcl::Extctrls::TPanel* pnlMode;
	Vcl::Buttons::TSpeedButton* btnCut;
	Vcl::Buttons::TSpeedButton* btnCopy;
	Vcl::Buttons::TSpeedButton* btnPaste;
	Vcl::Buttons::TSpeedButton* btnFront;
	Vcl::Buttons::TSpeedButton* btnBack;
	Vcl::Buttons::TSpeedButton* btnGroup;
	Vcl::Buttons::TSpeedButton* btnSaveToFile;
	Vcl::Buttons::TSpeedButton* btnOpenReport;
	Vcl::Buttons::TSpeedButton* btnNewReport;
	Vcl::Buttons::TSpeedButton* btnClear;
	Vcl::Buttons::TSpeedButton* btnUnGroup;
	Vcl::Buttons::TSpeedButton* btnReportSet;
	Vcl::Buttons::TSpeedButton* btnPrint;
	Vcl::Buttons::TSpeedButton* btnPreview;
	Vcl::Buttons::TSpeedButton* btnLayout;
	Vcl::Buttons::TSpeedButton* btnAbout;
	Vcl::Buttons::TSpeedButton* btnClose;
	Vcl::Buttons::TSpeedButton* btnSMRExplorer;
	Vcl::Buttons::TSpeedButton* btnInvertGroup;
	Vcl::Buttons::TSpeedButton* btnGroups;
	Vcl::Extctrls::TPanel* pnlFont;
	Vcl::Buttons::TSpeedButton* btnBold;
	Vcl::Buttons::TSpeedButton* btnItalic;
	Vcl::Buttons::TSpeedButton* btnUnderline;
	Vcl::Buttons::TSpeedButton* btnLeftJustify;
	Vcl::Buttons::TSpeedButton* btnRightJustify;
	Vcl::Buttons::TSpeedButton* btnCenterJustify;
	Colorbtn::TColorButton* btnBackColor;
	Colorbtn::TColorButton* btnFrameColor;
	Colorbtn::TColorButton* btnFontColor;
	Smcombo::TSMFontNamesCombo* cbFont;
	Smcombo::TSMFontSizesCombo* cbFontSize;
	Vcl::Extctrls::TPanel* pnlFrame;
	Vcl::Buttons::TSpeedButton* btnUpLine;
	Vcl::Buttons::TSpeedButton* btnLeftLine;
	Vcl::Buttons::TSpeedButton* btnDownLine;
	Vcl::Buttons::TSpeedButton* btnRightLine;
	Vcl::Buttons::TSpeedButton* btnTypeLine;
	Smcombo::TSMBrushPenStyleCombo* cbBrushStyle;
	Smcombo::TSMBrushPenStyleCombo* cbPenStyle;
	Vcl::Extctrls::TPanel* pnlAlign;
	Vcl::Buttons::TSpeedButton* btnAlignLeft;
	Vcl::Buttons::TSpeedButton* btnAlignHCenter;
	Vcl::Buttons::TSpeedButton* btnAlignHWinCenter;
	Vcl::Buttons::TSpeedButton* btnAlignHSpace;
	Vcl::Buttons::TSpeedButton* btnAlignVSpace;
	Vcl::Buttons::TSpeedButton* btnAlignBottom;
	Vcl::Buttons::TSpeedButton* btnAlignVWinCenter;
	Vcl::Buttons::TSpeedButton* btnAlignVCenter;
	Vcl::Buttons::TSpeedButton* btnAlignTop;
	Vcl::Buttons::TSpeedButton* btnAlignRight;
	Vcl::Extctrls::TPanel* pnlStatusBar;
	Vcl::Extctrls::TPanel* pnlLogo;
	Vcl::Extctrls::TPanel* pnlMousePos;
	Vcl::Extctrls::TPanel* pnlControl;
	Vcl::Stdctrls::TLabel* lblLogo1;
	Vcl::Stdctrls::TLabel* lblLogo2;
	Vcl::Buttons::TSpeedButton* btnWizardReport;
	Vcl::Buttons::TSpeedButton* btnBand;
	Vcl::Comctrls::TPageControl* pcContainer;
	Vcl::Comctrls::TTabSheet* tsPage1;
	Vcl::Extctrls::TImage* imgLogo;
	Vcl::Extctrls::TPaintBox* pbGrabberAlign;
	Vcl::Extctrls::TPaintBox* pbGrabberFrame;
	Vcl::Extctrls::TPaintBox* pbGrabberFont;
	Vcl::Extctrls::TPaintBox* pbGrabberStandard;
	Vcl::Extctrls::TPaintBox* pbGrabberElement;
	Vcl::Buttons::TSpeedButton* btnSMRObjectInspector;
	void __fastcall FormCreate(System::TObject* Sender);
	void __fastcall FormDestroy(System::TObject* Sender);
	void __fastcall btnGroupsClick(System::TObject* Sender);
	void __fastcall btnGetColorClick(System::TObject* Sender);
	void __fastcall btnSaveToFileClick(System::TObject* Sender);
	void __fastcall btnOpenReportClick(System::TObject* Sender);
	void __fastcall btnPrintClick(System::TObject* Sender);
	void __fastcall btnPreviewClick(System::TObject* Sender);
	void __fastcall btnLayoutClick(System::TObject* Sender);
	void __fastcall btnReportSetClick(System::TObject* Sender);
	void __fastcall FormActivate(System::TObject* Sender);
	void __fastcall btnAboutClick(System::TObject* Sender);
	void __fastcall FontStyleClick(System::TObject* Sender);
	void __fastcall AlignmentClick(System::TObject* Sender);
	void __fastcall FrameClick(System::TObject* Sender);
	void __fastcall btnTypeLineClick(System::TObject* Sender);
	void __fastcall btnPaletteClick(System::TObject* Sender);
	void __fastcall btnFrontClick(System::TObject* Sender);
	void __fastcall btnBackClick(System::TObject* Sender);
	void __fastcall btnGroupClick(System::TObject* Sender);
	void __fastcall btnUnGroupClick(System::TObject* Sender);
	void __fastcall btnClearClick(System::TObject* Sender);
	void __fastcall btnCutClick(System::TObject* Sender);
	void __fastcall btnCopyClick(System::TObject* Sender);
	void __fastcall btnPasteClick(System::TObject* Sender);
	void __fastcall btnNewReportClick(System::TObject* Sender);
	void __fastcall SMFontNamesCombo1Change(System::TObject* Sender);
	void __fastcall SMFontSizesCombo1Change(System::TObject* Sender);
	void __fastcall cbPenStyleChange(System::TObject* Sender);
	void __fastcall cbBrushStyleChange(System::TObject* Sender);
	void __fastcall btnCloseClick(System::TObject* Sender);
	void __fastcall btnSMRExplorerClick(System::TObject* Sender);
	void __fastcall btnInvertGroupClick(System::TObject* Sender);
	void __fastcall FormShow(System::TObject* Sender);
	void __fastcall btnAlignClick(System::TObject* Sender);
	void __fastcall pnlStatusBarResize(System::TObject* Sender);
	void __fastcall btnWizardReportClick(System::TObject* Sender);
	void __fastcall btnBandClick(System::TObject* Sender);
	void __fastcall FormKeyDown(System::TObject* Sender, System::Word &Key, System::Classes::TShiftState Shift);
	void __fastcall pbGrabberAlignPaint(System::TObject* Sender);
	void __fastcall pbGrabberAlignMouseDown(System::TObject* Sender, System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, int X, int Y);
	void __fastcall pnlAlignResize(System::TObject* Sender);
	void __fastcall btnSMRObjectInspectorClick(System::TObject* Sender);
	
private:
	int doFrameWidth;
	Vcl::Graphics::TPenStyle doFrameStyle;
	System::Classes::TNotifyEvent oldOnHint;
	TSMRDesigner* SMRDesigner;
	Vcl::Menus::TPopupMenu* pmSMRControl;
	int X1;
	int Y1;
	int X2;
	int Y2;
	Smrexpl::TfrmSMRExplorer* frmSMRExplorer;
	Smroi::TfrmSMROI* frmSMROI;
	void __fastcall SetProperty(TPropertySet idxProperty, System::Variant *Values, const System::NativeInt Values_High);
	void __fastcall DisplayHint(System::TObject* Sender);
	void __fastcall ReCreateBands();
	void __fastcall ApplyColorToRuller(Smruler::TSMRuler* ruller);
	MESSAGE void __fastcall WMChangeSelected(Winapi::Messages::TMessage &Message);
	MESSAGE void __fastcall WMInsertedControl(Winapi::Messages::TMessage &Message);
	MESSAGE void __fastcall WMMovedControl(Winapi::Messages::TMessage &Message);
	MESSAGE void __fastcall WMShowSMRExplorer(Winapi::Messages::TMessage &Message);
	MESSAGE void __fastcall WMSMREChangeSelected(Winapi::Messages::TMessage &Message);
	MESSAGE void __fastcall WMClipboard(Winapi::Messages::TMessage &Message);
	MESSAGE void __fastcall WMBandChanged(Winapi::Messages::TMessage &Message);
	MESSAGE void __fastcall WMShowSMROI(Winapi::Messages::TMessage &Message);
	void __fastcall UpdateFlat();
	void __fastcall UpdateToolbars();
	void __fastcall AssignEvents(bool ToNil, Smrbase::TSMRControl* cntrl, Vcl::Controls::TWinControl* ToParent);
	HIDESBASE MESSAGE void __fastcall CMDialogKey(Vcl::Controls::TCMDialogKey &Message);
	
protected:
	bool IsNotInitialized;
	virtual void __fastcall FillStringsFromRes();
	void __fastcall OIRefresh();
	void __fastcall ControlMouseDown(System::TObject* Sender, System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, int X, int Y);
	void __fastcall ControlMouseUp(System::TObject* Sender, System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, int X, int Y);
	void __fastcall ControlMouseMove(System::TObject* Sender, System::Classes::TShiftState Shift, int X, int Y);
	void __fastcall BandMouseDown(System::TObject* Sender, System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, int X, int Y);
	void __fastcall BandMouseUp(System::TObject* Sender, System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, int X, int Y);
	void __fastcall BandMouseMove(System::TObject* Sender, System::Classes::TShiftState Shift, int X, int Y);
	void __fastcall BandDragDropEvent(System::TObject* Sender, System::TObject* Source, int X, int Y);
	void __fastcall BandDragOverEvent(System::TObject* Sender, System::TObject* Source, int X, int Y, System::Uitypes::TDragState State, bool &Accept);
	void __fastcall BandTitleMouseDown(System::TObject* Sender, System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, int X, int Y);
	void __fastcall BandTitleMouseUp(System::TObject* Sender, System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, int X, int Y);
	void __fastcall DrawGrid(System::TObject* Sender, const System::Types::TRect &R);
	
public:
	void __fastcall SaveLayout();
	void __fastcall LoadLayout();
	void __fastcall ClearClipboard();
	void __fastcall CopyToClipboard();
	void __fastcall CutToClipboard();
	void __fastcall PasteFromClipboard(Smrbase::TSMRBand* band);
	void __fastcall DeleteSelected();
public:
	/* TCustomForm.Create */ inline __fastcall virtual TfrmReportDesigner(System::Classes::TComponent* AOwner) : Vcl::Forms::TForm(AOwner) { }
	/* TCustomForm.CreateNew */ inline __fastcall virtual TfrmReportDesigner(System::Classes::TComponent* AOwner, int Dummy) : Vcl::Forms::TForm(AOwner, Dummy) { }
	/* TCustomForm.CreateScaledNew */ inline __fastcall virtual TfrmReportDesigner(System::Classes::TComponent* AOwner, int ADPI, int Dummy) : Vcl::Forms::TForm(AOwner, ADPI, Dummy) { }
	/* TCustomForm.Destroy */ inline __fastcall virtual ~TfrmReportDesigner() { }
	
public:
	/* TWinControl.CreateParented */ inline __fastcall TfrmReportDesigner(HWND ParentWindow) : Vcl::Forms::TForm(ParentWindow) { }
	
};


//-- var, const, procedure ---------------------------------------------------
extern DELPHI_PACKAGE System::Classes::TList* lstClipboard;
extern DELPHI_PACKAGE void __fastcall DesignReport(Smrbase::TSMReport* AReport);
}	/* namespace Smdesign */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_SMDESIGN)
using namespace Smdesign;
#endif
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// SMDesignHPP
