make formula refButton and refEdit loadable from .ui
Change-Id: I2ad13cd8de2c0f8f5672a30c3c1117708368b05f
This commit is contained in:
parent
d1c72717a2
commit
a9b33fc304
@ -109,6 +109,13 @@
|
|||||||
generic-name="ComboBoxNumeric" parent="VclComboBoxText"
|
generic-name="ComboBoxNumeric" parent="VclComboBoxText"
|
||||||
icon-name="widget-gtk-comboboxtext"/>
|
icon-name="widget-gtk-comboboxtext"/>
|
||||||
|
|
||||||
|
<glade-widget-class title="Reference Button" name="foruilo-RefButton"
|
||||||
|
generic-name="Reference Button" parent="GtkButton"
|
||||||
|
icon-name="widget-gtk-button"/>
|
||||||
|
|
||||||
|
<glade-widget-class title="Reference Edit" name="foruilo-RefEdit"
|
||||||
|
generic-name="Reference Edit" parent="GtkEntry"
|
||||||
|
icon-name="widget-gtk-textentry"/>
|
||||||
|
|
||||||
</glade-widget-classes>
|
</glade-widget-classes>
|
||||||
</glade-catalog>
|
</glade-catalog>
|
||||||
|
@ -44,6 +44,7 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
RefEdit( Window* _pParent,IControlReferenceHandler* pParent, const ResId& rResId );
|
RefEdit( Window* _pParent,IControlReferenceHandler* pParent, const ResId& rResId );
|
||||||
|
RefEdit( Window* _pParent, WinBits nStyle = WB_BORDER );
|
||||||
virtual ~RefEdit();
|
virtual ~RefEdit();
|
||||||
|
|
||||||
void SetRefString( const XubString& rStr );
|
void SetRefString( const XubString& rStr );
|
||||||
@ -84,8 +85,9 @@ protected:
|
|||||||
virtual void LoseFocus();
|
virtual void LoseFocus();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RefButton( Window* _pParent, const ResId& rResId);
|
RefButton(Window* _pParent, const ResId& rResId);
|
||||||
RefButton( Window* _pParent, const ResId& rResId, RefEdit* pEdit ,IControlReferenceHandler* pDlg);
|
RefButton(Window* _pParent, WinBits nStyle = 0);
|
||||||
|
RefButton(Window* _pParent, const ResId& rResId, RefEdit* pEdit ,IControlReferenceHandler* pDlg);
|
||||||
|
|
||||||
void SetReferences( IControlReferenceHandler* pDlg, RefEdit* pEdit );
|
void SetReferences( IControlReferenceHandler* pDlg, RefEdit* pEdit );
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <vcl/builder.hxx>
|
||||||
#include <vcl/svapp.hxx>
|
#include <vcl/svapp.hxx>
|
||||||
#include <vcl/scrbar.hxx>
|
#include <vcl/scrbar.hxx>
|
||||||
|
|
||||||
@ -854,6 +855,19 @@ RefEdit::RefEdit( Window* _pParent,IControlReferenceHandler* pParent, const ResI
|
|||||||
aTimer.SetTimeout( SC_ENABLE_TIME );
|
aTimer.SetTimeout( SC_ENABLE_TIME );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RefEdit::RefEdit( Window* _pParent, WinBits nStyle ) :
|
||||||
|
Edit( _pParent, nStyle ),
|
||||||
|
pAnyRefDlg( NULL )
|
||||||
|
{
|
||||||
|
aTimer.SetTimeoutHdl( LINK( this, RefEdit, UpdateHdl ) );
|
||||||
|
aTimer.SetTimeout( SC_ENABLE_TIME );
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeRefEdit(Window *pParent, VclBuilder::stringmap &)
|
||||||
|
{
|
||||||
|
return new RefEdit(pParent, WB_BORDER);
|
||||||
|
}
|
||||||
|
|
||||||
RefEdit::~RefEdit()
|
RefEdit::~RefEdit()
|
||||||
{
|
{
|
||||||
aTimer.SetTimeoutHdl( Link() );
|
aTimer.SetTimeoutHdl( Link() );
|
||||||
@ -958,6 +972,23 @@ RefButton::RefButton( Window* _pParent, const ResId& rResId) :
|
|||||||
SetStartImage();
|
SetStartImage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RefButton::RefButton( Window* _pParent, WinBits nStyle ) :
|
||||||
|
ImageButton( _pParent, nStyle ),
|
||||||
|
aImgRefStart( ModuleRes( RID_BMP_REFBTN1 ) ),
|
||||||
|
aImgRefDone( ModuleRes( RID_BMP_REFBTN2 ) ),
|
||||||
|
aShrinkQuickHelp( ModuleRes( RID_STR_SHRINK ).toString() ),
|
||||||
|
aExpandQuickHelp( ModuleRes( RID_STR_EXPAND ).toString() ),
|
||||||
|
pAnyRefDlg( NULL ),
|
||||||
|
pRefEdit( NULL )
|
||||||
|
{
|
||||||
|
SetStartImage();
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeRefButton(Window *pParent, VclBuilder::stringmap &)
|
||||||
|
{
|
||||||
|
return new RefButton(pParent, 0);
|
||||||
|
}
|
||||||
|
|
||||||
RefButton::RefButton( Window* _pParent, const ResId& rResId, RefEdit* pEdit, IControlReferenceHandler* _pDlg ) :
|
RefButton::RefButton( Window* _pParent, const ResId& rResId, RefEdit* pEdit, IControlReferenceHandler* _pDlg ) :
|
||||||
ImageButton( _pParent, rResId ),
|
ImageButton( _pParent, rResId ),
|
||||||
aImgRefStart( ModuleRes( RID_BMP_REFBTN1 ) ),
|
aImgRefStart( ModuleRes( RID_BMP_REFBTN1 ) ),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user