xref: /trunk/main/UnoControls/inc/definesunocontrols.hxx (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _UNOCONTROLS_DEFINES_CTRL_HXX
29 #define _UNOCONTROLS_DEFINES_CTRL_HXX
30 
31 //-------------------------------------------------------------------------------------------------------------------
32 // includes
33 #include <limits.h> // defines for min/max of INT
34 
35 namespace unocontrols{
36 
37 //-------------------------------------------------------------------------------------------------------------------
38 // global defines for all UnoControls
39 //-------------------------------------------------------------------------------------------------------------------
40 #define UNOCONTROLS_TRGB_COLORDATA( t,r,g,b )               ((INT32)(((UINT32)((UINT8)(b))))|(((UINT32)((UINT8)(g)))<<8)|(((UINT32)((UINT8)(r)))<<16)|(((UINT32)((UINT8)(t)))<<24))
41 //-------------------------------------------------------------------------------------------------------------------
42 
43 // defines for BaseControl
44 #ifdef _UNOCONTROLS_BASECONTROL_CTRL_HXX
45     #define BASECONTROL_IDLCLASSNAME                        "BaseControl"
46     #define BASECONTROL_DEFAULT_PMULTIPLEXER                NULL
47     #define BASECONTROL_DEFAULT_X                           0
48     #define BASECONTROL_DEFAULT_Y                           0
49     #define BASECONTROL_DEFAULT_WIDTH                       100
50     #define BASECONTROL_DEFAULT_HEIGHT                      100
51     #define BASECONTROL_DEFAULT_VISIBLE                     FALSE
52     #define BASECONTROL_DEFAULT_INDESIGNMODE                FALSE
53     #define BASECONTROL_DEFAULT_ENABLE                      TRUE
54     #define BASECONTROL_SERVICE_VCLTOOLKIT                  "com.sun.star.awt.VclToolkit"
55 #endif
56 //-------------------------------------------------------------------------------------------------------------------
57 
58 //-------------------------------------------------------------------------------------------------------------------
59 // defines for BaseContainerControl
60 #ifdef _UNOCONTROLS_BASECONTAINERCONTROL_CTRL_HXX
61     #define BASECONTAINERCONTROL_IDLCLASSNAME               "BaseContainerControl"
62 #endif
63 //-------------------------------------------------------------------------------------------------------------------
64 
65 //-------------------------------------------------------------------------------------------------------------------
66 // defines for ProgressBar
67 #ifdef _UNOCONTROLS_PROGRESSBAR_CTRL_HXX
68     #define PROGRESSBAR_IDLCLASSNAME                        "XProgressbar"
69     #define PROGRESSBAR_SERVICENAME                         "com.sun.star.awt.XProgressBar"
70     #define PROGRESSBAR_IMPLEMENTATIONNAME                  "stardiv.UnoControls.ProgressBar"
71     #define PROGRESSBAR_FREEBORDER                          2
72     #define PROGRESSBAR_DEFAULT_HORIZONTAL                  TRUE
73     #define PROGRESSBAR_DEFAULT_BLOCKDIMENSION              Size(1,1)
74     #define PROGRESSBAR_DEFAULT_BACKGROUNDCOLOR             UNOCONTROLS_TRGB_COLORDATA( 0x00, 0xC0, 0xC0, 0xC0 )    // lightgray
75     #define PROGRESSBAR_DEFAULT_FOREGROUNDCOLOR             UNOCONTROLS_TRGB_COLORDATA( 0x00, 0x00, 0x00, 0x80 )    // blue
76     #define PROGRESSBAR_DEFAULT_MINRANGE                    INT_MIN
77     #define PROGRESSBAR_DEFAULT_MAXRANGE                    INT_MAX
78     #define PROGRESSBAR_DEFAULT_BLOCKVALUE                  1
79     #define PROGRESSBAR_DEFAULT_VALUE                       PROGRESSBAR_DEFAULT_MINRANGE
80     #define PROGRESSBAR_LINECOLOR_BRIGHT                    UNOCONTROLS_TRGB_COLORDATA( 0x00, 0xFF, 0xFF, 0xFF )    // white
81     #define PROGRESSBAR_LINECOLOR_SHADOW                    UNOCONTROLS_TRGB_COLORDATA( 0x00, 0x00, 0x00, 0x00 )    // black
82 #endif
83 //-------------------------------------------------------------------------------------------------------------------
84 
85 //-------------------------------------------------------------------------------------------------------------------
86 // defines for FrameControl
87 #ifdef _UNOCONTROLS_FRAMECONTROL_CTRL_HXX
88     #define FRAMECONTROL_IDLCLASSNAME                       "FrameControl"
89     #define FRAMECONTROL_SERVICENAME                        "com.sun.star.frame.FrameControl"
90     #define FRAMECONTROL_IMPLEMENTATIONNAME                 "stardiv.UnoControls.FrameControl"
91     #define FRAMECONTROL_DEFAULT_COMPONENTURL               "private:factory/swriter"
92     #define FRAMECONTROL_PROPERTYNAME_LOADERARGUMENTS       "LoaderArguments"
93     #define FRAMECONTROL_PROPERTYNAME_COMPONENTURL          "ComponentURL"
94     #define FRAMECONTROL_PROPERTYNAME_FRAME                 "Frame"
95     #define FRAMECONTROL_PROPERTYNAME_IDLCLASSES            "IDLClasses"
96     #define FRAMECONTROL_ERRORTEXT_VOSENSHURE               "This is an invalid property handle."
97     #define FRAMECONTROL_PROPERTY_COUNT                     4                                                       // you must count the propertys
98     #define FRAMECONTROL_PROPERTY_COMPONENTURL              0                                                       // Id must be the index into the array
99     #define FRAMECONTROL_PROPERTY_FRAME                     1
100     #define FRAMECONTROL_PROPERTY_IDLCLASSES                2
101     #define FRAMECONTROL_PROPERTY_LOADERARGUMENTS           3
102 #endif
103 //-------------------------------------------------------------------------------------------------------------------
104 
105 //-------------------------------------------------------------------------------------------------------------------
106 // defines for ProgressMonitor
107 #ifdef _UNOCONTROLS_PROGRESSMONITOR_CTRL_HXX
108     #define PROGRESSMONITOR_IDLCLASSNAME                    "XProgressMonitor"
109     #define PROGRESSMONITOR_SERVICENAME                     "com.sun.star.awt.XProgressMonitor"
110     #define PROGRESSMONITOR_IMPLEMENTATIONNAME              "stardiv.UnoControls.ProgressMonitor"
111     #define PROGRESSMONITOR_FREEBORDER                      10                                                      // border around and between the controls
112     #define PROGRESSMONITOR_WIDTH_RELATION                  4                                                       // reserve 1/4 for button width and rest for progressbar width
113     #define PROGRESSMONITOR_HEIGHT_RELATION                 5                                                       // reserve 1/5 for button and progressbar heigth and rest for text height
114     #define PROGRESSMONITOR_FIXEDTEXT_SERVICENAME           "com.sun.star.awt.UnoControlFixedText"
115     #define PROGRESSMONITOR_BUTTON_SERVICENAME              "com.sun.star.awt.UnoControlButton"
116     #define PROGRESSMONITOR_FIXEDTEXT_MODELNAME             "com.sun.star.awt.UnoControlFixedTextModel"
117     #define PROGRESSMONITOR_BUTTON_MODELNAME                "com.sun.star.awt.UnoControlButtonModel"
118     #define PROGRESSMONITOR_CONTROLNAME_TEXT                "Text"                                                  // identifier the control in container
119     #define PROGRESSMONITOR_CONTROLNAME_BUTTON              "Button"                                                //              -||-
120     #define PROGRESSMONITOR_CONTROLNAME_PROGRESSBAR         "ProgressBar"                                           //              -||-
121     #define PROGRESSMONITOR_DEFAULT_BUTTONLABEL             "Abbrechen"
122     #define PROGRESSMONITOR_DEFAULT_TOPIC                   "\0"
123     #define PROGRESSMONITOR_DEFAULT_TEXT                    "\0"
124     #define PROGRESSMONITOR_BACKGROUNDCOLOR                 UNOCONTROLS_TRGB_COLORDATA( 0x00, 0xC0, 0xC0, 0xC0 )    // lighgray
125     #define PROGRESSMONITOR_LINECOLOR_BRIGHT                UNOCONTROLS_TRGB_COLORDATA( 0x00, 0xFF, 0xFF, 0xFF )    // white
126     #define PROGRESSMONITOR_LINECOLOR_SHADOW                UNOCONTROLS_TRGB_COLORDATA( 0x00, 0x00, 0x00, 0x00 )    // black
127     #define PROGRESSMONITOR_HEIGHT_PROGRESSBAR              15
128     #define PROGRESSMONITOR_DEFAULT_WIDTH                   350
129     #define PROGRESSMONITOR_DEFAULT_HEIGHT                  100
130 #endif
131 //-------------------------------------------------------------------------------------------------------------------
132 
133 }   // namespace unocontrols
134 
135 #endif  // #ifndef _UNOCONTROLS_DEFINES_CTRL_HXX
136