Kaydet (Commit) d9e3efbc authored tarafından Caolán McNamara's avatar Caolán McNamara

add a CloseButton to vcl for convenience

does exactly the same default action as a CancelButton except with "Close" as
the label

Change-Id: I538e8fc761cde4a1050d066ef935df1ecd930414
üst f8a4ce67
......@@ -58,7 +58,7 @@ private:
SvTreeListBox* m_pMacroBox;
PushButton* m_pRunButton;
PushButton* m_pCloseButton;
CloseButton* m_pCloseButton;
PushButton* m_pAssignButton;
PushButton* m_pEditButton;
PushButton* m_pDelButton;
......
......@@ -151,7 +151,7 @@ private:
PushButton* m_pOptionsPB;
PushButton* m_pUndoPB;
PushButton* m_pClosePB;
CloseButton* m_pClosePB;
OUString m_sResumeST;
OUString m_sIgnoreOnceST;
......
......@@ -51,7 +51,7 @@ class SvxHyphenWordDialog : public SfxModalDialog
PushButton* m_pContBtn;
PushButton* m_pDelBtn;
PushButton* m_pHyphAll;
PushButton* m_pCloseBtn;
CloseButton* m_pCloseBtn;
String aLabel;
SvxSpellWrapper* pHyphWrapper;
uno::Reference< linguistic2::XHyphenator > xHyphenator;
......
......@@ -142,7 +142,7 @@ protected:
SFTreeListBox* m_pScriptsBox;
PushButton* m_pRunButton;
PushButton* m_pCloseButton;
CloseButton* m_pCloseButton;
PushButton* m_pCreateButton;
PushButton* m_pEditButton;
PushButton* m_pRenameButton;
......
......@@ -101,7 +101,7 @@ class ExtMgrDialog : public ModelessDialog,
ExtBoxWithBtns_Impl *m_pExtensionBox;
PushButton *m_pAddBtn;
PushButton *m_pUpdateBtn;
PushButton *m_pCloseBtn;
CloseButton *m_pCloseBtn;
CheckBox *m_pBundledCbx;
CheckBox *m_pSharedCbx;
CheckBox *m_pUserCbx;
......
......@@ -135,7 +135,7 @@ private:
PushButton* m_pPBDelete;
PushButton* m_pPBSave;
PushButton* m_pPBOpen;
PushButton* m_pPBClose;
CloseButton* m_pPBClose;
bool m_bIsClosable;
......
......@@ -79,7 +79,7 @@ private:
PushButton* m_pPBImportBrowse;
PushButton* m_pPBRecentFile;
FixedText* m_pFTNameOfRecentFile;
PushButton* m_pPBClose;
CloseButton* m_pPBClose;
filter_info_impl* m_pFilterInfo;
......
......@@ -80,7 +80,7 @@ class SwIndexMarkPane
PushButton* m_pOKBT;
PushButton* m_pCloseBT;
CloseButton* m_pCloseBT;
PushButton* m_pDelBT;
PushButton* m_pPrevSameBT;
......@@ -193,7 +193,7 @@ class SwAuthorMarkPane
ListBox* m_pEntryLB;
PushButton* m_pActionBT;
PushButton* m_pCloseBT;
CloseButton* m_pCloseBT;
PushButton* m_pCreateEntryPB;
PushButton* m_pEditEntryPB;
......
......@@ -44,7 +44,7 @@ class SwWordCountFloatDlg : public SfxModelessDialog
FixedText* m_pCjkcharsLabelFT;
PushButton* m_pClosePB;
CloseButton* m_pClosePB;
SW_DLLPRIVATE DECL_LINK( CloseHdl, void* );
public:
......
......@@ -247,6 +247,13 @@ public:
virtual void Click();
};
class VCL_DLLPUBLIC CloseButton : public CancelButton
{
public:
CloseButton(Window* pParent, WinBits nStyle = 0);
};
// --------------
// - HelpButton -
// --------------
......
......@@ -1866,6 +1866,13 @@ void CancelButton::Click()
}
}
CloseButton::CloseButton( Window* pParent, WinBits nStyle )
: CancelButton(pParent, nStyle)
{
SetText( Button::GetStandardText( BUTTON_CLOSE ) );
SetHelpText( Button::GetStandardHelpText( BUTTON_CLOSE ) );
}
// =======================================================================
void HelpButton::ImplInit( Window* pParent, WinBits nStyle )
......
......@@ -506,6 +506,8 @@ namespace
pWindow = new OKButton(pParent, nBits);
else if (sType == "gtk-cancel")
pWindow = new CancelButton(pParent, nBits);
else if (sType == "gtk-close")
pWindow = new CloseButton(pParent, nBits);
else if (sType == "gtk-help")
pWindow = new HelpButton(pParent, nBits);
else
......
......@@ -84,7 +84,7 @@ private:
PushButton* m_pAddBtn;
PushButton* m_pRemoveBtn;
PushButton* m_pCloseBtn;
CloseButton* m_pCloseBtn;
OUString m_sODFVersion;
//Signals if the document contains already a document signature. This is only
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment