| Class TAppBar (unit AppBar) |
TForm
TAppBar class ////////////////////////////////////////////////////////////
| Constructors |
constructor Create (Owner : TComponent);Public member functions } // TAppBar.
| Functions |
destructor Destroy;TAppBar.
function LoadSettings : Boolean;
function SaveSettings : Boolean;
procedure UpdateBar;TAppBar.
function GetEdge : TAppBarEdge;
function GetEdgeFromPoint (abFlags : TAppBarFlags;
pt : TSmallPoint) : TAppBarEdge;TAppBar.
function IsDockable (abFlags : TAppBarFlags) : Boolean;TAppBar.
function IsDockableHorizontally (abFlags : TAppBarFlags) : Boolean;TAppBar.
function IsDockableVertically (abFlags : TAppBarFlags) : Boolean;TAppBar.
function IsEdgeLeftOrRight (abEdge : TAppBarEdge) : Boolean;AppBar-specific helper functions } // TAppBar.
function IsEdgeTopOrBottom (abEdge : TAppBarEdge) : Boolean;TAppBar.
function IsFloating (abEdge : TAppBarEdge) : Boolean;TAppBar.
procedure OnABNFullScreenApp (bOpen : Boolean);TAppBar.
procedure OnABNPosChanged;TAppBar.
procedure OnABNWindowArrange (bBeginning : Boolean);TAppBar.
procedure OnActivate (var Msg : TWMActivate);TAppBar.
procedure OnAppBarCallbackMsg(var Msg : TMessage);Message handlers } // TAppBar.
procedure OnAppBarForcedToDocked;TAppBar.
procedure OnAppBarStateChange (bProposed : Boolean;
abEdgeProposed : TAppBarEdge);Overridable functions } // TAppBar.
procedure OnAppBarTimer (Sender : TObject);TAppBar.
procedure OnCreate (var Msg: TWMCreate);TAppBar.
procedure OnDestroy (var Msg : TWMDestroy);TAppBar.
procedure OnEnterSizeMove (var Msg : TMessage);TAppBar.
procedure OnExitSizeMove (var Msg : TMessage);TAppBar.
procedure OnGetMinMaxInfo (var Msg : TWMGetMinMaxInfo);TAppBar.
procedure OnMoving (var Msg : TMessage);TAppBar.
procedure OnNcHitTest (var Msg: TWMNCHitTest);TAppBar.
procedure OnNcMouseMove (var Msg : TWMNCMouseMove);TAppBar.
procedure OnSizing (var Msg : TMessage);TAppBar.
procedure OnWindowPosChanged (var Msg : TWMWindowPosChanged);TAppBar.
procedure ResetSystemKnowledge;TAppBar.
procedure SetEdge (abEdge : TAppBarEdge);TAppBar.
procedure SetSlideTime (nInterval : Integer);TAppBar.
function AdjustLocationForAutohide (bShow : Boolean;
var rc : TRect) : Boolean;TAppBar.
function AppBarMessage (abMessage : TAppBarMessage;
abEdge : TAppBarEdge;
lParam : LPARAM;
bRect : Boolean;
var rc : TRect) : UINT;TAppBar.
function AppBarMessage1 (abMessage : TAppBarMessage) : UINT;
function AppBarMessage2 (abMessage : TAppBarMessage;
abEdge : TAppBarEdge) : UINT;
function AppBarMessage3 (abMessage : TAppBarMessage;
abEdge : TAppBarEdge;
lParam : LPARAM) : UINT;
function AppBarMessage4 (abMessage : TAppBarMessage;
abEdge : TAppBarEdge;
lParam : LPARAM;
var rc : TRect) : UINT;
function CalcProposedState (var pt : TSmallPoint) : TAppBarEdge;TAppBar.
procedure CreateParams (var Params: TCreateParams);Internal implementation functions } // TAppBar.
function GetAutohideEdge : TAppBarEdge;TAppBar.
function GetMessagePosition : TSmallPoint;TAppBar.
procedure GetRect (abEdgeProposed : TAppBarEdge; var rcProposed : TRect);TAppBar.
function ModifyStyle (hWnd : THandle;
nStyleOffset : Integer;
dwRemove : DWORD;
dwAdd : DWORD;
nFlags : UINT) : Boolean;TAppBar.
procedure ShowHiddenAppBar (bShow : Boolean);TAppBar.
procedure SlideWindow (var rcEnd : TRect);TAppBar.
| Properties |
property AlwaysOnTop : Boolean
property AutoHide : Boolean
property Edge : TAppBarEdge
property Flags : TAppBarFlags
property FloatBottom : Integer
property FloatLeft : Integer
property FloatRight : Integer
property FloatTop : Integer
property HorzDockSize : Integer
property HorzSizeInc : Integer
property KeyName : String
property MaxHeight : Integer
property MaxHorzDockSize : Integer
property MaxVertDockSize : Integer
property MaxWidth : Integer
property MinHeight : Integer
property MinHorzDockSize : Integer
property MinVertDockSize : Integer
property MinWidth : Integer
property RootKey : Integer
property SlideEffect : Boolean
property SlideTime : Integer
property TaskEntry : TAppBarTaskEntry
property VertDockSize : Integer
property VertSizeInc : Integer| Events |
| Variables |
FabEdgeProposedPrev : TAppBarEdge;
FABS : TAppBarSettings;
FabSettingsLocation : TAppBarSettingsLocation;
FbAutoHideIsVisible : Boolean;
FbFullScreenAppOpen : Boolean;
FTimer : TTimer;| Constructors |
constructor Create (Owner : TComponent);Public member functions } // Constructs an AppBar
Public member functions } // TAppBar.Create /////////////////////////////////////////////////////////////
| Functions |
destructor Destroy;Destroys a previously created AppBar
TAppBar.Destroy ////////////////////////////////////////////////////////////
function LoadSettings : Boolean;Loads settings from the registry at RootKey and KeyName location. Returns TRUE if the settings are available, else FALSE
TAppBar.LoadSettings ///////////////////////////////////////////////////////
function SaveSettings : Boolean;Saves settings into the registry at RootKey and KeyName location. Returns TRUE if succeeded, else FALSE
TAppBar.SaveSettings ///////////////////////////////////////////////////////
procedure UpdateBar;Forces the AppBar's visual appearance to match its internal state
TAppBar.UpdateBar //////////////////////////////////////////////////////////
function GetEdge : TAppBarEdge;Property selector functions } // Retrieves the AppBar's edge. If the AppBar is being positioned, its // proposed state is returned instead
Property selector functions } // TAppBar.GetEdge ////////////////////////////////////////////////////////////
function GetEdgeFromPoint (abFlags : TAppBarFlags;
pt : TSmallPoint) : TAppBarEdge;Returns a proposed edge or ABE_FLOAT based on ABF_* flags and a point specified in screen coordinates
TAppBar.GetEdgeFromPoint ///////////////////////////////////////////////////
function IsDockable (abFlags : TAppBarFlags) : Boolean;Returns TRUE if abFlags contain an at least allowed edge to dock on
TAppBar.IsDockable /////////////////////////////////////////////////////////
function IsDockableHorizontally (abFlags : TAppBarFlags) : Boolean;Returns TRUE if abFlags contain abfAllowTop and abfAllowBottom
TAppBar.IsDockableHorizontally /////////////////////////////////////////////
function IsDockableVertically (abFlags : TAppBarFlags) : Boolean;Returns TRUE if abFlags contain abfAllowLeft and abfAllowRight
TAppBar.IsDockableVertically ///////////////////////////////////////////////
function IsEdgeLeftOrRight (abEdge : TAppBarEdge) : Boolean;AppBar-specific helper functions } // Returns TRUE if abEdge is ABE_LEFT or ABE_RIGHT, else FALSE is returned
AppBar-specific helper functions } // TAppBar.IsEdgeLeftOrRight //////////////////////////////////////////////////
function IsEdgeTopOrBottom (abEdge : TAppBarEdge) : Boolean;Returns TRUE if abEdge is ABE_TOP or ABE_BOTTOM, else FALSE is returned
TAppBar.IsEdgeTopOrBottom //////////////////////////////////////////////////
function IsFloating (abEdge : TAppBarEdge) : Boolean;Returns TRUE if abEdge is ABE_FLOAT, else FALSE is returned
TAppBar.IsFloating /////////////////////////////////////////////////////////
procedure OnABNFullScreenApp (bOpen : Boolean);Called when AppBar gets an ABN_FULLSCREENAPP notification
TAppBar.OnABNFullScreenApp /////////////////////////////////////////////////
procedure OnABNPosChanged;Called when AppBar gets an ABN_POSCHANGED notification
TAppBar.OnABNPosChanged ////////////////////////////////////////////////////
procedure OnABNWindowArrange (bBeginning : Boolean);Called when AppBar gets an ABN_WINDOWARRANGE notification
TAppBar.OnABNWindowArrange /////////////////////////////////////////////////
procedure OnActivate (var Msg : TWMActivate);Called when the AppBar receives a WM_ACTIVATE message
TAppBar.OnActivate /////////////////////////////////////////////////////////
procedure OnAppBarCallbackMsg(var Msg : TMessage);Message handlers } // Called when the AppBar receives a WM_APPBARNOTIFY window message
Message handlers } // TAppBar.OnAppBarCallbackMsg ////////////////////////////////////////////////
procedure OnAppBarForcedToDocked;Called if user attempts to dock an Autohide AppBar on an edge that already contains an Autohide AppBar
TAppBar.OnAppBarForcedToDocked /////////////////////////////////////////////
procedure OnAppBarStateChange (bProposed : Boolean;
abEdgeProposed : TAppBarEdge);Overridable functions } // Called when the AppBar's proposed state changes
Overridable functions } // TAppBar.OnAppBarStateChange ////////////////////////////////////////////////
procedure OnAppBarTimer (Sender : TObject);Called every timer tick
TAppBar.OnAppBarTimer //////////////////////////////////////////////////////
procedure OnCreate (var Msg: TWMCreate);Called when the AppBar form is first created
TAppBar.OnCreate ///////////////////////////////////////////////////////////
procedure OnDestroy (var Msg : TWMDestroy);Called when the AppBar form is about to be destroyed
TAppBar.OnDestroy //////////////////////////////////////////////////////////
procedure OnEnterSizeMove (var Msg : TMessage);Called when the AppBar receives a WM_ENTERSIZEMOVE message
TAppBar.OnEnterSizeMove ////////////////////////////////////////////////////
procedure OnExitSizeMove (var Msg : TMessage);Called when the AppBar receives a WM_EXITSIZEMOVE message
TAppBar.OnExitSizeMove /////////////////////////////////////////////////////
procedure OnGetMinMaxInfo (var Msg : TWMGetMinMaxInfo);Called when the AppBar receives a WM_GETMINMAXINFO message
TAppBar.OnGetMinMaxInfo ////////////////////////////////////////////////////
procedure OnMoving (var Msg : TMessage);Called when the AppBar receives a WM_MOVING message
TAppBar.OnMoving ///////////////////////////////////////////////////////////
procedure OnNcHitTest (var Msg: TWMNCHitTest);Called when the AppBar receives a WM_NCHITTEST message
TAppBar.OnNcHitTest ////////////////////////////////////////////////////////
procedure OnNcMouseMove (var Msg : TWMNCMouseMove);Called when the AppBar receives a WM_NCMOUSEMOVE message
TAppBar.OnNcMouseMove //////////////////////////////////////////////////////
procedure OnSizing (var Msg : TMessage);Called when the AppBar receives a WM_SIZING message
TAppBar.OnSizing ///////////////////////////////////////////////////////////
procedure OnWindowPosChanged (var Msg : TWMWindowPosChanged);Called when the AppBar receives a WM_WINDOWPOSCHANGED message
TAppBar.OnWindowPosChanged /////////////////////////////////////////////////
procedure ResetSystemKnowledge;Forces the shell to update its AppBar list and the workspace area
TAppBar.ResetSystemKnowledge ///////////////////////////////////////////////
procedure SetEdge (abEdge : TAppBarEdge);Changes the AppBar's edge to ABE_UNKNOWN, ABE_FLOAT or an ABE_edge
TAppBar.SetEdge ////////////////////////////////////////////////////////////
procedure SetSlideTime (nInterval : Integer);Changes the slide time interval
TAppBar.SetSlideTime ///////////////////////////////////////////////////////
function AdjustLocationForAutohide (bShow : Boolean;
var rc : TRect) : Boolean;Adjusts the AppBar's location to account for autohide Returns TRUE if rectangle was adjusted
TAppBar.AdjustLocationForAutohide //////////////////////////////////////////
function AppBarMessage (abMessage : TAppBarMessage;
abEdge : TAppBarEdge;
lParam : LPARAM;
bRect : Boolean;
var rc : TRect) : UINT;These functions encapsulate the shell's SHAppBarMessage function
TAppBar.AppBarMessage //////////////////////////////////////////////////////
function AppBarMessage1 (abMessage : TAppBarMessage) : UINT;TAppBar.AppBarMessage1 /////////////////////////////////////////////////////
function AppBarMessage2 (abMessage : TAppBarMessage;
abEdge : TAppBarEdge) : UINT;TAppBar.AppBarMessage2 /////////////////////////////////////////////////////
function AppBarMessage3 (abMessage : TAppBarMessage;
abEdge : TAppBarEdge;
lParam : LPARAM) : UINT;TAppBar.AppBarMessage3 /////////////////////////////////////////////////////
function AppBarMessage4 (abMessage : TAppBarMessage;
abEdge : TAppBarEdge;
lParam : LPARAM;
var rc : TRect) : UINT;TAppBar.AppBarMessage4 /////////////////////////////////////////////////////
function CalcProposedState (var pt : TSmallPoint) : TAppBarEdge;Gets a edge (ABE_FLOAT or ABE_edge) from a point (screen coordinates
TAppBar.CalcProposedState //////////////////////////////////////////////////
procedure CreateParams (var Params: TCreateParams);Internal implementation functions } // Modifies window creation flags
Internal implementation functions } // TAppBar.CreateParams ///////////////////////////////////////////////////////
function GetAutohideEdge : TAppBarEdge;Returns which edge we're autohidden on or ABE_UNKNOWN
TAppBar.GetAutohideEdge ////////////////////////////////////////////////////
function GetMessagePosition : TSmallPoint;Returns a TSmallPoint that gives the cursor position in screen coords
TAppBar.GetMessagePosition /////////////////////////////////////////////////
procedure GetRect (abEdgeProposed : TAppBarEdge; var rcProposed : TRect);Gets a retangle position (screen coordinates) from a proposed state
TAppBar.GetRect ////////////////////////////////////////////////////////////
function ModifyStyle (hWnd : THandle;
nStyleOffset : Integer;
dwRemove : DWORD;
dwAdd : DWORD;
nFlags : UINT) : Boolean;Changes the style of a window (translated from AfxModifyStyle
TAppBar.ModifyStyle ////////////////////////////////////////////////////////
procedure ShowHiddenAppBar (bShow : Boolean);If AppBar is Autohide and docked, shows/hides the AppBar
TAppBar.ShowHiddenAppBar ///////////////////////////////////////////////////
procedure SlideWindow (var rcEnd : TRect);When Autohide AppBar is shown/hidden, slides in/out of view
TAppBar.SlideWindow ////////////////////////////////////////////////////////
| Properties |
property AlwaysOnTop : BooleanAlways On Top On/Off
property AutoHide : BooleanAuto-hide On/Off
property Edge : TAppBarEdgeEdge to dock on
property Flags : TAppBarFlagsProperties } // Allowed dockable edges
property FloatBottom : Integer
property FloatLeft : IntegerAppBar coordinates when floating
property FloatRight : Integer
property FloatTop : Integer
property HorzDockSize : IntegerHorizontal size when docked on left or right
property HorzSizeInc : IntegerHorizontal size increment
property KeyName : StringKeyName in the registry where settings should be loaded/saved
property MaxHeight : Integer
property MaxHorzDockSize : IntegerMax Height when docked horizontally
property MaxVertDockSize : IntegerMax Width when docked vertically
property MaxWidth : Integer
property MinHeight : Integer
property MinHorzDockSize : IntegerMin Height when docked horizontally
property MinVertDockSize : IntegerMin Width when docked vertically
property MinWidth : IntegerAppBar MinMax dimensions when floating
property RootKey : IntegerRootKey in the registry where settings should be loaded/saved
property SlideEffect : BooleanSlide Effect On/Off
property SlideTime : IntegerSlide Time
property TaskEntry : TAppBarTaskEntryAppBar behavior in the Window Taskbar
property VertDockSize : IntegerVertical size when docked on top or bottom
property VertSizeInc : IntegerVertical size increment
| Events |
| Variables |
FabEdgeProposedPrev : TAppBarEdge;We need a member variable which tracks the proposed edge of the AppBar while the user is moving it, deciding where to position it. While not moving, this member must contain ABE_UNKNOWN so that GetEdge returns the current edge contained in FABS.abEdge. While moving the AppBar, FabEdgeProposedPrev contains the proposed edge based on the position of the AppBar. The proposed edge becomes the new edge when the user stops moving the AppBar.
FABS : TAppBarSettings;Internal implementation state variables } // This AppBar's settings info
FabSettingsLocation : TAppBarSettingsLocation;We need a member variable to store the settings location in the registry
FbAutoHideIsVisible : Boolean;We need a member variable which tracks whether our autohide window is visible or not
FbFullScreenAppOpen : Boolean;We need a member variable which tracks whether a full screen application window is open
FTimer : TTimer;We need a timer to to determine when the AppBar should be re-hidden