diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2013-04-18 18:26:28 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2013-04-23 22:20:31 +0200 |
commit | b9337e22ce1dbf2eba0e8c8db294ae99f4111f91 (patch) | |
tree | 53ee1bd3dfd213815a21579151983cb997922b05 /include/svx/rubydialog.hxx | |
parent | f4e1642a1761d5eab6ccdd89928869c2b2f1528a (diff) |
execute move of global headers
see https://gerrit.libreoffice.org/#/c/3367/
and Change-Id: I00c96fa77d04b33a6f8c8cd3490dfcd9bdc9e84a for details
Change-Id: I199a75bc4042af20817265d5ef85b1134a96ff5a
Diffstat (limited to 'include/svx/rubydialog.hxx')
-rw-r--r-- | include/svx/rubydialog.hxx | 177 |
1 files changed, 177 insertions, 0 deletions
diff --git a/include/svx/rubydialog.hxx b/include/svx/rubydialog.hxx new file mode 100644 index 000000000000..f1538a32c3ec --- /dev/null +++ b/include/svx/rubydialog.hxx @@ -0,0 +1,177 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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 . + */ + + +#ifndef _SVX_RUBYDLG_HXX_ +#define _SVX_RUBYDLG_HXX_ + +#include <sfx2/childwin.hxx> +#include <sfx2/basedlgs.hxx> +#include <vcl/layout.hxx> +#include <vcl/lstbox.hxx> +#include <vcl/fixed.hxx> +#include <vcl/button.hxx> +#include <vcl/edit.hxx> +#include <vcl/scrbar.hxx> +#include <com/sun/star/uno/Reference.h> +#include "svx/svxdllapi.h" + +namespace com{namespace sun{namespace star{ + namespace view{ + class XSelectionChangeListener; + } +}}} + + +class SvxRubyDialog; +class RubyPreview : public Window +{ +protected: + virtual void Paint( const Rectangle& rRect ); + SvxRubyDialog* m_pParentDlg; + +public: + RubyPreview(Window *pParent); + void setRubyDialog(SvxRubyDialog* pParentDlg) + { + m_pParentDlg = pParentDlg; + } + virtual Size GetOptimalSize() const; +}; + +class SVX_DLLPUBLIC SvxRubyChildWindow : public SfxChildWindow +{ + public: + + SvxRubyChildWindow( Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo* ); + + SFX_DECL_CHILDWINDOW( SvxRubyChildWindow ); + +}; +class SvxRubyData_Impl; +class RubyEdit : public Edit +{ + Link aScrollHdl; + Link aJumpHdl; + virtual void GetFocus(); + virtual long PreNotify( NotifyEvent& rNEvt ); +public: + 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;} +}; + + +class SvxRubyDialog : public SfxModelessDialog +{ + using Window::SetText; + using Window::GetText; + + friend class RubyPreview; + + 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]; + VclScrolledWindow* m_pScrolledWindow; + ScrollBar* m_pScrollSB; + + ListBox* m_pAdjustLB; + + ListBox* m_pPositionLB; + + FixedText* m_pCharStyleFT; + ListBox* m_pCharStyleLB; + PushButton* m_pStylistPB; + + RubyPreview* m_pPreviewWin; + + PushButton* m_pApplyPB; + PushButton* m_pClosePB; + + long nLastPos; + long nCurrentEdit; + + sal_Bool bModified; + + com::sun::star::uno::Reference<com::sun::star::view::XSelectionChangeListener> xImpl; + SfxBindings* pBindings; + SvxRubyData_Impl* pImpl; + + DECL_LINK(ApplyHdl_Impl, void *); + DECL_LINK(CloseHdl_Impl, void *); + DECL_LINK(StylistHdl_Impl, void *); + DECL_LINK(ScrollHdl_Impl, ScrollBar*); + DECL_LINK(PositionHdl_Impl, ListBox*); + DECL_LINK(AdjustHdl_Impl, ListBox*); + DECL_LINK(CharStyleHdl_Impl, void *); + DECL_LINK(EditModifyHdl_Impl, Edit*); + DECL_LINK(EditScrollHdl_Impl, sal_Int32*); + DECL_LINK(EditJumpHdl_Impl, sal_Int32*); + + void SetText(sal_Int32 nPos, Edit& rLeft, Edit& rRight); + void GetText(); + void ClearCharStyleList(); + void AssertOneEntry(); + + void Update(); + virtual sal_Bool Close(); + + long GetLastPos() const {return nLastPos;} + void SetLastPos(long nSet) {nLastPos = nSet;} + + sal_Bool IsModified() const {return bModified;} + void SetModified(sal_Bool bSet) {bModified = bSet;} + + void EnableControls(bool bEnable); + + void GetCurrentText(String& rBase, String& rRuby); + + void UpdateColors( void ); +protected: + virtual void DataChanged( const DataChangedEvent& rDCEvt ); +public: + + SvxRubyDialog(SfxBindings *pBindings, SfxChildWindow *pCW, + Window* pParent); + virtual ~SvxRubyDialog(); + + virtual void Activate(); + virtual void Deactivate(); +}; + +#endif // _SVX_RUBYDLG_HXX_ + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |