FILE COMPARISON
Produced: 2/18/2011 1:22:32 AM
   
Mode:  All Lines  
Left base folder: C:\Documents and Settings\krollins\My Documents\Admin\OpenSource\eRCP\eSWT\eSWT-1.2.orig  
Right base folder: C:\Documents and Settings\krollins\My Documents\Admin\OpenSource\eRCP\eSWT\eSWT-1.2.today  
   
File: org.eclipse.ercp.swt.core.win\common-native\api\MenuItem.h  
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_MENUITEM_H__ = 16 #ifndef __UGL_MENUITEM_H__
13 #define __UGL_MENUITEM_H__   17 #define __UGL_MENUITEM_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 * Enables or disables a menu item.   28 * Enables or disables a menu item.
25 *   29 *
26 * @ingroup AbstractMenuItem   30 * @ingroup AbstractMenuItem
27 *   31 *
28 * @param menuItemHandle the menu item handle   32 * @param menuItemHandle the menu item handle
29 * @param enabled the enablement state of the menu item   33 * @param enabled the enablement state of the menu item
30 * @param error the error status of the call   34 * @param error the error status of the call
31 */   35 */
32 void AbstractMenuItem_SetEnabled(UGL_Int menuItemHandle, UGL_Boolean enabled, UGL_Error error);   36 void AbstractMenuItem_SetEnabled(UGL_Int menuItemHandle, UGL_Boolean enabled, UGL_Error error);
33     37  
34 /**   38 /**
35 * Creates a new cascade menu item, and places it at the given   39 * Creates a new cascade menu item, and places it at the given
36 * index of the menu.  If the index value is -1, the menu should   40 * index of the menu.  If the index value is -1, the menu should
37 * append the new item.   41 * append the new item.
38 *   42 *
39 * @ingroup CascadeMenuItem   43 * @ingroup CascadeMenuItem
40 *   44 *
41 * @param menuHandle the menu handle which contains this new item   45 * @param menuHandle the menu handle which contains this new item
42 * @param index the index inside menu where this new item is placed   46 * @param index the index inside menu where this new item is placed
43 * @param error the error status of the call   47 * @param error the error status of the call
44 *   48 *
45 * @return handle of new widget   49 * @return handle of new widget
46 */   50 */
47 UGL_Int CascadeMenuItem_New(UGL_Int menuHandle, UGL_Int index, UGL_Error error);   51 UGL_Int CascadeMenuItem_New(UGL_Int menuHandle, UGL_Int index, UGL_Error error);
48     52  
49 /**   53 /**
50 * Sets the submenu of a cascade menu item.   54 * Sets the submenu of a cascade menu item.
51 *   55 *
52 * @ingroup CascadeMenuItem   56 * @ingroup CascadeMenuItem
53 *   57 *
54 * @param cascadeMenuItemHandle the cascade menu item   58 * @param cascadeMenuItemHandle the cascade menu item
55 * @param dropDownMenuHandle the submenu, or 0 if the current menu   59 * @param dropDownMenuHandle the submenu, or 0 if the current menu
56 *                           should be removed.   60 *                           should be removed.
57 * @param error the error status of the call   61 * @param error the error status of the call
58 */   62 */
59 void CascadeMenuItem_SetMenu(UGL_Int cascadeMenuItemHandle, UGL_Int dropDownMenuHandle, UGL_Error error);   63 void CascadeMenuItem_SetMenu(UGL_Int cascadeMenuItemHandle, UGL_Int dropDownMenuHandle, UGL_Error error);
60     64  
61 /**   65 /**
62 * Sets the accelerator for a LabeledMenuItem.  The accelerator is a bitwise   66 * Sets the accelerator for a LabeledMenuItem.  The accelerator is a bitwise
63 * OR of MODIFIER_MASK constants and keycode values.  The MODIFIER_MASK constants   67 * OR of MODIFIER_MASK constants and keycode values.  The MODIFIER_MASK constants
64 * are placed in the upper 16 bits of the value.  The keycode is in the lower   68 * are placed in the upper 16 bits of the value.  The keycode is in the lower
65 * 16 bits.  Valid keycodes are either KEYCODE constants or 16-bit char values.   69 * 16 bits.  Valid keycodes are either KEYCODE constants or 16-bit char values.
66 *   70 *
67 * @ingroup LabeledMenuItem   71 * @ingroup LabeledMenuItem
68 *   72 *
69 * @param menuItemHandle the menu item handle   73 * @param menuItemHandle the menu item handle
70 * @param accelerator the accelerator   74 * @param accelerator the accelerator
71 * @param error the error status of the call   75 * @param error the error status of the call
72 */   76 */
73 void LabeledMenuItem_SetAccelerator(UGL_Int menuItemHandle, UGL_Int accelerator, UGL_Error error);   77 void LabeledMenuItem_SetAccelerator(UGL_Int menuItemHandle, UGL_Int accelerator, UGL_Error error);
74     78  
75 /**   79 /**
76 * Sets the descriptive text and the accelerator text of a LabeledMenuItem.   80 * Sets the descriptive text and the accelerator text of a LabeledMenuItem.
77 * The descriptive text may contain mnemonic characters, which are preceded   81 * The descriptive text may contain mnemonic characters, which are preceded
78 * by the '&amp;' character.  In order to add a '&amp;' character to the text,   82 * by the '&amp;' character.  In order to add a '&amp;' character to the text,
79 * it should be escaped with another '&amp;' character.   83 * it should be escaped with another '&amp;' character.
80 * The accelerator text is displayed next to the descriptive text in the item,   84 * The accelerator text is displayed next to the descriptive text in the item,
81 * and usually describes the accelerator, if one is being used.  Note that the   85 * and usually describes the accelerator, if one is being used.  Note that the
82 * accelerator text does not actually set the accelerator.  That is done by   86 * accelerator text does not actually set the accelerator.  That is done by
83 * LabeledMenuItem_SetAccelerator.   87 * LabeledMenuItem_SetAccelerator.
84 *   88 *
85 * @ingroup LabeledMenuItem   89 * @ingroup LabeledMenuItem
86 *   90 *
87 * @param menuItemHandle the menu item handle   91 * @param menuItemHandle the menu item handle
88 * @param text the descriptive text   92 * @param text the descriptive text
89 * @param accelText the accelerator text   93 * @param accelText the accelerator text
90 * @param error the error status of the call   94 * @param error the error status of the call
91 */   95 */
92 void LabeledMenuItem_SetText(UGL_Int menuItemHandle, UGL_String text, UGL_String accelText, UGL_Error error);   96 void LabeledMenuItem_SetText(UGL_Int menuItemHandle, UGL_String text, UGL_String accelText, UGL_Error error);
93     97  
94 /**   98 /**
95 * Creates a new push menu item.   99 * Creates a new push menu item.
96 *   100 *
97 * @ingroup PushMenuItem   101 * @ingroup PushMenuItem
98 *   102 *
99 * @param menuHandle the menu handle which contains this new item   103 * @param menuHandle the menu handle which contains this new item
100 * @param index the index inside menu where this new item is placed   104 * @param index the index inside menu where this new item is placed
101 * @param error the error status of the call   105 * @param error the error status of the call
102 *   106 *
103 * @return handle of new widget   107 * @return handle of new widget
104 */   108 */
105 UGL_Int PushMenuItem_New(UGL_Int menuHandle, UGL_Int index, UGL_Error error);   109 UGL_Int PushMenuItem_New(UGL_Int menuHandle, UGL_Int index, UGL_Error error);
106     110  
107 /**   111 /**
108 * Creates a new separator menu item.   112 * Creates a new separator menu item.
109 *   113 *
110 * @ingroup SeparatorItem   114 * @ingroup SeparatorItem
111 *   115 *
112 * @param menuHandle the menu handle which contains this new item   116 * @param menuHandle the menu handle which contains this new item
113 * @param index the index inside menu where this new item is placed   117 * @param index the index inside menu where this new item is placed
114 * @param error the error status of the call   118 * @param error the error status of the call
115 *   119 *
116 * @return handle of new widget   120 * @return handle of new widget
117 */   121 */
118 UGL_Int SeparatorItem_New(UGL_Int menuHandle, UGL_Int index, UGL_Error error);   122 UGL_Int SeparatorItem_New(UGL_Int menuHandle, UGL_Int index, UGL_Error error);
119     123  
120 /**   124 /**
121 * Creates a new menu item which has a selection state, similar to a checkbox.   125 * Creates a new menu item which has a selection state, similar to a checkbox.
122 *   126 *
123 * @ingroup StateMenuItem   127 * @ingroup StateMenuItem
124 *   128 *
125 * @param menuHandle the menu handle which contains this new item   129 * @param menuHandle the menu handle which contains this new item
126 * @param index the index inside menu where this new item is placed   130 * @param index the index inside menu where this new item is placed
127 * @param style either STYLE_RADIO or STYLE_CHECK   131 * @param style either STYLE_RADIO or STYLE_CHECK
128 * @param error the error status of the call   132 * @param error the error status of the call
129 *   133 *
130 * @return handle of new widget   134 * @return handle of new widget
131 */   135 */
132 UGL_Int StateMenuItem_New(UGL_Int menuHandle, UGL_Int index, UGL_Int style, UGL_Error error);   136 UGL_Int StateMenuItem_New(UGL_Int menuHandle, UGL_Int index, UGL_Int style, UGL_Error error);
133     137  
134 /**   138 /**
135 * Sets the selection state of a state menu item.   139 * Sets the selection state of a state menu item.
136 *   140 *
137 * @ingroup StateMenuItem   141 * @ingroup StateMenuItem
138 *   142 *
139 * @param statefulMenuItemHandle the menu item handle   143 * @param statefulMenuItemHandle the menu item handle
140 * @param selected the new selection state   144 * @param selected the new selection state
141 * @param error the error status of the call   145 * @param error the error status of the call
142 */   146 */
143 void StateMenuItem_SetSelection(UGL_Int statefulMenuItemHandle, UGL_Boolean selected, UGL_Error error);   147 void StateMenuItem_SetSelection(UGL_Int statefulMenuItemHandle, UGL_Boolean selected, UGL_Error error);
144     148  
    <> 149 /**
      150 * Sets the disableAutoSelection state of a state menu item.
      151 *
      152 * @ingroup StateMenuItem
      153 *
      154 * @param statefulMenuItemHandle the menu item handle
      155 * @param disableAutoSelection the new disableAutoSelection state
      156 */
      157 void StateMenuItem_DisableAutoSelection(UGL_Int statefulMenuItemHandle, UGL_Boolean disableAutoSelection);
      158  
145   = 159  
146     160  
147 /**   161 /**
148 * Sets the image which is displayed on a LabeledMenuItem.  If the   162 * Sets the image which is displayed on a LabeledMenuItem.  If the
149 * imageHandle is zero, remove the current image.   163 * imageHandle is zero, remove the current image.
150 *   164 *
151 * @ingroup LabeledMenuItem   165 * @ingroup LabeledMenuItem
152 *   166 *
153 * @param menuItemHandle the menu item handle   167 * @param menuItemHandle the menu item handle
154 * @param imageHandle the image handle   168 * @param imageHandle the image handle
155 * @param error the error status of the call   169 * @param error the error status of the call
156 */   170 */
157 void LabeledMenuItem_SetImage(UGL_Int menuItemHandle, UGL_Int imageHandle, UGL_Error error);   171 void LabeledMenuItem_SetImage(UGL_Int menuItemHandle, UGL_Int imageHandle, UGL_Error error);
158     172  
159     173  
160     174  
161 #ifdef __cplusplus   175 #ifdef __cplusplus
162 }   176 }
163 #endif   177 #endif
164     178  
165 #endif /* __UGL_MENUITEM_H__ */   179 #endif /* __UGL_MENUITEM_H__ */