xref: /aoo42x/main/toolkit/workben/layout/plugin.cxx (revision b0724fc6)
1*b0724fc6SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*b0724fc6SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*b0724fc6SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*b0724fc6SAndrew Rist  * distributed with this work for additional information
6*b0724fc6SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*b0724fc6SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*b0724fc6SAndrew Rist  * "License"); you may not use this file except in compliance
9*b0724fc6SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*b0724fc6SAndrew Rist  *
11*b0724fc6SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*b0724fc6SAndrew Rist  *
13*b0724fc6SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*b0724fc6SAndrew Rist  * software distributed under the License is distributed on an
15*b0724fc6SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b0724fc6SAndrew Rist  * KIND, either express or implied.  See the License for the
17*b0724fc6SAndrew Rist  * specific language governing permissions and limitations
18*b0724fc6SAndrew Rist  * under the License.
19*b0724fc6SAndrew Rist  *
20*b0724fc6SAndrew Rist  *************************************************************/
21*b0724fc6SAndrew Rist 
22*b0724fc6SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #define _LAYOUT_PLUGIN_CXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include "plugin.hxx"
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #include <com/sun/star/awt/XDialog2.hpp>
29cdf0e10cSrcweir #include <dialcontrol.hxx>
30cdf0e10cSrcweir #include <toolkit/awt/vclxwindow.hxx>
31cdf0e10cSrcweir 
32cdf0e10cSrcweir #include <layout/layout-pre.hxx>
33cdf0e10cSrcweir 
34cdf0e10cSrcweir using namespace com::sun::star;
35cdf0e10cSrcweir 
36cdf0e10cSrcweir #define LAYOUT_RES(x) #x
37cdf0e10cSrcweir 
38cdf0e10cSrcweir #undef ModalDialog
39cdf0e10cSrcweir #define ModalDialog( parent, id ) Dialog( parent, "plugin.xml", id )
40cdf0e10cSrcweir 
PluginDialog(Window * pParent)41cdf0e10cSrcweir PluginDialog::PluginDialog( Window* pParent )
42cdf0e10cSrcweir     : ModalDialog( pParent, LAYOUT_RES( RID_DLG_PLUGIN ) )
43cdf0e10cSrcweir     , aHeaderImage( this, LAYOUT_RES( FI_HEADER ) )
44cdf0e10cSrcweir     , aHeaderText( this, LAYOUT_RES( FT_HEADER ) )
45cdf0e10cSrcweir     , aHeaderLine( this, LAYOUT_RES( FL_HEADER ) )
46cdf0e10cSrcweir     , aPlugin( this, LAYOUT_RES( PL_DIAL ),
47cdf0e10cSrcweir // FIXME: width=, height=, are not recognized as properties.
48cdf0e10cSrcweir //               new svx::DialControl( LAYOUT_DIALOG_PARENT, Size( 0, 0 ), 0 ) )
49cdf0e10cSrcweir                new svx::DialControl( LAYOUT_DIALOG_PARENT, Size( 80, 80 ), 0 ) )
50cdf0e10cSrcweir       //, aDialControl( static_cast<svx::DialControl&> ( aPlugin.GetPlugin() ) )
51cdf0e10cSrcweir     , aDialControl( static_cast<svx::DialControl&> ( *aPlugin.mpPlugin ) )
52cdf0e10cSrcweir     , aOKBtn( this, LAYOUT_RES( BTN_OK ) )
53cdf0e10cSrcweir 	, aCancelBtn( this, LAYOUT_RES( BTN_CANCEL ) )
54cdf0e10cSrcweir 	, aHelpBtn( this, LAYOUT_RES( BTN_HELP ) )
55cdf0e10cSrcweir {
56cdf0e10cSrcweir     aDialControl.SetRotation( 425 );
57cdf0e10cSrcweir }
58cdf0e10cSrcweir 
~PluginDialog()59cdf0e10cSrcweir PluginDialog::~PluginDialog()
60cdf0e10cSrcweir {
61cdf0e10cSrcweir }
62