xref: /trunk/main/basic/inc/basic/sbstdobj.hxx (revision 7fef15a0)
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 _SBSTDOBJ1_HXX
25 #define _SBSTDOBJ1_HXX
26 
27 #include <basic/sbxobj.hxx>
28 #ifndef _GRAPH_HXX //autogen
29 #include <vcl/graph.hxx>
30 #endif
31 #include <basic/sbxfac.hxx>
32 #include "basic/basicdllapi.h"
33 class StarBASIC;
34 class SbStdFactory;
35 
36 //--------------------
37 // class SbStdFactory
38 //--------------------
39 class BASIC_DLLPUBLIC SbStdFactory : public SbxFactory
40 {
41 public:
42 	SbStdFactory();
43 
44 	virtual SbxObject*  CreateObject( const String& rClassName );
45 };
46 
47 //--------------------
48 // class SbStdPicture
49 //--------------------
50 class BASIC_DLLPUBLIC SbStdPicture : public SbxObject
51 {
52 protected:
53 	Graphic		aGraphic;
54 
55    ~SbStdPicture();
56 	virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
57 							 const SfxHint& rHint, const TypeId& rHintType );
58 
59 	void 	PropType( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
60 	void	PropWidth( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
61 	void	PropHeight( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
62 
63 public:
64 	TYPEINFO();
65 
66 	SbStdPicture();
67 	virtual SbxVariable* Find( const String&, SbxClassType );
68 
GetGraphic() const69 	Graphic GetGraphic() const { return aGraphic; }
SetGraphic(const Graphic & rGrf)70 	void	SetGraphic( const Graphic& rGrf ) { aGraphic = rGrf; }
71 };
72 
73 //-----------------
74 // class SbStdFont
75 //-----------------
76 class BASIC_DLLPUBLIC SbStdFont : public SbxObject
77 {
78 protected:
79 	sal_Bool	bBold;
80 	sal_Bool	bItalic;
81 	sal_Bool	bStrikeThrough;
82 	sal_Bool	bUnderline;
83 	sal_uInt16	nSize;
84 	String	aName;
85 
86    ~SbStdFont();
87 	virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
88 							 const SfxHint& rHint, const TypeId& rHintType );
89 
90 	void 	PropBold( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
91 	void	PropItalic( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
92 	void	PropStrikeThrough( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
93 	void	PropUnderline( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
94 	void	PropSize( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
95 	void	PropName( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite );
96 
97 public:
98 	TYPEINFO();
99 
100 	SbStdFont();
101 	virtual SbxVariable* Find( const String&, SbxClassType );
102 
SetBold(sal_Bool bB)103 	void	SetBold( sal_Bool bB ) { bBold = bB; }
IsBold() const104 	sal_Bool	IsBold() const { return bBold; }
SetItalic(sal_Bool bI)105 	void	SetItalic( sal_Bool bI ) { bItalic = bI; }
IsItalic() const106 	sal_Bool	IsItalic() const { return bItalic; }
SetStrikeThrough(sal_Bool bS)107 	void	SetStrikeThrough( sal_Bool bS ) { bStrikeThrough = bS; }
IsStrikeThrough() const108 	sal_Bool	IsStrikeThrough() const { return bStrikeThrough; }
SetUnderline(sal_Bool bU)109 	void	SetUnderline( sal_Bool bU ) { bUnderline = bU; }
IsUnderline() const110 	sal_Bool	IsUnderline() const { return bUnderline; }
SetSize(sal_uInt16 nS)111 	void	SetSize( sal_uInt16 nS ) { nSize = nS; }
GetSize() const112 	sal_uInt16	GetSize() const { return nSize; }
SetFontName(const String & rName)113 	void	SetFontName( const String& rName ) { aName = rName; }
GetFontName() const114 	String	GetFontName() const { return aName; }
115 };
116 
117 //----------------------
118 // class SbStdClipboard
119 //----------------------
120 class BASIC_DLLPUBLIC SbStdClipboard : public SbxObject
121 {
122 protected:
123 
124    ~SbStdClipboard();
125 	virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
126 							 const SfxHint& rHint, const TypeId& rHintType );
127 
128 	void 	MethClear( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite );
129 	void	MethGetData( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite );
130 	void	MethGetFormat( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite );
131 	void	MethGetText( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite );
132 	void	MethSetData( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite );
133 	void	MethSetText( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite );
134 
135 public:
136 	TYPEINFO();
137 
138 	SbStdClipboard();
139 	virtual SbxVariable* Find( const String&, SbxClassType );
140 };
141 
142 #endif
143