1 |
/******************************************************************************* |
= |
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2000, 2005 IBM Corporation and others. |
|
2 |
* Copyright (c) 2000, 2005 IBM Corporation and others. |
3 |
* All rights reserved. This program and the accompanying materials |
|
3 |
* All rights reserved. This program and the accompanying materials |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
|
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
5 |
* which accompanies this distribution, and is available at |
|
5 |
* which accompanies this distribution, and is available at |
6 |
* http://www.eclipse.org/legal/epl-v10.html |
|
6 |
* http://www.eclipse.org/legal/epl-v10.html |
7 |
* |
|
7 |
* |
8 |
* Contributors: |
|
8 |
* Contributors: |
9 |
* IBM Corporation - initial API and implementation |
|
9 |
* IBM Corporation - initial API and implementation |
10 |
*******************************************************************************/ |
|
10 |
*******************************************************************************/ |
11 |
|
|
11 |
|
|
|
<> |
12 |
/******************************************************************************* |
|
|
|
13 |
* Additions/modifications to this source file by Oracle America, Inc. 2011 |
|
|
|
14 |
*******************************************************************************/ |
|
|
|
15 |
|
12 |
#ifndef __UGL_BUTTON_H__ |
= |
16 |
#ifndef __UGL_BUTTON_H__ |
13 |
#define __UGL_BUTTON_H__ |
|
17 |
#define __UGL_BUTTON_H__ |
14 |
|
|
18 |
|
15 |
#include "UGL_Error.h" |
|
19 |
#include "UGL_Error.h" |
16 |
#include "UGLTypes.h" |
|
20 |
#include "UGLTypes.h" |
17 |
|
|
21 |
|
18 |
#ifdef __cplusplus |
|
22 |
#ifdef __cplusplus |
19 |
extern "C" { |
|
23 |
extern "C" { |
20 |
#endif |
|
24 |
#endif |
21 |
|
|
25 |
|
22 |
|
|
26 |
|
23 |
/** |
|
27 |
/** |
24 |
* Sets the label of a button. Please note that a button may not display |
|
28 |
* Sets the label of a button. Please note that a button may not display |
25 |
* its image and its label simultaneously. |
|
29 |
* its image and its label simultaneously. |
26 |
* |
|
30 |
* |
27 |
* @ingroup Button |
|
31 |
* @ingroup Button |
28 |
* |
|
32 |
* |
29 |
* @param handle the button handle |
|
33 |
* @param handle the button handle |
30 |
* @param string the label |
|
34 |
* @param string the label |
31 |
* @param error the error status of the call |
|
35 |
* @param error the error status of the call |
32 |
*/ |
|
36 |
*/ |
33 |
void Button_SetLabel(UGL_Int handle, UGL_String string, UGL_Error error); |
|
37 |
void Button_SetLabel(UGL_Int handle, UGL_String string, UGL_Error error); |
34 |
|
|
38 |
|
35 |
/** |
|
39 |
/** |
36 |
* Set the selection state of a button. |
|
40 |
* Set the selection state of a button. |
37 |
* |
|
41 |
* |
38 |
* @ingroup Button |
|
42 |
* @ingroup Button |
39 |
* |
|
43 |
* |
40 |
* @param handle the button handle |
|
44 |
* @param handle the button handle |
41 |
* @param selection true for selected, false for unselected |
|
45 |
* @param selection true for selected, false for unselected |
42 |
* @param error the error status of the call |
|
46 |
* @param error the error status of the call |
43 |
*/ |
|
47 |
*/ |
44 |
void Button_SetSelection(UGL_Int handle, UGL_Boolean selection, UGL_Error error); |
|
48 |
void Button_SetSelection(UGL_Int handle, UGL_Boolean selection, UGL_Error error); |
45 |
|
|
49 |
|
46 |
/** |
|
50 |
/** |
|
|
<> |
51 |
* Gets the selection state of a button. |
|
|
|
52 |
* |
|
|
|
53 |
* @param handle the button handle |
|
|
|
54 |
* @return the selection state of the button |
|
|
|
55 |
*/ |
|
|
|
56 |
UGL_Boolean Button_GetSelection(UGL_Int handle, UGL_Error error); |
|
|
|
57 |
|
|
|
|
58 |
/** |
47 |
* Creates a new Checkbox widget |
= |
59 |
* Creates a new Checkbox widget |
48 |
* |
|
60 |
* |
49 |
* @ingroup Checkbox |
|
61 |
* @ingroup Checkbox |
50 |
* |
|
62 |
* |
51 |
* @param parentHandle handle of parent widget |
|
63 |
* @param parentHandle handle of parent widget |
52 |
* @param style STYLE_FLAT or 0 |
|
64 |
* @param style STYLE_FLAT or 0 |
53 |
* @param error the error status of the call |
|
65 |
* @param error the error status of the call |
54 |
* |
|
66 |
* |
55 |
* @return handle of new widget |
|
67 |
* @return handle of new widget |
56 |
*/ |
|
68 |
*/ |
57 |
UGL_Int Checkbox_New(UGL_Int parentHandle, UGL_Int style, UGL_Error error); |
|
69 |
UGL_Int Checkbox_New(UGL_Int parentHandle, UGL_Int style, UGL_Error error); |
58 |
|
|
70 |
|
59 |
/** |
|
71 |
/** |
60 |
* Create a new PushButton widget |
|
72 |
* Create a new PushButton widget |
61 |
* |
|
73 |
* |
62 |
* @ingroup PushButton |
|
74 |
* @ingroup PushButton |
63 |
* |
|
75 |
* |
64 |
* @param parentHandle handle of parent widget |
|
76 |
* @param parentHandle handle of parent widget |
65 |
* @param style STYLE_FLAT or 0 |
|
77 |
* @param style STYLE_FLAT or 0 |
66 |
* @param error the error status of the call |
|
78 |
* @param error the error status of the call |
67 |
* |
|
79 |
* |
68 |
* @return handle of new widget |
|
80 |
* @return handle of new widget |
69 |
*/ |
|
81 |
*/ |
70 |
UGL_Int PushButton_New(UGL_Int parentHandle, UGL_Int style, UGL_Error error); |
|
82 |
UGL_Int PushButton_New(UGL_Int parentHandle, UGL_Int style, UGL_Error error); |
71 |
|
|
83 |
|
72 |
/** |
|
84 |
/** |
73 |
* Create a new RadioButton widget |
|
85 |
* Create a new RadioButton widget |
74 |
* |
|
86 |
* |
75 |
* @ingroup RadioButton |
|
87 |
* @ingroup RadioButton |
76 |
* |
|
88 |
* |
77 |
* @param parentHandle handle of parent widget |
|
89 |
* @param parentHandle handle of parent widget |
78 |
* @param style STYLE_FLAT or 0 |
|
90 |
* @param style STYLE_FLAT or 0 |
79 |
* @param error the error status of the call |
|
91 |
* @param error the error status of the call |
80 |
* |
|
92 |
* |
81 |
* @return handle of new widget |
|
93 |
* @return handle of new widget |
82 |
*/ |
|
94 |
*/ |
83 |
UGL_Int RadioButton_New(UGL_Int parentHandle, UGL_Int style, UGL_Error error); |
|
95 |
UGL_Int RadioButton_New(UGL_Int parentHandle, UGL_Int style, UGL_Error error); |
84 |
|
|
96 |
|
85 |
|
|
97 |
|
86 |
|
|
98 |
|
87 |
/** |
|
99 |
/** |
88 |
* Sets the position of the label or image on the button. |
|
100 |
* Sets the position of the label or image on the button. |
89 |
* On left to right locales, STYLE_LEAD is left, and STYLE_TRAIL |
|
101 |
* On left to right locales, STYLE_LEAD is left, and STYLE_TRAIL |
90 |
* is right. Right to left locales reverse this notation. |
|
102 |
* is right. Right to left locales reverse this notation. |
91 |
* |
|
103 |
* |
92 |
* @ingroup Button |
|
104 |
* @ingroup Button |
93 |
* |
|
105 |
* |
94 |
* @param handle the button handle |
|
106 |
* @param handle the button handle |
95 |
* @param alignment OS.STYLE_LEAD, OS.STYLE_CENTER or OS.STYLE_TRAIL |
|
107 |
* @param alignment OS.STYLE_LEAD, OS.STYLE_CENTER or OS.STYLE_TRAIL |
96 |
* @param error the error status of the call |
|
108 |
* @param error the error status of the call |
97 |
*/ |
|
109 |
*/ |
98 |
void Button_SetAlignment(UGL_Int handle, UGL_Int alignment, UGL_Error error); |
|
110 |
void Button_SetAlignment(UGL_Int handle, UGL_Int alignment, UGL_Error error); |
99 |
|
|
111 |
|
100 |
/** |
|
112 |
/** |
101 |
* Sets the image of a button. Please note that a button may not display |
|
113 |
* Sets the image of a button. Please note that a button may not display |
102 |
* its image and its label simultaneously. |
|
114 |
* its image and its label simultaneously. |
103 |
* |
|
115 |
* |
104 |
* @ingroup Button |
|
116 |
* @ingroup Button |
105 |
* |
|
117 |
* |
106 |
* @param handle the button handle |
|
118 |
* @param handle the button handle |
107 |
* @param imageHandle the image handle |
|
119 |
* @param imageHandle the image handle |
108 |
* @param error the error status of the call |
|
120 |
* @param error the error status of the call |
109 |
*/ |
|
121 |
*/ |
110 |
void Button_SetImage(UGL_Int handle, UGL_Int imageHandle, UGL_Error error); |
|
122 |
void Button_SetImage(UGL_Int handle, UGL_Int imageHandle, UGL_Error error); |
111 |
|
|
123 |
|
112 |
/** |
|
124 |
/** |
113 |
* Create a new ToggleButton widget |
|
125 |
* Create a new ToggleButton widget |
114 |
* |
|
126 |
* |
115 |
* @ingroup ToggleButton |
|
127 |
* @ingroup ToggleButton |
116 |
* |
|
128 |
* |
117 |
* @param parentHandle handle of parent widget |
|
129 |
* @param parentHandle handle of parent widget |
118 |
* @param style STYLE_FLAT or 0 |
|
130 |
* @param style STYLE_FLAT or 0 |
119 |
* @param error the error status of the call |
|
131 |
* @param error the error status of the call |
120 |
* |
|
132 |
* |
121 |
* @return handle of new widget |
|
133 |
* @return handle of new widget |
122 |
*/ |
|
134 |
*/ |
123 |
UGL_Int ToggleButton_New(UGL_Int parentHandle, UGL_Int style, UGL_Error error); |
|
135 |
UGL_Int ToggleButton_New(UGL_Int parentHandle, UGL_Int style, UGL_Error error); |
124 |
|
|
136 |
|
125 |
|
|
137 |
|
126 |
#ifdef __cplusplus |
|
138 |
#ifdef __cplusplus |
127 |
} |
|
139 |
} |
128 |
#endif |
|
140 |
#endif |
129 |
|
|
141 |
|
130 |
#endif /* __UGL_BUTTON_H__ */ |
|
142 |
#endif /* __UGL_BUTTON_H__ */ |