xref: /aoo41x/main/offapi/com/sun/star/ui/ItemStyle.idl (revision d1766043)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#ifndef __com_sun_star_ui_ItemStyle_idl__
25#define __com_sun_star_ui_ItemStyle_idl__
26
27//=============================================================================
28
29module com {  module sun {  module star {  module ui {
30
31/**
32    specifies styles which influence the appearance and the behavior of an
33    user interface item.
34
35    <p>
36    These styles are only valid if the item describes a toolbar or statusbar item.
37    The style values can be combined with the OR operator. Styles which are not valid
38    for an item will be ignored by the implementation.<br/>
39    There are two styles where
40    only one value is valid:
41    Alignment:
42    <ul>
43        <li>ALIGN_LEFT</li>
44        <li>ALIGN_CENTER</li>
45        <li>ALIGN_RIGHT</li>
46    </ul>
47    Drawing:
48    <ul>
49        <li>DRAW_OUT3D</li>
50        <li>DRAW_IN3D</li>
51        <li>DRAW_FLAT</li>
52    </ul>
53    </p>
54
55    @since OOo 2.0
56*/
57constants ItemStyle
58{
59    //-------------------------------------------------------------------------
60    /** specifies how the output of the item is aligned in the bounding box of
61        the user interface element.
62        <p>This style is only valid for an item which describes a statusbar item.
63        Draw item with a left aligned output.</p>
64    */
65    const short ALIGN_LEFT   = 1;
66
67    /** specifies how the output of the item is aligned in the bounding box of
68        the user interface element.
69        <p>This style is only valid for an item which describes a statusbar item.
70        Draw item with a centered aligned output.</p>
71    */
72    const short ALIGN_CENTER = 2;
73
74    /** specifies how the output of the item is aligned in the bounding box of
75        the user interface element.
76        <p>This style is only valid for an item which describes a statusbar item.
77        Draw item with a right aligned output.</p>
78    */
79    const short ALIGN_RIGHT  = 3;
80
81    //-------------------------------------------------------------------------
82    /** specifies how the implementation should draw the item.
83        <p>This style is only valid for an item which describes a statusbar item.
84        Draw item with an embossed 3D effect.</p>
85    */
86    const short DRAW_OUT3D   = 4;
87
88    /** specifies how the implementation should draw the item.
89        <p>This style is only valid for an item which describes a statusbar item.
90        Draw item with an impressed 3D effect.</p>
91    */
92    const short DRAW_IN3D    = 8;
93
94    /** specifies how the implementation should draw the item.
95        <p>This style is only valid for an item which describes a statusbar item.
96        Draw item without an 3D effect.</p>
97    */
98    const short DRAW_FLAT    = 12;
99
100    //-------------------------------------------------------------------------
101    /** specifies whether or not a item is displayed using an external function.
102        <p>This style is only valid if the item describes a statusbar item.</p>
103    */
104    const short OWNER_DRAW    = 16;
105
106    //-------------------------------------------------------------------------
107    /** specifies whether or not the size of the item is set automatically by
108        the parent user interface element.
109        <p>This style is only valid if the item describes a toolbar or statusbar item.</p>
110    */
111    const short AUTO_SIZE     = 32;
112
113    //-------------------------------------------------------------------------
114    /**  determines whether the item unchecks neighbor entries which have also this style set.
115         <p>This style is only valid if the item describes a toolbar item.</p>
116    */
117    const short RADIO_CHECK   = 64;
118
119    //-------------------------------------------------------------------------
120    /** specifies if an icon is placed on left side of the text, like an entry in a taskbar.
121        <p>This style is only valid if the item describes a toolbar item and visible if
122        style of the toolbar is set to symboltext.</p>
123        <p> This style can also be used for custom toolbars and menus, in a custom toolbar an item's Style setting can used to override the toolbar container setting, the style can be bitwise OR-ed with <member scope="::com::sun::star::ui::ItemStyle">TEXT</member> to define text, text+icon or icon only is to be displayed. Similarly for menu items, an items Style can override the application setting to display either text or icon ( note: for menu an icon only setting interpreted as icon+text ) </p>
124    */
125    const short ICON          = 128;
126
127    //-------------------------------------------------------------------------
128    /** specifies that the item supports a dropdown menu or toolbar for additional functions.
129        <p>This style is only valid if the item describes a toolbar item.</p>
130    */
131    const short DROP_DOWN     = 256;
132
133    //-------------------------------------------------------------------------
134    /** indicates that the item continues to execute the command while you click and hold
135        the mouse button.
136        <p>This style is only valid if the item describes a toolbar item.</p>
137    */
138    const short REPEAT        = 512;
139
140    //-------------------------------------------------------------------------
141    /** indicates that the item only supports a dropdown menu or toolbar for
142        additional functions. There is no function on the button itself.
143        <p>This style is only valid if the item describes a toolbar item.</p>
144    */
145    const short DROPDOWN_ONLY = 1024;
146    /** indicates if icon, text or text+icon is displayed for the item.
147        <p> This style can be used for custom toolbars and menus, in a custom toolbar an item's Style setting can used to override the toolbar container setting, the style can be bitwise OR-ed with <member scope="com::sun::star::ui::ItemStyle">ICON</member> to define text, text+icon or icon only is to be displayed. Similarly for menu items, an items Style can override the application setting to display either text or icon ( note: for menu an icon only setting interpreted as icon+text ) </p>
148    */
149    const short TEXT = 2048;
150};
151
152}; }; }; };
153
154#endif
155