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