diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-01-09 20:10:12 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-01-10 12:24:45 +0000 |
commit | c82390b5afb4f400ba16c3932ef8ad6a714baac9 (patch) | |
tree | 1d9435bb92440d74ae7b63b27385305fda3eb349 /svx | |
parent | b350eb3cdc0e52362dc227c3d8336504d89fb42b (diff) |
adapt code to Asian Phonetic Guide .ui conversion
Change-Id: Ie7bf21269e11fd1b3982999fa16597ba9caba674
Diffstat (limited to 'svx')
-rw-r--r-- | svx/AllLangResTarget_svx.mk | 1 | ||||
-rw-r--r-- | svx/UI_svx.mk | 1 | ||||
-rw-r--r-- | svx/inc/helpid.hrc | 1 | ||||
-rw-r--r-- | svx/inc/svx/dialogs.hrc | 2 | ||||
-rw-r--r-- | svx/inc/svx/rubydialog.hxx | 91 | ||||
-rw-r--r-- | svx/source/dialog/rubydialog.cxx | 256 | ||||
-rw-r--r-- | svx/source/dialog/rubydialog.hrc | 43 | ||||
-rw-r--r-- | svx/source/dialog/rubydialog.src | 205 | ||||
-rw-r--r-- | svx/uiconfig/ui/asianphoneticguidedialog.ui | 403 |
9 files changed, 586 insertions, 417 deletions
diff --git a/svx/AllLangResTarget_svx.mk b/svx/AllLangResTarget_svx.mk index c996c3a1ef15..c4f66e6c79d8 100644 --- a/svx/AllLangResTarget_svx.mk +++ b/svx/AllLangResTarget_svx.mk @@ -63,7 +63,6 @@ $(eval $(call gb_SrsTarget_add_files,svx/res,\ svx/source/dialog/optgrid.src \ svx/source/dialog/passwd.src \ svx/source/dialog/prtqry.src \ - svx/source/dialog/rubydialog.src \ svx/source/dialog/ruler.src \ svx/source/dialog/sdstring.src \ svx/source/dialog/srchdlg.src \ diff --git a/svx/UI_svx.mk b/svx/UI_svx.mk index ae1ccf87cea8..bba32ab1f907 100644 --- a/svx/UI_svx.mk +++ b/svx/UI_svx.mk @@ -10,6 +10,7 @@ $(eval $(call gb_UI_UI,svx)) $(eval $(call gb_UI_add_uifiles,svx,\ + svx/uiconfig/ui/asianphoneticguidedialog \ svx/uiconfig/ui/compressgraphicdialog \ )) diff --git a/svx/inc/helpid.hrc b/svx/inc/helpid.hrc index 0de9cf2835b7..1668f7173efa 100644 --- a/svx/inc/helpid.hrc +++ b/svx/inc/helpid.hrc @@ -181,7 +181,6 @@ #define HID_REDLINING_VIEW_PB_REJECT "SVX_HID_REDLINING_VIEW_PB_REJECT" #define HID_REDLINING_VIEW_PB_REJECTALL "SVX_HID_REDLINING_VIEW_PB_REJECTALL" #define HID_REDLINING_VIEW_PB_UNDO "SVX_HID_REDLINING_VIEW_PB_UNDO" -#define HID_RUBY_DIALOG "SVX_HID_RUBY_DIALOG" #define HID_STYLE_LISTBOX "SVX_HID_STYLE_LISTBOX" #define HID_SVXTBX_UNDO_REDO_CTRL "SVX_HID_SVXTBX_UNDO_REDO_CTRL" #define HID_SVX_CHINESE_DICTIONARY_CB_REVERSE "SVX_HID_SVX_CHINESE_DICTIONARY_CB_REVERSE" diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc index 714106525ffa..d9420b59fb8b 100644 --- a/svx/inc/svx/dialogs.hrc +++ b/svx/inc/svx/dialogs.hrc @@ -250,8 +250,6 @@ #define RID_SVXIMG_NOTCHECKED (RID_SVX_START + 243) #define RID_SVXIMG_CHECKED (RID_SVX_START + 244) -#define RID_SVXDLG_RUBY (RID_SVX_START + 247) - #define RID_SVXDLG_TEXTCONTROL_CHARATTR (RID_SVX_START + 286) #define RID_SVXDLG_TEXTCONTROL_PARAATTR (RID_SVX_START + 287) diff --git a/svx/inc/svx/rubydialog.hxx b/svx/inc/svx/rubydialog.hxx index ab670b545613..3ab0f2577107 100644 --- a/svx/inc/svx/rubydialog.hxx +++ b/svx/inc/svx/rubydialog.hxx @@ -23,6 +23,7 @@ #include <sfx2/childwin.hxx> #include <sfx2/basedlgs.hxx> +#include <vcl/layout.hxx> #include <vcl/lstbox.hxx> #include <vcl/fixed.hxx> #include <vcl/button.hxx> @@ -43,10 +44,16 @@ class RubyPreview : public Window { protected: virtual void Paint( const Rectangle& rRect ); - SvxRubyDialog& rParentDlg; + SvxRubyDialog* m_pParentDlg; public: RubyPreview(SvxRubyDialog& rParent, const ResId& rResId); + RubyPreview(Window *pParent); + void setRubyDialog(SvxRubyDialog* pParentDlg) + { + m_pParentDlg = pParentDlg; + } + virtual Size GetOptimalSize(WindowSizeType eType) const; }; class SVX_DLLPUBLIC SvxRubyChildWindow : public SfxChildWindow @@ -66,8 +73,14 @@ class RubyEdit : public Edit virtual void GetFocus(); virtual long PreNotify( NotifyEvent& rNEvt ); public: - RubyEdit(Window* pParent, const ResId& rResId) : - Edit(pParent, rResId){} + RubyEdit(Window* pParent, const ResId& rResId) + : Edit(pParent, rResId) + { + } + RubyEdit(Window* pParent) + : Edit(pParent, WB_BORDER) + { + } void SetScrollHdl(Link& rLink) {aScrollHdl = rLink;} void SetJumpHdl(Link& rLink) {aJumpHdl = rLink;} }; @@ -80,36 +93,33 @@ class SvxRubyDialog : public SfxModelessDialog friend class RubyPreview; - FixedText aLeftFT; - RubyEdit aLeft1ED; - FixedText aRightFT; - RubyEdit aRight1ED; - RubyEdit aLeft2ED; - RubyEdit aRight2ED; - RubyEdit aLeft3ED; - RubyEdit aRight3ED; - RubyEdit aLeft4ED; - RubyEdit aRight4ED; + FixedText* m_pLeftFT; + FixedText* m_pRightFT; + RubyEdit* m_pLeft1ED; + RubyEdit* m_pRight1ED; + RubyEdit* m_pLeft2ED; + RubyEdit* m_pRight2ED; + RubyEdit* m_pLeft3ED; + RubyEdit* m_pRight3ED; + RubyEdit* m_pLeft4ED; + RubyEdit* m_pRight4ED; - RubyEdit* aEditArr[8]; - ScrollBar aScrollSB; + RubyEdit* aEditArr[8]; + VclScrolledWindow* m_pScrolledWindow; + ScrollBar* m_pScrollSB; - FixedText aAdjustFT; - ListBox aAdjustLB; + ListBox* m_pAdjustLB; - FixedText aPositionFT; - ListBox aPositionLB; + ListBox* m_pPositionLB; - FixedText aCharStyleFT; - ListBox aCharStyleLB; - PushButton aStylistPB; + FixedText* m_pCharStyleFT; + ListBox* m_pCharStyleLB; + PushButton* m_pStylistPB; - FixedText aPreviewFT; - RubyPreview aPreviewWin; + RubyPreview* m_pPreviewWin; - OKButton aApplyPB; - PushButton aClosePB; - HelpButton aHelpPB; + PushButton* m_pApplyPB; + PushButton* m_pClosePB; long nLastPos; long nCurrentEdit; @@ -145,28 +155,7 @@ class SvxRubyDialog : public SfxModelessDialog sal_Bool IsModified() const {return bModified;} void SetModified(sal_Bool bSet) {bModified = bSet;} - void EnableControls(sal_Bool bEnable) - { - aLeftFT.Enable(bEnable); - aRightFT.Enable(bEnable); - aLeft1ED.Enable(bEnable); - aRight1ED.Enable(bEnable); - aLeft2ED.Enable(bEnable); - aRight2ED.Enable(bEnable); - aLeft3ED.Enable(bEnable); - aRight3ED.Enable(bEnable); - aLeft4ED.Enable(bEnable); - aRight4ED.Enable(bEnable); - aScrollSB.Enable(bEnable); - aAdjustFT.Enable(bEnable); - aAdjustLB.Enable(bEnable); - aCharStyleFT.Enable(bEnable); - aCharStyleLB.Enable(bEnable); - aStylistPB.Enable(bEnable); - aPreviewFT.Enable(bEnable); - aPreviewWin.Enable(bEnable); - aApplyPB.Enable(bEnable); - } + void EnableControls(bool bEnable); void GetCurrentText(String& rBase, String& rRuby); @@ -175,8 +164,8 @@ protected: virtual void DataChanged( const DataChangedEvent& rDCEvt ); public: - SvxRubyDialog( SfxBindings *pBindings, SfxChildWindow *pCW, - Window* pParent, const ResId& rResId ); + SvxRubyDialog(SfxBindings *pBindings, SfxChildWindow *pCW, + Window* pParent); virtual ~SvxRubyDialog(); virtual void Activate(); diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index b1698fd2c81e..dd5867015ab5 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -21,7 +21,6 @@ #include <tools/shl.hxx> #include <svx/dialmgr.hxx> #include <svx/dialogs.hrc> -#include <rubydialog.hrc> #include <sfx2/app.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/viewfrm.hxx> @@ -39,6 +38,7 @@ #include <com/sun/star/view/XSelectionSupplier.hpp> #include <cppuhelper/implbase1.hxx> #include <svtools/colorcfg.hxx> +#include <vcl/layout.hxx> using namespace com::sun::star::uno; using namespace com::sun::star::frame; @@ -68,8 +68,8 @@ SvxRubyChildWindow::SvxRubyChildWindow( Window* _pParent, sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo) : SfxChildWindow(_pParent, nId) { - pWindow = new SvxRubyDialog( pBindings, this, _pParent, SVX_RES( RID_SVXDLG_RUBY ) ); - SvxRubyDialog* pDlg = (SvxRubyDialog*) pWindow; + SvxRubyDialog* pDlg = new SvxRubyDialog(pBindings, this, _pParent); + pWindow = pDlg; if ( pInfo->nFlags & SFX_CHILDWIN_ZOOMIN ) pDlg->RollUp(); @@ -194,54 +194,53 @@ void SvxRubyData_Impl::AssertOneEntry() } } -SvxRubyDialog::SvxRubyDialog( SfxBindings *pBind, SfxChildWindow *pCW, - Window* _pParent, const ResId& rResId ) : - SfxModelessDialog( pBind, pCW, _pParent, rResId ), - aLeftFT(this, ResId(FT_LEFT,*rResId.GetResMgr() )), - aLeft1ED(this, ResId(ED_LEFT_1,*rResId.GetResMgr() )), - aRightFT(this, ResId(FT_RIGHT,*rResId.GetResMgr() )), - aRight1ED(this, ResId(ED_RIGHT_1,*rResId.GetResMgr() )), - aLeft2ED(this, ResId(ED_LEFT_2,*rResId.GetResMgr() )), - aRight2ED(this, ResId(ED_RIGHT_2,*rResId.GetResMgr() )), - aLeft3ED(this, ResId(ED_LEFT_3,*rResId.GetResMgr() )), - aRight3ED(this, ResId(ED_RIGHT_3,*rResId.GetResMgr() )), - aLeft4ED(this, ResId(ED_LEFT_4,*rResId.GetResMgr() )), - aRight4ED(this, ResId(ED_RIGHT_4,*rResId.GetResMgr() )), - aScrollSB(this, ResId(SB_SCROLL,*rResId.GetResMgr() )), - aAdjustFT(this, ResId(FT_ADJUST,*rResId.GetResMgr() )), - aAdjustLB(this, ResId(LB_ADJUST,*rResId.GetResMgr() )), - aPositionFT(this, ResId(FT_POSITION,*rResId.GetResMgr() )), - aPositionLB(this, ResId(LB_POSITION,*rResId.GetResMgr() )), - aCharStyleFT(this, ResId(FT_CHAR_STYLE,*rResId.GetResMgr() )), - aCharStyleLB(this, ResId(LB_CHAR_STYLE,*rResId.GetResMgr() )), - aStylistPB(this, ResId(PB_STYLIST,*rResId.GetResMgr() )), - aPreviewFT(this, ResId(FT_PREVIEW,*rResId.GetResMgr() )), - aPreviewWin(*this, ResId(WIN_PREVIEW,*rResId.GetResMgr() )), - aApplyPB(this, ResId(PB_APPLY,*rResId.GetResMgr() )), - aClosePB(this, ResId(PB_CLOSE,*rResId.GetResMgr() )), - aHelpPB(this, ResId(PB_HELP,*rResId.GetResMgr() )), - nLastPos(0), - nCurrentEdit(0), - bModified(sal_False), - pBindings(pBind) +SvxRubyDialog::SvxRubyDialog(SfxBindings *pBind, SfxChildWindow *pCW, + Window* _pParent) + : SfxModelessDialog(pBind, pCW, _pParent, "AsianPhoneticGuideDialog", + "svx/ui/asianphoneticguidedialog.ui") + , nLastPos(0) + , nCurrentEdit(0) + , bModified(false) + , pBindings(pBind) { xImpl = pImpl = new SvxRubyData_Impl; - FreeResource(); - aEditArr[0] = &aLeft1ED; aEditArr[1] = &aRight1ED; - aEditArr[2] = &aLeft2ED; aEditArr[3] = &aRight2ED; - aEditArr[4] = &aLeft3ED; aEditArr[5] = &aRight3ED; - aEditArr[6] = &aLeft4ED; aEditArr[7] = &aRight4ED; - - aApplyPB.SetClickHdl(LINK(this, SvxRubyDialog, ApplyHdl_Impl)); - aClosePB.SetClickHdl(LINK(this, SvxRubyDialog, CloseHdl_Impl)); - aStylistPB.SetClickHdl(LINK(this, SvxRubyDialog, StylistHdl_Impl)); - aAdjustLB.SetSelectHdl(LINK(this, SvxRubyDialog, AdjustHdl_Impl)); - aPositionLB.SetSelectHdl(LINK(this, SvxRubyDialog, PositionHdl_Impl)); - aCharStyleLB.SetSelectHdl(LINK(this, SvxRubyDialog, CharStyleHdl_Impl)); + get(m_pLeftFT, "basetextft"); + get(m_pRightFT, "rubytextft"); + get(m_pAdjustLB, "adjustlb"); + get(m_pPositionLB, "positionlb"); + get(m_pCharStyleFT, "styleft"); + get(m_pCharStyleLB, "stylelb"); + m_pCharStyleLB->SetStyle(m_pCharStyleLB->GetStyle() | WB_SORT); + get(m_pStylistPB, "styles"); + get(m_pApplyPB, "apply"); + get(m_pClosePB, "close"); + get(m_pPreviewWin, "preview"); + m_pPreviewWin->setRubyDialog(this); + get(m_pScrolledWindow, "scrolledwindow"); + m_pScrollSB = &m_pScrolledWindow->getVertScrollBar(); + get(m_pLeft1ED, "Left1ED"); + get(m_pRight1ED, "Right1ED"); + get(m_pLeft2ED, "Left2ED"); + get(m_pRight2ED, "Right2ED"); + get(m_pLeft3ED, "Left3ED"); + get(m_pRight3ED, "Right3ED"); + get(m_pLeft4ED, "Left4ED"); + get(m_pRight4ED, "Right4ED"); + aEditArr[0] = m_pLeft1ED; aEditArr[1] = m_pRight1ED; + aEditArr[2] = m_pLeft2ED; aEditArr[3] = m_pRight2ED; + aEditArr[4] = m_pLeft3ED; aEditArr[5] = m_pRight3ED; + aEditArr[6] = m_pLeft4ED; aEditArr[7] = m_pRight4ED; + + m_pApplyPB->SetClickHdl(LINK(this, SvxRubyDialog, ApplyHdl_Impl)); + m_pClosePB->SetClickHdl(LINK(this, SvxRubyDialog, CloseHdl_Impl)); + m_pStylistPB->SetClickHdl(LINK(this, SvxRubyDialog, StylistHdl_Impl)); + m_pAdjustLB->SetSelectHdl(LINK(this, SvxRubyDialog, AdjustHdl_Impl)); + m_pPositionLB->SetSelectHdl(LINK(this, SvxRubyDialog, PositionHdl_Impl)); + m_pCharStyleLB->SetSelectHdl(LINK(this, SvxRubyDialog, CharStyleHdl_Impl)); Link aScrLk(LINK(this, SvxRubyDialog, ScrollHdl_Impl)); - aScrollSB.SetScrollHdl( aScrLk ); - aScrollSB.SetEndScrollHdl( aScrLk ); + m_pScrollSB->SetScrollHdl( aScrLk ); + m_pScrollSB->SetEndScrollHdl( aScrLk ); Link aEditLk(LINK(this, SvxRubyDialog, EditModifyHdl_Impl)); Link aScrollLk(LINK(this, SvxRubyDialog, EditScrollHdl_Impl)); @@ -256,13 +255,13 @@ SvxRubyDialog::SvxRubyDialog( SfxBindings *pBind, SfxChildWindow *pCW, UpdateColors(); - String leftLabelName = aLeftFT.GetText(), rightLabelName = aRightFT.GetText(); - aLeft2ED.SetAccessibleName(leftLabelName); - aLeft3ED.SetAccessibleName(leftLabelName); - aLeft4ED.SetAccessibleName(leftLabelName); - aRight2ED.SetAccessibleName(rightLabelName); - aRight3ED.SetAccessibleName(rightLabelName); - aRight4ED.SetAccessibleName(rightLabelName); + String leftLabelName = m_pLeftFT->GetText(), rightLabelName = m_pRightFT->GetText(); + m_pLeft2ED->SetAccessibleName(leftLabelName); + m_pLeft3ED->SetAccessibleName(leftLabelName); + m_pLeft4ED->SetAccessibleName(leftLabelName); + m_pRight2ED->SetAccessibleName(rightLabelName); + m_pRight3ED->SetAccessibleName(rightLabelName); + m_pRight4ED->SetAccessibleName(rightLabelName); } SvxRubyDialog::~SvxRubyDialog() @@ -274,12 +273,12 @@ SvxRubyDialog::~SvxRubyDialog() void SvxRubyDialog::ClearCharStyleList() { - for(sal_uInt16 i = 0; i < aCharStyleLB.GetEntryCount(); i++) + for(sal_uInt16 i = 0; i < m_pCharStyleLB->GetEntryCount(); i++) { - void* pData = aCharStyleLB.GetEntryData(i); + void* pData = m_pCharStyleLB->GetEntryData(i); delete (OUString*)pData; } - aCharStyleLB.Clear(); + m_pCharStyleLB->Clear(); } sal_Bool SvxRubyDialog::Close() @@ -296,7 +295,7 @@ void SvxRubyDialog::Activate() SfxPoolItem* pState = 0; SfxItemState eState = pBindings->QueryState( SID_STYLE_DESIGNER, pState ); sal_Bool bEnable = (eState < SFX_ITEM_AVAILABLE) || !pState || !((SfxBoolItem*)pState)->GetValue(); - aStylistPB.Enable(bEnable); + m_pStylistPB->Enable(bEnable); //get selection from current view frame SfxViewFrame* pCurFrm = SfxViewFrame::Current(); Reference< XController > xCtrl = pCurFrm->GetFrame().GetController(); @@ -310,7 +309,7 @@ void SvxRubyDialog::Activate() if(xRubySel.is()) { Reference< XModel > xModel = pImpl->GetModel(); - const String sCharStyleSelect = aCharStyleLB.GetSelectEntry(); + const String sCharStyleSelect = m_pCharStyleLB->GetSelectEntry(); ClearCharStyleList(); Reference<XStyleFamiliesSupplier> xSupplier(xModel, UNO_QUERY); if(xSupplier.is()) @@ -350,8 +349,8 @@ void SvxRubyDialog::Activate() } if(!sName.isEmpty()) { - sal_uInt16 nPos = aCharStyleLB.InsertEntry(sName); - aCharStyleLB.SetEntryData( nPos, new OUString(sCoreName) ); + sal_uInt16 nPos = m_pCharStyleLB->InsertEntry(sName); + m_pCharStyleLB->SetEntryData( nPos, new OUString(sCoreName) ); } } @@ -362,13 +361,13 @@ void SvxRubyDialog::Activate() OSL_FAIL("exception in style access"); } if(sCharStyleSelect.Len()) - aCharStyleLB.SelectEntry(sCharStyleSelect); + m_pCharStyleLB->SelectEntry(sCharStyleSelect); } - aCharStyleLB.Enable(xSupplier.is()); - aCharStyleFT.Enable(xSupplier.is()); + m_pCharStyleLB->Enable(xSupplier.is()); + m_pCharStyleFT->Enable(xSupplier.is()); } Update(); - aPreviewWin.Invalidate(); + m_pPreviewWin->Invalidate(); } } @@ -433,9 +432,9 @@ void SvxRubyDialog::Update() { const Sequence<PropertyValues>& aRubyValues = pImpl->GetRubyValues(); sal_Int32 nLen = aRubyValues.getLength(); - aScrollSB.Enable(nLen > 4); - aScrollSB.SetRange( Range(0, nLen > 4 ? nLen - 4 : 0)); - aScrollSB.SetThumbPos(0); + m_pScrollSB->Enable(nLen > 4); + m_pScrollSB->SetRange( Range(0, nLen > 4 ? nLen - 4 : 0)); + m_pScrollSB->SetThumbPos(0); SetLastPos(0); SetModified(sal_False); @@ -483,29 +482,29 @@ void SvxRubyDialog::Update() nPosition = 0; } if(nAdjust > -1) - aAdjustLB.SelectEntryPos(nAdjust); + m_pAdjustLB->SelectEntryPos(nAdjust); else - aAdjustLB.SetNoSelection(); + m_pAdjustLB->SetNoSelection(); if(nPosition > -1) - aPositionLB.SelectEntryPos(nPosition ? 1 : 0); + m_pPositionLB->SelectEntryPos(nPosition ? 1 : 0); if(!nLen || (bCharStyleEqual && sCharStyleName.isEmpty())) sCharStyleName = C2U(cRubies); if(!sCharStyleName.isEmpty()) { - for(sal_uInt16 i = 0; i < aCharStyleLB.GetEntryCount(); i++) + for(sal_uInt16 i = 0; i < m_pCharStyleLB->GetEntryCount(); i++) { - const OUString* pCoreName = (const OUString*)aCharStyleLB.GetEntryData(i); + const OUString* pCoreName = (const OUString*)m_pCharStyleLB->GetEntryData(i); if(pCoreName && sCharStyleName == *pCoreName) { - aCharStyleLB.SelectEntryPos(i); + m_pCharStyleLB->SelectEntryPos(i); break; } } } else - aCharStyleLB.SetNoSelection(); + m_pCharStyleLB->SetNoSelection(); - ScrollHdl_Impl(&aScrollSB); + ScrollHdl_Impl(m_pScrollSB); } void SvxRubyDialog::GetCurrentText(String& rBase, String& rRuby) @@ -521,12 +520,12 @@ IMPL_LINK(SvxRubyDialog, ScrollHdl_Impl, ScrollBar*, pScroll) { GetText(); } - SetText(nPos++, aLeft1ED, aRight1ED); - SetText(nPos++, aLeft2ED, aRight2ED); - SetText(nPos++, aLeft3ED, aRight3ED); - SetText(nPos, aLeft4ED, aRight4ED); + SetText(nPos++, *m_pLeft1ED, *m_pRight1ED); + SetText(nPos++, *m_pLeft2ED, *m_pRight2ED); + SetText(nPos++, *m_pLeft3ED, *m_pRight3ED); + SetText(nPos, *m_pLeft4ED, *m_pRight4ED); SetLastPos(nPos - 3); - aPreviewWin.Invalidate(); + m_pPreviewWin->Invalidate(); return 0; } @@ -536,13 +535,13 @@ IMPL_LINK_NOARG(SvxRubyDialog, ApplyHdl_Impl) if(!aRubyValues.getLength()) { AssertOneEntry(); - PositionHdl_Impl(&aPositionLB); - AdjustHdl_Impl(&aAdjustLB); - CharStyleHdl_Impl(&aCharStyleLB); + PositionHdl_Impl(m_pPositionLB); + AdjustHdl_Impl(m_pAdjustLB); + CharStyleHdl_Impl(m_pCharStyleLB); } GetText(); //reset all edit fields - SaveValue is called - ScrollHdl_Impl(&aScrollSB); + ScrollHdl_Impl(m_pScrollSB); Reference<XRubySelection> xSelection = pImpl->GetRubySelection(); if(IsModified() && xSelection.is()) @@ -594,7 +593,7 @@ IMPL_LINK(SvxRubyDialog, AdjustHdl_Impl, ListBox*, pBox) } SetModified(sal_True); } - aPreviewWin.Invalidate(); + m_pPreviewWin->Invalidate(); return 0; } @@ -615,7 +614,7 @@ IMPL_LINK(SvxRubyDialog, PositionHdl_Impl, ListBox*, pBox) } SetModified(sal_True); } - aPreviewWin.Invalidate(); + m_pPreviewWin->Invalidate(); return 0; } @@ -623,8 +622,8 @@ IMPL_LINK_NOARG(SvxRubyDialog, CharStyleHdl_Impl) { AssertOneEntry(); OUString sStyleName; - if(LISTBOX_ENTRY_NOTFOUND != aCharStyleLB.GetSelectEntryPos()) - sStyleName = *(OUString*) aCharStyleLB.GetEntryData(aCharStyleLB.GetSelectEntryPos()); + if(LISTBOX_ENTRY_NOTFOUND != m_pCharStyleLB->GetSelectEntryPos()) + sStyleName = *(OUString*) m_pCharStyleLB->GetEntryData(m_pCharStyleLB->GetSelectEntryPos()); Sequence<PropertyValues>& aRubyValues = pImpl->GetRubyValues(); for(sal_Int32 nRuby = 0; nRuby < aRubyValues.getLength(); nRuby++) { @@ -652,34 +651,34 @@ IMPL_LINK(SvxRubyDialog, EditModifyHdl_Impl, Edit*, pEdit) break; } } - aPreviewWin.Invalidate(); + m_pPreviewWin->Invalidate(); return 0; } IMPL_LINK(SvxRubyDialog, EditScrollHdl_Impl, sal_Int32*, pParam) { long nRet = 0; - if(aScrollSB.IsEnabled()) + if(m_pScrollSB->IsEnabled()) { //scroll forward if(*pParam > 0 && (aEditArr[7]->HasFocus() || aEditArr[6]->HasFocus() )) { - if(aScrollSB.GetRangeMax() > aScrollSB.GetThumbPos()) + if(m_pScrollSB->GetRangeMax() > m_pScrollSB->GetThumbPos()) { - aScrollSB.SetThumbPos(aScrollSB.GetThumbPos() + 1); + m_pScrollSB->SetThumbPos(m_pScrollSB->GetThumbPos() + 1); aEditArr[6]->GrabFocus(); nRet = 1; } } //scroll backward - else if(aScrollSB.GetThumbPos() && (aEditArr[0]->HasFocus()||aEditArr[1]->HasFocus()) ) + else if(m_pScrollSB->GetThumbPos() && (aEditArr[0]->HasFocus()||aEditArr[1]->HasFocus()) ) { - aScrollSB.SetThumbPos(aScrollSB.GetThumbPos() - 1); + m_pScrollSB->SetThumbPos(m_pScrollSB->GetThumbPos() - 1); aEditArr[1]->GrabFocus(); nRet = 1; } if(nRet) - ScrollHdl_Impl(&aScrollSB); + ScrollHdl_Impl(m_pScrollSB); } return nRet; } @@ -724,7 +723,7 @@ void SvxRubyDialog::UpdateColors( void ) const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); svtools::ColorConfig aColorConfig; - Font aFnt( aPreviewWin.GetFont() ); + Font aFnt( m_pPreviewWin->GetFont() ); Color aNewTextCol( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor ); Color aNewFillCol( rStyleSettings.GetWindowColor() ); @@ -733,9 +732,9 @@ void SvxRubyDialog::UpdateColors( void ) { aFnt.SetFillColor( aNewFillCol ); aFnt.SetColor( aNewTextCol ); - aPreviewWin.SetFont( aFnt ); + m_pPreviewWin->SetFont( aFnt ); - aPreviewWin.Invalidate(); + m_pPreviewWin->Invalidate(); } } @@ -749,42 +748,59 @@ void SvxRubyDialog::DataChanged( const DataChangedEvent& rDCEvt ) UpdateColors(); } -RubyPreview::RubyPreview(SvxRubyDialog& rParent, const ResId& rResId) : - Window(&rParent, rResId), - rParentDlg(rParent) +void SvxRubyDialog::EnableControls(bool bEnable) { - SetMapMode(MAP_TWIP); - Size aWinSize = GetOutputSize(); + get_content_area()->Enable(bEnable); + m_pApplyPB->Enable(bEnable); +} - Font aFont = GetFont(); - aFont.SetHeight(aWinSize.Height() / 4); - SetFont(aFont); +RubyPreview::RubyPreview(SvxRubyDialog& rParent, const ResId& rResId) + : Window(&rParent, rResId) + , m_pParentDlg(&rParent) +{ + SetMapMode(MAP_TWIP); + SetBorderStyle( WINDOW_BORDER_MONO ); +} +RubyPreview::RubyPreview(Window *pParent) + : Window(pParent, WB_BORDER) + , m_pParentDlg(NULL) +{ + SetMapMode(MAP_TWIP); SetBorderStyle( WINDOW_BORDER_MONO ); } -void RubyPreview::Paint( const Rectangle& /* rRect */ ) +extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeRubyPreview(Window *pParent, VclBuilder::stringmap &) { - Font aRubyFont = GetFont(); - Font aSaveFont(aRubyFont); - aRubyFont.SetHeight(aRubyFont.GetHeight() * 70 / 100); + return new RubyPreview(pParent); +} +void RubyPreview::Paint( const Rectangle& /* rRect */ ) +{ Size aWinSize = GetOutputSize(); + + Font aSaveFont = GetFont(); + aSaveFont.SetHeight(aWinSize.Height() / 4); + SetFont(aSaveFont); + Rectangle aRect(Point(0, 0), aWinSize); SetLineColor(); SetFillColor( aSaveFont.GetFillColor() ); DrawRect(aRect); String sBaseText, sRubyText; - rParentDlg.GetCurrentText(sBaseText, sRubyText); + m_pParentDlg->GetCurrentText(sBaseText, sRubyText); long nTextHeight = GetTextHeight(); long nBaseWidth = GetTextWidth(sBaseText); + + Font aRubyFont(aSaveFont); + aRubyFont.SetHeight(aRubyFont.GetHeight() * 70 / 100); SetFont(aRubyFont); long nRubyWidth = GetTextWidth(sRubyText); SetFont(aSaveFont); - sal_uInt16 nAdjust = rParentDlg.aAdjustLB.GetSelectEntryPos(); + sal_uInt16 nAdjust = m_pParentDlg->m_pAdjustLB->GetSelectEntryPos(); //use center if no adjustment is available if(nAdjust > 4) nAdjust = 1; @@ -800,7 +816,7 @@ void RubyPreview::Paint( const Rectangle& /* rRect */ ) long nYBase = aWinSize.Height() * 3 / 4 - nTextHeight / 2; //use above also if no selection is set - sal_Bool bAbove = rParentDlg.aPositionLB.GetSelectEntryPos() != 1; + sal_Bool bAbove = m_pParentDlg->m_pPositionLB->GetSelectEntryPos() != 1; if(!bAbove) { long nTmp = nYRuby; @@ -870,6 +886,13 @@ void RubyPreview::Paint( const Rectangle& /* rRect */ ) SetFont(aSaveFont); } +Size RubyPreview::GetOptimalSize(WindowSizeType eType) const +{ + if (eType == WINDOWSIZE_PREFERRED) + return LogicToPixel(Size(215, 50), MapMode(MAP_APPFONT)); + return Window::GetOptimalSize(eType); +} + void RubyEdit::GetFocus() { GetModifyHdl().Call(this); @@ -902,4 +925,9 @@ long RubyEdit::PreNotify( NotifyEvent& rNEvt ) return nHandled; } +extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeRubyEdit(Window *pParent, VclBuilder::stringmap &) +{ + return new RubyEdit(pParent); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/rubydialog.hrc b/svx/source/dialog/rubydialog.hrc deleted file mode 100644 index d4f4b6c8a400..000000000000 --- a/svx/source/dialog/rubydialog.hrc +++ /dev/null @@ -1,43 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#define FT_CHAR_STYLE 2 -#define LB_CHAR_STYLE 3 -#define PB_STYLIST 4 -#define FT_PREVIEW 5 -#define WIN_PREVIEW 6 -#define PB_APPLY 7 -#define PB_CLOSE 8 -#define PB_HELP 9 -#define ED_LEFT_1 10 -#define ED_LEFT_2 11 -#define ED_LEFT_3 12 -#define ED_LEFT_4 13 -#define ED_RIGHT_1 14 -#define ED_RIGHT_2 15 -#define ED_RIGHT_3 16 -#define ED_RIGHT_4 17 -#define HB_HEADER 18 -#define SB_SCROLL 19 -#define FT_LEFT 20 -#define FT_RIGHT 21 -#define FT_ADJUST 22 -#define LB_ADJUST 23 -#define FT_POSITION 24 -#define LB_POSITION 25 - diff --git a/svx/source/dialog/rubydialog.src b/svx/source/dialog/rubydialog.src deleted file mode 100644 index 658b793dc061..000000000000 --- a/svx/source/dialog/rubydialog.src +++ /dev/null @@ -1,205 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <rubydialog.hrc> -#include "helpid.hrc" -#include <svx/dialogs.hrc> - -ModelessDialog RID_SVXDLG_RUBY -{ - OutputSize = TRUE ; - Hide = TRUE ; - SVLook = TRUE ; - HelpId = HID_RUBY_DIALOG; - Pos = MAP_APPFONT ( 0 , 0 ) ; - Size = MAP_APPFONT ( 227 , 195 ) ; - Text [ en-US ] = "Asian Phonetic Guide" ; - Moveable = TRUE ; - Closeable = TRUE ; - FixedText FT_LEFT - { - Pos = MAP_APPFONT ( 6 , 17 ) ; - Size = MAP_APPFONT ( 80 , 8 ) ; - Text [ en-US ] = "Base text"; - }; - FixedText FT_RIGHT - { - Pos = MAP_APPFONT ( 109 , 17 ) ; - Size = MAP_APPFONT ( 80 , 8 ) ; - Text [ en-US ] = "Ruby text"; - }; - Edit ED_LEFT_1 - { - HelpID = "svx:Edit:RID_SVXDLG_RUBY:ED_LEFT_1"; - Pos = MAP_APPFONT ( 6 , 30 ) ; - Size = MAP_APPFONT ( 102 , 12 ) ; - Hide = False; - Border = TRUE; - }; - Edit ED_RIGHT_1 - { - HelpID = "svx:Edit:RID_SVXDLG_RUBY:ED_RIGHT_1"; - Pos = MAP_APPFONT ( 109 , 30 ) ; - Size = MAP_APPFONT ( 102 , 12 ) ; - Border = TRUE; - }; - Edit ED_LEFT_2 - { - HelpID = "svx:Edit:RID_SVXDLG_RUBY:ED_LEFT_2"; - Pos = MAP_APPFONT ( 6 , 42) ; - Size = MAP_APPFONT ( 102 , 12 ) ; - Border = TRUE; - }; - Edit ED_RIGHT_2 - { - HelpID = "svx:Edit:RID_SVXDLG_RUBY:ED_RIGHT_2"; - Pos = MAP_APPFONT ( 109 , 42 ) ; - Size = MAP_APPFONT ( 102 , 12 ) ; - Border = TRUE; - }; - Edit ED_LEFT_3 - { - HelpID = "svx:Edit:RID_SVXDLG_RUBY:ED_LEFT_3"; - Pos = MAP_APPFONT ( 6 , 54 ) ; - Size = MAP_APPFONT ( 102 , 12 ) ; - Border = TRUE; - }; - Edit ED_RIGHT_3 - { - HelpID = "svx:Edit:RID_SVXDLG_RUBY:ED_RIGHT_3"; - Pos = MAP_APPFONT ( 109 , 54 ) ; - Size = MAP_APPFONT ( 102 , 12 ) ; - Border = TRUE; - }; - Edit ED_LEFT_4 - { - HelpID = "svx:Edit:RID_SVXDLG_RUBY:ED_LEFT_4"; - Pos = MAP_APPFONT ( 6 , 66 ) ; - Size = MAP_APPFONT ( 102 , 12 ) ; - Border = TRUE; - }; - Edit ED_RIGHT_4 - { - HelpID = "svx:Edit:RID_SVXDLG_RUBY:ED_RIGHT_4"; - Pos = MAP_APPFONT ( 109 , 66 ) ; - Size = MAP_APPFONT ( 102 , 12 ) ; - Border = TRUE; - }; - ScrollBar SB_SCROLL - { - Pos = MAP_APPFONT ( 213 , 30 ) ; - Size = MAP_APPFONT ( 8 , 48 ) ; - VScroll = TRUE ; - Drag = TRUE ; - }; - FixedText FT_ADJUST - { - Pos = MAP_APPFONT ( 6 , 82 ) ; - Size = MAP_APPFONT ( 35 , 8 ) ; - Text [ en-US ] = "Alignment"; - }; - ListBox LB_ADJUST - { - HelpID = "svx:ListBox:RID_SVXDLG_RUBY:LB_ADJUST"; - Pos = MAP_APPFONT ( 6 , 93) ; - Size = MAP_APPFONT ( 35 , 60 ) ; - DropDown = TRUE; - Border = TRUE; - StringList [ en-US ] = - { - "Left" ; - "Center" ; - "Right" ; - "0 1 0" ; - "1 2 1" ; - }; - }; - FixedText FT_POSITION - { - Pos = MAP_APPFONT ( 43 , 82 ) ; - Size = MAP_APPFONT ( 35 , 8 ) ; - Text [ en-US ] = "Position"; - }; - ListBox LB_POSITION - { - HelpID = "svx:ListBox:RID_SVXDLG_RUBY:LB_POSITION"; - Pos = MAP_APPFONT ( 43 , 93) ; - Size = MAP_APPFONT ( 35 , 60 ) ; - DropDown = TRUE; - Border = TRUE; - StringList [ en-US ] = - { - "Top" ; - "Bottom" ; - }; - }; - FixedText FT_CHAR_STYLE - { - Pos = MAP_APPFONT ( 80 , 82 ) ; - Size = MAP_APPFONT ( 141 , 8 ) ; - Text [ en-US ] = "Character Style for ruby text"; - }; - ListBox LB_CHAR_STYLE - { - HelpID = "svx:ListBox:RID_SVXDLG_RUBY:LB_CHAR_STYLE"; - Pos = MAP_APPFONT ( 80 , 93) ; - Size = MAP_APPFONT ( 89 , 60 ) ; - DropDown = TRUE; - Border = TRUE; - Sort = TRUE; - }; - PushButton PB_STYLIST - { - HelpID = "svx:PushButton:RID_SVXDLG_RUBY:PB_STYLIST"; - Pos = MAP_APPFONT ( 171 , 92 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - Text [ en-US ] = "Styles"; - }; - FixedText FT_PREVIEW - { - Pos = MAP_APPFONT ( 6, 110 ) ; - Size = MAP_APPFONT ( 195 , 8 ) ; - Text [ en-US ] = "Preview:"; - }; - Window WIN_PREVIEW - { - Pos = MAP_APPFONT ( 6 , 121 ) ; - Size = MAP_APPFONT ( 215 , 50 ) ; - Border = TRUE ; - }; - OKButton PB_APPLY - { - DefButton = TRUE; - Pos = MAP_APPFONT ( 65 , 175 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - Text [ en-US ] = "~Apply"; - }; - PushButton PB_CLOSE - { - HelpID = "svx:PushButton:RID_SVXDLG_RUBY:PB_CLOSE"; - Pos = MAP_APPFONT ( 118, 175 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - Text [ en-US ] = "~Close"; - }; - HelpButton PB_HELP - { - Pos = MAP_APPFONT ( 171 , 175 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - }; -}; - diff --git a/svx/uiconfig/ui/asianphoneticguidedialog.ui b/svx/uiconfig/ui/asianphoneticguidedialog.ui new file mode 100644 index 000000000000..17df036dfff0 --- /dev/null +++ b/svx/uiconfig/ui/asianphoneticguidedialog.ui @@ -0,0 +1,403 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkDialog" id="AsianPhoneticGuideDialog"> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="title" translatable="yes">Asian Phonetic Guide</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox1"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">2</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="apply"> + <property name="label">gtk-apply</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="close"> + <property name="label">gtk-close</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="help"> + <property name="label">gtk-help</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkGrid" id="grid3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="column_spacing">12</property> + <property name="column_homogeneous">True</property> + <child> + <object class="GtkLabel" id="basetextft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Base text </property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="rubytextft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Ruby text</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkScrolledWindow" id="scrolledwindow"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">never</property> + <property name="vscrollbar_policy">always</property> + <property name="shadow_type">in</property> + <child> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_right">3</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="column_spacing">3</property> + <child> + <object class="svxlo:RubyEdit" id="Left2ED"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="svxlo:RubyEdit" id="Left1ED"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="svxlo:RubyEdit" id="Right1ED"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="svxlo:RubyEdit" id="Right2ED"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="svxlo:RubyEdit" id="Left3ED"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="svxlo:RubyEdit" id="Right3ED"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="svxlo:RubyEdit" id="Right4ED"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">3</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="svxlo:RubyEdit" id="Left4ED"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">3</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_top">6</property> + <property name="row_spacing">6</property> + <property name="column_spacing">6</property> + <child> + <object class="GtkLabel" id="label4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Alignment </property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Position </property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="styleft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Character Style for ruby text</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="stylelb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="styles"> + <property name="label" translatable="yes">Styles</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkComboBoxText" id="adjustlb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="entry_text_column">0</property> + <property name="id_column">1</property> + <items> + <item translatable="yes">Left</item> + <item translatable="yes">Center</item> + <item translatable="yes">Right</item> + <item translatable="yes">0 1 0</item> + <item translatable="yes">1 2 1</item> + </items> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkComboBoxText" id="positionlb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="entry_text_column">0</property> + <property name="id_column">1</property> + <items> + <item translatable="yes">Top</item> + <item translatable="yes">Bottom</item> + </items> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_top">6</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Preview:</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">4</property> + </packing> + </child> + <child> + <object class="svxlo:RubyPreview" id="preview"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">5</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="0">apply</action-widget> + <action-widget response="0">close</action-widget> + <action-widget response="0">help</action-widget> + </action-widgets> + </object> +</interface> |