xref: /trunk/main/UnoControls/inc/definesunocontrols.hxx (revision 515f4036a64467de788f5756d8ebf472d92f9466)
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 #ifndef _UNOCONTROLS_DEFINES_CTRL_HXX
23 #define _UNOCONTROLS_DEFINES_CTRL_HXX
24 
25 //-------------------------------------------------------------------------------------------------------------------
26 // includes
27 #include <limits.h> // defines for min/max of INT
28 
29 namespace unocontrols{
30 
31 //-------------------------------------------------------------------------------------------------------------------
32 // global defines for all UnoControls
33 //-------------------------------------------------------------------------------------------------------------------
34 #define UNOCONTROLS_TRGB_COLORDATA( t,r,g,b )               ((INT32)(((UINT32)((UINT8)(b))))|(((UINT32)((UINT8)(g)))<<8)|(((UINT32)((UINT8)(r)))<<16)|(((UINT32)((UINT8)(t)))<<24))
35 //-------------------------------------------------------------------------------------------------------------------
36 
37 // defines for BaseControl
38 #ifdef _UNOCONTROLS_BASECONTROL_CTRL_HXX
39     #define BASECONTROL_IDLCLASSNAME                        "BaseControl"
40     #define BASECONTROL_DEFAULT_PMULTIPLEXER                NULL
41     #define BASECONTROL_DEFAULT_X                           0
42     #define BASECONTROL_DEFAULT_Y                           0
43     #define BASECONTROL_DEFAULT_WIDTH                       100
44     #define BASECONTROL_DEFAULT_HEIGHT                      100
45     #define BASECONTROL_DEFAULT_VISIBLE                     FALSE
46     #define BASECONTROL_DEFAULT_INDESIGNMODE                FALSE
47     #define BASECONTROL_DEFAULT_ENABLE                      TRUE
48     #define BASECONTROL_SERVICE_VCLTOOLKIT                  "com.sun.star.awt.VclToolkit"
49 #endif
50 //-------------------------------------------------------------------------------------------------------------------
51 
52 //-------------------------------------------------------------------------------------------------------------------
53 // defines for BaseContainerControl
54 #ifdef _UNOCONTROLS_BASECONTAINERCONTROL_CTRL_HXX
55     #define BASECONTAINERCONTROL_IDLCLASSNAME               "BaseContainerControl"
56 #endif
57 //-------------------------------------------------------------------------------------------------------------------
58 
59 //-------------------------------------------------------------------------------------------------------------------
60 // defines for ProgressBar
61 #ifdef _UNOCONTROLS_PROGRESSBAR_CTRL_HXX
62     #define PROGRESSBAR_IDLCLASSNAME                        "XProgressbar"
63     #define PROGRESSBAR_SERVICENAME                         "com.sun.star.awt.XProgressBar"
64     #define PROGRESSBAR_IMPLEMENTATIONNAME                  "stardiv.UnoControls.ProgressBar"
65     #define PROGRESSBAR_FREEBORDER                          2
66     #define PROGRESSBAR_DEFAULT_HORIZONTAL                  TRUE
67     #define PROGRESSBAR_DEFAULT_BLOCKDIMENSION              Size(1,1)
68     #define PROGRESSBAR_DEFAULT_BACKGROUNDCOLOR             UNOCONTROLS_TRGB_COLORDATA( 0x00, 0xC0, 0xC0, 0xC0 )    // lightgray
69     #define PROGRESSBAR_DEFAULT_FOREGROUNDCOLOR             UNOCONTROLS_TRGB_COLORDATA( 0x00, 0x00, 0x00, 0x80 )    // blue
70     #define PROGRESSBAR_DEFAULT_MINRANGE                    INT_MIN
71     #define PROGRESSBAR_DEFAULT_MAXRANGE                    INT_MAX
72     #define PROGRESSBAR_DEFAULT_BLOCKVALUE                  1
73     #define PROGRESSBAR_DEFAULT_VALUE                       PROGRESSBAR_DEFAULT_MINRANGE
74     #define PROGRESSBAR_LINECOLOR_BRIGHT                    UNOCONTROLS_TRGB_COLORDATA( 0x00, 0xFF, 0xFF, 0xFF )    // white
75     #define PROGRESSBAR_LINECOLOR_SHADOW                    UNOCONTROLS_TRGB_COLORDATA( 0x00, 0x00, 0x00, 0x00 )    // black
76 #endif
77 //-------------------------------------------------------------------------------------------------------------------
78 
79 //-------------------------------------------------------------------------------------------------------------------
80 // defines for FrameControl
81 #ifdef _UNOCONTROLS_FRAMECONTROL_CTRL_HXX
82     #define FRAMECONTROL_IDLCLASSNAME                       "FrameControl"
83     #define FRAMECONTROL_SERVICENAME                        "com.sun.star.frame.FrameControl"
84     #define FRAMECONTROL_IMPLEMENTATIONNAME                 "stardiv.UnoControls.FrameControl"
85     #define FRAMECONTROL_DEFAULT_COMPONENTURL               "private:factory/swriter"
86     #define FRAMECONTROL_PROPERTYNAME_LOADERARGUMENTS       "LoaderArguments"
87     #define FRAMECONTROL_PROPERTYNAME_COMPONENTURL          "ComponentURL"
88     #define FRAMECONTROL_PROPERTYNAME_FRAME                 "Frame"
89     #define FRAMECONTROL_PROPERTYNAME_IDLCLASSES            "IDLClasses"
90     #define FRAMECONTROL_ERRORTEXT_VOSENSHURE               "This is an invalid property handle."
91     #define FRAMECONTROL_PROPERTY_COUNT                     4                                                       // you must count the properties
92     #define FRAMECONTROL_PROPERTY_COMPONENTURL              0                                                       // Id must be the index into the array
93     #define FRAMECONTROL_PROPERTY_FRAME                     1
94     #define FRAMECONTROL_PROPERTY_IDLCLASSES                2
95     #define FRAMECONTROL_PROPERTY_LOADERARGUMENTS           3
96 #endif
97 //-------------------------------------------------------------------------------------------------------------------
98 
99 //-------------------------------------------------------------------------------------------------------------------
100 // defines for ProgressMonitor
101 #ifdef _UNOCONTROLS_PROGRESSMONITOR_CTRL_HXX
102     #define PROGRESSMONITOR_IDLCLASSNAME                    "XProgressMonitor"
103     #define PROGRESSMONITOR_SERVICENAME                     "com.sun.star.awt.XProgressMonitor"
104     #define PROGRESSMONITOR_IMPLEMENTATIONNAME              "stardiv.UnoControls.ProgressMonitor"
105     #define PROGRESSMONITOR_FREEBORDER                      10                                                      // border around and between the controls
106     #define PROGRESSMONITOR_WIDTH_RELATION                  4                                                       // reserve 1/4 for button width and rest for progressbar width
107     #define PROGRESSMONITOR_HEIGHT_RELATION                 5                                                       // reserve 1/5 for button and progressbar height and rest for text height
108     #define PROGRESSMONITOR_FIXEDTEXT_SERVICENAME           "com.sun.star.awt.UnoControlFixedText"
109     #define PROGRESSMONITOR_BUTTON_SERVICENAME              "com.sun.star.awt.UnoControlButton"
110     #define PROGRESSMONITOR_FIXEDTEXT_MODELNAME             "com.sun.star.awt.UnoControlFixedTextModel"
111     #define PROGRESSMONITOR_BUTTON_MODELNAME                "com.sun.star.awt.UnoControlButtonModel"
112     #define PROGRESSMONITOR_CONTROLNAME_TEXT                "Text"                                                  // identifier the control in container
113     #define PROGRESSMONITOR_CONTROLNAME_BUTTON              "Button"                                                //              -||-
114     #define PROGRESSMONITOR_CONTROLNAME_PROGRESSBAR         "ProgressBar"                                           //              -||-
115     #define PROGRESSMONITOR_DEFAULT_BUTTONLABEL             "Abbrechen"
116     #define PROGRESSMONITOR_DEFAULT_TOPIC                   "\0"
117     #define PROGRESSMONITOR_DEFAULT_TEXT                    "\0"
118     #define PROGRESSMONITOR_BACKGROUNDCOLOR                 UNOCONTROLS_TRGB_COLORDATA( 0x00, 0xC0, 0xC0, 0xC0 )    // lightgray
119     #define PROGRESSMONITOR_LINECOLOR_BRIGHT                UNOCONTROLS_TRGB_COLORDATA( 0x00, 0xFF, 0xFF, 0xFF )    // white
120     #define PROGRESSMONITOR_LINECOLOR_SHADOW                UNOCONTROLS_TRGB_COLORDATA( 0x00, 0x00, 0x00, 0x00 )    // black
121     #define PROGRESSMONITOR_HEIGHT_PROGRESSBAR              15
122     #define PROGRESSMONITOR_DEFAULT_WIDTH                   350
123     #define PROGRESSMONITOR_DEFAULT_HEIGHT                  100
124 #endif
125 //-------------------------------------------------------------------------------------------------------------------
126 
127 }   // namespace unocontrols
128 
129 #endif  // #ifndef _UNOCONTROLS_DEFINES_CTRL_HXX
130 
131 /* vim: set noet sw=4 ts=4: */
132