OWLNext
7.0
Borland's Object Windows Library for the modern age
Toggle main menu visibility
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
20
namespace
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
//
61
class
_OWLCLASS
TControlBar
:
public
TGadgetWindow
{
62
public
:
63
TControlBar
(
TWindow
* parent = 0,
64
TTileDirection
direction=
Horizontal
,
65
TFont
* font = 0,
66
TModule
* module = 0);
67
~TControlBar
();
68
69
DECLARE_CASTABLE
;
70
};
71
/// @}
72
73
#include <
owl/posclass.h
>
74
75
76
}
// OWL namespace
77
78
79
#endif
// OWL_CONTROLB_H
owl::TControlBar::TControlBar
TControlBar(TWindow *parent=0, TTileDirection direction=Horizontal, TFont *font=0, TModule *module=0)
Constructs a TControlBar interface object with the specified direction (either horizontal or vertical...
Definition
controlb.cpp:21
owl::TControlBar::DECLARE_CASTABLE
DECLARE_CASTABLE
Definition
controlb.h:69
owl::TFont
TFont derived from TGdiObject provides constructors for creating font objects from explicit informati...
Definition
gdiobjec.h:296
owl::TGadgetWindow::TGadgetWindow
TGadgetWindow(TWindow *parent=nullptr, TTileDirection direction=Horizontal, TFont *font=nullptr, TModule *module=nullptr)
Creates a TGadgetWindow interface object with the default tile direction and font and passes module w...
Definition
gadgetwi.cpp:98
owl::TGadgetWindow::TTileDirection
TTileDirection
Enumeration describing how gadgets should be laid out within the gadget window.
Definition
gadgetwi.h:130
owl::TGadgetWindow::Horizontal
@ Horizontal
Arrange gadgets in a row.
Definition
gadgetwi.h:131
owl::TModule
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
Definition
module.h:78
owl::TWindow
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
Definition
window.h:414
gadgetwi.h
Definition of TGadgetList, TGadgetWindow & TGadgetWindowFont A list holding gadgets,...
owl
Object Windows Library (OWLNext Core).
Definition
animctrl.h:22
defs.h
_OWLCLASS
#define _OWLCLASS
Definition
defs.h:338
posclass.h
preclass.h
include
owl
controlb.h
Generated by
1.18.0