OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
hotkey.h
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectWindows
3// Copyright (c) 1995, 1996 by Borland International, All Rights Reserved
4//
5/// \file
6/// Definition of class THotKey
7//----------------------------------------------------------------------------
8
9#if !defined(OWL_HOTKEY_H)
10#define OWL_HOTKEY_H
11
12#include <owl/private/defs.h>
13#if defined(BI_HAS_PRAGMA_ONCE)
14# pragma once
15#endif
16
17#include <owl/commctrl.h>
18
19
20namespace owl {
21
22#include <owl/preclass.h>
23
24/// \addtogroup commctrl
25/// @{
26/// \class THotKey
27// ~~~~~ ~~~~~~~
28/// THotKey encapsulates the hot-key control, a window that allows the user to
29/// enter a combination of keystrokes to be used as a a hot key.
30/// [A hot key is a key combination that the user can press to perform an
31/// action quickly].
32//
33class _OWLCLASS THotKey : public TControl {
34 public:
35 THotKey(TWindow* parent, int id, int x, int y, int w, int h, TModule* module = 0);
36 THotKey(TWindow* parent, int resourceId, TModule* module = 0);
37 THotKey(THandle hWnd, TModule* module = 0);
38
39 // Set and retrieve the hot key virtual code.
40 //
41 uint16 GetHotKey();
42 void SetHotKey(uint16 hotKey);
43 void SetHotKey(uint8 vk, uint8 mods);
44
45 /// Set the invalid key combinations for this control
46 //
47 void SetRules(uint16 invalid, uint16 defFlag);
48
49 /// Safe overload
50 //
52
53 protected:
54
55 // Override TWindow virtual member functions
56 //
57 uint Transfer(void* buffer, TTransferDirection direction);
58 virtual auto GetWindowClassName() -> TWindowClassName;
59
60 private:
61 // Hidden to prevent accidental copying or assignment
62 //
63 THotKey(const THotKey&);
64 THotKey& operator =(const THotKey&);
65
66};
67
68/// @}
69
70#include <owl/posclass.h>
71
72
73} // OWL namespace
74
75
76#endif // OWL_HOTKEY_H
TControl unifies its derived control classes, such as TScrollBar, TControlGadget, and TButton.
Definition control.h:38
THotKey encapsulates the hot-key control, a window that allows the user to enter a combination of key...
Definition hotkey.h:33
uint Transfer(uint16 &key, TTransferDirection direction)
Safe overload.
Definition hotkey.h:51
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
Definition module.h:75
Type-safe encapsulation of a Windows class name, a union between ATOM and LPCTSTR.
Definition module.h:47
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
Definition window.h:414
HWND THandle
TWindow encapsulates an HWND.
Definition window.h:418
Definition of classes for CommonControl encapsulation.
TTransferDirection
The TTransferDirection enum describes the constants that the transfer function uses to determine how ...
Definition window.h:92
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
unsigned char uint8
Definition number.h:32
unsigned short uint16
Definition number.h:33
unsigned int uint
Definition number.h:25
#define _OWLCLASS
Definition defs.h:338