xref: /aoo41x/main/toolkit/workben/layout/plugin.cxx (revision b0724fc6)
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 #define _LAYOUT_PLUGIN_CXX
25 
26 #include "plugin.hxx"
27 
28 #include <com/sun/star/awt/XDialog2.hpp>
29 #include <dialcontrol.hxx>
30 #include <toolkit/awt/vclxwindow.hxx>
31 
32 #include <layout/layout-pre.hxx>
33 
34 using namespace com::sun::star;
35 
36 #define LAYOUT_RES(x) #x
37 
38 #undef ModalDialog
39 #define ModalDialog( parent, id ) Dialog( parent, "plugin.xml", id )
40 
PluginDialog(Window * pParent)41 PluginDialog::PluginDialog( Window* pParent )
42     : ModalDialog( pParent, LAYOUT_RES( RID_DLG_PLUGIN ) )
43     , aHeaderImage( this, LAYOUT_RES( FI_HEADER ) )
44     , aHeaderText( this, LAYOUT_RES( FT_HEADER ) )
45     , aHeaderLine( this, LAYOUT_RES( FL_HEADER ) )
46     , aPlugin( this, LAYOUT_RES( PL_DIAL ),
47 // FIXME: width=, height=, are not recognized as properties.
48 //               new svx::DialControl( LAYOUT_DIALOG_PARENT, Size( 0, 0 ), 0 ) )
49                new svx::DialControl( LAYOUT_DIALOG_PARENT, Size( 80, 80 ), 0 ) )
50       //, aDialControl( static_cast<svx::DialControl&> ( aPlugin.GetPlugin() ) )
51     , aDialControl( static_cast<svx::DialControl&> ( *aPlugin.mpPlugin ) )
52     , aOKBtn( this, LAYOUT_RES( BTN_OK ) )
53 	, aCancelBtn( this, LAYOUT_RES( BTN_CANCEL ) )
54 	, aHelpBtn( this, LAYOUT_RES( BTN_HELP ) )
55 {
56     aDialControl.SetRotation( 425 );
57 }
58 
~PluginDialog()59 PluginDialog::~PluginDialog()
60 {
61 }
62