vcl: rename VclReference to VclPtr
and remove the typedefs. The code is more obvious this way. Change-Id: I4c8f5b5ab050dd96216302a03e760ed0e3ab3464
This commit is contained in:
parent
10981bc4e3
commit
a632fa5f2e
@ -72,7 +72,7 @@ bool VCLWidgets::VisitFieldDecl(const FieldDecl * fieldDecl) {
|
|||||||
|
|
||||||
report(
|
report(
|
||||||
DiagnosticsEngine::Warning,
|
DiagnosticsEngine::Warning,
|
||||||
"vcl::Window subclass allocated as a class member, should be allocated via VclReference.",
|
"vcl::Window subclass allocated as a class member, should be allocated via VclPtr.",
|
||||||
fieldDecl->getLocation())
|
fieldDecl->getLocation())
|
||||||
<< fieldDecl->getSourceRange();
|
<< fieldDecl->getSourceRange();
|
||||||
return true;
|
return true;
|
||||||
|
@ -1029,7 +1029,7 @@ namespace pcr
|
|||||||
{
|
{
|
||||||
SetCompoundControl( true );
|
SetCompoundControl( true );
|
||||||
|
|
||||||
m_pImplEdit = MultiLineEditRef( new MultiLineEdit( this, WB_TABSTOP | WB_IGNORETAB | WB_NOBORDER | (_nStyle & WB_READONLY) ) );
|
m_pImplEdit = VclPtr<MultiLineEdit>( new MultiLineEdit( this, WB_TABSTOP | WB_IGNORETAB | WB_NOBORDER | (_nStyle & WB_READONLY) ) );
|
||||||
SetSubEdit( m_pImplEdit.get() );
|
SetSubEdit( m_pImplEdit.get() );
|
||||||
m_pImplEdit->Show();
|
m_pImplEdit->Show();
|
||||||
|
|
||||||
@ -1064,7 +1064,7 @@ namespace pcr
|
|||||||
boost::scoped_ptr<vcl::Window> aTemp(m_pFloatingEdit);
|
boost::scoped_ptr<vcl::Window> aTemp(m_pFloatingEdit);
|
||||||
m_pFloatingEdit = NULL;
|
m_pFloatingEdit = NULL;
|
||||||
}
|
}
|
||||||
SetSubEdit(EditRef());
|
SetSubEdit(VclPtr<Edit>());
|
||||||
{
|
{
|
||||||
boost::scoped_ptr<vcl::Window> aTemp(m_pDropdownButton);
|
boost::scoped_ptr<vcl::Window> aTemp(m_pDropdownButton);
|
||||||
m_pDropdownButton = NULL;
|
m_pDropdownButton = NULL;
|
||||||
|
@ -375,7 +375,7 @@ namespace pcr
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
OMultilineFloatingEdit* m_pFloatingEdit;
|
OMultilineFloatingEdit* m_pFloatingEdit;
|
||||||
VclReference<MultiLineEdit> m_pImplEdit;
|
VclPtr<MultiLineEdit> m_pImplEdit;
|
||||||
PushButton* m_pDropdownButton;
|
PushButton* m_pDropdownButton;
|
||||||
MultiLineOperationMode m_nOperationMode;
|
MultiLineOperationMode m_nOperationMode;
|
||||||
bool m_bDropdown : 1;
|
bool m_bDropdown : 1;
|
||||||
|
@ -35,7 +35,6 @@ public:
|
|||||||
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
|
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
|
||||||
GetComponentInterface(bool bCreate = true) SAL_OVERRIDE;
|
GetComponentInterface(bool bCreate = true) SAL_OVERRIDE;
|
||||||
};
|
};
|
||||||
typedef VclReference<MultiLineEdit> MultiLineEditRef;
|
|
||||||
|
|
||||||
|
|
||||||
#endif // INCLUDED_SVTOOLS_SVMEDIT_HXX
|
#endif // INCLUDED_SVTOOLS_SVMEDIT_HXX
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include <vcl/bitmap.hxx>
|
#include <vcl/bitmap.hxx>
|
||||||
#include <vcl/salnativewidgets.hxx>
|
#include <vcl/salnativewidgets.hxx>
|
||||||
#include <rsc/rsc-vcl-shared-types.hxx>
|
#include <rsc/rsc-vcl-shared-types.hxx>
|
||||||
#include <vcl/vclref.hxx>
|
#include <vcl/vclptr.hxx>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
class UserDrawEvent;
|
class UserDrawEvent;
|
||||||
@ -200,8 +200,6 @@ public:
|
|||||||
virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE;
|
virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef VclReference<PushButton> PushButtonPtr;
|
|
||||||
|
|
||||||
inline void PushButton::Check( bool bCheck )
|
inline void PushButton::Check( bool bCheck )
|
||||||
{
|
{
|
||||||
SetState( (bCheck) ? TRISTATE_TRUE : TRISTATE_FALSE );
|
SetState( (bCheck) ? TRISTATE_TRUE : TRISTATE_FALSE );
|
||||||
@ -228,8 +226,6 @@ public:
|
|||||||
virtual void Click() SAL_OVERRIDE;
|
virtual void Click() SAL_OVERRIDE;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef VclReference<OKButton> OKButtonPtr;
|
|
||||||
|
|
||||||
class VCL_DLLPUBLIC CancelButton : public PushButton
|
class VCL_DLLPUBLIC CancelButton : public PushButton
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
@ -246,8 +242,6 @@ public:
|
|||||||
virtual void Click() SAL_OVERRIDE;
|
virtual void Click() SAL_OVERRIDE;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef VclReference<CancelButton> CancelButtonPtr;
|
|
||||||
|
|
||||||
class VCL_DLLPUBLIC CloseButton : public CancelButton
|
class VCL_DLLPUBLIC CloseButton : public CancelButton
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -275,7 +269,6 @@ public:
|
|||||||
virtual void Click() SAL_OVERRIDE;
|
virtual void Click() SAL_OVERRIDE;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef VclReference<HelpButton> HelpButtonPtr;
|
|
||||||
|
|
||||||
// - RadioButton -
|
// - RadioButton -
|
||||||
class VCL_DLLPUBLIC RadioButton : public Button
|
class VCL_DLLPUBLIC RadioButton : public Button
|
||||||
@ -499,8 +492,6 @@ public:
|
|||||||
virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE;
|
virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef VclReference<CheckBox> CheckBoxPtr;
|
|
||||||
|
|
||||||
inline void CheckBox::Check( bool bCheck )
|
inline void CheckBox::Check( bool bCheck )
|
||||||
{
|
{
|
||||||
SetState( (bCheck) ? TRISTATE_TRUE : TRISTATE_FALSE );
|
SetState( (bCheck) ? TRISTATE_TRUE : TRISTATE_FALSE );
|
||||||
@ -561,8 +552,6 @@ public:
|
|||||||
virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
|
virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef VclReference<DisclosureButton> DisclosureButtonPtr;
|
|
||||||
|
|
||||||
#endif // INCLUDED_VCL_BUTTON_HXX
|
#endif // INCLUDED_VCL_BUTTON_HXX
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@ -39,7 +39,7 @@ class ImplBtn;
|
|||||||
class VCL_DLLPUBLIC ComboBox : public Edit
|
class VCL_DLLPUBLIC ComboBox : public Edit
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
VclReference<Edit> mpSubEdit;
|
VclPtr<Edit> mpSubEdit;
|
||||||
ImplListBox* mpImplLB;
|
ImplListBox* mpImplLB;
|
||||||
ImplBtn* mpBtn;
|
ImplBtn* mpBtn;
|
||||||
ImplListBoxFloatingWindow* mpFloatWin;
|
ImplListBoxFloatingWindow* mpFloatWin;
|
||||||
@ -225,7 +225,6 @@ public:
|
|||||||
|
|
||||||
virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE;
|
virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE;
|
||||||
};
|
};
|
||||||
typedef VclReference<ComboBox> ComboBoxPtr;
|
|
||||||
|
|
||||||
#endif // _COMBOBOX_HXX
|
#endif // _COMBOBOX_HXX
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include <vcl/dllapi.h>
|
#include <vcl/dllapi.h>
|
||||||
#include <vcl/syswin.hxx>
|
#include <vcl/syswin.hxx>
|
||||||
#include <vcl/timer.hxx>
|
#include <vcl/timer.hxx>
|
||||||
#include <vcl/vclref.hxx>
|
#include <vcl/vclptr.hxx>
|
||||||
|
|
||||||
// parameter to pass to the dialog constructor if really no parent is wanted
|
// parameter to pass to the dialog constructor if really no parent is wanted
|
||||||
// whereas NULL chooses the default dialog parent
|
// whereas NULL chooses the default dialog parent
|
||||||
@ -48,8 +48,8 @@ private:
|
|||||||
bool mbInClose;
|
bool mbInClose;
|
||||||
bool mbModalMode;
|
bool mbModalMode;
|
||||||
|
|
||||||
VclReference<VclButtonBox> mpActionArea;
|
VclPtr<VclButtonBox> mpActionArea;
|
||||||
VclReference<VclBox> mpContentArea;
|
VclPtr<VclBox> mpContentArea;
|
||||||
|
|
||||||
SAL_DLLPRIVATE void ImplInitDialogData();
|
SAL_DLLPRIVATE void ImplInitDialogData();
|
||||||
SAL_DLLPRIVATE void ImplInitSettings();
|
SAL_DLLPRIVATE void ImplInitSettings();
|
||||||
@ -75,8 +75,8 @@ protected:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
friend class VclBuilder;
|
friend class VclBuilder;
|
||||||
void set_action_area(const VclReference<VclButtonBox> &xBox);
|
void set_action_area(const VclPtr<VclButtonBox> &xBox);
|
||||||
void set_content_area(const VclReference<VclBox> &xBox);
|
void set_content_area(const VclPtr<VclBox> &xBox);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit Dialog( vcl::Window* pParent, WinBits nStyle = WB_STDDIALOG );
|
explicit Dialog( vcl::Window* pParent, WinBits nStyle = WB_STDDIALOG );
|
||||||
@ -122,7 +122,6 @@ public:
|
|||||||
|
|
||||||
void GrabFocusToFirstControl();
|
void GrabFocusToFirstControl();
|
||||||
};
|
};
|
||||||
typedef VclReference<Dialog> DialogRef;
|
|
||||||
|
|
||||||
// - ModelessDialog -
|
// - ModelessDialog -
|
||||||
class VCL_DLLPUBLIC ModelessDialog : public Dialog
|
class VCL_DLLPUBLIC ModelessDialog : public Dialog
|
||||||
@ -133,7 +132,6 @@ class VCL_DLLPUBLIC ModelessDialog : public Dialog
|
|||||||
public:
|
public:
|
||||||
explicit ModelessDialog( vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription );
|
explicit ModelessDialog( vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription );
|
||||||
};
|
};
|
||||||
typedef VclReference<ModelessDialog> ModelessDialogRef;
|
|
||||||
|
|
||||||
// - ModalDialog -
|
// - ModalDialog -
|
||||||
class VCL_DLLPUBLIC ModalDialog : public Dialog
|
class VCL_DLLPUBLIC ModalDialog : public Dialog
|
||||||
@ -153,7 +151,6 @@ private:
|
|||||||
SAL_DLLPRIVATE ModalDialog (const ModalDialog &) SAL_DELETED_FUNCTION;
|
SAL_DLLPRIVATE ModalDialog (const ModalDialog &) SAL_DELETED_FUNCTION;
|
||||||
SAL_DLLPRIVATE ModalDialog & operator= (const ModalDialog &) SAL_DELETED_FUNCTION;
|
SAL_DLLPRIVATE ModalDialog & operator= (const ModalDialog &) SAL_DELETED_FUNCTION;
|
||||||
};
|
};
|
||||||
typedef VclReference<ModalDialog> ModalDialogRef;
|
|
||||||
|
|
||||||
#endif // INCLUDED_VCL_DIALOG_HXX
|
#endif // INCLUDED_VCL_DIALOG_HXX
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include <vcl/ctrl.hxx>
|
#include <vcl/ctrl.hxx>
|
||||||
#include <vcl/menu.hxx>
|
#include <vcl/menu.hxx>
|
||||||
#include <vcl/dndhelp.hxx>
|
#include <vcl/dndhelp.hxx>
|
||||||
#include <vcl/vclref.hxx>
|
#include <vcl/vclptr.hxx>
|
||||||
#include <com/sun/star/uno/Reference.h>
|
#include <com/sun/star/uno/Reference.h>
|
||||||
|
|
||||||
namespace com {
|
namespace com {
|
||||||
@ -69,7 +69,7 @@ enum AutocompleteAction{ AUTOCOMPLETE_KEYINPUT, AUTOCOMPLETE_TABFORWARD, AUTOCOM
|
|||||||
class VCL_DLLPUBLIC Edit : public Control, public vcl::unohelper::DragAndDropClient
|
class VCL_DLLPUBLIC Edit : public Control, public vcl::unohelper::DragAndDropClient
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
VclReference<Edit> mpSubEdit;
|
VclPtr<Edit> mpSubEdit;
|
||||||
Timer* mpUpdateDataTimer;
|
Timer* mpUpdateDataTimer;
|
||||||
TextFilter* mpFilterText;
|
TextFilter* mpFilterText;
|
||||||
DDInfo* mpDDInfo;
|
DDInfo* mpDDInfo;
|
||||||
@ -237,7 +237,7 @@ public:
|
|||||||
virtual const Link& GetModifyHdl() const { return maModifyHdl; }
|
virtual const Link& GetModifyHdl() const { return maModifyHdl; }
|
||||||
virtual void SetUpdateDataHdl( const Link& rLink ) { maUpdateDataHdl = rLink; }
|
virtual void SetUpdateDataHdl( const Link& rLink ) { maUpdateDataHdl = rLink; }
|
||||||
|
|
||||||
void SetSubEdit( VclReference<Edit> pEdit );
|
void SetSubEdit( VclPtr<Edit> pEdit );
|
||||||
Edit* GetSubEdit() const { return mpSubEdit; }
|
Edit* GetSubEdit() const { return mpSubEdit; }
|
||||||
|
|
||||||
boost::signals2::signal< void ( Edit* ) > autocompleteSignal;
|
boost::signals2::signal< void ( Edit* ) > autocompleteSignal;
|
||||||
@ -270,7 +270,6 @@ public:
|
|||||||
// global style settings (needed by sc's inputwin.cxx)
|
// global style settings (needed by sc's inputwin.cxx)
|
||||||
static Size GetMinimumEditSize();
|
static Size GetMinimumEditSize();
|
||||||
};
|
};
|
||||||
typedef VclReference<Edit> EditRef;
|
|
||||||
|
|
||||||
#endif // INCLUDED_VCL_EDIT_HXX
|
#endif // INCLUDED_VCL_EDIT_HXX
|
||||||
|
|
||||||
|
@ -83,8 +83,6 @@ public:
|
|||||||
vcl::Window* get_mnemonic_widget() const { return m_pMnemonicWindow; }
|
vcl::Window* get_mnemonic_widget() const { return m_pMnemonicWindow; }
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef VclReference<FixedText> FixedTextPtr;
|
|
||||||
|
|
||||||
class VCL_DLLPUBLIC SelectableFixedText : public Edit
|
class VCL_DLLPUBLIC SelectableFixedText : public Edit
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -127,8 +125,6 @@ public:
|
|||||||
virtual Size GetOptimalSize() const SAL_OVERRIDE;
|
virtual Size GetOptimalSize() const SAL_OVERRIDE;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef VclReference<FixedLine> FixedLinePtr;
|
|
||||||
|
|
||||||
// - FixedBitmap -
|
// - FixedBitmap -
|
||||||
class VCL_DLLPUBLIC FixedBitmap : public Control
|
class VCL_DLLPUBLIC FixedBitmap : public Control
|
||||||
{
|
{
|
||||||
|
@ -55,8 +55,6 @@ public:
|
|||||||
virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
|
virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef VclReference<GroupBox> GroupBoxPtr;
|
|
||||||
|
|
||||||
#endif // INCLUDED_VCL_GROUP_HXX
|
#endif // INCLUDED_VCL_GROUP_HXX
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@ -51,8 +51,6 @@ protected:
|
|||||||
void ImplDraw( OutputDevice& rDev, sal_uLong nDrawFlags, const Point& rPos, const Size& rSize ) const;
|
void ImplDraw( OutputDevice& rDev, sal_uLong nDrawFlags, const Point& rPos, const Size& rSize ) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef VclReference<ImageControl> ImageControlPtr;
|
|
||||||
|
|
||||||
#endif // INCLUDED_VCL_IMGCTRL_HXX
|
#endif // INCLUDED_VCL_IMGCTRL_HXX
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include <vcl/scrbar.hxx>
|
#include <vcl/scrbar.hxx>
|
||||||
#include <vcl/vclmedit.hxx>
|
#include <vcl/vclmedit.hxx>
|
||||||
#include <vcl/window.hxx>
|
#include <vcl/window.hxx>
|
||||||
#include <vcl/vclref.hxx>
|
#include <vcl/vclptr.hxx>
|
||||||
#include <boost/multi_array.hpp>
|
#include <boost/multi_array.hpp>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
@ -59,7 +59,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
bool m_bLayoutDirty;
|
bool m_bLayoutDirty;
|
||||||
};
|
};
|
||||||
typedef VclReference<VclContainer> VclContainerRef;
|
|
||||||
|
|
||||||
class VCL_DLLPUBLIC VclBox : public VclContainer
|
class VCL_DLLPUBLIC VclBox : public VclContainer
|
||||||
{
|
{
|
||||||
@ -111,7 +110,6 @@ protected:
|
|||||||
|
|
||||||
virtual bool getPrimaryDimensionChildExpand(const vcl::Window &rWindow) const = 0;
|
virtual bool getPrimaryDimensionChildExpand(const vcl::Window &rWindow) const = 0;
|
||||||
};
|
};
|
||||||
typedef VclReference<VclBox> VclBoxRef;
|
|
||||||
|
|
||||||
class VCL_DLLPUBLIC VclVBox : public VclBox
|
class VCL_DLLPUBLIC VclVBox : public VclBox
|
||||||
{
|
{
|
||||||
@ -159,7 +157,6 @@ protected:
|
|||||||
return rWindow.get_expand() || rWindow.get_vexpand();
|
return rWindow.get_expand() || rWindow.get_vexpand();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
typedef VclReference<VclVBox> VclVBoxRef;
|
|
||||||
|
|
||||||
class VCL_DLLPUBLIC VclHBox : public VclBox
|
class VCL_DLLPUBLIC VclHBox : public VclBox
|
||||||
{
|
{
|
||||||
@ -207,7 +204,6 @@ protected:
|
|||||||
return rWindow.get_expand() || rWindow.get_hexpand();
|
return rWindow.get_expand() || rWindow.get_hexpand();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
typedef VclReference<VclHBox> VclHBoxRef;
|
|
||||||
|
|
||||||
enum VclButtonBoxStyle
|
enum VclButtonBoxStyle
|
||||||
{
|
{
|
||||||
@ -253,7 +249,6 @@ private:
|
|||||||
Requisition calculatePrimarySecondaryRequisitions() const;
|
Requisition calculatePrimarySecondaryRequisitions() const;
|
||||||
Size addReqGroups(const VclButtonBox::Requisition &rReq) const;
|
Size addReqGroups(const VclButtonBox::Requisition &rReq) const;
|
||||||
};
|
};
|
||||||
typedef VclReference<VclButtonBox> VclButtonBoxRef;
|
|
||||||
|
|
||||||
class VCL_DLLPUBLIC VclVButtonBox : public VclButtonBox
|
class VCL_DLLPUBLIC VclVButtonBox : public VclButtonBox
|
||||||
{
|
{
|
||||||
@ -301,7 +296,6 @@ protected:
|
|||||||
return rWindow.get_expand() || rWindow.get_vexpand();
|
return rWindow.get_expand() || rWindow.get_vexpand();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
typedef VclReference<VclVButtonBox> VclVButtonBoxRef;
|
|
||||||
|
|
||||||
class VCL_DLLPUBLIC VclHButtonBox : public VclButtonBox
|
class VCL_DLLPUBLIC VclHButtonBox : public VclButtonBox
|
||||||
{
|
{
|
||||||
@ -349,7 +343,6 @@ protected:
|
|||||||
return rWindow.get_expand() || rWindow.get_hexpand();
|
return rWindow.get_expand() || rWindow.get_hexpand();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
typedef VclReference<VclHButtonBox> VclHButtonBoxRef;
|
|
||||||
|
|
||||||
class VCL_DLLPUBLIC VclGrid : public VclContainer
|
class VCL_DLLPUBLIC VclGrid : public VclContainer
|
||||||
{
|
{
|
||||||
@ -443,7 +436,6 @@ public:
|
|||||||
}
|
}
|
||||||
virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE;
|
virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE;
|
||||||
};
|
};
|
||||||
typedef VclReference<VclGrid> VclGridRef;
|
|
||||||
|
|
||||||
VCL_DLLPUBLIC void setGridAttach(vcl::Window &rWidget, sal_Int32 nLeft, sal_Int32 nTop,
|
VCL_DLLPUBLIC void setGridAttach(vcl::Window &rWidget, sal_Int32 nLeft, sal_Int32 nTop,
|
||||||
sal_Int32 nWidth = 1, sal_Int32 nHeight = 1);
|
sal_Int32 nWidth = 1, sal_Int32 nHeight = 1);
|
||||||
@ -460,7 +452,6 @@ public:
|
|||||||
virtual Size calculateRequisition() const SAL_OVERRIDE;
|
virtual Size calculateRequisition() const SAL_OVERRIDE;
|
||||||
virtual void setAllocation(const Size &rAllocation) SAL_OVERRIDE;
|
virtual void setAllocation(const Size &rAllocation) SAL_OVERRIDE;
|
||||||
};
|
};
|
||||||
typedef VclReference<VclBin> VclBinRef;
|
|
||||||
|
|
||||||
class VCL_DLLPUBLIC VclFrame : public VclBin
|
class VCL_DLLPUBLIC VclFrame : public VclBin
|
||||||
{
|
{
|
||||||
@ -487,7 +478,6 @@ protected:
|
|||||||
virtual void setAllocation(const Size &rAllocation) SAL_OVERRIDE;
|
virtual void setAllocation(const Size &rAllocation) SAL_OVERRIDE;
|
||||||
virtual OUString getDefaultAccessibleName() const SAL_OVERRIDE;
|
virtual OUString getDefaultAccessibleName() const SAL_OVERRIDE;
|
||||||
};
|
};
|
||||||
typedef VclReference<VclFrame> VclFrameRef;
|
|
||||||
|
|
||||||
class VCL_DLLPUBLIC VclAlignment : public VclBin
|
class VCL_DLLPUBLIC VclAlignment : public VclBin
|
||||||
{
|
{
|
||||||
@ -518,7 +508,6 @@ private:
|
|||||||
float m_fYAlign;
|
float m_fYAlign;
|
||||||
float m_fYScale;
|
float m_fYScale;
|
||||||
};
|
};
|
||||||
typedef VclReference<VclAlignment> VclAlignmentRef;
|
|
||||||
|
|
||||||
class VCL_DLLPUBLIC VclExpander : public VclBin
|
class VCL_DLLPUBLIC VclExpander : public VclBin
|
||||||
{
|
{
|
||||||
@ -559,11 +548,10 @@ protected:
|
|||||||
void dispose() SAL_OVERRIDE { m_pDisclosureButton.disposeAndClear(); VclBin::dispose(); }
|
void dispose() SAL_OVERRIDE { m_pDisclosureButton.disposeAndClear(); VclBin::dispose(); }
|
||||||
private:
|
private:
|
||||||
bool m_bResizeTopLevel;
|
bool m_bResizeTopLevel;
|
||||||
DisclosureButtonPtr m_pDisclosureButton;
|
VclPtr<DisclosureButton> m_pDisclosureButton;
|
||||||
Link maExpandedHdl;
|
Link maExpandedHdl;
|
||||||
DECL_DLLPRIVATE_LINK(ClickHdl, DisclosureButton* pBtn);
|
DECL_DLLPRIVATE_LINK(ClickHdl, DisclosureButton* pBtn);
|
||||||
};
|
};
|
||||||
typedef VclReference<VclExpander> VclExpanderRef;
|
|
||||||
|
|
||||||
class VCL_DLLPUBLIC VclScrolledWindow : public VclBin
|
class VCL_DLLPUBLIC VclScrolledWindow : public VclBin
|
||||||
{
|
{
|
||||||
@ -587,11 +575,10 @@ protected:
|
|||||||
void dispose() SAL_OVERRIDE { m_pVScroll.disposeAndClear(); m_pHScroll.disposeAndClear(); VclBin::dispose(); }
|
void dispose() SAL_OVERRIDE { m_pVScroll.disposeAndClear(); m_pHScroll.disposeAndClear(); VclBin::dispose(); }
|
||||||
private:
|
private:
|
||||||
bool m_bUserManagedScrolling;
|
bool m_bUserManagedScrolling;
|
||||||
ScrollBarPtr m_pVScroll;
|
VclPtr<ScrollBar> m_pVScroll;
|
||||||
ScrollBarPtr m_pHScroll;
|
VclPtr<ScrollBar> m_pHScroll;
|
||||||
ScrollBarBox m_aScrollBarBox;
|
ScrollBarBox m_aScrollBarBox;
|
||||||
};
|
};
|
||||||
typedef VclReference<VclScrolledWindow> VclScrolledWindowRef;
|
|
||||||
|
|
||||||
class VCL_DLLPUBLIC VclViewport : public VclBin
|
class VCL_DLLPUBLIC VclViewport : public VclBin
|
||||||
{
|
{
|
||||||
@ -603,7 +590,6 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
virtual void setAllocation(const Size &rAllocation) SAL_OVERRIDE;
|
virtual void setAllocation(const Size &rAllocation) SAL_OVERRIDE;
|
||||||
};
|
};
|
||||||
typedef VclReference<VclViewport> VclViewportRef;
|
|
||||||
|
|
||||||
//Enforces that its children are always the same size as itself.
|
//Enforces that its children are always the same size as itself.
|
||||||
//Intercepts any Commands intended for its children.
|
//Intercepts any Commands intended for its children.
|
||||||
@ -648,7 +634,6 @@ public:
|
|||||||
|
|
||||||
virtual void Command(const CommandEvent& rCEvt) SAL_OVERRIDE;
|
virtual void Command(const CommandEvent& rCEvt) SAL_OVERRIDE;
|
||||||
};
|
};
|
||||||
typedef VclReference<VclEventBox> VclEventBoxRef;
|
|
||||||
|
|
||||||
enum VclSizeGroupMode
|
enum VclSizeGroupMode
|
||||||
{
|
{
|
||||||
@ -700,7 +685,6 @@ public:
|
|||||||
}
|
}
|
||||||
bool set_property(const OString &rKey, const OString &rValue);
|
bool set_property(const OString &rKey, const OString &rValue);
|
||||||
};
|
};
|
||||||
typedef VclReference<VclSizeGroup> VclSizeGroupRef;
|
|
||||||
|
|
||||||
enum VclButtonsType
|
enum VclButtonsType
|
||||||
{
|
{
|
||||||
@ -725,13 +709,13 @@ class VCL_DLLPUBLIC MessageDialog : public Dialog
|
|||||||
private:
|
private:
|
||||||
VclButtonsType m_eButtonsType;
|
VclButtonsType m_eButtonsType;
|
||||||
VclMessageType m_eMessageType;
|
VclMessageType m_eMessageType;
|
||||||
VclBoxRef m_pOwnedContentArea;
|
VclPtr<VclBox> m_pOwnedContentArea;
|
||||||
VclButtonBoxRef m_pOwnedActionArea;
|
VclPtr<VclButtonBox> m_pOwnedActionArea;
|
||||||
VclGridRef m_pGrid;
|
VclPtr<VclGrid> m_pGrid;
|
||||||
FixedImage* m_pImage;
|
FixedImage* m_pImage;
|
||||||
VclMultiLineEdit* m_pPrimaryMessage;
|
VclMultiLineEdit* m_pPrimaryMessage;
|
||||||
VclMultiLineEdit* m_pSecondaryMessage;
|
VclMultiLineEdit* m_pSecondaryMessage;
|
||||||
std::vector<PushButtonPtr> m_aOwnedButtons;
|
std::vector<VclPtr<PushButton> > m_aOwnedButtons;
|
||||||
std::map<const vcl::Window*, short> m_aResponses;
|
std::map<const vcl::Window*, short> m_aResponses;
|
||||||
OUString m_sPrimaryString;
|
OUString m_sPrimaryString;
|
||||||
OUString m_sSecondaryString;
|
OUString m_sSecondaryString;
|
||||||
@ -764,7 +748,6 @@ public:
|
|||||||
static void SetMessagesWidths(vcl::Window *pParent, VclMultiLineEdit *pPrimaryMessage,
|
static void SetMessagesWidths(vcl::Window *pParent, VclMultiLineEdit *pPrimaryMessage,
|
||||||
VclMultiLineEdit *pSecondaryMessage);
|
VclMultiLineEdit *pSecondaryMessage);
|
||||||
};
|
};
|
||||||
typedef VclReference<MessageDialog> MessageDialogRef;
|
|
||||||
|
|
||||||
VCL_DLLPUBLIC Size bestmaxFrameSizeForScreenSize(const Size &rScreenSize);
|
VCL_DLLPUBLIC Size bestmaxFrameSizeForScreenSize(const Size &rScreenSize);
|
||||||
|
|
||||||
|
@ -239,7 +239,6 @@ public:
|
|||||||
void EnableQuickSelection( const bool& b );
|
void EnableQuickSelection( const bool& b );
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef VclReference<ListBox> ListBoxPtr;
|
|
||||||
|
|
||||||
// - MultiListBox -
|
// - MultiListBox -
|
||||||
|
|
||||||
|
@ -82,8 +82,6 @@ public:
|
|||||||
const Link& GetSelectHdl() const { return maSelectHdl; }
|
const Link& GetSelectHdl() const { return maSelectHdl; }
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef VclReference<MenuButton> MenuButtonPtr;
|
|
||||||
|
|
||||||
#endif // INCLUDED_VCL_MENUBTN_HXX
|
#endif // INCLUDED_VCL_MENUBTN_HXX
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@ -141,8 +141,6 @@ public:
|
|||||||
virtual Size GetOptimalSize() const SAL_OVERRIDE;
|
virtual Size GetOptimalSize() const SAL_OVERRIDE;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef VclReference<ScrollBar> ScrollBarPtr;
|
|
||||||
|
|
||||||
|
|
||||||
// - ScrollBarBox -
|
// - ScrollBarBox -
|
||||||
|
|
||||||
|
@ -130,7 +130,6 @@ public:
|
|||||||
|
|
||||||
virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE;
|
virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE;
|
||||||
};
|
};
|
||||||
typedef VclReference<VclMultiLineEdit> VclMultiLineEditRef;
|
|
||||||
|
|
||||||
#endif // INCLUDED_VCL_VCLMEDIT_HXX
|
#endif // INCLUDED_VCL_VCLMEDIT_HXX
|
||||||
|
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef INCLUDED_VCL_REFERENCE_HXX
|
#ifndef INCLUDED_VCL_PTR_HXX
|
||||||
#define INCLUDED_VCL_REFERENCE_HXX
|
#define INCLUDED_VCL_PTR_HXX
|
||||||
|
|
||||||
#include <rtl/ref.hxx>
|
#include <rtl/ref.hxx>
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ public:
|
|||||||
* @param reference_type must be a subclass of vcl::Window
|
* @param reference_type must be a subclass of vcl::Window
|
||||||
*/
|
*/
|
||||||
template <class reference_type>
|
template <class reference_type>
|
||||||
class VclReference
|
class VclPtr
|
||||||
{
|
{
|
||||||
|
|
||||||
::rtl::Reference<reference_type> m_rInnerRef;
|
::rtl::Reference<reference_type> m_rInnerRef;
|
||||||
@ -81,21 +81,21 @@ class VclReference
|
|||||||
public:
|
public:
|
||||||
/** Constructor...
|
/** Constructor...
|
||||||
*/
|
*/
|
||||||
inline VclReference()
|
inline VclPtr()
|
||||||
: m_rInnerRef()
|
: m_rInnerRef()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
/** Constructor...
|
/** Constructor...
|
||||||
*/
|
*/
|
||||||
inline VclReference (reference_type * pBody)
|
inline VclPtr (reference_type * pBody)
|
||||||
: m_rInnerRef(pBody)
|
: m_rInnerRef(pBody)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
/** Copy constructor...
|
/** Copy constructor...
|
||||||
*/
|
*/
|
||||||
inline VclReference (const VclReference<reference_type> & handle)
|
inline VclPtr (const VclPtr<reference_type> & handle)
|
||||||
: m_rInnerRef (handle.m_rInnerRef)
|
: m_rInnerRef (handle.m_rInnerRef)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -108,8 +108,8 @@ public:
|
|||||||
@param rRef another reference
|
@param rRef another reference
|
||||||
*/
|
*/
|
||||||
template< class derived_type >
|
template< class derived_type >
|
||||||
inline VclReference(
|
inline VclPtr(
|
||||||
const VclReference< derived_type > & rRef,
|
const VclPtr< derived_type > & rRef,
|
||||||
typename ::vcl::detail::UpCast< reference_type, derived_type >::t = 0 )
|
typename ::vcl::detail::UpCast< reference_type, derived_type >::t = 0 )
|
||||||
: m_rInnerRef( static_cast<reference_type*>(rRef) )
|
: m_rInnerRef( static_cast<reference_type*>(rRef) )
|
||||||
{
|
{
|
||||||
@ -150,8 +150,8 @@ public:
|
|||||||
aTmp->dispose();
|
aTmp->dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
}; // class VclReference
|
}; // class VclPtr
|
||||||
|
|
||||||
#endif // INCLUDED_VCL_REFERENCE_HXX
|
#endif // INCLUDED_VCL_PTR_HXX
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@ -119,7 +119,7 @@ namespace vcl {
|
|||||||
|
|
||||||
namespace svt { class PopupWindowControllerImpl; }
|
namespace svt { class PopupWindowControllerImpl; }
|
||||||
|
|
||||||
template<class T> class VclReference;
|
template<class T> class VclPtr;
|
||||||
|
|
||||||
|
|
||||||
// - WindowTypes -
|
// - WindowTypes -
|
||||||
@ -502,7 +502,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
template<typename T> friend class ::rtl::Reference;
|
template<typename T> friend class ::rtl::Reference;
|
||||||
template<typename T> friend class ::VclReference;
|
template<typename T> friend class ::VclPtr;
|
||||||
|
|
||||||
inline void acquire() const
|
inline void acquire() const
|
||||||
{
|
{
|
||||||
|
@ -320,7 +320,7 @@ Control* FontPropertyBox::getControl()
|
|||||||
class DropdownMenuBox : public Edit
|
class DropdownMenuBox : public Edit
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DropdownMenuBox( vcl::Window* pParent, const EditRef &pSubControl, PopupMenu* pMenu );
|
DropdownMenuBox( vcl::Window* pParent, const VclPtr<Edit> &pSubControl, PopupMenu* pMenu );
|
||||||
virtual ~DropdownMenuBox();
|
virtual ~DropdownMenuBox();
|
||||||
|
|
||||||
void Resize() SAL_OVERRIDE;
|
void Resize() SAL_OVERRIDE;
|
||||||
@ -329,12 +329,12 @@ public:
|
|||||||
void SetMenuSelectHdl( const Link& rLink ) { mpDropdownButton->SetSelectHdl( rLink ); }
|
void SetMenuSelectHdl( const Link& rLink ) { mpDropdownButton->SetSelectHdl( rLink ); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
EditRef mpSubControl;
|
VclPtr<Edit> mpSubControl;
|
||||||
MenuButton* mpDropdownButton;
|
MenuButton* mpDropdownButton;
|
||||||
PopupMenu* mpMenu;
|
PopupMenu* mpMenu;
|
||||||
};
|
};
|
||||||
|
|
||||||
DropdownMenuBox::DropdownMenuBox( vcl::Window* pParent, const EditRef &pSubControl, PopupMenu* pMenu )
|
DropdownMenuBox::DropdownMenuBox( vcl::Window* pParent, const VclPtr<Edit> &pSubControl, PopupMenu* pMenu )
|
||||||
: Edit( pParent, WB_BORDER|WB_TABSTOP| WB_DIALOGCONTROL ),
|
: Edit( pParent, WB_BORDER|WB_TABSTOP| WB_DIALOGCONTROL ),
|
||||||
mpSubControl(pSubControl),mpDropdownButton(0),mpMenu(pMenu)
|
mpSubControl(pSubControl),mpDropdownButton(0),mpMenu(pMenu)
|
||||||
{
|
{
|
||||||
@ -350,7 +350,7 @@ DropdownMenuBox::DropdownMenuBox( vcl::Window* pParent, const EditRef &pSubContr
|
|||||||
|
|
||||||
DropdownMenuBox::~DropdownMenuBox()
|
DropdownMenuBox::~DropdownMenuBox()
|
||||||
{
|
{
|
||||||
SetSubEdit(EditRef());
|
SetSubEdit(VclPtr<Edit>());
|
||||||
delete mpDropdownButton;
|
delete mpDropdownButton;
|
||||||
delete mpMenu;
|
delete mpMenu;
|
||||||
}
|
}
|
||||||
@ -406,7 +406,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
DropdownMenuBox* mpControl;
|
DropdownMenuBox* mpControl;
|
||||||
PopupMenu* mpMenu;
|
PopupMenu* mpMenu;
|
||||||
VclReference<MetricField> mpMetric;
|
VclPtr<MetricField> mpMetric;
|
||||||
};
|
};
|
||||||
|
|
||||||
CharHeightPropertyBox::CharHeightPropertyBox( sal_Int32 nControlType, vcl::Window* pParent, const Any& rValue, const Link& rModifyHdl )
|
CharHeightPropertyBox::CharHeightPropertyBox( sal_Int32 nControlType, vcl::Window* pParent, const Any& rValue, const Link& rModifyHdl )
|
||||||
@ -486,7 +486,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
DropdownMenuBox* mpControl;
|
DropdownMenuBox* mpControl;
|
||||||
PopupMenu* mpMenu;
|
PopupMenu* mpMenu;
|
||||||
VclReference<MetricField> mpMetric;
|
VclPtr<MetricField> mpMetric;
|
||||||
Link maModifyHdl;
|
Link maModifyHdl;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -590,7 +590,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
DropdownMenuBox* mpControl;
|
DropdownMenuBox* mpControl;
|
||||||
PopupMenu* mpMenu;
|
PopupMenu* mpMenu;
|
||||||
VclReference<MetricField> mpMetric;
|
VclPtr<MetricField> mpMetric;
|
||||||
Link maModifyHdl;
|
Link maModifyHdl;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -715,7 +715,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
DropdownMenuBox* mpControl;
|
DropdownMenuBox* mpControl;
|
||||||
PopupMenu* mpMenu;
|
PopupMenu* mpMenu;
|
||||||
VclReference<MetricField> mpMetric;
|
VclPtr<MetricField> mpMetric;
|
||||||
Link maModifyHdl;
|
Link maModifyHdl;
|
||||||
int mnDirection;
|
int mnDirection;
|
||||||
};
|
};
|
||||||
@ -877,7 +877,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
DropdownMenuBox* mpControl;
|
DropdownMenuBox* mpControl;
|
||||||
PopupMenu* mpMenu;
|
PopupMenu* mpMenu;
|
||||||
EditRef mpEdit;
|
VclPtr<Edit> mpEdit;
|
||||||
Link maModifyHdl;
|
Link maModifyHdl;
|
||||||
|
|
||||||
float mfFontWeight;
|
float mfFontWeight;
|
||||||
|
@ -53,11 +53,11 @@ namespace vcl
|
|||||||
Size maPreviewSize;
|
Size maPreviewSize;
|
||||||
VirtualDevice maPageVDev;
|
VirtualDevice maPageVDev;
|
||||||
Bitmap maPreviewBitmap;
|
Bitmap maPreviewBitmap;
|
||||||
OUString maReplacementString;
|
OUString maReplacementString;
|
||||||
OUString maToolTipString;
|
OUString maToolTipString;
|
||||||
bool mbGreyscale;
|
bool mbGreyscale;
|
||||||
FixedLinePtr maHorzDim;
|
VclPtr<FixedLine> maHorzDim;
|
||||||
FixedLinePtr maVertDim;
|
VclPtr<FixedLine> maVertDim;
|
||||||
|
|
||||||
void preparePreviewBitmap();
|
void preparePreviewBitmap();
|
||||||
|
|
||||||
|
@ -39,21 +39,21 @@ public:
|
|||||||
// A compile time sanity check
|
// A compile time sanity check
|
||||||
void LifecycleTest::testCast()
|
void LifecycleTest::testCast()
|
||||||
{
|
{
|
||||||
VclReference<PushButton> xButton(new PushButton(NULL, 0));
|
VclPtr<PushButton> xButton(new PushButton(NULL, 0));
|
||||||
VclReference<vcl::Window> xWindow(xButton);
|
VclPtr<vcl::Window> xWindow(xButton);
|
||||||
|
|
||||||
VclReference<MetricField> xField(new MetricField(NULL, 0));
|
VclPtr<MetricField> xField(new MetricField(NULL, 0));
|
||||||
VclReference<SpinField> xSpin(xField);
|
VclPtr<SpinField> xSpin(xField);
|
||||||
VclReference<Edit> xEdit(xField);
|
VclPtr<Edit> xEdit(xField);
|
||||||
|
|
||||||
// the following line should NOT compile
|
// the following line should NOT compile
|
||||||
// VclReference<PushButton> xButton2(xWindow);
|
// VclPtr<PushButton> xButton2(xWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LifecycleTest::testMultiDispose()
|
void LifecycleTest::testMultiDispose()
|
||||||
{
|
{
|
||||||
VclReference<WorkWindow> xWin(new WorkWindow((vcl::Window *)NULL,
|
VclPtr<WorkWindow> xWin(new WorkWindow((vcl::Window *)NULL,
|
||||||
WB_APP|WB_STDWORK));
|
WB_APP|WB_STDWORK));
|
||||||
CPPUNIT_ASSERT(xWin.get() != NULL);
|
CPPUNIT_ASSERT(xWin.get() != NULL);
|
||||||
xWin->dispose();
|
xWin->dispose();
|
||||||
xWin->dispose();
|
xWin->dispose();
|
||||||
@ -65,19 +65,19 @@ void LifecycleTest::testMultiDispose()
|
|||||||
|
|
||||||
void LifecycleTest::testWidgets(vcl::Window *pParent)
|
void LifecycleTest::testWidgets(vcl::Window *pParent)
|
||||||
{
|
{
|
||||||
{ PushButtonPtr aPtr(new PushButton(pParent)); }
|
{ VclPtr<PushButton> aPtr(new PushButton(pParent)); }
|
||||||
{ OKButtonPtr aPtr(new OKButton(pParent)); }
|
{ VclPtr<OKButton> aPtr(new OKButton(pParent)); }
|
||||||
{ CancelButtonPtr aPtr(new CancelButton(pParent)); }
|
{ VclPtr<CancelButton> aPtr(new CancelButton(pParent)); }
|
||||||
{ HelpButtonPtr aPtr(new HelpButton(pParent)); }
|
{ VclPtr<HelpButton> aPtr(new HelpButton(pParent)); }
|
||||||
|
|
||||||
// Some widgets really insist on adoption.
|
// Some widgets really insist on adoption.
|
||||||
if (pParent)
|
if (pParent)
|
||||||
{
|
{
|
||||||
{ CheckBoxPtr aPtr(new CheckBox(pParent)); }
|
{ VclPtr<CheckBox> aPtr(new CheckBox(pParent)); }
|
||||||
// { EditRef aPtr(new Edit(pParent)); }
|
// { VclPtr<Edit> aPtr(new Edit(pParent)); }
|
||||||
// { ComboBoxPtr aPtr(new ComboBox(pParent)); }
|
// { VclPtr<ComboBox> aPtr(new ComboBox(pParent)); }
|
||||||
}
|
}
|
||||||
// { RadioButtonPtr aPtr(new RadioButton(pParent)); }
|
// { VclPtr<RadioButton> aPtr(new RadioButton(pParent)); }
|
||||||
}
|
}
|
||||||
|
|
||||||
void LifecycleTest::testIsolatedWidgets()
|
void LifecycleTest::testIsolatedWidgets()
|
||||||
@ -87,7 +87,7 @@ void LifecycleTest::testIsolatedWidgets()
|
|||||||
|
|
||||||
void LifecycleTest::testParentedWidgets()
|
void LifecycleTest::testParentedWidgets()
|
||||||
{
|
{
|
||||||
VclReference<WorkWindow> xWin(new WorkWindow((vcl::Window *)NULL,
|
VclPtr<WorkWindow> xWin(new WorkWindow((vcl::Window *)NULL,
|
||||||
WB_APP|WB_STDWORK));
|
WB_APP|WB_STDWORK));
|
||||||
CPPUNIT_ASSERT(xWin.get() != NULL);
|
CPPUNIT_ASSERT(xWin.get() != NULL);
|
||||||
testWidgets(xWin);
|
testWidgets(xWin);
|
||||||
|
@ -207,9 +207,9 @@ NULL
|
|||||||
class DbgInfoDialog : public ModalDialog
|
class DbgInfoDialog : public ModalDialog
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
ListBoxPtr maListBox;
|
VclPtr<ListBox> maListBox;
|
||||||
OKButtonPtr maOKButton;
|
VclPtr<OKButton> maOKButton;
|
||||||
bool mbHelpText;
|
bool mbHelpText;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DbgInfoDialog( vcl::Window* pParent, bool bHelpText = false );
|
DbgInfoDialog( vcl::Window* pParent, bool bHelpText = false );
|
||||||
@ -222,14 +222,14 @@ private:
|
|||||||
class DbgDialog : public ModalDialog
|
class DbgDialog : public ModalDialog
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CheckBoxPtr maRes;
|
VclPtr<CheckBox> maRes;
|
||||||
CheckBoxPtr maDialog;
|
VclPtr<CheckBox> maDialog;
|
||||||
CheckBoxPtr maBoldAppFont;
|
VclPtr<CheckBox> maBoldAppFont;
|
||||||
GroupBoxPtr maBox3;
|
VclPtr<GroupBox> maBox3;
|
||||||
|
|
||||||
OKButtonPtr maOKButton;
|
VclPtr<OKButton> maOKButton;
|
||||||
CancelButtonPtr maCancelButton;
|
VclPtr<CancelButton> maCancelButton;
|
||||||
HelpButtonPtr maHelpButton;
|
VclPtr<HelpButton> maHelpButton;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DbgDialog();
|
DbgDialog();
|
||||||
|
@ -68,7 +68,7 @@ ComboBox::ComboBox( vcl::Window* pParent, const ResId& rResId ) :
|
|||||||
|
|
||||||
ComboBox::~ComboBox()
|
ComboBox::~ComboBox()
|
||||||
{
|
{
|
||||||
SetSubEdit(VclReference<Edit>());
|
SetSubEdit(VclPtr<Edit>());
|
||||||
|
|
||||||
ImplListBox *pImplLB = mpImplLB;
|
ImplListBox *pImplLB = mpImplLB;
|
||||||
mpImplLB = NULL;
|
mpImplLB = NULL;
|
||||||
|
@ -285,7 +285,7 @@ void Edit::dispose()
|
|||||||
|
|
||||||
void Edit::ImplInitEditData()
|
void Edit::ImplInitEditData()
|
||||||
{
|
{
|
||||||
mpSubEdit = EditRef();
|
mpSubEdit = VclPtr<Edit>();
|
||||||
mpUpdateDataTimer = NULL;
|
mpUpdateDataTimer = NULL;
|
||||||
mpFilterText = NULL;
|
mpFilterText = NULL;
|
||||||
mnXOffset = 0;
|
mnXOffset = 0;
|
||||||
@ -2706,7 +2706,7 @@ void Edit::ClearModifyFlag()
|
|||||||
mbModified = false;
|
mbModified = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Edit::SetSubEdit( VclReference<Edit> pEdit )
|
void Edit::SetSubEdit( VclPtr<Edit> pEdit )
|
||||||
{
|
{
|
||||||
mpSubEdit.disposeAndClear();
|
mpSubEdit.disposeAndClear();
|
||||||
mpSubEdit = pEdit;
|
mpSubEdit = pEdit;
|
||||||
|
@ -509,12 +509,12 @@ Dialog::Dialog(vcl::Window* pParent, WinBits nStyle)
|
|||||||
ImplInit( pParent, nStyle );
|
ImplInit( pParent, nStyle );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Dialog::set_action_area(const VclButtonBoxRef &xBox)
|
void Dialog::set_action_area(const VclPtr<VclButtonBox> &xBox)
|
||||||
{
|
{
|
||||||
mpActionArea = xBox;
|
mpActionArea = xBox;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Dialog::set_content_area(const VclBoxRef &xBox)
|
void Dialog::set_content_area(const VclPtr<VclBox> &xBox)
|
||||||
{
|
{
|
||||||
mpContentArea = xBox;
|
mpContentArea = xBox;
|
||||||
}
|
}
|
||||||
|
@ -2159,7 +2159,7 @@ short MessageDialog::Execute()
|
|||||||
VclButtonBox *pButtonBox = get_action_area();
|
VclButtonBox *pButtonBox = get_action_area();
|
||||||
assert(pButtonBox);
|
assert(pButtonBox);
|
||||||
|
|
||||||
PushButtonPtr pBtn;
|
VclPtr<PushButton> pBtn;
|
||||||
switch (m_eButtonsType)
|
switch (m_eButtonsType)
|
||||||
{
|
{
|
||||||
case VCL_BUTTONS_NONE:
|
case VCL_BUTTONS_NONE:
|
||||||
|
@ -52,8 +52,6 @@ public:
|
|||||||
Image maImage;
|
Image maImage;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef VclReference<DecoToolBox> DecoToolBoxPtr;
|
|
||||||
|
|
||||||
|
|
||||||
/** Class that implements the actual window of the menu bar.
|
/** Class that implements the actual window of the menu bar.
|
||||||
*/
|
*/
|
||||||
@ -81,9 +79,9 @@ private:
|
|||||||
bool bIgnoreFirstMove;
|
bool bIgnoreFirstMove;
|
||||||
bool bStayActive;
|
bool bStayActive;
|
||||||
|
|
||||||
DecoToolBoxPtr aCloseBtn;
|
VclPtr<DecoToolBox> aCloseBtn;
|
||||||
PushButtonPtr aFloatBtn;
|
VclPtr<PushButton> aFloatBtn;
|
||||||
PushButtonPtr aHideBtn;
|
VclPtr<PushButton> aHideBtn;
|
||||||
|
|
||||||
std::map< sal_uInt16, AddButtonEntry > m_aAddButtons;
|
std::map< sal_uInt16, AddButtonEntry > m_aAddButtons;
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ namespace vcl {
|
|||||||
|
|
||||||
class XIMStatusWindow : public StatusWindow
|
class XIMStatusWindow : public StatusWindow
|
||||||
{
|
{
|
||||||
FixedTextPtr m_aStatusText;
|
VclPtr<FixedText> m_aStatusText;
|
||||||
SalFrame* m_pLastParent;
|
SalFrame* m_pLastParent;
|
||||||
Size m_aWindowSize;
|
Size m_aWindowSize;
|
||||||
bool m_bAnchoredAtRight;
|
bool m_bAnchoredAtRight;
|
||||||
@ -302,7 +302,7 @@ namespace vcl {
|
|||||||
|
|
||||||
class IIIMPStatusWindow : public StatusWindow
|
class IIIMPStatusWindow : public StatusWindow
|
||||||
{
|
{
|
||||||
MenuButtonPtr m_aStatusBtn;
|
VclPtr<MenuButton> m_aStatusBtn;
|
||||||
PopupMenu m_aMenu;
|
PopupMenu m_aMenu;
|
||||||
SalFrame* m_pResetFocus;
|
SalFrame* m_pResetFocus;
|
||||||
bool m_bShow;
|
bool m_bShow;
|
||||||
|
@ -92,10 +92,10 @@ SAL_IMPLEMENT_MAIN()
|
|||||||
|
|
||||||
class MyWin : public WorkWindow
|
class MyWin : public WorkWindow
|
||||||
{
|
{
|
||||||
PushButtonPtr m_aListButton;
|
VclPtr<PushButton> m_aListButton;
|
||||||
ListBoxPtr m_aSvpBitmaps;
|
VclPtr<ListBox> m_aSvpBitmaps;
|
||||||
ImageControlPtr m_aImage;
|
VclPtr<ImageControl> m_aImage;
|
||||||
PushButtonPtr m_aQuitButton;
|
VclPtr<PushButton> m_aQuitButton;
|
||||||
public:
|
public:
|
||||||
MyWin( vcl::Window* pParent, WinBits nWinStyle );
|
MyWin( vcl::Window* pParent, WinBits nWinStyle );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user