]>
git.saurik.com Git - wxWidgets.git/blob - contrib/include/wx/fl/barhintspl.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Contrib. demo
4 // Author: Aleksandras Gluchovas
6 // Created: 30/11/98 (my 22th birthday :-)
8 // Copyright: (c) Aleksandras Gluchovas
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __DRAGHINTSPL_G__
13 #define __DRAGHINTSPL_G__
16 #pragma interface "barhintspl.h"
19 #include "wx/fl/controlbar.h"
20 #include "wx/fl/toolwnd.h"
23 * Intercepts bar-decoration and sizing events, draws 3d-hints
24 * around fixed and flexible bars, similar to those in Microsoft DevStudio 6.x
27 class cbBarHintsPlugin
: public cbPluginBase
29 DECLARE_DYNAMIC_CLASS( cbBarHintsPlugin
)
32 cbDockPane
* mpPane
; // is set up temorarely, while handling event
34 cbMiniButton
* mBoxes
[2];
38 cbBarInfo
* mpClickedBar
;
44 void Draw3DBox ( wxDC
& dc
, const wxPoint
& pos
, bool pressed
);
45 void DrawCloseBox ( wxDC
& dc
, const wxPoint
& pos
, bool pressed
);
46 void DrawCollapseBox( wxDC
& dc
, const wxPoint
& pos
,
47 bool atLeft
, bool disabled
, bool pressed
);
49 void DrawGrooves ( wxDC
& dc
, const wxPoint
& pos
, int length
);
51 void DoDrawHint( wxDC
& dc
, wxRect
& rect
, int pos
, int boxOfs
, int grooveOfs
, bool isFixed
);
53 void GetHintsLayout( wxRect
& rect
, cbBarInfo
& info
,
54 int& boxOfs
, int& grooveOfs
, int& pos
);
56 int HitTestHints( cbBarInfo
& info
, const wxPoint
& pos
);
58 void ExcludeHints( wxRect
& rect
, cbBarInfo
& info
);
63 /* public properties */
65 bool mCloseBoxOn
; // default: ON
66 bool mCollapseBoxOn
; // default: ON
67 int mGrooveCount
; // default: 2 (two shaded bars)
68 int mHintGap
; // default: 5 (pixels from above, below, right and left)
69 int mXWeight
; // default: 2 (width in pixels of lines which used for drawing cross)
73 cbBarHintsPlugin(void);
75 cbBarHintsPlugin( wxFrameLayout
* pLayout
, int paneMask
= wxALL_PANES
);
79 void SetGrooveCount( int nGrooves
);
83 // handlers of plugin-events
85 void OnSizeBarWindow( cbSizeBarWndEvent
& event
);
86 void OnDrawBarDecorations( cbDrawBarDecorEvent
& event
);
88 void OnLeftDown( cbLeftDownEvent
& event
);
89 void OnLeftUp ( cbLeftUpEvent
& event
);
90 void OnMotion ( cbMotionEvent
& event
);
95 #endif /* __DRAGHINTSPL_G__ */