Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
WidgetMessageTypes.h
Go to the documentation of this file.
1 /* @(#)root/gui:$Id$ */
2 
3 /*************************************************************************
4  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
5  * All rights reserved. *
6  * *
7  * For the licensing terms see $ROOTSYS/LICENSE. *
8  * For the list of contributors see $ROOTSYS/README/CREDITS. *
9  *************************************************************************/
10 
11 #ifndef ROOT_WidgetMessageTypes
12 #define ROOT_WidgetMessageTypes
13 
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // WidgetMessageTypes //
18 // //
19 // System predefined widget message types. Message types are constants //
20 // that indicate which widget sent the message and by which widget //
21 // function (sub-message). Make sure your own message types don't clash //
22 // whith the ones defined in this file. ROOT reserves all message ids //
23 // between 0 - 1000. User defined messages should be in the range //
24 // 1001 - 10000. Sub-messages must always be in the range 1-255. //
25 // To use MK_MSG() just cast your message id's to an EWidgetMessageType.//
26 // //
27 //////////////////////////////////////////////////////////////////////////
28 
29 #include "Rtypes.h"
30 
31 
32 enum EWidgetMessageTypes {
33  kC_COMMAND = 1,
34  kCM_MENU = 1,
35  kCM_MENUSELECT = 2,
36  kCM_BUTTON = 3,
37  kCM_CHECKBUTTON = 4,
38  kCM_RADIOBUTTON = 5,
39  kCM_LISTBOX = 6,
40  kCM_COMBOBOX = 7,
41  kCM_TAB = 8,
42  kC_HSCROLL = 2,
43  kC_VSCROLL = 3,
44  kSB_LINEUP = 1,
45  kSB_LINEDOWN = 2,
46  kSB_PAGEUP = 3,
47  kSB_PAGEDOWN = 4,
48  kSB_SLIDERTRACK = 5,
49  kSB_SLIDERPOS = 6,
50  kC_TEXTENTRY = 4,
51  kTE_TEXTCHANGED = 1,
52  kTE_ENTER = 2,
53  kTE_TAB = 3,
54  kTE_KEY = 4,
55  kC_CONTAINER = 5,
56  kCT_ITEMCLICK = 1,
57  kCT_ITEMDBLCLICK = 2,
58  kCT_SELCHANGED = 3,
59  kCT_KEY = 4,
60  kC_HSLIDER = 6,
61  kC_VSLIDER = 7,
62  kSL_POS = 1,
63  kSL_TRACK = 2,
64  kSL_PRESS = 3,
65  kSL_RELEASE = 4,
66  kSL_POINTER = 5,
67  kC_LISTTREE = 8,
68  kC_TEXTVIEW = 9,
69  kTXT_ISMARKED = 1,
70  kTXT_DATACHANGE = 2,
71  kTXT_CLICK2 = 3,
72  kTXT_CLICK3 = 4,
73  kTXT_F3 = 5,
74  kTXT_OPEN = 6,
75  kTXT_CLOSE = 7,
76  kTXT_SAVE = 8,
77  kC_COLORSEL = 10,
78  kCOL_CLICK = 1,
79  kCOL_SELCHANGED = 2,
80  kC_PATTERNSEL = 11,
81  kPAT_CLICK = 1,
82  kPAT_SELCHANGED = 2,
83  kC_MARKERSEL = 12,
84  kMAR_CLICK = 1,
85  kMAR_SELCHANGED = 2,
86  kC_POPUP = 13,
87  kPOP_HIDE = 1,
88  kC_DOCK = 14,
89  kDOCK_DOCK = 1,
90  kDOCK_UNDOCK = 2,
91  kDOCK_SHOW = 3,
92  kDOCK_HIDE = 4,
93  kC_MDI = 15,
94  kMDI_CURRENT = 1,
95  kMDI_CREATE = 2,
96  kMDI_CLOSE = 4,
97  kMDI_RESTORE = 8,
98  kMDI_MOVE = 16,
99  kMDI_SIZE = 32,
100  kMDI_MINIMIZE = 64,
101  kMDI_MAXIMIZE = 128,
102  kMDI_HELP = 256,
103  kMDI_MENU = 512,
104  kC_USER = 1001,
105  kC_MSGMAX = 10000
106 };
107 
108 
109 // Message cracking routines
110 inline Int_t MK_MSG(EWidgetMessageTypes msg, EWidgetMessageTypes submsg)
111  { return (msg << 8) + submsg; }
112 inline Int_t GET_MSG(Long_t val) { return Int_t(val >> 8); }
113 inline Int_t GET_SUBMSG(Long_t val) { return Int_t(val & 255); }
114 
115 #endif