2010-10-14 01:27:31 -05:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2007-07-24 04:00:00 -05:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-11 01:36:18 -05:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2007-07-24 04:00:00 -05:00
|
|
|
*
|
2010-02-12 08:01:35 -06:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2007-07-24 04:00:00 -05:00
|
|
|
*
|
2008-04-11 01:36:18 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2007-07-24 04:00:00 -05:00
|
|
|
*
|
2008-04-11 01:36:18 -05:00
|
|
|
* This file is part of OpenOffice.org.
|
2007-07-24 04:00:00 -05:00
|
|
|
*
|
2008-04-11 01:36:18 -05:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2007-07-24 04:00:00 -05:00
|
|
|
*
|
2008-04-11 01:36:18 -05:00
|
|
|
* OpenOffice.org 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 version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2007-07-24 04:00:00 -05:00
|
|
|
*
|
2008-04-11 01:36:18 -05:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2007-07-24 04:00:00 -05:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
#ifndef _SV_HELPWIN_HXX
|
|
|
|
#define _SV_HELPWIN_HXX
|
|
|
|
|
|
|
|
#include <vcl/floatwin.hxx>
|
|
|
|
#include <vcl/timer.hxx>
|
|
|
|
|
|
|
|
// ------------------
|
|
|
|
// - HelpTextWindow -
|
|
|
|
// ------------------
|
|
|
|
|
|
|
|
class HelpTextWindow : public FloatingWindow
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
Point maPos;
|
2012-07-01 02:39:59 -05:00
|
|
|
Rectangle maHelpArea; // If next Help for the same rectangle w/ same text, then keep window
|
2007-07-24 04:00:00 -05:00
|
|
|
|
2012-07-01 02:39:59 -05:00
|
|
|
Rectangle maTextRect; // For wrapped text in QuickHelp
|
2007-07-24 04:00:00 -05:00
|
|
|
|
|
|
|
String maHelpText;
|
|
|
|
String maStatusText;
|
|
|
|
|
|
|
|
Timer maShowTimer;
|
|
|
|
Timer maHideTimer;
|
|
|
|
|
2010-09-29 02:46:40 -05:00
|
|
|
sal_uInt16 mnHelpWinStyle;
|
|
|
|
sal_uInt16 mnStyle;
|
2007-07-24 04:00:00 -05:00
|
|
|
|
|
|
|
protected:
|
|
|
|
DECL_LINK( TimerHdl, Timer* );
|
|
|
|
virtual void Paint( const Rectangle& );
|
|
|
|
virtual void RequestHelp( const HelpEvent& rHEvt );
|
|
|
|
virtual String GetText() const;
|
|
|
|
void ImplShow();
|
|
|
|
|
|
|
|
public:
|
2010-09-29 02:46:40 -05:00
|
|
|
HelpTextWindow( Window* pParent, const String& rText, sal_uInt16 nHelpWinStyle, sal_uInt16 nStyle );
|
2007-07-24 04:00:00 -05:00
|
|
|
~HelpTextWindow();
|
|
|
|
|
|
|
|
const String& GetHelpText() const { return maHelpText; }
|
|
|
|
void SetHelpText( const String& rHelpText );
|
2011-02-14 16:00:48 -06:00
|
|
|
sal_uInt16 GetWinStyle() const { return mnHelpWinStyle; }
|
|
|
|
sal_uInt16 GetStyle() const { return mnStyle; }
|
2007-07-24 04:00:00 -05:00
|
|
|
|
|
|
|
// Nur merken:
|
|
|
|
void SetStatusText( const String& rStatusText ) { maStatusText = rStatusText; }
|
|
|
|
void SetHelpArea( const Rectangle& rRect ) { maHelpArea = rRect; }
|
|
|
|
|
2010-09-29 02:46:40 -05:00
|
|
|
void ShowHelp( sal_uInt16 nDelayMode );
|
2007-07-24 04:00:00 -05:00
|
|
|
|
|
|
|
Size CalcOutSize() const;
|
|
|
|
const Rectangle& GetHelpArea() const { return maHelpArea; }
|
|
|
|
|
|
|
|
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
|
|
|
|
};
|
|
|
|
|
2010-09-29 02:46:40 -05:00
|
|
|
void ImplShowHelpWindow( Window* pParent, sal_uInt16 nHelpWinStyle, sal_uInt16 nStyle,
|
2007-07-24 04:00:00 -05:00
|
|
|
const String& rHelpText, const String& rStatusText,
|
|
|
|
const Point& rScreenPos, const Rectangle* pHelpArea = NULL );
|
2008-01-29 09:16:00 -06:00
|
|
|
void ImplDestroyHelpWindow( bool bUpdateHideTime );
|
2010-09-29 02:46:40 -05:00
|
|
|
void ImplSetHelpWindowPos( Window* pHelpWindow, sal_uInt16 nHelpWinStyle, sal_uInt16 nStyle,
|
2007-07-24 04:00:00 -05:00
|
|
|
const Point& rPos, const Rectangle* pHelpArea );
|
|
|
|
|
|
|
|
#endif // _SV_HELPWIN_HXX
|
2010-10-14 01:27:31 -05:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|