1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir #ifndef _LAYOUT_HXX 29*cdf0e10cSrcweir #define _LAYOUT_HXX 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir #include <com/sun/star/awt/XLayoutContainer.hpp> 32*cdf0e10cSrcweir #include <com/sun/star/uno/XInterface.hpp> 33*cdf0e10cSrcweir #include <com/sun/star/util/Color.hpp> 34*cdf0e10cSrcweir #include <i18npool/lang.h> 35*cdf0e10cSrcweir #include <toolkit/dllapi.h> 36*cdf0e10cSrcweir #include <tools/gen.hxx> 37*cdf0e10cSrcweir #include <tools/link.hxx> 38*cdf0e10cSrcweir #include <tools/string.hxx> 39*cdf0e10cSrcweir #include <vcl/bitmap.hxx> 40*cdf0e10cSrcweir #include <vcl/combobox.h> 41*cdf0e10cSrcweir #include <tools/fldunit.hxx> 42*cdf0e10cSrcweir #include <vcl/lstbox.h> 43*cdf0e10cSrcweir #include <tools/wintypes.hxx> 44*cdf0e10cSrcweir 45*cdf0e10cSrcweir class Button; 46*cdf0e10cSrcweir class ComboBox; 47*cdf0e10cSrcweir class Color; 48*cdf0e10cSrcweir class Control; 49*cdf0e10cSrcweir class Dialog; 50*cdf0e10cSrcweir class Edit; 51*cdf0e10cSrcweir class Font; 52*cdf0e10cSrcweir class Image; 53*cdf0e10cSrcweir class ListBox; 54*cdf0e10cSrcweir class MapMode; 55*cdf0e10cSrcweir class MultiListBox; 56*cdf0e10cSrcweir class NotifyEvent; 57*cdf0e10cSrcweir class Pointer; 58*cdf0e10cSrcweir class PushButton; 59*cdf0e10cSrcweir class RadioButton; 60*cdf0e10cSrcweir class ResId; 61*cdf0e10cSrcweir struct SfxChildWinInfo; 62*cdf0e10cSrcweir //class SvxFontListBox; 63*cdf0e10cSrcweir //class SvxLanguageBox; 64*cdf0e10cSrcweir class TabControl; 65*cdf0e10cSrcweir class TabPage; 66*cdf0e10cSrcweir class VCLXRadioButton; 67*cdf0e10cSrcweir class VCLXWindow; 68*cdf0e10cSrcweir class Window; 69*cdf0e10cSrcweir 70*cdf0e10cSrcweir namespace layoutimpl 71*cdf0e10cSrcweir { 72*cdf0e10cSrcweir class VCLXTabControl; 73*cdf0e10cSrcweir } 74*cdf0e10cSrcweir 75*cdf0e10cSrcweir class VCLXTabControl; 76*cdf0e10cSrcweir 77*cdf0e10cSrcweir namespace com { namespace sun { namespace star { namespace awt { class XWindow; } } } } 78*cdf0e10cSrcweir 79*cdf0e10cSrcweir namespace layout 80*cdf0e10cSrcweir { 81*cdf0e10cSrcweir 82*cdf0e10cSrcweir namespace css = ::com::sun::star; 83*cdf0e10cSrcweir 84*cdf0e10cSrcweir typedef css::uno::Reference< css::uno::XInterface > PeerHandle; 85*cdf0e10cSrcweir class ContextImpl; 86*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC Context 87*cdf0e10cSrcweir { 88*cdf0e10cSrcweir ContextImpl *pImpl; 89*cdf0e10cSrcweir public: 90*cdf0e10cSrcweir Context( char const* pPath ); 91*cdf0e10cSrcweir virtual ~Context(); 92*cdf0e10cSrcweir PeerHandle GetPeerHandle( char const* id, sal_uInt32 nId = 0 ) const; 93*cdf0e10cSrcweir void setToplevel( PeerHandle xToplevel ); 94*cdf0e10cSrcweir PeerHandle getToplevel(); 95*cdf0e10cSrcweir PeerHandle getRoot(); 96*cdf0e10cSrcweir }; 97*cdf0e10cSrcweir 98*cdf0e10cSrcweir // make declaring wrappers easier ... 99*cdf0e10cSrcweir #define DECL_CONSTRUCTORS(t,par,defaultWinBit) \ 100*cdf0e10cSrcweir protected: \ 101*cdf0e10cSrcweir explicit t( WindowImpl *pImpl ) : \ 102*cdf0e10cSrcweir par( pImpl ) {} \ 103*cdf0e10cSrcweir char const* GetUnoName() const; \ 104*cdf0e10cSrcweir public: \ 105*cdf0e10cSrcweir t( Context *context, char const* id, sal_uInt32 nId = 0 ); \ 106*cdf0e10cSrcweir t( Window *parent, WinBits nStyle = defaultWinBit ); \ 107*cdf0e10cSrcweir t (Window *parent, ResId const &res) 108*cdf0e10cSrcweir #define DECL_GET_IMPL(t) \ 109*cdf0e10cSrcweir inline t##Impl &getImpl() const 110*cdf0e10cSrcweir 111*cdf0e10cSrcweir #define DECL_GET_WINDOW( cls ) ::cls* Get##cls() const 112*cdf0e10cSrcweir #define IMPL_GET_WINDOW( cls ) ::cls* cls::Get##cls() const { return dynamic_cast< ::cls*>( GetWindow() ); } 113*cdf0e10cSrcweir 114*cdf0e10cSrcweir #define DECL_GET_VCLXWINDOW( cls ) ::VCLX##cls* GetVCLX##cls() const 115*cdf0e10cSrcweir #define IMPL_GET_VCLXWINDOW( cls ) ::VCLX##cls* cls::Get##VCLX##cls() const { return dynamic_cast< ::VCLX##cls*>( GetVCLXWindow() ); } 116*cdf0e10cSrcweir 117*cdf0e10cSrcweir #define DECL_GET_LAYOUT_VCLXWINDOW( cls ) ::layoutimpl::VCLX##cls* GetVCLX##cls() const 118*cdf0e10cSrcweir #define IMPL_GET_LAYOUT_VCLXWINDOW( cls ) ::layoutimpl::VCLX##cls* cls::Get##VCLX##cls() const { return dynamic_cast< ::layoutimpl::VCLX##cls*>( GetVCLXWindow() ); } 119*cdf0e10cSrcweir 120*cdf0e10cSrcweir // follows the VCL inheritance hierarchy ... 121*cdf0e10cSrcweir 122*cdf0e10cSrcweir class WindowImpl; 123*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC Window 124*cdf0e10cSrcweir { 125*cdf0e10cSrcweir protected: 126*cdf0e10cSrcweir friend class WindowImpl; 127*cdf0e10cSrcweir WindowImpl *mpImpl; 128*cdf0e10cSrcweir static PeerHandle CreatePeer( Window *parent, WinBits nStyle, 129*cdf0e10cSrcweir char const* pName); 130*cdf0e10cSrcweir 131*cdf0e10cSrcweir virtual void setRes (ResId const& res); 132*cdf0e10cSrcweir 133*cdf0e10cSrcweir public: 134*cdf0e10cSrcweir DECL_GET_IMPL( Window ); 135*cdf0e10cSrcweir explicit Window( WindowImpl *pImpl ); 136*cdf0e10cSrcweir virtual ~Window(); 137*cdf0e10cSrcweir 138*cdf0e10cSrcweir PeerHandle GetPeer() const; 139*cdf0e10cSrcweir Context *getContext(); 140*cdf0e10cSrcweir 141*cdf0e10cSrcweir void Enable( bool bEnable = true ); 142*cdf0e10cSrcweir inline void Disable() { Enable( false ); } 143*cdf0e10cSrcweir void Show( bool bVisible = true ); 144*cdf0e10cSrcweir inline void Hide() { Show( false ); } 145*cdf0e10cSrcweir void GrabFocus(); 146*cdf0e10cSrcweir void FreeResource() {} 147*cdf0e10cSrcweir 148*cdf0e10cSrcweir void SetParent( ::Window *parent ); 149*cdf0e10cSrcweir virtual void ParentSet (Window *window); 150*cdf0e10cSrcweir void SetParent( Window *parent ); 151*cdf0e10cSrcweir 152*cdf0e10cSrcweir css::uno::Reference<css::awt::XWindow> GetRef() const; 153*cdf0e10cSrcweir VCLXWindow* GetVCLXWindow() const; 154*cdf0e10cSrcweir ::Window* GetWindow() const; 155*cdf0e10cSrcweir ::Window* GetParent() const; 156*cdf0e10cSrcweir 157*cdf0e10cSrcweir void SetPointer( Pointer const& pointer ); 158*cdf0e10cSrcweir Pointer const& GetPointer() const; 159*cdf0e10cSrcweir WinBits GetStyle(); 160*cdf0e10cSrcweir void SetText( rtl::OUString const& str ); 161*cdf0e10cSrcweir String GetText() const; 162*cdf0e10cSrcweir void SetStyle( WinBits style ); 163*cdf0e10cSrcweir void SetUpdateMode( bool mode ); 164*cdf0e10cSrcweir void SetHelpId( const rtl::OString& id ); 165*cdf0e10cSrcweir const rtl::OString& GetHelpId() const; 166*cdf0e10cSrcweir void EnterWait (); 167*cdf0e10cSrcweir void LeaveWait (); 168*cdf0e10cSrcweir bool IsWait () const; 169*cdf0e10cSrcweir //void Enable (bool enable=true, bool child=true); 170*cdf0e10cSrcweir //void Disable (bool child=true); 171*cdf0e10cSrcweir bool IsEnabled () const; 172*cdf0e10cSrcweir void EnableInput (bool enable=true, bool child=true); 173*cdf0e10cSrcweir bool IsInputEnabled () const; 174*cdf0e10cSrcweir 175*cdf0e10cSrcweir bool IsVisible () const; 176*cdf0e10cSrcweir bool HasChildPathFocus (bool systemWindow=false) const; 177*cdf0e10cSrcweir void SetPosPixel (Point const&); 178*cdf0e10cSrcweir Point GetPosPixel () const; 179*cdf0e10cSrcweir void SetSizePixel (Size const&); 180*cdf0e10cSrcweir Size GetSizePixel () const; 181*cdf0e10cSrcweir void SetPosSizePixel (Point const&, Size const&); 182*cdf0e10cSrcweir sal_Int32 GetCtrlTextWidth (rtl::OUString const& str) const; 183*cdf0e10cSrcweir sal_Int32 GetTextHeight () const; 184*cdf0e10cSrcweir 185*cdf0e10cSrcweir Size LogicToPixel( Size const& size ) const; 186*cdf0e10cSrcweir Size LogicToPixel( Size const& size, MapMode const& mapMode ) const; 187*cdf0e10cSrcweir 188*cdf0e10cSrcweir bool HasFocus () const; 189*cdf0e10cSrcweir Font& GetFont () const; 190*cdf0e10cSrcweir void SetFont (Font const& font); 191*cdf0e10cSrcweir virtual void Invalidate (sal_uInt8 flags=0); 192*cdf0e10cSrcweir }; 193*cdf0e10cSrcweir 194*cdf0e10cSrcweir class ControlImpl; 195*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC Control : public Window 196*cdf0e10cSrcweir { 197*cdf0e10cSrcweir DECL_GET_IMPL( Control ); 198*cdf0e10cSrcweir DECL_CONSTRUCTORS( Control, Window, 0 ); 199*cdf0e10cSrcweir 200*cdf0e10cSrcweir public: 201*cdf0e10cSrcweir ~Control (); 202*cdf0e10cSrcweir void SetGetFocusHdl (Link const& link); 203*cdf0e10cSrcweir Link& GetGetFocusHdl (); 204*cdf0e10cSrcweir void SetLoseFocusHdl (Link const& link); 205*cdf0e10cSrcweir Link& GetLoseFocusHdl (); 206*cdf0e10cSrcweir }; 207*cdf0e10cSrcweir 208*cdf0e10cSrcweir class FixedLineImpl; 209*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC FixedLine : public Control 210*cdf0e10cSrcweir { 211*cdf0e10cSrcweir DECL_GET_IMPL( FixedLine ); 212*cdf0e10cSrcweir DECL_CONSTRUCTORS( FixedLine, Control, WB_HORZ ); 213*cdf0e10cSrcweir 214*cdf0e10cSrcweir public: 215*cdf0e10cSrcweir bool IsEnabled() const; 216*cdf0e10cSrcweir }; 217*cdf0e10cSrcweir 218*cdf0e10cSrcweir class FixedTextImpl; 219*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC FixedText : public Control 220*cdf0e10cSrcweir { 221*cdf0e10cSrcweir DECL_GET_IMPL( FixedText ); 222*cdf0e10cSrcweir DECL_CONSTRUCTORS( FixedText, Control, 0 ); 223*cdf0e10cSrcweir 224*cdf0e10cSrcweir public: 225*cdf0e10cSrcweir ~FixedText (); 226*cdf0e10cSrcweir void SetText( rtl::OUString const& rStr ); 227*cdf0e10cSrcweir }; 228*cdf0e10cSrcweir 229*cdf0e10cSrcweir class FixedImageImpl; 230*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC FixedImage : public Control 231*cdf0e10cSrcweir { 232*cdf0e10cSrcweir DECL_GET_IMPL( FixedImage ); 233*cdf0e10cSrcweir DECL_CONSTRUCTORS( FixedImage, Control, 0 ); 234*cdf0e10cSrcweir public: 235*cdf0e10cSrcweir void setImage( ::Image const& ); 236*cdf0e10cSrcweir }; 237*cdf0e10cSrcweir 238*cdf0e10cSrcweir class FixedInfoImpl; 239*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC FixedInfo : public FixedText 240*cdf0e10cSrcweir { 241*cdf0e10cSrcweir DECL_GET_IMPL( FixedInfo ); 242*cdf0e10cSrcweir DECL_CONSTRUCTORS( FixedInfo, FixedText, 0 ); 243*cdf0e10cSrcweir }; 244*cdf0e10cSrcweir 245*cdf0e10cSrcweir class ImageImpl; 246*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC Image 247*cdf0e10cSrcweir { 248*cdf0e10cSrcweir ImageImpl *pImpl; 249*cdf0e10cSrcweir public: 250*cdf0e10cSrcweir Image( char const* pName ); 251*cdf0e10cSrcweir ~Image(); 252*cdf0e10cSrcweir ImageImpl &getImpl() const { return *pImpl; } 253*cdf0e10cSrcweir }; 254*cdf0e10cSrcweir 255*cdf0e10cSrcweir class ButtonImpl; 256*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC Button : public Control 257*cdf0e10cSrcweir { 258*cdf0e10cSrcweir DECL_GET_IMPL( Button ); 259*cdf0e10cSrcweir DECL_CONSTRUCTORS( Button, Control, 0 ); 260*cdf0e10cSrcweir DECL_GET_WINDOW (Button); 261*cdf0e10cSrcweir 262*cdf0e10cSrcweir public: 263*cdf0e10cSrcweir ~Button (); 264*cdf0e10cSrcweir static String GetStandardText (sal_uInt16 button_type); 265*cdf0e10cSrcweir void SetText( rtl::OUString const& rStr ); 266*cdf0e10cSrcweir bool SetModeImage (Image const& image); 267*cdf0e10cSrcweir bool SetModeImage (::Image const& image, BmpColorMode mode=BMP_COLOR_NORMAL); 268*cdf0e10cSrcweir void SetImageAlign( ImageAlign eAlign ); 269*cdf0e10cSrcweir 270*cdf0e10cSrcweir void SetClickHdl( Link const& rLink ); 271*cdf0e10cSrcweir virtual void Click() /* pure virtual? */; 272*cdf0e10cSrcweir Link& GetClickHdl (); 273*cdf0e10cSrcweir }; 274*cdf0e10cSrcweir 275*cdf0e10cSrcweir class PushButtonImpl; 276*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC PushButton : public Button 277*cdf0e10cSrcweir { 278*cdf0e10cSrcweir DECL_GET_IMPL( PushButton ); 279*cdf0e10cSrcweir DECL_CONSTRUCTORS( PushButton, Button, 0 ); 280*cdf0e10cSrcweir DECL_GET_WINDOW (PushButton); 281*cdf0e10cSrcweir 282*cdf0e10cSrcweir public: 283*cdf0e10cSrcweir ~PushButton (); 284*cdf0e10cSrcweir void Check( bool bCheck=true ); 285*cdf0e10cSrcweir bool IsChecked() const; 286*cdf0e10cSrcweir 287*cdf0e10cSrcweir void Toggle(); 288*cdf0e10cSrcweir void SetToggleHdl( Link const& rLink ); 289*cdf0e10cSrcweir }; 290*cdf0e10cSrcweir 291*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC OKButton : public PushButton 292*cdf0e10cSrcweir { 293*cdf0e10cSrcweir DECL_CONSTRUCTORS( OKButton, PushButton, WB_DEFBUTTON ); 294*cdf0e10cSrcweir }; 295*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC CancelButton : public PushButton 296*cdf0e10cSrcweir { 297*cdf0e10cSrcweir DECL_CONSTRUCTORS( CancelButton, PushButton, 0 ); 298*cdf0e10cSrcweir }; 299*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC YesButton : public PushButton 300*cdf0e10cSrcweir { 301*cdf0e10cSrcweir DECL_CONSTRUCTORS( YesButton, PushButton, WB_DEFBUTTON ); 302*cdf0e10cSrcweir }; 303*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC NoButton : public PushButton 304*cdf0e10cSrcweir { 305*cdf0e10cSrcweir DECL_CONSTRUCTORS( NoButton, PushButton, 0 ); 306*cdf0e10cSrcweir }; 307*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC RetryButton : public PushButton 308*cdf0e10cSrcweir { 309*cdf0e10cSrcweir DECL_CONSTRUCTORS( RetryButton, PushButton, 0 ); 310*cdf0e10cSrcweir }; 311*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC IgnoreButton : public PushButton 312*cdf0e10cSrcweir { 313*cdf0e10cSrcweir DECL_CONSTRUCTORS( IgnoreButton, PushButton, 0 ); 314*cdf0e10cSrcweir }; 315*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC ResetButton : public PushButton 316*cdf0e10cSrcweir { 317*cdf0e10cSrcweir DECL_CONSTRUCTORS( ResetButton, PushButton, 0 ); 318*cdf0e10cSrcweir }; 319*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC ApplyButton : public PushButton 320*cdf0e10cSrcweir { 321*cdf0e10cSrcweir DECL_CONSTRUCTORS( ApplyButton, PushButton, 0 ); 322*cdf0e10cSrcweir }; 323*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC HelpButton : public PushButton 324*cdf0e10cSrcweir { 325*cdf0e10cSrcweir DECL_CONSTRUCTORS( HelpButton, PushButton, 0 ); 326*cdf0e10cSrcweir }; 327*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC ImageButton : public PushButton 328*cdf0e10cSrcweir { 329*cdf0e10cSrcweir DECL_CONSTRUCTORS( ImageButton, PushButton, 0 ); 330*cdf0e10cSrcweir }; 331*cdf0e10cSrcweir 332*cdf0e10cSrcweir class AdvancedButtonImpl; 333*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC AdvancedButton : public PushButton 334*cdf0e10cSrcweir { 335*cdf0e10cSrcweir DECL_CONSTRUCTORS( AdvancedButton, PushButton, 0 ); 336*cdf0e10cSrcweir DECL_GET_IMPL( AdvancedButton ); 337*cdf0e10cSrcweir 338*cdf0e10cSrcweir void AddAdvanced( Window* w ); 339*cdf0e10cSrcweir void AddSimple( Window* w ); 340*cdf0e10cSrcweir void RemoveAdvanced( Window* w ); 341*cdf0e10cSrcweir void RemoveSimple( Window* w ); 342*cdf0e10cSrcweir 343*cdf0e10cSrcweir void SetAdvancedText (rtl::OUString const& text); 344*cdf0e10cSrcweir void SetSimpleText (rtl::OUString const& text); 345*cdf0e10cSrcweir rtl::OUString GetAdvancedText () const; 346*cdf0e10cSrcweir rtl::OUString GetSimpleText () const; 347*cdf0e10cSrcweir void SetDelta (int); 348*cdf0e10cSrcweir }; 349*cdf0e10cSrcweir 350*cdf0e10cSrcweir class MoreButtonImpl; 351*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC MoreButton : public AdvancedButton 352*cdf0e10cSrcweir { 353*cdf0e10cSrcweir DECL_CONSTRUCTORS( MoreButton, AdvancedButton, 0 ); 354*cdf0e10cSrcweir DECL_GET_IMPL( MoreButton ); 355*cdf0e10cSrcweir void AddWindow( Window* w ); 356*cdf0e10cSrcweir void RemoveWindow( Window* w ); 357*cdf0e10cSrcweir 358*cdf0e10cSrcweir void SetMoreText (rtl::OUString const& text); 359*cdf0e10cSrcweir void SetLessText (rtl::OUString const& text); 360*cdf0e10cSrcweir rtl::OUString GetMoreText () const; 361*cdf0e10cSrcweir rtl::OUString GetLessText () const; 362*cdf0e10cSrcweir }; 363*cdf0e10cSrcweir 364*cdf0e10cSrcweir class RadioButtonImpl; 365*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC RadioButton : public Button 366*cdf0e10cSrcweir { 367*cdf0e10cSrcweir DECL_GET_IMPL( RadioButton ); 368*cdf0e10cSrcweir DECL_CONSTRUCTORS( RadioButton, Button, 0 ); 369*cdf0e10cSrcweir DECL_GET_WINDOW( RadioButton ); 370*cdf0e10cSrcweir DECL_GET_VCLXWINDOW( RadioButton ); 371*cdf0e10cSrcweir public: 372*cdf0e10cSrcweir ~RadioButton (); 373*cdf0e10cSrcweir void Check( bool bCheck=true ); 374*cdf0e10cSrcweir bool IsChecked() const; 375*cdf0e10cSrcweir 376*cdf0e10cSrcweir void Toggle(); 377*cdf0e10cSrcweir void SetToggleHdl( Link const& rLink ); 378*cdf0e10cSrcweir }; 379*cdf0e10cSrcweir 380*cdf0e10cSrcweir class CheckBoxImpl; 381*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC CheckBox : public Button 382*cdf0e10cSrcweir { 383*cdf0e10cSrcweir DECL_GET_IMPL( CheckBox ); 384*cdf0e10cSrcweir DECL_CONSTRUCTORS( CheckBox, Button, 0 ); 385*cdf0e10cSrcweir 386*cdf0e10cSrcweir public: 387*cdf0e10cSrcweir ~CheckBox (); 388*cdf0e10cSrcweir void Check( bool bCheck=true ); 389*cdf0e10cSrcweir bool IsChecked() const; 390*cdf0e10cSrcweir 391*cdf0e10cSrcweir void Toggle(); 392*cdf0e10cSrcweir void SetToggleHdl( Link const& rLink ); 393*cdf0e10cSrcweir }; 394*cdf0e10cSrcweir 395*cdf0e10cSrcweir class EditImpl; 396*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC Edit : public Control 397*cdf0e10cSrcweir { 398*cdf0e10cSrcweir DECL_GET_IMPL( Edit ); 399*cdf0e10cSrcweir DECL_CONSTRUCTORS( Edit, Control, WB_BORDER ); 400*cdf0e10cSrcweir DECL_GET_WINDOW (Edit); 401*cdf0e10cSrcweir 402*cdf0e10cSrcweir public: 403*cdf0e10cSrcweir ~Edit (); 404*cdf0e10cSrcweir void SetText( rtl::OUString const& rStr ); 405*cdf0e10cSrcweir String GetText() const; 406*cdf0e10cSrcweir void SetModifyHdl( Link const& rLink ); 407*cdf0e10cSrcweir void SetSelection( Selection const& rSelection ); 408*cdf0e10cSrcweir }; 409*cdf0e10cSrcweir 410*cdf0e10cSrcweir class MultiLineEditImpl; 411*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC MultiLineEdit : public Edit 412*cdf0e10cSrcweir { 413*cdf0e10cSrcweir DECL_GET_IMPL( MultiLineEdit ); 414*cdf0e10cSrcweir DECL_CONSTRUCTORS( MultiLineEdit, Edit, WB_LEFT|WB_BORDER ); 415*cdf0e10cSrcweir }; 416*cdf0e10cSrcweir 417*cdf0e10cSrcweir class SpinFieldImpl; 418*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC SpinField : public Edit 419*cdf0e10cSrcweir { 420*cdf0e10cSrcweir DECL_GET_IMPL( SpinField ); 421*cdf0e10cSrcweir DECL_CONSTRUCTORS( SpinField, Edit, 0 ); 422*cdf0e10cSrcweir }; 423*cdf0e10cSrcweir 424*cdf0e10cSrcweir class FormatterBaseImpl; 425*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC FormatterBase 426*cdf0e10cSrcweir { 427*cdf0e10cSrcweir protected: 428*cdf0e10cSrcweir FormatterBaseImpl *mpFormatImpl; 429*cdf0e10cSrcweir FormatterBase( FormatterBaseImpl *pFormatImpl ); 430*cdf0e10cSrcweir }; 431*cdf0e10cSrcweir 432*cdf0e10cSrcweir class NumericFormatterImpl; 433*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC NumericFormatter : public FormatterBase 434*cdf0e10cSrcweir { 435*cdf0e10cSrcweir protected: 436*cdf0e10cSrcweir explicit NumericFormatter( FormatterBaseImpl *pImpl ); 437*cdf0e10cSrcweir NumericFormatterImpl &getFormatImpl() const; 438*cdf0e10cSrcweir public: 439*cdf0e10cSrcweir void SetMin( sal_Int64 nNewMin ); 440*cdf0e10cSrcweir void SetMax( sal_Int64 nNewMax ); 441*cdf0e10cSrcweir void SetFirst( sal_Int64 nNewFirst ); 442*cdf0e10cSrcweir void SetLast( sal_Int64 nNewLast ); 443*cdf0e10cSrcweir void SetSpinSize( sal_Int64 nNewSize ); 444*cdf0e10cSrcweir 445*cdf0e10cSrcweir void SetValue( sal_Int64 nNewValue ); 446*cdf0e10cSrcweir sal_Int64 GetValue() const; 447*cdf0e10cSrcweir }; 448*cdf0e10cSrcweir 449*cdf0e10cSrcweir class NumericFieldImpl; 450*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC NumericField : public SpinField, public NumericFormatter 451*cdf0e10cSrcweir { 452*cdf0e10cSrcweir DECL_GET_IMPL( NumericField ); 453*cdf0e10cSrcweir public: 454*cdf0e10cSrcweir NumericField( Context *context, char const* id, sal_uInt32 nId=0 ); 455*cdf0e10cSrcweir NumericField( Window *parent, WinBits nStyle ); 456*cdf0e10cSrcweir }; 457*cdf0e10cSrcweir 458*cdf0e10cSrcweir class MetricFormatterImpl; 459*cdf0e10cSrcweir // Different inheritance to save code 460*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC MetricFormatter : public FormatterBase 461*cdf0e10cSrcweir { 462*cdf0e10cSrcweir protected: 463*cdf0e10cSrcweir explicit MetricFormatter( FormatterBaseImpl *pImpl ); 464*cdf0e10cSrcweir MetricFormatterImpl &getFormatImpl() const; 465*cdf0e10cSrcweir public: 466*cdf0e10cSrcweir void SetMin( sal_Int64 nNewMin, FieldUnit nUnit=FUNIT_NONE ); 467*cdf0e10cSrcweir void SetMax( sal_Int64 nNewMax, FieldUnit nUnit=FUNIT_NONE ); 468*cdf0e10cSrcweir void SetFirst( sal_Int64 nNewFirst, FieldUnit nUnit=FUNIT_NONE ); 469*cdf0e10cSrcweir void SetLast( sal_Int64 nNewLast, FieldUnit nUnit=FUNIT_NONE ); 470*cdf0e10cSrcweir void SetValue( sal_Int64 nNewValue, FieldUnit nUnit=FUNIT_NONE ); 471*cdf0e10cSrcweir sal_Int64 GetValue( FieldUnit nUnit=FUNIT_NONE ) const; 472*cdf0e10cSrcweir 473*cdf0e10cSrcweir void SetSpinSize( sal_Int64 nNewSize ); 474*cdf0e10cSrcweir }; 475*cdf0e10cSrcweir 476*cdf0e10cSrcweir class MetricFieldImpl; 477*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC MetricField : public SpinField, public MetricFormatter 478*cdf0e10cSrcweir { 479*cdf0e10cSrcweir DECL_GET_IMPL( MetricField ); 480*cdf0e10cSrcweir public: 481*cdf0e10cSrcweir MetricField( Context *context, char const* id, sal_uInt32 nId=0 ); 482*cdf0e10cSrcweir MetricField( Window *parent, WinBits nStyle ); 483*cdf0e10cSrcweir }; 484*cdf0e10cSrcweir 485*cdf0e10cSrcweir class ComboBoxImpl; 486*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC ComboBox : public Edit 487*cdf0e10cSrcweir { 488*cdf0e10cSrcweir DECL_GET_IMPL( ComboBox ); 489*cdf0e10cSrcweir DECL_GET_WINDOW (ComboBox ); 490*cdf0e10cSrcweir DECL_CONSTRUCTORS( ComboBox, Edit, 0 ); 491*cdf0e10cSrcweir 492*cdf0e10cSrcweir public: 493*cdf0e10cSrcweir ~ComboBox (); 494*cdf0e10cSrcweir sal_uInt16 InsertEntry( String const& rStr, sal_uInt16 nPos=COMBOBOX_APPEND ); 495*cdf0e10cSrcweir void RemoveEntry( String const& rStr ); 496*cdf0e10cSrcweir void RemoveEntry( sal_uInt16 nPos ); 497*cdf0e10cSrcweir void Clear(); 498*cdf0e10cSrcweir 499*cdf0e10cSrcweir sal_uInt16 GetEntryPos( String const& rStr ) const; 500*cdf0e10cSrcweir String GetEntry( sal_uInt16 nPos ) const; 501*cdf0e10cSrcweir sal_uInt16 GetEntryCount() const; 502*cdf0e10cSrcweir 503*cdf0e10cSrcweir void SetClickHdl( Link const& rLink ); 504*cdf0e10cSrcweir void SetSelectHdl( Link const& rLink ); 505*cdf0e10cSrcweir void EnableAutocomplete (bool enable, bool matchCase=false ); 506*cdf0e10cSrcweir }; 507*cdf0e10cSrcweir 508*cdf0e10cSrcweir class ListBoxImpl; 509*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC ListBox : public Control 510*cdf0e10cSrcweir { 511*cdf0e10cSrcweir DECL_GET_IMPL( ListBox ); 512*cdf0e10cSrcweir DECL_CONSTRUCTORS( ListBox, Control, WB_BORDER ); 513*cdf0e10cSrcweir DECL_GET_WINDOW (ListBox); 514*cdf0e10cSrcweir 515*cdf0e10cSrcweir public: 516*cdf0e10cSrcweir ~ListBox (); 517*cdf0e10cSrcweir sal_uInt16 InsertEntry( String const& rStr, sal_uInt16 nPos=LISTBOX_APPEND ); 518*cdf0e10cSrcweir 519*cdf0e10cSrcweir void RemoveEntry( String const& rStr ); 520*cdf0e10cSrcweir void RemoveEntry( sal_uInt16 nPos ); 521*cdf0e10cSrcweir void Clear(); 522*cdf0e10cSrcweir 523*cdf0e10cSrcweir sal_uInt16 GetEntryPos( String const& rStr ) const; 524*cdf0e10cSrcweir String GetEntry( sal_uInt16 nPos ) const; 525*cdf0e10cSrcweir sal_uInt16 GetEntryCount() const; 526*cdf0e10cSrcweir 527*cdf0e10cSrcweir void SelectEntry( String const& rStr, bool bSelect=true ); 528*cdf0e10cSrcweir void SelectEntryPos( sal_uInt16 nPos, bool bSelect=true ); 529*cdf0e10cSrcweir 530*cdf0e10cSrcweir sal_uInt16 GetSelectEntryCount() const; 531*cdf0e10cSrcweir String GetSelectEntry( sal_uInt16 nSelIndex=0 ) const; 532*cdf0e10cSrcweir sal_uInt16 GetSelectEntryPos( sal_uInt16 nSelIndex=0 ) const; 533*cdf0e10cSrcweir 534*cdf0e10cSrcweir void SetSelectHdl (Link const& link); 535*cdf0e10cSrcweir Link& GetSelectHdl (); 536*cdf0e10cSrcweir 537*cdf0e10cSrcweir void SetClickHdl (Link const& link); 538*cdf0e10cSrcweir Link& GetClickHdl (); 539*cdf0e10cSrcweir 540*cdf0e10cSrcweir void SetDoubleClickHdl (Link const& link); 541*cdf0e10cSrcweir Link& GetDoubleClickHdl (); 542*cdf0e10cSrcweir 543*cdf0e10cSrcweir void SetEntryData (sal_uInt16 pos, void* data); 544*cdf0e10cSrcweir void* GetEntryData (sal_uInt16 pos) const; 545*cdf0e10cSrcweir 546*cdf0e10cSrcweir virtual void SetNoSelection (); 547*cdf0e10cSrcweir }; 548*cdf0e10cSrcweir 549*cdf0e10cSrcweir class MultiListBoxImpl; 550*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC MultiListBox : public ListBox 551*cdf0e10cSrcweir { 552*cdf0e10cSrcweir DECL_GET_IMPL( MultiListBox ); 553*cdf0e10cSrcweir DECL_CONSTRUCTORS( MultiListBox, ListBox, 0 ); 554*cdf0e10cSrcweir DECL_GET_WINDOW( MultiListBox ); 555*cdf0e10cSrcweir }; 556*cdf0e10cSrcweir 557*cdf0e10cSrcweir class DialogImpl; 558*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC Dialog : public Context, public Window 559*cdf0e10cSrcweir { 560*cdf0e10cSrcweir DECL_GET_WINDOW (Dialog); 561*cdf0e10cSrcweir 562*cdf0e10cSrcweir public: 563*cdf0e10cSrcweir DECL_GET_IMPL (Dialog); 564*cdf0e10cSrcweir Dialog( Window *parent, char const* xml_file, char const* id, sal_uInt32 nId=0 ); 565*cdf0e10cSrcweir Dialog( ::Window *parent, char const* xml_file, char const* id, sal_uInt32 nId=0 ); 566*cdf0e10cSrcweir ~Dialog (); 567*cdf0e10cSrcweir virtual short Execute(); 568*cdf0e10cSrcweir void EndDialog( long nResult=0 ); 569*cdf0e10cSrcweir void SetText( rtl::OUString const& rStr ); 570*cdf0e10cSrcweir void SetTitle (rtl::OUString const& rStr ); 571*cdf0e10cSrcweir bool Close (); 572*cdf0e10cSrcweir long Notify (NotifyEvent & event); 573*cdf0e10cSrcweir 574*cdf0e10cSrcweir // Sxf*Dialog 575*cdf0e10cSrcweir bool bConstruct; 576*cdf0e10cSrcweir void Initialize (SfxChildWinInfo*); 577*cdf0e10cSrcweir }; 578*cdf0e10cSrcweir 579*cdf0e10cSrcweir #define DECL_MESSAGE_BOX_CTORS(Name)\ 580*cdf0e10cSrcweir public:\ 581*cdf0e10cSrcweir Name##Box (::Window *parent, char const* message,\ 582*cdf0e10cSrcweir char const* yes=0, char const* no=0, const rtl::OString& help_id=rtl::OString(),\ 583*cdf0e10cSrcweir char const* xml_file="message-box.xml", char const* id="message-box");\ 584*cdf0e10cSrcweir Name##Box (::Window *parent, rtl::OUString const& message,\ 585*cdf0e10cSrcweir rtl::OUString yes=String (),\ 586*cdf0e10cSrcweir rtl::OUString no=String (),\ 587*cdf0e10cSrcweir const rtl::OString& help_id=rtl::OString(),\ 588*cdf0e10cSrcweir char const* xml_file="message-box.xml", char const* id="message-box");\ 589*cdf0e10cSrcweir Name##Box (::Window *parent, WinBits, char const* message,\ 590*cdf0e10cSrcweir char const* yes=0, char const* no=0, const rtl::OString& help_id=rtl::OString(),\ 591*cdf0e10cSrcweir char const* xml_file="message-box.xml", char const* id="message-box");\ 592*cdf0e10cSrcweir Name##Box (::Window *parent, WinBits, rtl::OUString const& message,\ 593*cdf0e10cSrcweir rtl::OUString yes=String (),\ 594*cdf0e10cSrcweir rtl::OUString no=String (),\ 595*cdf0e10cSrcweir const rtl::OString& help_id=rtl::OString(),\ 596*cdf0e10cSrcweir char const* xml_file="message-box.xml", char const* id="message-box")\ 597*cdf0e10cSrcweir 598*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC MessageBox : public Dialog 599*cdf0e10cSrcweir { 600*cdf0e10cSrcweir DECL_MESSAGE_BOX_CTORS(Message); 601*cdf0e10cSrcweir 602*cdf0e10cSrcweir protected: 603*cdf0e10cSrcweir FixedImage imageError; 604*cdf0e10cSrcweir FixedImage imageInfo; 605*cdf0e10cSrcweir FixedImage imageQuery; 606*cdf0e10cSrcweir FixedImage imageWarning; 607*cdf0e10cSrcweir FixedText messageText; 608*cdf0e10cSrcweir CancelButton cancelButton; 609*cdf0e10cSrcweir HelpButton helpButton; 610*cdf0e10cSrcweir IgnoreButton ignoreButton; 611*cdf0e10cSrcweir NoButton noButton; 612*cdf0e10cSrcweir RetryButton retryButton; 613*cdf0e10cSrcweir YesButton yesButton; 614*cdf0e10cSrcweir 615*cdf0e10cSrcweir void bits_init (WinBits bits, rtl::OUString const& message, 616*cdf0e10cSrcweir rtl::OUString yes, rtl::OUString, const rtl::OString& help_id); 617*cdf0e10cSrcweir void init (rtl::OUString const& message, 618*cdf0e10cSrcweir rtl::OUString const& yes, rtl::OUString const& no, const rtl::OString& help_id); 619*cdf0e10cSrcweir void init (char const* message, char const* yes, char const* no, const rtl::OString& help_id); 620*cdf0e10cSrcweir }; 621*cdf0e10cSrcweir 622*cdf0e10cSrcweir #define CLASS_MESSAGE_BOX(Name)\ 623*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC Name##Box : public MessageBox\ 624*cdf0e10cSrcweir {\ 625*cdf0e10cSrcweir DECL_MESSAGE_BOX_CTORS (Name);\ 626*cdf0e10cSrcweir } 627*cdf0e10cSrcweir 628*cdf0e10cSrcweir //CLASS_MESSAGE_BOX (Mess); 629*cdf0e10cSrcweir typedef MessageBox MessBox; 630*cdf0e10cSrcweir CLASS_MESSAGE_BOX (Error); 631*cdf0e10cSrcweir CLASS_MESSAGE_BOX (Info); 632*cdf0e10cSrcweir CLASS_MESSAGE_BOX (Query); 633*cdf0e10cSrcweir CLASS_MESSAGE_BOX (Warning); 634*cdf0e10cSrcweir 635*cdf0e10cSrcweir #undef CLASS_MESSAGE_BOX 636*cdf0e10cSrcweir 637*cdf0e10cSrcweir #undef TAB_APPEND 638*cdf0e10cSrcweir 639*cdf0e10cSrcweir class TabControlImpl; 640*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC TabControl : public Control 641*cdf0e10cSrcweir { 642*cdf0e10cSrcweir //#ifndef TAB_APPEND 643*cdf0e10cSrcweir #define TAB_APPEND 0xFFFF 644*cdf0e10cSrcweir //#endif /* !TAB_APPEND */ 645*cdf0e10cSrcweir 646*cdf0e10cSrcweir DECL_GET_IMPL (TabControl); 647*cdf0e10cSrcweir DECL_CONSTRUCTORS (TabControl, Control, 0); 648*cdf0e10cSrcweir DECL_GET_WINDOW (TabControl); 649*cdf0e10cSrcweir DECL_GET_LAYOUT_VCLXWINDOW (TabControl); 650*cdf0e10cSrcweir 651*cdf0e10cSrcweir public: 652*cdf0e10cSrcweir ~TabControl (); 653*cdf0e10cSrcweir void InsertPage (sal_uInt16 id, rtl::OUString const& title, sal_uInt16 pos=TAB_APPEND); 654*cdf0e10cSrcweir void RemovePage (sal_uInt16 id); 655*cdf0e10cSrcweir sal_uInt16 GetPageCount () const; 656*cdf0e10cSrcweir sal_uInt16 GetPageId (sal_uInt16 pos) const; 657*cdf0e10cSrcweir sal_uInt16 GetPagePos (sal_uInt16 id) const; 658*cdf0e10cSrcweir void SetCurPageId (sal_uInt16 id); 659*cdf0e10cSrcweir sal_uInt16 GetCurPageId () const; 660*cdf0e10cSrcweir void SetTabPage (sal_uInt16 id, ::TabPage* page); 661*cdf0e10cSrcweir ::TabPage* GetTabPage (sal_uInt16 id) const; 662*cdf0e10cSrcweir void SetActivatePageHdl (Link const& link); 663*cdf0e10cSrcweir Link& GetActivatePageHdl () const; 664*cdf0e10cSrcweir void SetDeactivatePageHdl (Link const& link); 665*cdf0e10cSrcweir Link& GetDeactivatePageHdl () const; 666*cdf0e10cSrcweir void SetTabPageSizePixel (Size const& size); 667*cdf0e10cSrcweir Size GetTabPageSizePixel () const; 668*cdf0e10cSrcweir }; 669*cdf0e10cSrcweir 670*cdf0e10cSrcweir class TabPageImpl; 671*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC TabPage : public Context, public Window 672*cdf0e10cSrcweir { 673*cdf0e10cSrcweir DECL_GET_IMPL( TabPage ); 674*cdf0e10cSrcweir public: 675*cdf0e10cSrcweir static ::Window* global_parent; 676*cdf0e10cSrcweir static TabControl* global_tabcontrol; 677*cdf0e10cSrcweir 678*cdf0e10cSrcweir TabPage( Window *parent, char const* xml_file, char const* id, sal_uInt32 nId=0 ); 679*cdf0e10cSrcweir TabPage( ::Window *parent, char const* xml_file, char const* id, sal_uInt32 nId=0 ); 680*cdf0e10cSrcweir ~TabPage(); 681*cdf0e10cSrcweir DECL_GET_WINDOW( TabPage ); 682*cdf0e10cSrcweir virtual void ActivatePage(); 683*cdf0e10cSrcweir virtual void DeactivatePage(); 684*cdf0e10cSrcweir }; 685*cdf0e10cSrcweir 686*cdf0e10cSrcweir class ProgressBarImpl; 687*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC ProgressBar : public Control 688*cdf0e10cSrcweir { 689*cdf0e10cSrcweir DECL_GET_IMPL( ProgressBar ); 690*cdf0e10cSrcweir DECL_CONSTRUCTORS( ProgressBar, Control, WB_BORDER ); 691*cdf0e10cSrcweir public: 692*cdf0e10cSrcweir void SetForegroundColor( css::util::Color color ); 693*cdf0e10cSrcweir void SetBackgroundColor( css::util::Color color ); 694*cdf0e10cSrcweir void SetValue( sal_Int32 i ); 695*cdf0e10cSrcweir void SetRange( sal_Int32 min, sal_Int32 max ); 696*cdf0e10cSrcweir sal_Int32 GetValue(); 697*cdf0e10cSrcweir }; 698*cdf0e10cSrcweir 699*cdf0e10cSrcweir // ----------------------------------------------------------------- 700*cdf0e10cSrcweir // layout container / helper wrappers 701*cdf0e10cSrcweir // ----------------------------------------------------------------- 702*cdf0e10cSrcweir 703*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC Container 704*cdf0e10cSrcweir { 705*cdf0e10cSrcweir protected: 706*cdf0e10cSrcweir css::uno::Reference< css::awt::XLayoutContainer > mxContainer; 707*cdf0e10cSrcweir Container( rtl::OUString const& rName, sal_Int32 nBorder ); 708*cdf0e10cSrcweir public: 709*cdf0e10cSrcweir Container( Context const* context, char const* id ); 710*cdf0e10cSrcweir 711*cdf0e10cSrcweir void Add( Window *pWindow ); 712*cdf0e10cSrcweir void Add( Container *pContainer ); 713*cdf0e10cSrcweir 714*cdf0e10cSrcweir void Remove( Window *pWindow ); 715*cdf0e10cSrcweir void Remove( Container *pContainer ); 716*cdf0e10cSrcweir void Clear(); 717*cdf0e10cSrcweir // we can't really do a GetChildren() as they don't have a common class, 718*cdf0e10cSrcweir // besides we would need to keep track of children, uh 719*cdf0e10cSrcweir 720*cdf0e10cSrcweir void ShowAll( bool bVisible ); 721*cdf0e10cSrcweir void Show(); 722*cdf0e10cSrcweir void Hide(); 723*cdf0e10cSrcweir 724*cdf0e10cSrcweir css::uno::Reference< css::awt::XLayoutContainer > getImpl() 725*cdf0e10cSrcweir { return mxContainer; } 726*cdf0e10cSrcweir }; 727*cdf0e10cSrcweir 728*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC Table : public Container 729*cdf0e10cSrcweir { 730*cdf0e10cSrcweir protected: 731*cdf0e10cSrcweir Table( sal_Int32 nBorder, sal_Int32 nColumns ); 732*cdf0e10cSrcweir public: 733*cdf0e10cSrcweir Table( Context const* context, char const* id ); 734*cdf0e10cSrcweir void Add( Window *pWindow, bool bXExpand, bool bYExpand, 735*cdf0e10cSrcweir sal_Int32 nXSpan=1, sal_Int32 nYSpan=1 ); 736*cdf0e10cSrcweir void Add( Container *pContainer, bool bXExpand, bool bYExpand, 737*cdf0e10cSrcweir sal_Int32 nXSpan=1, sal_Int32 nYSpan=1 ); 738*cdf0e10cSrcweir 739*cdf0e10cSrcweir private: 740*cdf0e10cSrcweir void setProps( css::uno::Reference< css::awt::XLayoutConstrains > xChild, 741*cdf0e10cSrcweir bool bXExpand, bool bYExpand, sal_Int32 nXSpan, sal_Int32 nYSpan ); 742*cdf0e10cSrcweir }; 743*cdf0e10cSrcweir 744*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC Box : public Container 745*cdf0e10cSrcweir { 746*cdf0e10cSrcweir protected: 747*cdf0e10cSrcweir Box( rtl::OUString const& rName, sal_Int32 nBorder, bool bHomogeneous ); 748*cdf0e10cSrcweir public: 749*cdf0e10cSrcweir Box( Context const* context, char const* id ); 750*cdf0e10cSrcweir void Add( Window *pWindow, bool bExpand, bool bFill, sal_Int32 nPadding); 751*cdf0e10cSrcweir void Add( Container *pContainer, bool bExpand, bool bFill, sal_Int32 nPadding); 752*cdf0e10cSrcweir 753*cdf0e10cSrcweir private: 754*cdf0e10cSrcweir void setProps( css::uno::Reference< css::awt::XLayoutConstrains > xChild, 755*cdf0e10cSrcweir bool bXExpand, bool bYExpand, sal_Int32 nPadding ); 756*cdf0e10cSrcweir }; 757*cdf0e10cSrcweir 758*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC HBox : public Box 759*cdf0e10cSrcweir { 760*cdf0e10cSrcweir public: 761*cdf0e10cSrcweir HBox( Context const* context, char const* id ); 762*cdf0e10cSrcweir HBox( sal_Int32 nBorder, bool bHomogeneous ); 763*cdf0e10cSrcweir }; 764*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC VBox : public Box 765*cdf0e10cSrcweir { 766*cdf0e10cSrcweir public: 767*cdf0e10cSrcweir VBox( Context const* context, char const* id ); 768*cdf0e10cSrcweir VBox( sal_Int32 nBorder, bool bHomogeneous ); 769*cdf0e10cSrcweir }; 770*cdf0e10cSrcweir 771*cdf0e10cSrcweir class PluginImpl; 772*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC Plugin : public Control 773*cdf0e10cSrcweir { 774*cdf0e10cSrcweir DECL_GET_IMPL( Plugin ); 775*cdf0e10cSrcweir //DECL_CONSTRUCTORS( Plugin, Control, 0 ); 776*cdf0e10cSrcweir public: 777*cdf0e10cSrcweir ::Control *mpPlugin; 778*cdf0e10cSrcweir Plugin( Context *context, char const* id, ::Control *plugin ); 779*cdf0e10cSrcweir }; 780*cdf0e10cSrcweir 781*cdf0e10cSrcweir class LocalizedStringImpl; 782*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC LocalizedString : public Window 783*cdf0e10cSrcweir { 784*cdf0e10cSrcweir DECL_GET_IMPL( LocalizedString ); 785*cdf0e10cSrcweir 786*cdf0e10cSrcweir public: 787*cdf0e10cSrcweir LocalizedString( Context *context, char const* id ); 788*cdf0e10cSrcweir 789*cdf0e10cSrcweir rtl::OUString operator= (rtl::OUString const&); 790*cdf0e10cSrcweir rtl::OUString operator+= (sal_Unicode ); 791*cdf0e10cSrcweir rtl::OUString operator+= (rtl::OUString const&); 792*cdf0e10cSrcweir 793*cdf0e10cSrcweir operator rtl::OUString (); 794*cdf0e10cSrcweir operator rtl::OUString const& (); 795*cdf0e10cSrcweir operator String(); 796*cdf0e10cSrcweir String getString (); 797*cdf0e10cSrcweir rtl::OUString getOUString (); 798*cdf0e10cSrcweir String GetToken (sal_uInt16 i, sal_Char c); 799*cdf0e10cSrcweir }; 800*cdf0e10cSrcweir 801*cdf0e10cSrcweir class InPlugImpl; 802*cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC InPlug : public Context, public Window 803*cdf0e10cSrcweir { 804*cdf0e10cSrcweir DECL_GET_IMPL (InPlug); 805*cdf0e10cSrcweir 806*cdf0e10cSrcweir public: 807*cdf0e10cSrcweir InPlug ( Window *parent, char const* xml_file, char const* id, sal_uInt32 nId=0); 808*cdf0e10cSrcweir InPlug ( ::Window *parent, char const* xml_file, char const* id, sal_uInt32 nId=0); 809*cdf0e10cSrcweir 810*cdf0e10cSrcweir void ParentSet (Window *window); 811*cdf0e10cSrcweir }; 812*cdf0e10cSrcweir 813*cdf0e10cSrcweir } // end namespace layout 814*cdf0e10cSrcweir 815*cdf0e10cSrcweir #if ENABLE_LAYOUT 816*cdf0e10cSrcweir #define LAYOUT_NS layout:: 817*cdf0e10cSrcweir #define LAYOUT_DIALOG_PARENT\ 818*cdf0e10cSrcweir VCLXWindow::GetImplementation( uno::Reference <awt::XWindow> ( GetPeer(), uno::UNO_QUERY ) )->GetWindow() 819*cdf0e10cSrcweir #define LAYOUT_THIS_WINDOW( this ) this->GetWindow () 820*cdf0e10cSrcweir #else /* !ENABLE_LAYOUT */ 821*cdf0e10cSrcweir #define LAYOUT_NS 822*cdf0e10cSrcweir #define LAYOUT_DIALOG_PARENT this 823*cdf0e10cSrcweir #define LAYOUT_THIS_WINDOW( this ) this 824*cdf0e10cSrcweir #endif /* !ENABLE_LAYOUT */ 825*cdf0e10cSrcweir 826*cdf0e10cSrcweir #endif /* _LAYOUT_HXX */ 827