2 % automatically generated by HelpGen $Revision$ from
3 % controlbar.h at 05/Jan/02 22:50:58
7 \section{\class{wxFrameLayout
}}\label{wxframelayout
}
10 wxFrameLayout manages containment and docking of control bars.
11 which can be docked along top, bottom, righ, or left side of the
14 \wxheading{Derived from
}
16 \helpref{wxEvtHandler
}{wxevthandler
}
18 \wxheading{Data structures
}
20 \latexignore{\rtfignore{\wxheading{Members
}}}
23 \membersection{wxFrameLayout::wxFrameLayout
}\label{wxframelayoutwxframelayout
}
25 \func{}{wxFrameLayout
}{\param{wxWindow*
}{pParentFrame
},
\param{wxWindow*
}{pFrameClient = NULL
},
\param{bool
}{activateNow = TRUE
}}
28 \func{}{wxFrameLayout
}{\void}
30 used only while serializing
33 \membersection{wxFrameLayout::
\destruct{wxFrameLayout
}}\label{wxframelayoutdtor
}
35 \func{}{\destruct{wxFrameLayout
}}{\void}
37 (doesn't destroy bar windows)
40 \membersection{wxFrameLayout::Activate
}\label{wxframelayoutactivate
}
42 \func{void
}{Activate
}{\void}
44 Can be called after some other layout has been deactivated,
45 and this one must "take over" the current contents of frame window.
46 Effectively hooks itself to the frame window, re-displays all not-hidden
47 bar-windows and repaints decorations
50 \membersection{wxFrameLayout::AddBar
}\label{wxframelayoutaddbar
}
52 \func{void
}{AddBar
}{\param{wxWindow*
}{pBarWnd
},
\param{const cbDimInfo\&
}{dimInfo
},
\param{int
}{alignment = FL
\_ALIGN\_TOP},
\param{int
}{rowNo =
0},
\param{int
}{columnPos =
0},
\param{const wxString\&
}{name = "bar"
},
\param{bool
}{spyEvents = FALSE
},
\param{int
}{state = wxCBAR
\_DOCKED\_HORIZONTALLY}}
54 Adds bar information to frame-layout, appearence of layout is not refreshed
55 immediately, RefreshNow() can be called if necessary.
56 NOTES:: argument pBarWnd can by NULL, resulting bar decorations to be drawn
57 around the empty rectangle (filled with default background colour).
58 Argument dimInfo, can be re-used for adding any number of bars, since
59 it is not used directly, instead it's members are copied. If dimensions-
60 handler is present, it's instance shared (reference counted). Dimension
61 handler should always be allocated on the heap!)
64 \membersection{wxFrameLayout::AddPlugin
}\label{wxframelayoutaddplugin
}
66 \func{void
}{AddPlugin
}{\param{wxClassInfo*
}{pPlInfo
},
\param{int
}{paneMask = wxALL
\_PANES}}
68 "Advanced" methods for plugin-configuration using their dynamic class information (e.g. CLASSINFO(pluginClass) ) first checks if plugin of the given class is already "hooked up",
69 if not, adds it to the top of plugins chain
72 \membersection{wxFrameLayout::AddPluginBefore
}\label{wxframelayoutaddpluginbefore
}
74 \func{void
}{AddPluginBefore
}{\param{wxClassInfo*
}{pNextPlInfo
},
\param{wxClassInfo*
}{pPlInfo
},
\param{int
}{paneMask = wxALL
\_PANES}}
76 first checks if plugin of the givne class already hooked,
77 if so, removes it, and then inserts it to the chain
78 before plugin of the class given by "pNextPlInfo"
79 NOTE:: this method is "handy" in some cases, where the order
80 of plugin-chain could be important, e.g. one plugin overrides
81 some functionallity of the other already hooked plugin,
82 thefore the former should be hooked before the one
83 who's functionality is being overriden
86 \membersection{wxFrameLayout::ApplyBarProperties
}\label{wxframelayoutapplybarproperties
}
88 \func{void
}{ApplyBarProperties
}{\param{cbBarInfo*
}{pBar
}}
90 reflects changes in bar information structure visually
91 (e.g. moves bar, changes it's dimension info, pane to which it is docked)
94 \membersection{wxFrameLayout::CanReparent
}\label{wxframelayoutcanreparent
}
96 \func{bool
}{CanReparent
}{\void}
98 NOTE:: reparenting of windows may NOT work on all platforms
99 (reparenting allows control-bars to be floated)
102 \membersection{wxFrameLayout::CaptureEventsForPane
}\label{wxframelayoutcaptureeventsforpane
}
104 \func{void
}{CaptureEventsForPane
}{\param{cbDockPane*
}{toPane
}}
106 called by plugins ( also captures/releases mouse in parent frame)
109 \membersection{wxFrameLayout::CaptureEventsForPlugin
}\label{wxframelayoutcaptureeventsforplugin
}
111 \func{void
}{CaptureEventsForPlugin
}{\param{cbPluginBase*
}{pPlugin
}}
113 captures/releases user-input event's for the given plugin
114 Input events are: mouse movement, mouse clicks, keyboard input
117 \membersection{wxFrameLayout::CreateCursors
}\label{wxframelayoutcreatecursors
}
119 \func{void
}{CreateCursors
}{\void}
122 \membersection{wxFrameLayout::CreateUpdatesManager
}\label{wxframelayoutcreateupdatesmanager
}
124 \func{cbUpdatesManagerBase*
}{CreateUpdatesManager
}{\void}
129 \membersection{wxFrameLayout::Deactivate
}\label{wxframelayoutdeactivate
}
131 \func{void
}{Deactivate
}{\void}
133 unhooks itself from frame window, and hides all not-hidden windows
134 NOTE:: two frame-layouts should not be active at the same time in the
135 same frame window, it would cause messy overlapping of bar windows
139 \membersection{wxFrameLayout::DestroyBarWindows
}\label{wxframelayoutdestroybarwindows
}
141 \func{void
}{DestroyBarWindows
}{\void}
144 \membersection{wxFrameLayout::DoSetBarState
}\label{wxframelayoutdosetbarstate
}
146 \func{void
}{DoSetBarState
}{\param{cbBarInfo*
}{pBar
}}
149 \membersection{wxFrameLayout::EnableFloating
}\label{wxframelayoutenablefloating
}
151 \func{void
}{EnableFloating
}{\param{bool
}{enable = TRUE
}}
153 (by default floating of control-bars is ON)
156 \membersection{wxFrameLayout::FindBarByName
}\label{wxframelayoutfindbarbyname
}
158 \func{cbBarInfo*
}{FindBarByName
}{\param{const wxString\&
}{name
}}
160 methods for access and modification of bars in frame layout
163 \membersection{wxFrameLayout::FindBarByWindow
}\label{wxframelayoutfindbarbywindow
}
165 \func{cbBarInfo*
}{FindBarByWindow
}{\param{const wxWindow*
}{pWnd
}}
168 \membersection{wxFrameLayout::FindPlugin
}\label{wxframelayoutfindplugin
}
170 \func{cbPluginBase*
}{FindPlugin
}{\param{wxClassInfo*
}{pPlInfo
}}
172 returns NULL, if plugin of the given class is not hooked
175 \membersection{wxFrameLayout::FirePluginEvent
}\label{wxframelayoutfirepluginevent
}
177 \func{void
}{FirePluginEvent
}{\param{cbPluginEvent\&
}{event
}}
179 plugin-related methods **should be used, instead of passing the event to ProcessEvent(..) method
180 of the top-plugin directly. This method checks if events are currently
181 captured and ensures that plugin-event is routed correctly.
184 \membersection{wxFrameLayout::ForwardMouseEvent
}\label{wxframelayoutforwardmouseevent
}
186 \func{void
}{ForwardMouseEvent
}{\param{wxMouseEvent\&
}{event
},
\param{cbDockPane*
}{pToPane
},
\param{int
}{eventType
}}
188 delegated from "bar-spy"
191 \membersection{wxFrameLayout::GetBarPane
}\label{wxframelayoutgetbarpane
}
193 \func{cbDockPane*
}{GetBarPane
}{\param{cbBarInfo*
}{pBar
}}
195 returns panes, to which the given bar belongs
198 \membersection{wxFrameLayout::GetBars
}\label{wxframelayoutgetbars
}
200 \func{BarArrayT\&
}{GetBars
}{\void}
203 \membersection{wxFrameLayout::GetClientHeight
}\label{wxframelayoutgetclientheight
}
205 \func{int
}{GetClientHeight
}{\void}
208 \membersection{wxFrameLayout::GetClientRect
}\label{wxframelayoutgetclientrect
}
210 \func{wxRect\&
}{GetClientRect
}{\void}
213 \membersection{wxFrameLayout::GetClientWidth
}\label{wxframelayoutgetclientwidth
}
215 \func{int
}{GetClientWidth
}{\void}
218 \membersection{wxFrameLayout::GetFrameClient
}\label{wxframelayoutgetframeclient
}
220 \func{wxWindow*
}{GetFrameClient
}{\void}
223 \membersection{wxFrameLayout::GetPane
}\label{wxframelayoutgetpane
}
225 \func{cbDockPane*
}{GetPane
}{\param{int
}{alignment
}}
227 see pane alignment types
230 \membersection{wxFrameLayout::GetPaneProperties
}\label{wxframelayoutgetpaneproperties
}
232 \func{void
}{GetPaneProperties
}{\param{cbCommonPaneProperties\&
}{props
},
\param{int
}{alignment = FL
\_ALIGN\_TOP}}
234 NOTE:: changing properties of panes, does not result immediate on-screen update
237 \membersection{wxFrameLayout::GetPanesArray
}\label{wxframelayoutgetpanesarray
}
239 \func{cbDockPane**
}{GetPanesArray
}{\void}
241 used by updates-managers
244 \membersection{wxFrameLayout::GetParentFrame
}\label{wxframelayoutgetparentframe
}
246 \func{wxWindow\&
}{GetParentFrame
}{\void}
249 \membersection{wxFrameLayout::GetPrevClientRect
}\label{wxframelayoutgetprevclientrect
}
251 \func{wxRect\&
}{GetPrevClientRect
}{\void}
254 \membersection{wxFrameLayout::GetTopPlugin
}\label{wxframelayoutgettopplugin
}
256 \func{cbPluginBase\&
}{GetTopPlugin
}{\void}
258 returns current top-level plugin (the one which receives events first,
259 with an exception if input-events are currently captured by some other plugin)
262 \membersection{wxFrameLayout::GetUpdatesManager
}\label{wxframelayoutgetupdatesmanager
}
264 \func{cbUpdatesManagerBase\&
}{GetUpdatesManager
}{\void}
266 NOTE:: in future ubdates-manager will become a normal plugin
269 \membersection{wxFrameLayout::HasTopPlugin
}\label{wxframelayouthastopplugin
}
271 \func{bool
}{HasTopPlugin
}{\void}
274 \membersection{wxFrameLayout::HideBarWindows
}\label{wxframelayouthidebarwindows
}
276 \func{void
}{HideBarWindows
}{\void}
278 also hides the client window if presents
281 \membersection{wxFrameLayout::HitTestPane
}\label{wxframelayouthittestpane
}
283 \func{bool
}{HitTestPane
}{\param{cbDockPane*
}{pPane
},
\param{int
}{x
},
\param{int
}{y
}}
286 \membersection{wxFrameLayout::HitTestPanes
}\label{wxframelayouthittestpanes
}
288 \func{cbDockPane*
}{HitTestPanes
}{\param{const wxRect\&
}{rect
},
\param{cbDockPane*
}{pCurPane
}}
291 \membersection{wxFrameLayout::HookUpToFrame
}\label{wxframelayouthookuptoframe
}
293 \func{void
}{HookUpToFrame
}{\void}
296 \membersection{wxFrameLayout::InverseVisibility
}\label{wxframelayoutinversevisibility
}
298 \func{void
}{InverseVisibility
}{\param{cbBarInfo*
}{pBar
}}
301 \membersection{wxFrameLayout::LocateBar
}\label{wxframelayoutlocatebar
}
303 \func{bool
}{LocateBar
}{\param{cbBarInfo*
}{pBarInfo
},
\param{cbRowInfo**
}{ppRow
},
\param{cbDockPane**
}{ppPane
}}
306 \membersection{wxFrameLayout::OnActivate
}\label{wxframelayoutonactivate
}
308 \func{void
}{OnActivate
}{\param{wxActivateEvent\&
}{event
}}
311 \membersection{wxFrameLayout::OnEraseBackground
}\label{wxframelayoutonerasebackground
}
313 \func{void
}{OnEraseBackground
}{\param{wxEraseEvent\&
}{event
}}
316 \membersection{wxFrameLayout::OnIdle
}\label{wxframelayoutonidle
}
318 \func{void
}{OnIdle
}{\param{wxIdleEvent\&
}{event
}}
321 \membersection{wxFrameLayout::OnKillFocus
}\label{wxframelayoutonkillfocus
}
323 \func{void
}{OnKillFocus
}{\param{wxFocusEvent\&
}{event
}}
326 \membersection{wxFrameLayout::OnLButtonDown
}\label{wxframelayoutonlbuttondown
}
328 \func{void
}{OnLButtonDown
}{\param{wxMouseEvent\&
}{event
}}
331 \membersection{wxFrameLayout::OnLButtonUp
}\label{wxframelayoutonlbuttonup
}
333 \func{void
}{OnLButtonUp
}{\param{wxMouseEvent\&
}{event
}}
336 \membersection{wxFrameLayout::OnLDblClick
}\label{wxframelayoutonldblclick
}
338 \func{void
}{OnLDblClick
}{\param{wxMouseEvent\&
}{event
}}
341 \membersection{wxFrameLayout::OnMouseMove
}\label{wxframelayoutonmousemove
}
343 \func{void
}{OnMouseMove
}{\param{wxMouseEvent\&
}{event
}}
346 \membersection{wxFrameLayout::OnPaint
}\label{wxframelayoutonpaint
}
348 \func{void
}{OnPaint
}{\param{wxPaintEvent\&
}{event
}}
351 \membersection{wxFrameLayout::OnRButtonDown
}\label{wxframelayoutonrbuttondown
}
353 \func{void
}{OnRButtonDown
}{\param{wxMouseEvent\&
}{event
}}
356 \membersection{wxFrameLayout::OnRButtonUp
}\label{wxframelayoutonrbuttonup
}
358 \func{void
}{OnRButtonUp
}{\param{wxMouseEvent\&
}{event
}}
361 \membersection{wxFrameLayout::OnSetFocus
}\label{wxframelayoutonsetfocus
}
363 \func{void
}{OnSetFocus
}{\param{wxFocusEvent\&
}{event
}}
366 \membersection{wxFrameLayout::OnSize
}\label{wxframelayoutonsize
}
368 \func{void
}{OnSize
}{\param{wxSizeEvent\&
}{event
}}
373 \membersection{wxFrameLayout::PopAllPlugins
}\label{wxframelayoutpopallplugins
}
375 \func{void
}{PopAllPlugins
}{\void}
378 \membersection{wxFrameLayout::PopPlugin
}\label{wxframelayoutpopplugin
}
380 \func{void
}{PopPlugin
}{\void}
383 \membersection{wxFrameLayout::PositionClientWindow
}\label{wxframelayoutpositionclientwindow
}
385 \func{void
}{PositionClientWindow
}{\void}
387 called to set calculated layout to window objects
390 \membersection{wxFrameLayout::PositionPanes
}\label{wxframelayoutpositionpanes
}
392 \func{void
}{PositionPanes
}{\void}
395 \membersection{wxFrameLayout::PushDefaultPlugins
}\label{wxframelayoutpushdefaultplugins
}
397 \func{void
}{PushDefaultPlugins
}{\void}
399 default plugins are : cbPaneDrawPlugin, cbRowLayoutPlugin, cbBarDragPlugin,
400 cbAntiflickerPlugin, cbSimpleCustomizePlugin
401 this method is automatically invoked, if no plugins were found upon
402 fireing of the first plugin-event, i.e. wxFrameLayout *CONFIGURES* itself
405 \membersection{wxFrameLayout::PushPlugin
}\label{wxframelayoutpushplugin
}
407 \func{void
}{PushPlugin
}{\param{cbPluginBase*
}{pPugin
}}
409 similar to wxWindow's "push/pop-event-handler" methods, execept
410 that plugin is *deleted* upon "popping"
413 \membersection{wxFrameLayout::RecalcLayout
}\label{wxframelayoutrecalclayout
}
415 \func{void
}{RecalcLayout
}{\param{bool
}{repositionBarsNow = FALSE
}}
417 recalcualtes layout of panes, and all bars/rows in each pane
420 \membersection{wxFrameLayout::RedockBar
}\label{wxframelayoutredockbar
}
422 \func{bool
}{RedockBar
}{\param{cbBarInfo*
}{pBar
},
\param{const wxRect\&
}{shapeInParent
},
\param{cbDockPane*
}{pToPane = NULL
},
\param{bool
}{updateNow = TRUE
}}
424 can be used for repositioning already existing bars. The given bar is first removed
425 from the pane it currently belongs to, and inserted into the pane, which "matches"
426 the given recantular area. If pToPane is not NULL, bar is docked to this given pane
427 to dock the bar which is floated, use wxFrameLayout::DockBar(..) method
430 \membersection{wxFrameLayout::RefreshNow
}\label{wxframelayoutrefreshnow
}
432 \func{void
}{RefreshNow
}{\param{bool
}{recalcLayout = TRUE
}}
434 recalculates layoute and performs on-screen update of all panes
437 \membersection{wxFrameLayout::ReleaseEventsFromPane
}\label{wxframelayoutreleaseeventsfrompane
}
439 \func{void
}{ReleaseEventsFromPane
}{\param{cbDockPane*
}{fromPane
}}
442 \membersection{wxFrameLayout::ReleaseEventsFromPlugin
}\label{wxframelayoutreleaseeventsfromplugin
}
444 \func{void
}{ReleaseEventsFromPlugin
}{\param{cbPluginBase*
}{pPlugin
}}
447 \membersection{wxFrameLayout::RemoveBar
}\label{wxframelayoutremovebar
}
449 \func{void
}{RemoveBar
}{\param{cbBarInfo*
}{pBar
}}
451 removes bar from layout permanently, hides it's corresponding window if present
454 \membersection{wxFrameLayout::RemovePlugin
}\label{wxframelayoutremoveplugin
}
456 \func{void
}{RemovePlugin
}{\param{wxClassInfo*
}{pPlInfo
}}
458 checks if plugin of the given class is hooked, removes
460 @param pPlInfo class information structure for the plugin
462 @see wxFrameLayout::Method
465 \membersection{wxFrameLayout::ReparentWindow
}\label{wxframelayoutreparentwindow
}
467 \func{void
}{ReparentWindow
}{\param{wxWindow*
}{pChild
},
\param{wxWindow*
}{pNewParent
}}
470 \membersection{wxFrameLayout::RepositionFloatedBar
}\label{wxframelayoutrepositionfloatedbar
}
472 \func{void
}{RepositionFloatedBar
}{\param{cbBarInfo*
}{pBar
}}
475 \membersection{wxFrameLayout::RouteMouseEvent
}\label{wxframelayoutroutemouseevent
}
477 \func{void
}{RouteMouseEvent
}{\param{wxMouseEvent\&
}{event
},
\param{int
}{pluginEvtType
}}
480 \membersection{wxFrameLayout::SetBarState
}\label{wxframelayoutsetbarstate
}
482 \func{void
}{SetBarState
}{\param{cbBarInfo*
}{pBar
},
\param{int
}{newStatem
},
\param{bool
}{updateNow
}}
484 changes bar's docking state (see possible control bar states)
487 \membersection{wxFrameLayout::SetFrameClient
}\label{wxframelayoutsetframeclient
}
489 \func{void
}{SetFrameClient
}{\param{wxWindow*
}{pFrameClient
}}
491 passes the client window (e.g. MDI-client frame) to be controled by
492 frame layout, the size and position of which should be adjusted to be
493 surrounded by controlbar panes, whenever frame is resized, or dimensions
494 of control panes change
497 \membersection{wxFrameLayout::SetMargins
}\label{wxframelayoutsetmargins
}
499 \func{void
}{SetMargins
}{\param{int
}{top
},
\param{int
}{bottom
},
\param{int
}{left
},
\param{int
}{right
},
\param{int
}{paneMask = wxALL
\_PANES}}
501 TODO:: margins should go into cbCommonPaneProperties in the future
502 NOTE:: this method should be called before any custom plugins are attached
505 \membersection{wxFrameLayout::SetPaneBackground
}\label{wxframelayoutsetpanebackground
}
507 \func{void
}{SetPaneBackground
}{\param{const wxColour\&
}{colour
}}
510 \membersection{wxFrameLayout::SetPaneProperties
}\label{wxframelayoutsetpaneproperties
}
512 \func{void
}{SetPaneProperties
}{\param{const cbCommonPaneProperties\&
}{props
},
\param{int
}{paneMask = wxALL
\_PANES}}
515 \membersection{wxFrameLayout::SetTopPlugin
}\label{wxframelayoutsettopplugin
}
517 \func{void
}{SetTopPlugin
}{\param{cbPluginBase*
}{pPlugin
}}
519 hooking custom plugins to frame layout
520 NOTE:: when hooking one plugin on top of the other -
521 use SetNextHandler(..) or similar methods
522 of wxEvtHandler class to compose the chain of plugins,
523 than pass the left-most handler in this chain to
524 the above methods (assuming that events are delegated
525 from left-most towards right-most handler)
526 NOTE2:: this secenario is very inconvenient and "low-level",
527 use Add/Push/PopPlugin methods instead
530 \membersection{wxFrameLayout::SetUpdatesManager
}\label{wxframelayoutsetupdatesmanager
}
532 \func{void
}{SetUpdatesManager
}{\param{cbUpdatesManagerBase*
}{pUMgr
}}
534 destroys the previous manager if any, set the new one
537 \membersection{wxFrameLayout::ShowFloatedWindows
}\label{wxframelayoutshowfloatedwindows
}
539 \func{void
}{ShowFloatedWindows
}{\param{bool
}{show
}}
542 \membersection{wxFrameLayout::UnhookFromFrame
}\label{wxframelayoutunhookfromframe
}
544 \func{void
}{UnhookFromFrame
}{\void}