/* TSectionBarSection* __fastcall GetActiveSection(); * void __fastcall SetActiveSection(TSectionBarSection* ASection); * void DrawSection(int SectionNumber, TRect R); * void DrawButton(int SectionNumber, int ButtonNumber, int &Y, int YMax, bool CalcOnly, TRect &TextArea); * void DrawScrollButton(TRect R, bool Up); * bool MouseInButton(int X, int Y, int &Section, int &Button, bool &InTextArea); * void __fastcall SetSelected(TSectionBarButton* Value); * void __fastcall SetDown(TSectionBarButton* Value); * void __fastcall SetApplyDown(const bool Value); * void SelectFont(TFontIndex Index); * void ReCreateFonts(); * void DestroyFonts(); * MESSAGE void __fastcall WMEraseBkGnd(TWMEraseBkgnd& M );// message WM_ERASEBKGND; * MESSAGE void __fastcall WMSetFont(TWMSetFont& M); //message WM_SETFONT; * MESSAGE void __fastcall WMMouseMove(TWMMouseMove& Msg ); //message WM_MOUSEMOVE; * MESSAGE void __fastcall WMLButtonDown(TWMLButtonDown& Msg); //message WM_LBUTTONDOWN; * MESSAGE void __fastcall WMRButtonDown(TWMRButtonDown& Msg); //message WM_RBUTTONDOWN; * MESSAGE void __fastcall WMLButtonDblClick(TWMMButtonDblClk& Msg);// message WM_LBUTTONDBLCLK; * MESSAGE void __fastcall WMLButtonUp(TWMLButtonUp& Msg ); //message WM_LBUTTONUP; * MESSAGE void __fastcall WMRButtonUp(TWMRButtonUp& Msg ); //message WM_RBUTTONUP; * MESSAGE void __fastcall WMMouseLeave(TMessage& Msg);// CM_MOUSELEAVE * * protected: * void __fastcall Paint(void); * void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation); * void __fastcall Loaded(void); * * * __property TOnSectionBarChanging OnChanging = {read = FOnChanging, write = FOnChanging * }; * __property TOnSectionBarChanged OnChanged = { read = FOnChanged, write = FOnChanged * }; * * public: * * virtual void ButtonChanging(TSectionBarButton* NewButton); * virtual void ButtonChanged(TSectionBarButton* NewButton); * virtual void Changed(); * void __fastcall Assign(TPersistent* Source); * int LastFullVisible(); * void DownFalse();*/ public TGLSSectionBar() { int Index; FSections = new TSectionBarSections(); FHeaderHeight = 17;//19; FButtonHeight = -1; FSectionHeaderPressed = -1; FButtonPressed = -1; FLastHintSection = -1; FLastHintButton = -1; FUnderlineTextNum = -1; FEnterButton = -1; /* ControlStyle = ControlStyle << csOpaque; * Width = 100; * Align = alLeft; * FApplyDown = false; * FDown = NULL; * FOnLeftMouseDown = NULL; * FOnRightMouseDown = NULL; * FOnButtonApplyDown = NULL; * * for (Index = fiHeader; Index <= fiButtonUnderline; Index++) FFonts[Index] = NULL; * ReCreateFonts(); * Width = 100;*/ }
void SetSections(TSectionBarSections Value) { // FSections.Assign(Value); }