OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
controlb.h
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectWindows
3// Copyright (c) 1992, 1996 by Borland International, All Rights Reserved
4//
5/// \file
6/// Definition of class TControlBar.
7//----------------------------------------------------------------------------
8
9#if !defined(OWL_CONTROLB_H)
10#define OWL_CONTROLB_H
11
12#include <owl/private/defs.h>
13#if defined(BI_HAS_PRAGMA_ONCE)
14# pragma once
15#endif
16
17#include <owl/gadgetwi.h>
18
19
20namespace owl {
21
22#include <owl/preclass.h>
23
24/// \addtogroup gadgets
25/// @{
26/// \class TControlBar
27// ~~~~~ ~~~~~~~~~~~
28/// Derived from TGadgetWindow, TControlBar implements a control bar that provides
29/// mnemonic access for its button gadgets. The sample MDIFILE.CPP ObjectWindows
30/// program from the Borland C++ 5.x distribution displays the following example of a control
31/// bar:
32/// \image html bm103.BMP
33///
34/// To construct, build, and insert a control bar into a frame window, you can first
35/// define the following response table:
36/// \code
37/// DEFINE_RESPONSE_TABLE1(TMDIFileApp, TApplication)
38/// EV_COMMAND(CM_FILENEW, CmFileNew),
39/// EV_COMMAND(CM_FILEOPEN, CmFileOpen),
40/// EV_COMMAND(CM_SAVESTATE, CmSaveState),
41/// EV_COMMAND(CM_RESTORESTATE, CmRestoreState),
42/// END_RESPONSE_TABLE;
43/// \endcode
44/// Next, add statements that will construct a main window and load its menu,
45/// accelerator table, and icon. Then, to construct, build and insert a control bar
46/// into the frame window, insert these statements:
47/// \code
48/// TControlBar* cb = new TControlBar(frame);
49/// cb->Insert(*new TButtonGadget(CM_FILENEW, CM_FILENEW));
50/// cb->Insert(*new TButtonGadget(CM_FILEOPEN, CM_FILEOPEN));
51/// cb->Insert(*new TButtonGadget(CM_FILESAVE, CM_FILESAVE));
52/// cb->Insert(*new TSeparatorGadget(6));
53/// cb->Insert(*new TButtonGadget(CM_EDITCUT, CM_EDITCUT));
54/// cb->Insert(*new TButtonGadget(CM_EDITCOPY, CM_EDITCOPY));
55/// cb->Insert(*new TButtonGadget(CM_EDITPASTE, CM_EDITPASTE));
56/// cb->Insert(*new TSeparatorGadget(6));
57/// cb->Insert(*new TButtonGadget(CM_EDITUNDO, CM_EDITUNDO));
58/// frame->Insert(*cb, TDecoratedFrame::Top);
59/// \endcode
60//
62 public:
63 TControlBar(TWindow* parent = 0,
64 TTileDirection direction= Horizontal,
65 TFont* font = 0,
66 TModule* module = 0);
68
70};
71/// @}
72
73#include <owl/posclass.h>
74
75
76} // OWL namespace
77
78
79#endif // OWL_CONTROLB_H
Derived from TGadgetWindow, TControlBar implements a control bar that provides mnemonic access for it...
Definition controlb.h:61
TFont derived from TGdiObject provides constructors for creating font objects from explicit informati...
Definition gdiobjec.h:296
Derived from TWindow, TGadgetWindow maintains a list of tiled gadgets for a window and lets you dynam...
Definition gadgetwi.h:122
TTileDirection
Enumeration describing how gadgets should be laid out within the gadget window.
Definition gadgetwi.h:130
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
Definition module.h:75
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
Definition window.h:414
Definition of TGadgetList, TGadgetWindow & TGadgetWindowFont A list holding gadgets,...
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
#define _OWLCLASS
Definition defs.h:338