summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorFrank Schönheit <fs@openoffice.org>2001-02-19 13:08:31 +0000
committerFrank Schönheit <fs@openoffice.org>2001-02-19 13:08:31 +0000
commite4d9718afdcdec1a0674a899a2175d6a9375cf02 (patch)
tree5521e3d30f789b0881141739d74f6d561647f5ad /extensions
parent717e294d581243b802eaf42ab349e38f5ea169b7 (diff)
#84041# infrastructure for activating pages from outside
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/propctrlr/browserview.cxx19
-rw-r--r--extensions/source/propctrlr/browserview.hxx16
-rw-r--r--extensions/source/propctrlr/pcrstrings.hxx9
-rw-r--r--extensions/source/propctrlr/propertyeditor.cxx17
-rw-r--r--extensions/source/propctrlr/propertyeditor.hxx12
5 files changed, 60 insertions, 13 deletions
diff --git a/extensions/source/propctrlr/browserview.cxx b/extensions/source/propctrlr/browserview.cxx
index 5d484ed1c0f3..989f0c754128 100644
--- a/extensions/source/propctrlr/browserview.cxx
+++ b/extensions/source/propctrlr/browserview.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: browserview.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: rt $ $Date: 2001-01-18 14:45:10 $
+ * last change: $Author: fs $ $Date: 2001-02-19 14:08:31 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -100,6 +100,7 @@ namespace pcr
m_pPropBox = new OPropertyEditor( this );
m_pPropBox->SetHelpId(HID_FM_PROPDLG_TABCTR);
+ m_pPropBox->setPageActivationHandler(LINK(this, OPropertyBrowserView, OnPageActivation));
m_pPropBox->Show();
}
@@ -115,8 +116,8 @@ namespace pcr
DBG_CTOR(OPropertyBrowserView,NULL);
m_pPropBox = new OPropertyEditor( this );
-
m_pPropBox->SetHelpId(HID_FM_PROPDLG_TABCTR);
+ m_pPropBox->setPageActivationHandler(LINK(this, OPropertyBrowserView, OnPageActivation));
Size aSize = GetOutputSizePixel();
m_pPropBox->SetPosSizePixel(Point(0,0), aSize);
@@ -124,6 +125,15 @@ namespace pcr
}
//------------------------------------------------------------------------
+ IMPL_LINK(OPropertyBrowserView, OnPageActivation, void*, EMPTYARG)
+ {
+ m_nActivePage = m_pPropBox->GetCurPage();
+ if (m_aPageActivationHandler.IsSet())
+ m_aPageActivationHandler.Call(NULL);
+ return 0L;
+ }
+
+ //------------------------------------------------------------------------
OPropertyBrowserView::~OPropertyBrowserView()
{
if(m_pPropBox)
@@ -174,6 +184,9 @@ namespace pcr
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.2 2001/01/18 14:45:10 rt
+ * #65293# semicolon removed
+ *
* Revision 1.1 2001/01/12 11:26:10 fs
* initial checkin - outsourced the form property browser
*
diff --git a/extensions/source/propctrlr/browserview.hxx b/extensions/source/propctrlr/browserview.hxx
index 44ca6656f373..7383170f1b39 100644
--- a/extensions/source/propctrlr/browserview.hxx
+++ b/extensions/source/propctrlr/browserview.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: browserview.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: fs $ $Date: 2001-01-12 11:26:24 $
+ * last change: $Author: fs $ $Date: 2001-02-19 14:08:31 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -86,7 +86,7 @@ namespace pcr
//========================================================================
class OPropertyBrowserView : public Window
{
- friend class OPropertyBrowserController;
+// friend class OPropertyBrowserController;
OPropertyBrowserController* m_pActiveController;
@@ -95,6 +95,7 @@ namespace pcr
OPropertyEditor* m_pPropBox;
sal_uInt16 m_nActivePage;
+ Link m_aPageActivationHandler;
protected:
virtual void Resize();
@@ -121,6 +122,12 @@ namespace pcr
// page handling
sal_uInt16 getActivaPage() const { return m_nActivePage; }
void activatePage(sal_uInt16 _nPage);
+
+ void setPageActivationHandler(const Link& _rHdl) { m_aPageActivationHandler = _rHdl; }
+ Link getPageActivationHandler() const { return m_aPageActivationHandler; }
+
+ protected:
+ DECL_LINK(OnPageActivation, void*);
};
@@ -133,6 +140,9 @@ namespace pcr
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.1 2001/01/12 11:26:24 fs
+ * initial checkin - outsourced the form property browser
+ *
*
* Revision 1.0 08.01.01 11:01:16 fs
************************************************************************/
diff --git a/extensions/source/propctrlr/pcrstrings.hxx b/extensions/source/propctrlr/pcrstrings.hxx
index 1d38752fd8bc..401846ebcb64 100644
--- a/extensions/source/propctrlr/pcrstrings.hxx
+++ b/extensions/source/propctrlr/pcrstrings.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: pcrstrings.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: fs $ $Date: 2001-01-12 11:30:51 $
+ * last change: $Author: fs $ $Date: 2001-02-19 14:08:31 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -74,7 +74,7 @@ namespace pcr
// properties
PCR_CONSTASCII_STRING( PROPERTY_DEFAULTCONTROL, "DefaultControl" );
PCR_CONSTASCII_STRING( PROPERTY_INTROSPECTEDOBJECT, "IntrospectedObject" );
- PCR_CONSTASCII_STRING( PROPERTY_TITLEPROPOSAL, "TitleProposal" );
+ PCR_CONSTASCII_STRING( PROPERTY_CURRENTPAGE, "CurrentPage" );
// services
PCR_CONSTASCII_STRING( SERVICE_FORMCONTROLLER, "com.sun.star.form.controller.FormController" );
@@ -88,6 +88,9 @@ namespace pcr
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.1 2001/01/12 11:30:51 fs
+ * initial checkin - outsourced the form property browser
+ *
*
* Revision 1.0 08.01.01 14:17:16 fs
************************************************************************/
diff --git a/extensions/source/propctrlr/propertyeditor.cxx b/extensions/source/propctrlr/propertyeditor.cxx
index 16688d3aad42..708155c1b731 100644
--- a/extensions/source/propctrlr/propertyeditor.cxx
+++ b/extensions/source/propctrlr/propertyeditor.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: propertyeditor.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: rt $ $Date: 2001-01-18 14:45:10 $
+ * last change: $Author: fs $ $Date: 2001-02-19 14:08:31 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -88,6 +88,7 @@ namespace pcr
m_aTabControl.Show();
m_aTabControl.SetDeactivatePageHdl(LINK(this, OPropertyEditor, OnPageDeactivate));
+ m_aTabControl.SetActivatePageHdl(LINK(this, OPropertyEditor, OnPageActivate));
m_aTabControl.SetBackground(GetBackground());
}
@@ -101,6 +102,7 @@ namespace pcr
m_aTabControl.Show();
m_aTabControl.SetDeactivatePageHdl(LINK(this, OPropertyEditor, OnPageDeactivate));
+ m_aTabControl.SetActivatePageHdl(LINK(this, OPropertyEditor, OnPageActivate));
SetHelpId(GetHelpId());
m_aTabControl.SetBackground(GetBackground());
@@ -393,6 +395,14 @@ namespace pcr
}
//------------------------------------------------------------------
+ IMPL_LINK(OPropertyEditor, OnPageActivate, TabControl*, EMPTYARG)
+ {
+ if (m_aPageActivationHandler.IsSet())
+ m_aPageActivationHandler.Call(NULL);
+ return 0L;
+ }
+
+ //------------------------------------------------------------------
IMPL_LINK(OPropertyEditor, OnPageDeactivate, TabControl*, EMPTYARG)
{
// commit the data on the current (to-be-decativated) tab page
@@ -414,6 +424,9 @@ namespace pcr
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.2 2001/01/18 14:45:10 rt
+ * #65293# semicolon removed
+ *
* Revision 1.1 2001/01/12 11:31:24 fs
* initial checkin - outsourced the form property browser
*
diff --git a/extensions/source/propctrlr/propertyeditor.hxx b/extensions/source/propctrlr/propertyeditor.hxx
index c028d52be919..91dd7c4d0eab 100644
--- a/extensions/source/propctrlr/propertyeditor.hxx
+++ b/extensions/source/propctrlr/propertyeditor.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: propertyeditor.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: fs $ $Date: 2001-01-12 11:31:33 $
+ * last change: $Author: fs $ $Date: 2001-02-19 14:08:31 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -87,6 +87,7 @@ namespace pcr
TabControl m_aTabControl;
IPropertyLineListener* m_pListener;
sal_uInt16 m_nNextId;
+ Link m_aPageActivationHandler;
protected:
virtual void Resize();
@@ -127,8 +128,12 @@ namespace pcr
virtual void SetSelectedEntry(sal_uInt16 nPos);
virtual sal_uInt16 GetSelectedEntry();
+ void setPageActivationHandler(const Link& _rHdl) { m_aPageActivationHandler = _rHdl; }
+ Link getPageActivationHandler() const { return m_aPageActivationHandler; }
+
protected:
DECL_LINK(OnPageDeactivate, TabControl*);
+ DECL_LINK(OnPageActivate, TabControl*);
};
//............................................................................
@@ -140,6 +145,9 @@ namespace pcr
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.1 2001/01/12 11:31:33 fs
+ * initial checkin - outsourced the form property browser
+ *
*
* Revision 1.0 08.01.01 11:50:25 fs
************************************************************************/