diff options
author | Philipp Lohmann <pl@openoffice.org> | 2001-08-24 09:23:22 +0000 |
---|---|---|
committer | Philipp Lohmann <pl@openoffice.org> | 2001-08-24 09:23:22 +0000 |
commit | b2dff6689bfc458e27e5400fd666f46514ed24bb (patch) | |
tree | 88ac49ebff9b4aeb789b70899120c58fc6ad7033 /vcl/unx/inc | |
parent | 3b53c31ebe4971051df052473f42c5ae73feabe7 (diff) |
#79518# implement status window
Diffstat (limited to 'vcl/unx/inc')
-rw-r--r-- | vcl/unx/inc/i18n_cb.hxx | 5 | ||||
-rw-r--r-- | vcl/unx/inc/i18n_ic.hxx | 15 | ||||
-rw-r--r-- | vcl/unx/inc/i18n_status.hxx | 134 | ||||
-rw-r--r-- | vcl/unx/inc/salframe.h | 12 |
4 files changed, 154 insertions, 12 deletions
diff --git a/vcl/unx/inc/i18n_cb.hxx b/vcl/unx/inc/i18n_cb.hxx index e13e44693712..981a5980ab0e 100644 --- a/vcl/unx/inc/i18n_cb.hxx +++ b/vcl/unx/inc/i18n_cb.hxx @@ -2,9 +2,9 @@ * * $RCSfile: i18n_cb.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: cp $ $Date: 2001-05-28 17:22:32 $ + * last change: $Author: pl $ $Date: 2001-08-24 10:22:29 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -85,6 +85,7 @@ void StatusStartCallback (XIC ic, XPointer client_data, XPointer call_data); void StatusDoneCallback (XIC ic, XPointer client_data, XPointer call_data); void StatusDrawCallback (XIC ic, XPointer client_data, XIMStatusDrawCallbackStruct *call_data); +void SwitchIMCallback (XIC ix, XPointer client_data, XPointer call_data ); // keep informed if kinput2 crashed again void IC_IMDestroyCallback (XIM im, XPointer client_data, XPointer call_data); diff --git a/vcl/unx/inc/i18n_ic.hxx b/vcl/unx/inc/i18n_ic.hxx index c173c5c1ebb7..7cedc8e6b607 100644 --- a/vcl/unx/inc/i18n_ic.hxx +++ b/vcl/unx/inc/i18n_ic.hxx @@ -2,9 +2,9 @@ * * $RCSfile: i18n_ic.hxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: cp $ $Date: 2001-06-12 12:01:34 $ + * last change: $Author: pl $ $Date: 2001-08-24 10:22:29 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -90,11 +90,13 @@ private: XIMCallback maPreeditDrawCallback; XIMCallback maPreeditCaretCallback; XIMCallback maCommitStringCallback; + XIMCallback maSwitchIMCallback; XIMCallback maDestroyCallback; XVaNestedList mpAttributes; XVaNestedList mpStatusAttributes; XVaNestedList mpPreeditAttributes; + SalFrame* mpFocusFrame; Bool SupportInputMethodStyle( XIMStyles *pIMStyles ); unsigned int GetWeightingOfIMStyle( XIMStyle n_style ) const ; @@ -108,9 +110,10 @@ public: XIC GetContext() { return maContext; } void ExtendEventMask( XLIB_Window aFocusWindow ); - void SetICFocus(); - void UnsetICFocus(); + void SetICFocus( SalFrame* pFocusFrame ); + void UnsetICFocus( SalFrame* pFrame ); void HandleDestroyIM(); + int HandleKeyEvent( XKeyEvent *pEvent, SalFrame *pFrame ); // unused void EndExtTextInput( USHORT nFlags ); // unused int CommitStringCallback( sal_Unicode* pText, sal_Size nLength ); @@ -118,12 +121,12 @@ public: int UpdateSpotLocation(); void Map( SalFrame *pFrame ); - void Unmap(); + void Unmap( SalFrame* pFrame ); void SetPreeditState(Bool aPreeditState); void SetLanguage(LanguageType aInputLanguage); - SalI18N_InputContext( SalFrame *aFrame, Bool aIsOnTheSpot); + SalI18N_InputContext( SalFrame *aFrame ); ~SalI18N_InputContext(); private: diff --git a/vcl/unx/inc/i18n_status.hxx b/vcl/unx/inc/i18n_status.hxx new file mode 100644 index 000000000000..11958e07e3d5 --- /dev/null +++ b/vcl/unx/inc/i18n_status.hxx @@ -0,0 +1,134 @@ +/************************************************************************* + * + * $RCSfile: i18n_status.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: pl $ $Date: 2001-08-24 10:22:29 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (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.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifndef _SAL_I18N_STATUS_HXX +#define _SAL_I18N_STATUS_HXX + +#ifndef _STRING_HXX +#include <tools/string.hxx> +#endif + +#ifndef _LINK_HXX +#include <tools/link.hxx> +#endif + +#ifndef _GEN_HXX +#include <tools/gen.hxx> +#endif + +#ifndef _RTL_USTRING_HXX +#include <rtl/ustring.hxx> +#endif + +#include <hash_map> + +class SalFrame; +class WorkWindow; +class ListBox; +class FixedText; +class PushButton; +class SalI18N_InputContext; + +namespace vcl +{ + +class StatusWindow; + +class I18NStatus +{ + SalFrame* m_pParent; + StatusWindow* m_pStatusWindow; + SalI18N_InputContext* m_pInputContext; + + ::std::hash_map< ::rtl::OUString, void*, ::rtl::OUStringHash > + m_aChoices; + + I18NStatus(); + ~I18NStatus(); + + static I18NStatus* pInstance; + +public: + static I18NStatus& get(); + static void free(); + + void setParent( SalFrame* pParent ); + SalFrame* getParent() const { return m_pParent; } + + void setStatusText( const String& rText ); + const String& getStatusText() const; + + void show( bool bShow = true ); + + const ::std::hash_map< ::rtl::OUString, void*, ::rtl::OUStringHash >& getChoices() const { return m_aChoices; } + void clearChoices(); + void addChoice( const String&, void* pData ); + SalI18N_InputContext* getInputContext( bool& bDeleteAfterUse ); + + void toTop() const; + + // for SwitchIMCallback + void changeIM( const String& ); +}; + +} // namespace + +#endif // _SAL_I18N_STATUS_HXX diff --git a/vcl/unx/inc/salframe.h b/vcl/unx/inc/salframe.h index 5b6399176f84..588ab7689863 100644 --- a/vcl/unx/inc/salframe.h +++ b/vcl/unx/inc/salframe.h @@ -2,9 +2,9 @@ * * $RCSfile: salframe.h,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: pl $ $Date: 2001-08-09 19:56:33 $ + * last change: $Author: pl $ $Date: 2001-08-24 10:22:29 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -172,7 +172,7 @@ class SalFrameData int nHeight_; // client height Rectangle aPosSize_; // Shells Pos&Size Rectangle aRestoreFullScreen_; - USHORT nStyle_; + ULONG nStyle_; BOOL bAlwaysOnTop_; BOOL bViewable_; BOOL bMapped_; @@ -196,6 +196,7 @@ class SalFrameData SystemChildData maSystemChildData; SalI18N_InputContext *mpInputContext; + bool mbDeleteInputContext; Bool mbInputFocus; SalFrameDelData *mpDeleteData; void RegisterDeleteData (SalFrameDelData *pData); @@ -234,7 +235,7 @@ class SalFrameData DECL_LINK( HandleResizeTimer, void* ); public: long Dispatch( XEvent *pEvent ); - void Init( USHORT nSalFrameStyle, SystemParentData* pParentData = NULL ); + void Init( ULONG nSalFrameStyle, SystemParentData* pParentData = NULL ); SalDisplay *GetDisplay() const { return pDisplay_; } inline Display *GetXDisplay() const; @@ -262,6 +263,9 @@ public: #endif inline SalColormap &GetColormap() const; bool IsOverrideRedirect() const; + SalI18N_InputContext* getInputContext() const { return mpInputContext; } + const Rectangle& getPosSize() const { return aPosSize_; } + void setPosSize( const Rectangle& rRect ) { SetPosSize( rRect ); } }; #ifdef _SV_SALDISP_HXX |