2010-10-14 08:27:31 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2000-09-18 16:07:07 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-11 07:30:09 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2008-04-11 07:30:09 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2008-04-11 07:30:09 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2008-04-11 07:30:09 +00: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.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2008-04-11 07:30:09 +00: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).
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2008-04-11 07:30:09 +00: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.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2006-09-17 10:51:29 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
#include <tools/debug.hxx>
|
2011-01-24 16:34:14 +01:00
|
|
|
#include <tools/poly.hxx>
|
|
|
|
#include <tools/rc.h>
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2007-06-27 19:04:30 +00:00
|
|
|
#include <vcl/image.hxx>
|
|
|
|
#include <vcl/bitmap.hxx>
|
|
|
|
#include <vcl/bitmapex.hxx>
|
|
|
|
#include <vcl/decoview.hxx>
|
|
|
|
#include <vcl/event.hxx>
|
|
|
|
#include <vcl/svapp.hxx>
|
|
|
|
#include <vcl/dialog.hxx>
|
|
|
|
#include <vcl/fixed.hxx>
|
|
|
|
#include <vcl/button.hxx>
|
|
|
|
#include <vcl/salnativewidgets.hxx>
|
|
|
|
#include <vcl/edit.hxx>
|
2012-03-10 22:45:03 +00:00
|
|
|
#include <vcl/layout.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-01-24 16:34:14 +01:00
|
|
|
#include <svids.hrc>
|
|
|
|
#include <svdata.hxx>
|
|
|
|
#include <window.h>
|
|
|
|
#include <controldata.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
// =======================================================================
|
|
|
|
|
|
|
|
#define PUSHBUTTON_VIEW_STYLE (WB_3DLOOK | \
|
|
|
|
WB_LEFT | WB_CENTER | WB_RIGHT | \
|
|
|
|
WB_TOP | WB_VCENTER | WB_BOTTOM | \
|
|
|
|
WB_WORDBREAK | WB_NOLABEL | \
|
|
|
|
WB_DEFBUTTON | WB_NOLIGHTBORDER | \
|
2004-07-05 14:41:27 +00:00
|
|
|
WB_RECTSTYLE | WB_SMALLSTYLE | \
|
|
|
|
WB_TOGGLE )
|
2000-09-18 16:07:07 +00:00
|
|
|
#define RADIOBUTTON_VIEW_STYLE (WB_3DLOOK | \
|
|
|
|
WB_LEFT | WB_CENTER | WB_RIGHT | \
|
|
|
|
WB_TOP | WB_VCENTER | WB_BOTTOM | \
|
|
|
|
WB_WORDBREAK | WB_NOLABEL)
|
|
|
|
#define CHECKBOX_VIEW_STYLE (WB_3DLOOK | \
|
|
|
|
WB_LEFT | WB_CENTER | WB_RIGHT | \
|
|
|
|
WB_TOP | WB_VCENTER | WB_BOTTOM | \
|
|
|
|
WB_WORDBREAK | WB_NOLABEL)
|
|
|
|
|
|
|
|
// =======================================================================
|
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
class ImplCommonButtonData
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Rectangle maFocusRect;
|
2012-07-25 22:28:48 +04:00
|
|
|
long mnSeparatorX;
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 mnButtonState;
|
|
|
|
sal_Bool mbSmallSymbol;
|
2004-07-05 14:41:27 +00:00
|
|
|
|
|
|
|
Image maImage;
|
|
|
|
ImageAlign meImageAlign;
|
2005-02-25 12:10:56 +00:00
|
|
|
SymbolAlign meSymbolAlign;
|
2004-07-05 14:41:27 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
ImplCommonButtonData();
|
|
|
|
~ImplCommonButtonData();
|
|
|
|
};
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
2012-08-05 17:45:17 +02:00
|
|
|
ImplCommonButtonData::ImplCommonButtonData() : maFocusRect(), mnSeparatorX(0), mnButtonState(0),
|
|
|
|
mbSmallSymbol(sal_False), maImage(), meImageAlign(IMAGEALIGN_TOP), meSymbolAlign(SYMBOLALIGN_LEFT)
|
2004-07-05 14:41:27 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
ImplCommonButtonData::~ImplCommonButtonData()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// =======================================================================
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
Button::Button( WindowType nType ) :
|
|
|
|
Control( nType )
|
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
mpButtonData = new ImplCommonButtonData;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
Button::~Button()
|
|
|
|
{
|
|
|
|
delete mpButtonData;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
void Button::Click()
|
|
|
|
{
|
2004-10-22 11:12:18 +00:00
|
|
|
ImplCallEventListenersAndHandler( VCLEVENT_BUTTON_CLICK, maClickHdl, this );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
XubString Button::GetStandardText( StandardButtonType eButton )
|
|
|
|
{
|
2005-09-28 13:39:27 +00:00
|
|
|
static struct
|
|
|
|
{
|
|
|
|
sal_uInt32 nResId;
|
|
|
|
const char* pDefText;
|
|
|
|
} aResIdAry[BUTTON_COUNT] =
|
|
|
|
{
|
|
|
|
{ SV_BUTTONTEXT_OK, "~OK" },
|
|
|
|
{ SV_BUTTONTEXT_CANCEL, "~Cancel" },
|
|
|
|
{ SV_BUTTONTEXT_YES, "~Yes" },
|
|
|
|
{ SV_BUTTONTEXT_NO, "~No" },
|
|
|
|
{ SV_BUTTONTEXT_RETRY, "~Retry" },
|
|
|
|
{ SV_BUTTONTEXT_HELP, "~Help" },
|
|
|
|
{ SV_BUTTONTEXT_CLOSE, "~Close" },
|
|
|
|
{ SV_BUTTONTEXT_MORE, "~More" },
|
|
|
|
{ SV_BUTTONTEXT_IGNORE, "~Ignore" },
|
|
|
|
{ SV_BUTTONTEXT_ABORT, "~Abort" },
|
|
|
|
{ SV_BUTTONTEXT_LESS, "~Less" }
|
2000-09-18 16:07:07 +00:00
|
|
|
};
|
|
|
|
|
2005-09-28 13:39:27 +00:00
|
|
|
String aText;
|
|
|
|
ResMgr* pResMgr = ImplGetResMgr();
|
|
|
|
if( pResMgr )
|
|
|
|
{
|
2011-04-01 12:18:49 +01:00
|
|
|
sal_uInt32 nResId = aResIdAry[(sal_uInt16)eButton].nResId;
|
2012-04-29 23:36:57 +01:00
|
|
|
aText = ResId(nResId, *pResMgr).toString();
|
2011-04-01 12:18:49 +01:00
|
|
|
|
|
|
|
// Windows (apparently) has some magic auto-accelerator evil around
|
|
|
|
// ok / cancel so add this only for Unix
|
|
|
|
#ifdef UNX
|
|
|
|
if( nResId == SV_BUTTONTEXT_OK || nResId == SV_BUTTONTEXT_CANCEL )
|
2012-07-02 16:02:38 +01:00
|
|
|
aText.Insert( rtl::OUString("~"), 0 );
|
2011-04-01 12:18:49 +01:00
|
|
|
#endif
|
2005-09-28 13:39:27 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2011-09-14 21:59:35 +01:00
|
|
|
rtl::OString aT( aResIdAry[(sal_uInt16)eButton].pDefText );
|
|
|
|
aText = rtl::OStringToOUString(aT, RTL_TEXTENCODING_ASCII_US);
|
2005-09-28 13:39:27 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
return aText;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
XubString Button::GetStandardHelpText( StandardButtonType /* eButton */ )
|
|
|
|
{
|
|
|
|
XubString aHelpText;
|
|
|
|
return aHelpText;
|
|
|
|
}
|
2004-07-05 14:41:27 +00:00
|
|
|
// -----------------------------------------------------------------------
|
Merge commit 'ooo/DEV300_m101' into intm101
The following builds for me:
basebmp, basegfx, comphelper, dtrans, i18npool, i18nutil, l10ntools, o3tl,
psprint_config, regexp, rsc, sax, sot, tools, ucbhelper, unotools, vcl
The rest still needs fixing ;-)
Conflicts:
canvas/prj/build.lst
canvas/source/cairo/cairo_textlayout.cxx
canvas/source/directx/dx_winstuff.hxx
canvas/source/tools/image.cxx
canvas/source/vcl/canvashelper.cxx
comphelper/inc/comphelper/documentconstants.hxx
comphelper/inc/comphelper/optionalvalue.hxx
comphelper/inc/comphelper/querydeep.hxx
comphelper/prj/build.lst
comphelper/qa/complex/makefile.mk
comphelper/qa/string/test_string_noadditional.cxx
comphelper/source/misc/componentmodule.cxx
comphelper/source/misc/mimeconfighelper.cxx
comphelper/source/misc/querydeep.cxx
comphelper/source/misc/uieventslogger.cxx
comphelper/source/property/TypeGeneration.cxx
comphelper/test/uno_iterators/uno_iterators.cxx
comphelper/util/makefile.mk
cppcanvas/source/mtfrenderer/implrenderer.cxx
dtrans/prj/build.lst
dtrans/source/generic/dtrans.cxx
dtrans/source/win32/dtobj/FmtFilter.cxx
i18npool/prj/build.lst
i18npool/source/localedata/data/localedata_others.map
i18npool/source/localedata/data/makefile.mk
i18npool/source/localedata/localedata.cxx
i18npool/source/localedata/saxparser.cxx
i18npool/source/registerservices/registerservices.cxx
i18npool/source/search/textsearch.cxx
l10ntools/inc/cfgmerge.hxx
l10ntools/inc/export.hxx
l10ntools/inc/gsicheck.hxx
l10ntools/inc/l10ntools/vosapp.hxx
l10ntools/inc/tagtest.hxx
l10ntools/inc/xmlparse.hxx
l10ntools/layout/layoutparse.cxx
l10ntools/layout/tralay.cxx
l10ntools/source/cfgmerge.cxx
l10ntools/source/export.cxx
l10ntools/source/export2.cxx
l10ntools/source/gsicheck.cxx
l10ntools/source/help/HelpLinker.cxx
l10ntools/source/lngex.cxx
l10ntools/source/lngmerge.cxx
l10ntools/source/merge.cxx
l10ntools/source/tagtest.cxx
l10ntools/source/xmlparse.cxx
padmin/source/fontentry.cxx
padmin/source/padialog.cxx
padmin/source/padialog.src
padmin/source/pamain.cxx
rsc/inc/rscarray.hxx
rsc/inc/rscclass.hxx
rsc/inc/rscclobj.hxx
rsc/inc/rsccont.hxx
rsc/inc/rscdb.hxx
rsc/inc/rscdef.hxx
rsc/inc/rscmgr.hxx
rsc/inc/rscrange.hxx
rsc/inc/rsctop.hxx
rsc/inc/vclrsc.hxx
rsc/source/parser/rscdb.cxx
rsc/source/parser/rscicpx.cxx
rsc/source/parser/rscinit.cxx
rsc/source/prj/start.cxx
rsc/source/res/rscarray.cxx
rsc/source/res/rscclass.cxx
rsc/source/res/rscclobj.cxx
rsc/source/res/rsccont.cxx
rsc/source/res/rscmgr.cxx
rsc/source/res/rscrange.cxx
rsc/source/res/rsctop.cxx
rsc/source/rsc/rsc.cxx
rsc/source/tools/rscdef.cxx
rsc/source/tools/rsctools.cxx
sax/source/expatwrap/sax_expat.cxx
sax/source/fastparser/facreg.cxx
sax/source/tools/fastserializer.cxx
sot/inc/sot/filelist.hxx
sot/inc/sot/object.hxx
sot/source/base/factory.cxx
sot/source/base/filelist.cxx
sot/source/sdstor/stg.cxx
sot/source/sdstor/stgcache.cxx
sot/source/sdstor/stgole.cxx
sot/source/sdstor/stgstrms.cxx
sot/source/sdstor/storage.cxx
sot/source/sdstor/ucbstorage.cxx
svl/inc/svl/cenumitm.hxx
svl/inc/svl/cintitem.hxx
svl/inc/svl/cntwall.hxx
svl/inc/svl/ctypeitm.hxx
svl/inc/svl/custritm.hxx
svl/inc/svl/dateitem.hxx
svl/inc/svl/filerec.hxx
svl/inc/svl/globalnameitem.hxx
svl/inc/svl/ilstitem.hxx
svl/inc/svl/imageitm.hxx
svl/inc/svl/intitem.hxx
svl/inc/svl/itempool.hxx
svl/inc/svl/itemset.hxx
svl/inc/svl/lckbitem.hxx
svl/inc/svl/poolitem.hxx
svl/inc/svl/ptitem.hxx
svl/inc/svl/rectitem.hxx
svl/inc/svl/sfontitm.hxx
svl/inc/svl/slstitm.hxx
svl/inc/svl/srchitem.hxx
svl/inc/svl/svarray.hxx
svl/inc/svl/svdde.hxx
svl/inc/svl/svstdarr.hxx
svl/inc/svl/szitem.hxx
svl/inc/svl/visitem.hxx
svl/inc/svl/zforlist.hxx
svl/inc/svl/zformat.hxx
svl/prj/build.lst
svl/qa/complex/ConfigItems/helper/ConfigItemTest.cxx
svl/qa/complex/ConfigItems/helper/makefile.mk
svl/qa/makefile.mk
svl/source/filepicker/pickerhelper.cxx
svl/source/filerec/filerec.cxx
svl/source/items/cenumitm.cxx
svl/source/items/cintitem.cxx
svl/source/items/cntwall.cxx
svl/source/items/ctypeitm.cxx
svl/source/items/custritm.cxx
svl/source/items/dateitem.cxx
svl/source/items/globalnameitem.cxx
svl/source/items/ilstitem.cxx
svl/source/items/imageitm.cxx
svl/source/items/intitem.cxx
svl/source/items/itempool.cxx
svl/source/items/itemprop.cxx
svl/source/items/itemset.cxx
svl/source/items/lckbitem.cxx
svl/source/items/poolio.cxx
svl/source/items/poolitem.cxx
svl/source/items/ptitem.cxx
svl/source/items/rectitem.cxx
svl/source/items/slstitm.cxx
svl/source/items/srchitem.cxx
svl/source/items/style.cxx
svl/source/items/szitem.cxx
svl/source/items/visitem.cxx
svl/source/items/whiter.cxx
svl/source/memtools/svarray.cxx
svl/source/misc/PasswordHelper.cxx
svl/source/misc/adrparse.cxx
svl/source/misc/lngmisc.cxx
svl/source/notify/brdcst.cxx
svl/source/notify/listener.cxx
svl/source/notify/listenerbase.cxx
svl/source/numbers/makefile.mk
svl/source/numbers/nbdll.cxx
svl/source/numbers/zforfind.cxx
svl/source/numbers/zforlist.cxx
svl/source/numbers/zformat.cxx
svl/source/numbers/zforscan.cxx
svl/source/passwordcontainer/passwordcontainer.cxx
svl/source/svdde/ddecli.cxx
svl/source/svdde/ddeimp.hxx
svl/source/svdde/ddemlos2.h
svl/source/svdde/ddesvr.cxx
svl/source/undo/undo.cxx
svl/source/uno/registerservices.cxx
svl/util/makefile.mk
svtools/bmpmaker/bmpsum.cxx
svtools/bmpmaker/g2g.cxx
svtools/bmpmaker/makefile.mk
svtools/inc/borderhelper.hxx
svtools/inc/svtools/accessiblefactory.hxx
svtools/inc/svtools/apearcfg.hxx
svtools/inc/svtools/brwbox.hxx
svtools/inc/svtools/ctrlbox.hxx
svtools/inc/svtools/ctrltool.hxx
svtools/inc/svtools/editbrowsebox.hxx
svtools/inc/svtools/ehdl.hxx
svtools/inc/svtools/embedhlp.hxx
svtools/inc/svtools/filter.hxx
svtools/inc/svtools/ivctrl.hxx
svtools/inc/svtools/parhtml.hxx
svtools/inc/svtools/printdlg.hxx
svtools/inc/svtools/rtftoken.h
svtools/inc/svtools/ruler.hxx
svtools/inc/svtools/svicnvw.hxx
svtools/inc/svtools/svlbitm.hxx
svtools/inc/svtools/svlbox.hxx
svtools/inc/svtools/svtreebx.hxx
svtools/inc/svtools/tabbar.hxx
svtools/inc/svtools/table/abstracttablecontrol.hxx
svtools/inc/svtools/taskbar.hxx
svtools/inc/svtools/textview.hxx
svtools/inc/svtools/valueset.hxx
svtools/source/brwbox/brwbox1.cxx
svtools/source/brwbox/brwbox2.cxx
svtools/source/brwbox/datwin.cxx
svtools/source/brwbox/datwin.hxx
svtools/source/brwbox/makefile.mk
svtools/source/config/apearcfg.cxx
svtools/source/config/htmlcfg.cxx
svtools/source/config/menuoptions.cxx
svtools/source/config/miscopt.cxx
svtools/source/contnr/cont_pch.cxx
svtools/source/contnr/ctrdll.cxx
svtools/source/contnr/fileview.cxx
svtools/source/contnr/imivctl1.cxx
svtools/source/contnr/ivctrl.cxx
svtools/source/contnr/makefile.mk
svtools/source/contnr/svcontnr.src
svtools/source/contnr/svicnvw.cxx
svtools/source/contnr/svimpbox.cxx
svtools/source/contnr/svimpicn.cxx
svtools/source/contnr/svlbitm.cxx
svtools/source/contnr/svtreebx.cxx
svtools/source/contnr/templwin.cxx
svtools/source/contnr/templwin.hxx
svtools/source/control/asynclink.cxx
svtools/source/control/ctrlbox.cxx
svtools/source/control/ctrldll.cxx
svtools/source/control/ctrltool.cxx
svtools/source/control/filectrl.cxx
svtools/source/control/filectrl.src
svtools/source/control/headbar.cxx
svtools/source/control/inettbc.cxx
svtools/source/control/makefile.mk
svtools/source/control/prgsbar.cxx
svtools/source/control/roadmap.cxx
svtools/source/control/ruler.cxx
svtools/source/control/scriptedtext.cxx
svtools/source/control/stdmenu.cxx
svtools/source/control/tabbar.cxx
svtools/source/control/taskbar.cxx
svtools/source/control/taskbox.cxx
svtools/source/control/taskmisc.cxx
svtools/source/control/taskstat.cxx
svtools/source/control/valueacc.cxx
svtools/source/control/valueset.cxx
svtools/source/dialogs/addresstemplate.cxx
svtools/source/dialogs/addresstemplate.src
svtools/source/dialogs/colrdlg.src
svtools/source/dialogs/filedlg2.cxx
svtools/source/dialogs/filedlg2.hxx
svtools/source/dialogs/makefile.mk
svtools/source/dialogs/printdlg.cxx
svtools/source/dialogs/printdlg.src
svtools/source/dialogs/propctrl.cxx
svtools/source/dialogs/propctrl.hxx
svtools/source/dialogs/property.cxx
svtools/source/edit/makefile.mk
svtools/source/edit/sychconv.cxx
svtools/source/edit/syntaxhighlight.cxx
svtools/source/edit/textdoc.cxx
svtools/source/edit/texteng.cxx
svtools/source/edit/textundo.cxx
svtools/source/edit/textview.cxx
svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx
svtools/source/filter.vcl/filter/dlgejpg.cxx
svtools/source/filter.vcl/filter/dlgejpg.hxx
svtools/source/filter.vcl/filter/dlgejpg.src
svtools/source/filter.vcl/filter/dlgepng.cxx
svtools/source/filter.vcl/filter/dlgepng.hxx
svtools/source/filter.vcl/filter/dlgepng.src
svtools/source/filter.vcl/filter/dlgexpor.cxx
svtools/source/filter.vcl/filter/dlgexpor.hxx
svtools/source/filter.vcl/filter/dlgexpor.src
svtools/source/filter.vcl/filter/filter2.cxx
svtools/source/filter.vcl/filter/makefile.mk
svtools/source/filter.vcl/filter/sgfbram.cxx
svtools/source/filter.vcl/filter/sgvmain.cxx
svtools/source/filter.vcl/filter/sgvspln.cxx
svtools/source/filter.vcl/filter/strings.src
svtools/source/filter.vcl/jpeg/makefile.mk
svtools/source/filter.vcl/wmf/emfwr.cxx
svtools/source/filter.vcl/wmf/emfwr.hxx
svtools/source/filter.vcl/wmf/enhwmf.cxx
svtools/source/filter.vcl/wmf/winmtf.hxx
svtools/source/filter.vcl/wmf/wmfwr.cxx
svtools/source/filter.vcl/wmf/wmfwr.hxx
svtools/source/graphic/grfcache.cxx
svtools/source/graphic/grfcache.hxx
svtools/source/graphic/grfmgr.cxx
svtools/source/graphic/makefile.mk
svtools/source/inc/accessibletableimp.hxx
svtools/source/inc/svimpbox.hxx
svtools/source/java/patchjavaerror.src
svtools/source/misc/ehdl.cxx
svtools/source/misc/errtxt.src
svtools/source/misc/helpagentwindow.cxx
svtools/source/misc/imagemgr.cxx
svtools/source/misc/imagemgr.src
svtools/source/misc/imageresourceaccess.cxx
svtools/source/misc/imap.cxx
svtools/source/misc/langtab.src
svtools/source/misc/makefile.mk
svtools/source/misc/svtdata.cxx
svtools/source/misc/templatefoldercache.cxx
svtools/source/misc/transfer2.cxx
svtools/source/misc/undo.src
svtools/source/plugapp/commtest.cxx
svtools/source/plugapp/commtest.src
svtools/source/plugapp/makefile.mk
svtools/source/plugapp/testtool.src
svtools/source/productregistration/productregistration.cxx
svtools/source/svhtml/htmlkywd.cxx
svtools/source/svhtml/parhtml.cxx
svtools/source/svrtf/rtfkey2.cxx
svtools/source/svrtf/rtfkeywd.cxx
svtools/source/table/defaultinputhandler.cxx
svtools/source/table/makefile.mk
svtools/source/table/tablecontrol.cxx
svtools/source/table/tablecontrol_impl.cxx
svtools/source/table/tablecontrol_impl.hxx
svtools/source/table/tabledatawindow.cxx
svtools/source/table/tablegeometry.cxx
svtools/source/table/tablegeometry.hxx
svtools/source/toolpanel/makefile.mk
svtools/source/toolpanel/toolpaneldrawer.cxx
svtools/source/uno/addrtempuno.cxx
svtools/source/uno/miscservices.cxx
svtools/source/uno/svtxgridcontrol.cxx
svtools/source/uno/svtxgridcontrol.hxx
svtools/source/uno/toolboxcontroller.cxx
svtools/source/uno/treecontrolpeer.cxx
svtools/source/uno/unocontroltablemodel.cxx
svtools/source/uno/unocontroltablemodel.hxx
svtools/source/uno/unoimap.cxx
svtools/source/urlobj/inetimg.cxx
svtools/util/makefile.mk
svtools/workben/browser.cxx
svtools/workben/cui/makefile.mk
svtools/workben/makefile.mk
svtools/workben/stest.cxx
svtools/workben/toolpanel/makefile.mk
svtools/workben/urange.cxx
toolkit/inc/toolkit/awt/vclxdevice.hxx
toolkit/inc/toolkit/awt/vclxgraphics.hxx
toolkit/inc/toolkit/awt/vclxwindows.hxx
toolkit/inc/toolkit/controls/dialogcontrol.hxx
toolkit/inc/toolkit/helper/property.hxx
toolkit/inc/toolkit/helper/servicenames.hxx
toolkit/inc/toolkit/helper/throbberimpl.hxx
toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent.java
toolkit/source/awt/asynccallback.cxx
toolkit/source/awt/vclxgraphics.cxx
toolkit/source/awt/vclxtoolkit.cxx
toolkit/source/awt/vclxwindow.cxx
toolkit/source/awt/xsimpleanimation.cxx
toolkit/source/awt/xthrobber.cxx
toolkit/source/controls/dialogcontrol.cxx
toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
toolkit/source/controls/grid/defaultgriddatamodel.cxx
toolkit/source/controls/grid/gridcontrol.cxx
toolkit/source/controls/grid/initguard.hxx
toolkit/source/controls/unocontrol.cxx
toolkit/source/controls/unocontrolcontainer.cxx
toolkit/source/controls/unocontrols.cxx
toolkit/source/helper/listenermultiplexer.cxx
toolkit/source/helper/property.cxx
toolkit/source/helper/registerservices.cxx
toolkit/source/helper/servicenames.cxx
toolkit/source/helper/throbberimpl.cxx
toolkit/source/helper/tkresmgr.cxx
tools/StaticLibrary_ooopathutils.mk
tools/bootstrp/addexes/makefile.mk
tools/bootstrp/addexes2/makefile.mk
tools/bootstrp/addexes2/mkfilt.cxx
tools/bootstrp/command.cxx
tools/bootstrp/cppdep.cxx
tools/bootstrp/iserver.cxx
tools/bootstrp/makefile.mk
tools/bootstrp/mkcreate.cxx
tools/bootstrp/prj.cxx
tools/bootstrp/rscdep.cxx
tools/bootstrp/sstring.cxx
tools/inc/bootstrp/command.hxx
tools/inc/bootstrp/mkcreate.hxx
tools/inc/bootstrp/prj.hxx
tools/inc/bootstrp/sstring.hxx
tools/inc/tools/agapi.hxx
tools/inc/tools/agitem.hxx
tools/inc/tools/chapi.hxx
tools/inc/tools/download.hxx
tools/inc/tools/eacopier.hxx
tools/inc/tools/fract.hxx
tools/inc/tools/fsys.hxx
tools/inc/tools/geninfo.hxx
tools/inc/tools/globname.hxx
tools/inc/tools/inetmime.hxx
tools/inc/tools/multisel.hxx
tools/inc/tools/poly.hxx
tools/inc/tools/postsys.h
tools/inc/tools/postwin.h
tools/inc/tools/presys.h
tools/inc/tools/prewin.h
tools/inc/tools/pstm.hxx
tools/inc/tools/ref.hxx
tools/inc/tools/simplerm.hxx
tools/inc/tools/solar.h
tools/inc/tools/table.hxx
tools/inc/tools/urlkeys.hxx
tools/inc/tools/urlobj.hxx
tools/prj/build.lst
tools/prj/d.lst
tools/qa/makefile.mk
tools/source/communi/geninfo.cxx
tools/source/debug/debug.cxx
tools/source/fsys/dirent.cxx
tools/source/fsys/tdir.cxx
tools/source/fsys/unx.cxx
tools/source/fsys/urlobj.cxx
tools/source/generic/color.cxx
tools/source/generic/config.cxx
tools/source/generic/fract.cxx
tools/source/inet/inetmime.cxx
tools/source/memtools/multisel.cxx
tools/source/memtools/table.cxx
tools/source/rc/resmgr.cxx
tools/source/ref/globname.cxx
tools/source/ref/pstm.cxx
tools/source/solar/solar.c
tools/source/stream/strmos2.cxx
tools/source/stream/strmunx.cxx
tools/source/stream/strmwnt.cxx
tools/source/string/makefile.mk
tools/source/testtoolloader/testtoolloader.cxx
tools/test/makefile.mk
tools/util/makefile.mk
tools/win/inc/dll.hxx
tools/win/inc/parser.hxx
tools/win/inc/shellex.h
tools/win/inc/shutil.h
tools/win/inc/toolsdll.hxx
tools/win/inc/winshell.hxx
tools/workben/makefile.mk
ucbhelper/source/client/proxydecider.cxx
ucbhelper/workben/ucbexplorer/ucbexplorer.hrc
unotools/inc/unotools/unotunnelhelper.hxx
unotools/source/config/fltrcfg.cxx
unotools/source/config/lingucfg.cxx
unotools/source/config/misccfg.cxx
unotools/source/config/pathoptions.cxx
unotools/source/config/searchopt.cxx
unotools/source/i18n/localedatawrapper.cxx
unotools/source/ucbhelper/localfilehelper.cxx
unotools/source/ucbhelper/ucbhelper.cxx
unotools/source/ucbhelper/xtempfile.cxx
vcl/aqua/inc/salbmp.h
vcl/aqua/inc/salgdi.h
vcl/aqua/inc/salinst.h
vcl/aqua/source/app/salinst.cxx
vcl/aqua/source/gdi/aquaprintaccessoryview.mm
vcl/aqua/source/gdi/salgdi.cxx
vcl/aqua/source/gdi/salprn.cxx
vcl/aqua/source/window/salframeview.mm
vcl/aqua/source/window/salobj.cxx
vcl/inc/vcl/bitmap.hxx
vcl/inc/vcl/brdwin.hxx
vcl/inc/vcl/button.hxx
vcl/inc/vcl/cmdevt.hxx
vcl/inc/vcl/cvtgrf.hxx
vcl/inc/vcl/dialog.hxx
vcl/inc/vcl/dockwin.hxx
vcl/inc/vcl/event.hxx
vcl/inc/vcl/fixed.hxx
vcl/inc/vcl/fldunit.hxx
vcl/inc/vcl/floatwin.hxx
vcl/inc/vcl/gdimtf.hxx
vcl/inc/vcl/glyphcache.hxx
vcl/inc/vcl/graphite_adaptors.hxx
vcl/inc/vcl/graphite_features.hxx
vcl/inc/vcl/graphite_layout.hxx
vcl/inc/vcl/ilstbox.hxx
vcl/inc/vcl/image.h
vcl/inc/vcl/imgctrl.hxx
vcl/inc/vcl/impbmpconv.hxx
vcl/inc/vcl/impprn.hxx
vcl/inc/vcl/jobset.h
vcl/inc/vcl/keycodes.hxx
vcl/inc/vcl/lstbox.hxx
vcl/inc/vcl/mapunit.hxx
vcl/inc/vcl/menu.hxx
vcl/inc/vcl/msgbox.hxx
vcl/inc/vcl/outdev.hxx
vcl/inc/vcl/prndlg.hxx
vcl/inc/vcl/salatype.hxx
vcl/inc/vcl/salbmp.hxx
vcl/inc/vcl/salgdi.hxx
vcl/inc/vcl/salinst.hxx
vcl/inc/vcl/seleng.hxx
vcl/inc/vcl/settings.hxx
vcl/inc/vcl/smartid.hxx
vcl/inc/vcl/status.hxx
vcl/inc/vcl/strhelper.hxx
vcl/inc/vcl/svapp.hxx
vcl/inc/vcl/svdata.hxx
vcl/inc/vcl/syschild.hxx
vcl/inc/vcl/sysdata.hxx
vcl/inc/vcl/taskpanelist.hxx
vcl/inc/vcl/toolbox.hxx
vcl/inc/vcl/vclevent.hxx
vcl/inc/vcl/windata.hxx
vcl/inc/vcl/window.hxx
vcl/inc/vcl/wintypes.hxx
vcl/os2/source/app/salinst.cxx
vcl/os2/source/gdi/salgdi.cxx
vcl/os2/source/window/salmenu.cxx
vcl/os2/source/window/salobj.cxx
vcl/prj/build.lst
vcl/source/app/dbggui.cxx
vcl/source/app/help.cxx
vcl/source/app/idlemgr.cxx
vcl/source/app/settings.cxx
vcl/source/app/svapp.cxx
vcl/source/app/svdata.cxx
vcl/source/app/svmain.cxx
vcl/source/app/svmainhook.cxx
vcl/source/app/unohelp.cxx
vcl/source/app/vclevent.cxx
vcl/source/control/button.cxx
vcl/source/control/combobox.cxx
vcl/source/control/edit.cxx
vcl/source/control/field.cxx
vcl/source/control/fixed.cxx
vcl/source/control/ilstbox.cxx
vcl/source/control/imgctrl.cxx
vcl/source/control/makefile.mk
vcl/source/control/tabctrl.cxx
vcl/source/gdi/bitmap.cxx
vcl/source/gdi/bitmap2.cxx
vcl/source/gdi/bitmap4.cxx
vcl/source/gdi/bmpconv.cxx
vcl/source/gdi/cvtsvm.cxx
vcl/source/gdi/font.cxx
vcl/source/gdi/gdimtf.cxx
vcl/source/gdi/image.cxx
vcl/source/gdi/impimage.cxx
vcl/source/gdi/jobset.cxx
vcl/source/gdi/makefile.mk
vcl/source/gdi/metaact.cxx
vcl/source/gdi/outdev.cxx
vcl/source/gdi/outdev3.cxx
vcl/source/gdi/outdev4.cxx
vcl/source/gdi/outdevnative.cxx
vcl/source/gdi/pdfwriter.cxx
vcl/source/gdi/pdfwriter_impl.cxx
vcl/source/gdi/print3.cxx
vcl/source/gdi/salmisc.cxx
vcl/source/glyphs/gcach_ftyp.cxx
vcl/source/glyphs/gcach_ftyp.hxx
vcl/source/glyphs/glyphcache.cxx
vcl/source/glyphs/graphite_cache.cxx
vcl/source/glyphs/graphite_layout.cxx
vcl/source/glyphs/graphite_textsrc.hxx
vcl/source/helper/canvasbitmap.cxx
vcl/source/helper/smartid.cxx
vcl/source/helper/xconnection.cxx
vcl/source/src/btntext.src
vcl/source/src/images.src
vcl/source/src/print.src
vcl/source/window/accel.cxx
vcl/source/window/accmgr.cxx
vcl/source/window/brdwin.cxx
vcl/source/window/btndlg.cxx
vcl/source/window/dlgctrl.cxx
vcl/source/window/javachild.cxx
vcl/source/window/menu.cxx
vcl/source/window/msgbox.cxx
vcl/source/window/printdlg.cxx
vcl/source/window/status.cxx
vcl/source/window/syschild.cxx
vcl/source/window/toolbox.cxx
vcl/source/window/toolbox2.cxx
vcl/source/window/window.cxx
vcl/source/window/window2.cxx
vcl/source/window/wrkwin.cxx
vcl/unx/gtk/app/gtkdata.cxx
vcl/unx/gtk/app/gtkinst.cxx
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
vcl/unx/gtk/window/gtkframe.cxx
vcl/unx/gtk/window/gtkobject.cxx
vcl/unx/headless/svpbmp.hxx
vcl/unx/headless/svpgdi.cxx
vcl/unx/headless/svpgdi.hxx
vcl/unx/headless/svpinst.cxx
vcl/unx/headless/svpinst.hxx
vcl/unx/headless/svpprn.cxx
vcl/unx/headless/svpprn.hxx
vcl/unx/headless/svppspgraphics.cxx
vcl/unx/headless/svppspgraphics.hxx
vcl/unx/headless/svptext.cxx
vcl/unx/inc/dtint.hxx
vcl/unx/inc/plugins/gtk/gtkdata.hxx
vcl/unx/inc/pspgraphics.h
vcl/unx/inc/salbmp.h
vcl/unx/inc/saldata.hxx
vcl/unx/inc/saldisp.hxx
vcl/unx/inc/salgdi.h
vcl/unx/inc/salinst.h
vcl/unx/inc/xfont.hxx
vcl/unx/kde/kdedata.cxx
vcl/unx/kde4/KDESalGraphics.cxx
vcl/unx/source/app/keysymnames.cxx
vcl/unx/source/app/saldata.cxx
vcl/unx/source/app/saldisp.cxx
vcl/unx/source/app/salinst.cxx
vcl/unx/source/app/wmadaptor.cxx
vcl/unx/source/dtrans/X11_selection.cxx
vcl/unx/source/dtrans/X11_service.cxx
vcl/unx/source/gdi/makefile.mk
vcl/unx/source/gdi/pspgraphics.cxx
vcl/unx/source/gdi/salgdi.cxx
vcl/unx/source/gdi/salgdi3.cxx
vcl/unx/source/gdi/salprnpsp.cxx
vcl/unx/source/gdi/xfont.cxx
vcl/unx/source/gdi/xlfd_attr.cxx
vcl/unx/source/gdi/xlfd_attr.hxx
vcl/unx/source/gdi/xlfd_extd.cxx
vcl/unx/source/gdi/xlfd_extd.hxx
vcl/unx/source/gdi/xlfd_smpl.cxx
vcl/unx/source/gdi/xlfd_smpl.hxx
vcl/unx/source/printer/ppdparser.cxx
vcl/unx/source/printer/printerinfomanager.cxx
vcl/unx/source/window/salframe.cxx
vcl/unx/source/window/salmenu.cxx
vcl/unx/source/window/salobj.cxx
vcl/util/makefile2.pmk
vcl/win/inc/salbmp.h
vcl/win/inc/saldata.hxx
vcl/win/inc/salgdi.h
vcl/win/inc/salinst.h
vcl/win/source/app/saldata.cxx
vcl/win/source/app/salinst.cxx
vcl/win/source/gdi/salgdi.cxx
vcl/win/source/gdi/salgdi3.cxx
vcl/win/source/gdi/salprn.cxx
vcl/win/source/gdi/winlayout.cxx
vcl/win/source/window/salframe.cxx
vcl/win/source/window/salobj.cxx
vcl/workben/outdevgrind.cxx
vos/inc/vos/execabl.hxx
vos/inc/vos/macros.hxx
vos/inc/vos/pipe.hxx
vos/inc/vos/process.hxx
vos/inc/vos/refernce.hxx
vos/inc/vos/signal.hxx
vos/inc/vos/socket.hxx
vos/inc/vos/stream.hxx
vos/inc/vos/thread.hxx
vos/source/pipe.cxx
vos/source/process.cxx
vos/source/signal.cxx
vos/source/thread.cxx
vos/source/timer.cxx
2011-03-11 14:24:23 +01:00
|
|
|
sal_Bool Button::SetModeImage( const Image& rImage )
|
2004-07-05 14:41:27 +00:00
|
|
|
{
|
2010-11-13 00:35:47 -08:00
|
|
|
if ( rImage != mpButtonData->maImage )
|
2004-07-05 14:41:27 +00:00
|
|
|
{
|
2010-11-13 00:35:47 -08:00
|
|
|
mpButtonData->maImage = rImage;
|
2004-07-05 14:41:27 +00:00
|
|
|
|
2010-11-13 00:35:47 -08:00
|
|
|
StateChanged( STATE_CHANGE_DATA );
|
2004-07-05 14:41:27 +00:00
|
|
|
}
|
2010-09-29 15:46:40 +08:00
|
|
|
return sal_True;
|
2004-07-05 14:41:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
2010-11-13 00:35:47 -08:00
|
|
|
const Image Button::GetModeImage( ) const
|
2004-07-05 14:41:27 +00:00
|
|
|
{
|
2010-11-13 00:35:47 -08:00
|
|
|
return mpButtonData->maImage;
|
2004-07-05 14:41:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Button::HasImage() const
|
2004-07-05 14:41:27 +00:00
|
|
|
{
|
|
|
|
return !!(mpButtonData->maImage);
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void Button::SetImageAlign( ImageAlign eAlign )
|
|
|
|
{
|
|
|
|
if ( mpButtonData->meImageAlign != eAlign )
|
|
|
|
{
|
|
|
|
mpButtonData->meImageAlign = eAlign;
|
|
|
|
StateChanged( STATE_CHANGE_DATA );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
ImageAlign Button::GetImageAlign() const
|
|
|
|
{
|
|
|
|
return mpButtonData->meImageAlign;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void Button::SetFocusRect( const Rectangle& rFocusRect )
|
|
|
|
{
|
|
|
|
ImplSetFocusRect( rFocusRect );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2012-07-25 22:28:48 +04:00
|
|
|
long Button::ImplGetSeparatorX() const
|
2010-07-05 15:10:02 +02:00
|
|
|
{
|
2012-07-25 22:28:48 +04:00
|
|
|
return mpButtonData->mnSeparatorX;
|
2010-07-05 15:10:02 +02:00
|
|
|
}
|
|
|
|
|
2012-07-25 22:28:48 +04:00
|
|
|
void Button::ImplSetSeparatorX( long nX )
|
2010-07-05 15:10:02 +02:00
|
|
|
{
|
2012-07-25 22:28:48 +04:00
|
|
|
mpButtonData->mnSeparatorX = nX;
|
2010-07-05 15:10:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 Button::ImplGetTextStyle( XubString& rText, WinBits nWinStyle,
|
2011-01-12 15:07:10 +01:00
|
|
|
sal_uLong nDrawFlags )
|
2004-07-05 14:41:27 +00:00
|
|
|
{
|
|
|
|
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 nTextStyle = FixedText::ImplGetTextStyle( nWinStyle & ~WB_DEFBUTTON );
|
2004-07-05 14:41:27 +00:00
|
|
|
|
|
|
|
if ( nDrawFlags & WINDOW_DRAW_NOMNEMONIC )
|
|
|
|
{
|
|
|
|
if ( nTextStyle & TEXT_DRAW_MNEMONIC )
|
|
|
|
{
|
|
|
|
rText = GetNonMnemonicString( rText );
|
|
|
|
nTextStyle &= ~TEXT_DRAW_MNEMONIC;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( !(nDrawFlags & WINDOW_DRAW_NODISABLE) )
|
|
|
|
{
|
|
|
|
if ( !IsEnabled() )
|
|
|
|
nTextStyle |= TEXT_DRAW_DISABLE;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( (nDrawFlags & WINDOW_DRAW_MONO) ||
|
|
|
|
(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
|
|
|
|
nTextStyle |= TEXT_DRAW_MONO;
|
|
|
|
|
|
|
|
return nTextStyle;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos,
|
2010-09-29 15:46:40 +08:00
|
|
|
Size& rSize, sal_Bool bLayout,
|
2011-01-12 15:07:10 +01:00
|
|
|
sal_uLong nImageSep, sal_uLong nDrawFlags,
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 nTextStyle, Rectangle *pSymbolRect,
|
2010-04-15 20:50:30 +02:00
|
|
|
bool bAddImageSep )
|
2004-07-05 14:41:27 +00:00
|
|
|
{
|
|
|
|
XubString aText( GetText() );
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool bDrawImage = HasImage() && ! ( ImplGetButtonState() & BUTTON_DRAW_NOIMAGE );
|
|
|
|
sal_Bool bDrawText = aText.Len() && ! ( ImplGetButtonState() & BUTTON_DRAW_NOTEXT );
|
|
|
|
sal_Bool bHasSymbol = pSymbolRect ? sal_True : sal_False;
|
2004-07-05 14:41:27 +00:00
|
|
|
|
|
|
|
// No text and no image => nothing to do => return
|
|
|
|
if ( !bDrawImage && !bDrawText && !bHasSymbol )
|
|
|
|
return;
|
|
|
|
|
|
|
|
WinBits nWinStyle = GetStyle();
|
|
|
|
Rectangle aOutRect( rPos, rSize );
|
2009-09-14 12:09:22 +00:00
|
|
|
MetricVector *pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
|
|
|
|
String *pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
|
2004-07-05 14:41:27 +00:00
|
|
|
ImageAlign eImageAlign = mpButtonData->meImageAlign;
|
|
|
|
Size aImageSize = mpButtonData->maImage.GetSizePixel();
|
|
|
|
|
|
|
|
if ( ( nDrawFlags & WINDOW_DRAW_NOMNEMONIC ) &&
|
|
|
|
( nTextStyle & TEXT_DRAW_MNEMONIC ) )
|
|
|
|
{
|
|
|
|
aText = GetNonMnemonicString( aText );
|
|
|
|
nTextStyle &= ~TEXT_DRAW_MNEMONIC;
|
|
|
|
}
|
|
|
|
|
|
|
|
aImageSize.Width() = CalcZoom( aImageSize.Width() );
|
|
|
|
aImageSize.Height() = CalcZoom( aImageSize.Height() );
|
|
|
|
|
|
|
|
// Drawing text or symbol only is simple, use style and output rectangle
|
|
|
|
if ( bHasSymbol && !bDrawImage && !bDrawText )
|
|
|
|
{
|
|
|
|
*pSymbolRect = aOutRect;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
else if ( bDrawText && !bDrawImage && !bHasSymbol )
|
|
|
|
{
|
#b6875455#
refactor the Control's "draw with reference device" functionality
In particular, use the existing DrawText/ImplGetTextLines methods, but provide
them with an optional ITextLayout interface, which replaces the usage of GetTextWidth and DrawText( Point, ... )
This way, the ref-device-rendering benefits from the existing implementations in DrawText( Rectangle, ... ),
in particular, it now respects all kind of TEXT_DRAW_ flags, i.e. alignment, word breaks, multi line text,
disabled drawing, etc.
2009-09-17 21:26:57 +00:00
|
|
|
DrawControlText( *pDev, aOutRect, aText, nTextStyle, pVector, pDisplayText );
|
2004-07-05 14:41:27 +00:00
|
|
|
|
|
|
|
ImplSetFocusRect( aOutRect );
|
|
|
|
rSize = aOutRect.GetSize();
|
|
|
|
rPos = aOutRect.TopLeft();
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// check for HC mode ( image only! )
|
|
|
|
Image *pImage = &(mpButtonData->maImage);
|
|
|
|
|
|
|
|
Size aTextSize;
|
|
|
|
Size aSymbolSize;
|
|
|
|
Size aMax;
|
|
|
|
Point aImagePos = rPos;
|
|
|
|
Point aTextPos = rPos;
|
|
|
|
Rectangle aUnion = Rectangle( aImagePos, aImageSize );
|
|
|
|
Rectangle aSymbol;
|
|
|
|
long nSymbolHeight = 0;
|
|
|
|
|
|
|
|
if ( bDrawText || bHasSymbol )
|
|
|
|
{
|
|
|
|
// Get the size of the text output area ( the symbol will be drawn in
|
|
|
|
// this area as well, so the symbol rectangle will be calculated here, too )
|
|
|
|
|
|
|
|
Rectangle aRect = Rectangle( Point(), rSize );
|
|
|
|
Size aTSSize;
|
|
|
|
|
|
|
|
if ( bHasSymbol )
|
|
|
|
{
|
|
|
|
if ( bDrawText )
|
|
|
|
{
|
|
|
|
nSymbolHeight = pDev->GetTextHeight();
|
2005-02-25 12:10:56 +00:00
|
|
|
if ( mpButtonData->mbSmallSymbol )
|
|
|
|
nSymbolHeight = nSymbolHeight * 3 / 4;
|
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
aSymbol = Rectangle( Point(), Size( nSymbolHeight, nSymbolHeight ) );
|
|
|
|
ImplCalcSymbolRect( aSymbol );
|
2005-02-25 12:10:56 +00:00
|
|
|
aRect.Left() += 3 * nSymbolHeight / 2;
|
|
|
|
aTSSize.Width() = 3 * nSymbolHeight / 2;
|
2004-07-05 14:41:27 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
aSymbol = Rectangle( Point(), rSize );
|
|
|
|
ImplCalcSymbolRect( aSymbol );
|
|
|
|
aTSSize.Width() = aSymbol.GetWidth();
|
|
|
|
}
|
|
|
|
aTSSize.Height() = aSymbol.GetHeight();
|
|
|
|
aSymbolSize = aSymbol.GetSize();
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( bDrawText )
|
|
|
|
{
|
2010-11-13 00:35:47 -08:00
|
|
|
if ( ( eImageAlign == IMAGEALIGN_LEFT_TOP ) ||
|
|
|
|
( eImageAlign == IMAGEALIGN_LEFT ) ||
|
|
|
|
( eImageAlign == IMAGEALIGN_LEFT_BOTTOM ) ||
|
|
|
|
( eImageAlign == IMAGEALIGN_RIGHT_TOP ) ||
|
|
|
|
( eImageAlign == IMAGEALIGN_RIGHT ) ||
|
|
|
|
( eImageAlign == IMAGEALIGN_RIGHT_BOTTOM ) )
|
2004-07-05 14:41:27 +00:00
|
|
|
{
|
|
|
|
aRect.Right() -= ( aImageSize.Width() + nImageSep );
|
|
|
|
}
|
2010-11-13 00:35:47 -08:00
|
|
|
else if ( ( eImageAlign == IMAGEALIGN_TOP_LEFT ) ||
|
|
|
|
( eImageAlign == IMAGEALIGN_TOP ) ||
|
|
|
|
( eImageAlign == IMAGEALIGN_TOP_RIGHT ) ||
|
|
|
|
( eImageAlign == IMAGEALIGN_BOTTOM_LEFT ) ||
|
|
|
|
( eImageAlign == IMAGEALIGN_BOTTOM ) ||
|
|
|
|
( eImageAlign == IMAGEALIGN_BOTTOM_RIGHT ) )
|
2004-07-05 14:41:27 +00:00
|
|
|
{
|
|
|
|
aRect.Bottom() -= ( aImageSize.Height() + nImageSep );
|
|
|
|
}
|
|
|
|
|
|
|
|
aRect = pDev->GetTextRect( aRect, aText, nTextStyle );
|
|
|
|
aTextSize = aRect.GetSize();
|
|
|
|
|
|
|
|
aTSSize.Width() += aTextSize.Width();
|
|
|
|
|
|
|
|
if ( aTSSize.Height() < aTextSize.Height() )
|
|
|
|
aTSSize.Height() = aTextSize.Height();
|
2010-04-15 20:50:30 +02:00
|
|
|
|
|
|
|
if( bAddImageSep && bDrawImage )
|
|
|
|
{
|
|
|
|
long nDiff = (aImageSize.Height() - aTextSize.Height()) / 3;
|
|
|
|
if( nDiff > 0 )
|
|
|
|
nImageSep += nDiff;
|
|
|
|
}
|
2004-07-05 14:41:27 +00:00
|
|
|
}
|
|
|
|
|
2010-11-13 00:35:47 -08:00
|
|
|
aMax.Width() = aTSSize.Width() > aImageSize.Width() ? aTSSize.Width() : aImageSize.Width();
|
2004-07-05 14:41:27 +00:00
|
|
|
aMax.Height() = aTSSize.Height() > aImageSize.Height() ? aTSSize.Height() : aImageSize.Height();
|
|
|
|
|
|
|
|
// Now calculate the output area for the image and the text acording to the image align flags
|
|
|
|
|
|
|
|
if ( ( eImageAlign == IMAGEALIGN_LEFT ) ||
|
|
|
|
( eImageAlign == IMAGEALIGN_RIGHT ) )
|
|
|
|
{
|
|
|
|
aImagePos.Y() = rPos.Y() + ( aMax.Height() - aImageSize.Height() ) / 2;
|
|
|
|
aTextPos.Y() = rPos.Y() + ( aMax.Height() - aTSSize.Height() ) / 2;
|
|
|
|
}
|
|
|
|
else if ( ( eImageAlign == IMAGEALIGN_LEFT_BOTTOM ) ||
|
|
|
|
( eImageAlign == IMAGEALIGN_RIGHT_BOTTOM ) )
|
|
|
|
{
|
|
|
|
aImagePos.Y() = rPos.Y() + aMax.Height() - aImageSize.Height();
|
|
|
|
aTextPos.Y() = rPos.Y() + aMax.Height() - aTSSize.Height();
|
|
|
|
}
|
|
|
|
else if ( ( eImageAlign == IMAGEALIGN_TOP ) ||
|
|
|
|
( eImageAlign == IMAGEALIGN_BOTTOM ) )
|
|
|
|
{
|
|
|
|
aImagePos.X() = rPos.X() + ( aMax.Width() - aImageSize.Width() ) / 2;
|
|
|
|
aTextPos.X() = rPos.X() + ( aMax.Width() - aTSSize.Width() ) / 2;
|
|
|
|
}
|
|
|
|
else if ( ( eImageAlign == IMAGEALIGN_TOP_RIGHT ) ||
|
|
|
|
( eImageAlign == IMAGEALIGN_BOTTOM_RIGHT ) )
|
|
|
|
{
|
|
|
|
aImagePos.X() = rPos.X() + aMax.Width() - aImageSize.Width();
|
|
|
|
aTextPos.X() = rPos.X() + aMax.Width() - aTSSize.Width();
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( ( eImageAlign == IMAGEALIGN_LEFT_TOP ) ||
|
|
|
|
( eImageAlign == IMAGEALIGN_LEFT ) ||
|
|
|
|
( eImageAlign == IMAGEALIGN_LEFT_BOTTOM ) )
|
|
|
|
{
|
|
|
|
aTextPos.X() = rPos.X() + aImageSize.Width() + nImageSep;
|
|
|
|
}
|
|
|
|
else if ( ( eImageAlign == IMAGEALIGN_RIGHT_TOP ) ||
|
|
|
|
( eImageAlign == IMAGEALIGN_RIGHT ) ||
|
|
|
|
( eImageAlign == IMAGEALIGN_RIGHT_BOTTOM ) )
|
|
|
|
{
|
|
|
|
aImagePos.X() = rPos.X() + aTSSize.Width() + nImageSep;
|
|
|
|
}
|
|
|
|
else if ( ( eImageAlign == IMAGEALIGN_TOP_LEFT ) ||
|
|
|
|
( eImageAlign == IMAGEALIGN_TOP ) ||
|
|
|
|
( eImageAlign == IMAGEALIGN_TOP_RIGHT ) )
|
|
|
|
{
|
|
|
|
aTextPos.Y() = rPos.Y() + aImageSize.Height() + nImageSep;
|
|
|
|
}
|
|
|
|
else if ( ( eImageAlign == IMAGEALIGN_BOTTOM_LEFT ) ||
|
|
|
|
( eImageAlign == IMAGEALIGN_BOTTOM ) ||
|
|
|
|
( eImageAlign == IMAGEALIGN_BOTTOM_RIGHT ) )
|
|
|
|
{
|
|
|
|
aImagePos.Y() = rPos.Y() + aTSSize.Height() + nImageSep;
|
|
|
|
}
|
|
|
|
else if ( eImageAlign == IMAGEALIGN_CENTER )
|
|
|
|
{
|
|
|
|
aImagePos.X() = rPos.X() + ( aMax.Width() - aImageSize.Width() ) / 2;
|
|
|
|
aImagePos.Y() = rPos.Y() + ( aMax.Height() - aImageSize.Height() ) / 2;
|
|
|
|
aTextPos.X() = rPos.X() + ( aMax.Width() - aTSSize.Width() ) / 2;
|
|
|
|
aTextPos.Y() = rPos.Y() + ( aMax.Height() - aTSSize.Height() ) / 2;
|
|
|
|
}
|
|
|
|
aUnion = Rectangle( aImagePos, aImageSize );
|
|
|
|
aUnion.Union( Rectangle( aTextPos, aTSSize ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
// Now place the combination of text and image in the output area of the button
|
|
|
|
// according to the window style (WinBits)
|
|
|
|
long nXOffset = 0;
|
|
|
|
long nYOffset = 0;
|
|
|
|
|
|
|
|
if ( nWinStyle & WB_CENTER )
|
|
|
|
{
|
|
|
|
nXOffset = ( rSize.Width() - aUnion.GetWidth() ) / 2;
|
|
|
|
}
|
|
|
|
else if ( nWinStyle & WB_RIGHT )
|
|
|
|
{
|
|
|
|
nXOffset = rSize.Width() - aUnion.GetWidth();
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( nWinStyle & WB_VCENTER )
|
|
|
|
{
|
|
|
|
nYOffset = ( rSize.Height() - aUnion.GetHeight() ) / 2;
|
|
|
|
}
|
|
|
|
else if ( nWinStyle & WB_BOTTOM )
|
|
|
|
{
|
|
|
|
nYOffset = rSize.Height() - aUnion.GetHeight();
|
|
|
|
}
|
|
|
|
|
|
|
|
// the top left corner should always be visible, so we don't allow negative offsets
|
|
|
|
if ( nXOffset < 0 ) nXOffset = 0;
|
|
|
|
if ( nYOffset < 0 ) nYOffset = 0;
|
|
|
|
|
|
|
|
aImagePos.X() += nXOffset;
|
|
|
|
aImagePos.Y() += nYOffset;
|
|
|
|
aTextPos.X() += nXOffset;
|
|
|
|
aTextPos.Y() += nYOffset;
|
|
|
|
|
|
|
|
// set rPos and rSize to the union
|
|
|
|
rSize = aUnion.GetSize();
|
|
|
|
rPos.X() += nXOffset;
|
|
|
|
rPos.Y() += nYOffset;
|
|
|
|
|
|
|
|
if ( bHasSymbol )
|
|
|
|
{
|
2005-02-25 12:10:56 +00:00
|
|
|
if ( mpButtonData->meSymbolAlign == SYMBOLALIGN_RIGHT )
|
|
|
|
{
|
|
|
|
Point aRightPos = Point( aTextPos.X() + aTextSize.Width() + aSymbolSize.Width()/2, aTextPos.Y() );
|
|
|
|
*pSymbolRect = Rectangle( aRightPos, aSymbolSize );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
*pSymbolRect = Rectangle( aTextPos, aSymbolSize );
|
|
|
|
aTextPos.X() += ( 3 * nSymbolHeight / 2 );
|
|
|
|
}
|
|
|
|
if ( mpButtonData->mbSmallSymbol )
|
|
|
|
{
|
|
|
|
nYOffset = (aUnion.GetHeight() - aSymbolSize.Height())/2;
|
|
|
|
pSymbolRect->setY( aTextPos.Y() + nYOffset );
|
|
|
|
}
|
2004-07-05 14:41:27 +00:00
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 nStyle = 0;
|
2004-07-05 14:41:27 +00:00
|
|
|
|
|
|
|
if ( ! ( nDrawFlags & WINDOW_DRAW_NODISABLE ) &&
|
|
|
|
! IsEnabled() )
|
|
|
|
nStyle |= IMAGE_DRAW_DISABLE;
|
|
|
|
|
2011-08-15 09:12:17 +02:00
|
|
|
if ( IsZoom() )
|
|
|
|
pDev->DrawImage( aImagePos, aImageSize, *pImage, nStyle );
|
2004-07-05 14:41:27 +00:00
|
|
|
else
|
2011-08-15 09:12:17 +02:00
|
|
|
pDev->DrawImage( aImagePos, *pImage, nStyle );
|
2004-07-05 14:41:27 +00:00
|
|
|
|
|
|
|
if ( bDrawText )
|
|
|
|
{
|
|
|
|
ImplSetFocusRect( Rectangle( aTextPos, aTextSize ) );
|
|
|
|
pDev->DrawText( Rectangle( aTextPos, aTextSize ), aText, nTextStyle, pVector, pDisplayText );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ImplSetFocusRect( Rectangle( aImagePos, aImageSize ) );
|
|
|
|
}
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void Button::ImplSetFocusRect( const Rectangle &rFocusRect )
|
|
|
|
{
|
|
|
|
Rectangle aFocusRect = rFocusRect;
|
|
|
|
Rectangle aOutputRect = Rectangle( Point(), GetOutputSizePixel() );
|
|
|
|
|
|
|
|
if ( ! aFocusRect.IsEmpty() )
|
|
|
|
{
|
|
|
|
aFocusRect.Left()--;
|
|
|
|
aFocusRect.Top()--;
|
|
|
|
aFocusRect.Right()++;
|
|
|
|
aFocusRect.Bottom()++;
|
|
|
|
}
|
|
|
|
|
2010-11-13 00:35:47 -08:00
|
|
|
if ( aFocusRect.Left() < aOutputRect.Left() ) aFocusRect.Left() = aOutputRect.Left();
|
|
|
|
if ( aFocusRect.Top() < aOutputRect.Top() ) aFocusRect.Top() = aOutputRect.Top();
|
|
|
|
if ( aFocusRect.Right() > aOutputRect.Right() ) aFocusRect.Right() = aOutputRect.Right();
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( aFocusRect.Bottom() > aOutputRect.Bottom() ) aFocusRect.Bottom() = aOutputRect.Bottom();
|
|
|
|
|
|
|
|
mpButtonData->maFocusRect = aFocusRect;
|
|
|
|
}
|
2002-07-04 17:17:19 +00:00
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
2004-07-05 14:41:27 +00:00
|
|
|
const Rectangle& Button::ImplGetFocusRect() const
|
|
|
|
{
|
|
|
|
return mpButtonData->maFocusRect;
|
|
|
|
}
|
2002-07-04 17:17:19 +00:00
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
// -----------------------------------------------------------------------
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16& Button::ImplGetButtonState()
|
2004-07-05 14:41:27 +00:00
|
|
|
{
|
|
|
|
return mpButtonData->mnButtonState;
|
2002-07-04 17:17:19 +00:00
|
|
|
}
|
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
// -----------------------------------------------------------------------
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 Button::ImplGetButtonState() const
|
2004-07-05 14:41:27 +00:00
|
|
|
{
|
|
|
|
return mpButtonData->mnButtonState;
|
|
|
|
}
|
2002-07-04 17:17:19 +00:00
|
|
|
|
2005-02-25 12:10:56 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void Button::ImplSetSymbolAlign( SymbolAlign eAlign )
|
|
|
|
{
|
|
|
|
if ( mpButtonData->meSymbolAlign != eAlign )
|
|
|
|
{
|
|
|
|
mpButtonData->meSymbolAlign = eAlign;
|
|
|
|
StateChanged( STATE_CHANGE_DATA );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
2010-09-29 15:46:40 +08:00
|
|
|
void Button::ImplSetSmallSymbol( sal_Bool bSmall )
|
2005-02-25 12:10:56 +00:00
|
|
|
{
|
|
|
|
mpButtonData->mbSmallSymbol = bSmall;
|
|
|
|
}
|
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
// -----------------------------------------------------------------------
|
2010-09-29 15:46:40 +08:00
|
|
|
void Button::EnableImageDisplay( sal_Bool bEnable )
|
2004-07-05 14:41:27 +00:00
|
|
|
{
|
|
|
|
if( bEnable )
|
|
|
|
mpButtonData->mnButtonState &= ~BUTTON_DRAW_NOIMAGE;
|
|
|
|
else
|
|
|
|
mpButtonData->mnButtonState |= BUTTON_DRAW_NOIMAGE;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
2010-09-29 15:46:40 +08:00
|
|
|
void Button::EnableTextDisplay( sal_Bool bEnable )
|
2004-07-05 14:41:27 +00:00
|
|
|
{
|
|
|
|
if( bEnable )
|
|
|
|
mpButtonData->mnButtonState &= ~BUTTON_DRAW_NOTEXT;
|
|
|
|
else
|
|
|
|
mpButtonData->mnButtonState |= BUTTON_DRAW_NOTEXT;
|
|
|
|
}
|
|
|
|
|
CWS-TOOLING: integrate CWS layoutdialogs2
2009-04-09 10:11:14 +0200 mba r270680 : defective merge sets seem to have brought config_office back
2009-04-02 18:00:52 +0200 mba r270429 : #i100503#: make tralay work without LD_LIBRARY_PATH
2009-04-01 13:27:58 +0200 mba r270320 : warning on Solaris fixed
2009-03-31 22:15:03 +0200 mba r270293 : CWS-TOOLING: rebase CWS layoutdialogs2 to trunk@270033 (milestone: DEV300:m45)
2009-03-16 13:05:08 +0100 mba r269526 : fixed some compiler warnings of the Sun compiler
2009-03-11 15:32:42 +0100 mba r269337 : some problems for ENABLE_LAYOUT fixed
2009-03-09 16:05:32 +0100 mba r269197 : merge conflict solved
2009-03-09 15:09:55 +0100 mba r269194 : merge conflict solved
2009-03-09 15:09:35 +0100 mba r269193 : merge conflict solved
2009-03-06 22:12:47 +0100 mba r269052 : compilation error fixed
2009-03-06 17:36:37 +0100 mba r269033 : integer warning fixed
2009-03-06 10:31:19 +0100 mba r268983 : CWS-TOOLING: rebase CWS layoutdialogs2 to trunk@268395 (milestone: DEV300:m42)
2009-03-03 20:03:59 +0100 jcn r268777 : Add Notes checkbox to find-and-replace dialog in anticipation of m40 resync.
2009-03-03 15:56:20 +0100 jcn r268737 : Apply layout-find-dialog-crash-fix.diff -- fixes crasher.
From http://svn.gnome.org/viewvc/ooo-build?view=revision&revision=15378
2009-02-06 17:41:24 +0100 mba r267479 : arrrrgh - svx headers must be included behind the magic define
2009-02-05 19:44:42 +0100 mba r267439 : seems that msvc preprocessor is thick as a brick
2009-02-05 15:15:16 +0100 mba r267425 : pch added
2009-02-05 08:14:01 +0100 mba r267409 : double defined symbols fixed
2009-02-05 08:13:14 +0100 mba r267408 : compile Languagebox and FontListbox with ENABLE_LAYOUT
2009-02-05 08:07:35 +0100 mba r267406 : warning fixed
2009-02-05 08:06:42 +0100 mba r267405 : warnings and errors fixed
2009-01-30 15:51:52 +0100 mba r267206 : export Container class to compile code in sfx2
2009-01-30 15:51:14 +0100 mba r267205 : remove LAYOUT_EXPERIMENTAL from sfx2, everything now compiles with ENABLE_LAYOUT
2009-01-28 17:01:27 +0100 mba r267069 : fixed namespace problems in sfx2
2009-01-28 16:59:48 +0100 mba r267068 : fixed namespace problems
2009-01-24 13:57:06 +0100 mba r266877 : move svx stuff to experimental
2009-01-24 13:56:11 +0100 mba r266876 : move svx stuff to experimental
2009-01-24 13:52:09 +0100 mba r266875 : put sfx stuff into experimental
2009-01-24 13:28:08 +0100 mba r266874 : put sfx stuff into experimental
2009-01-24 13:26:38 +0100 mba r266873 : help msvc++ compiler a bit
2009-01-24 13:24:43 +0100 mba r266872 : warning removed
2009-01-24 13:23:21 +0100 mba r266871 : moved svx stuff to svx; put sfx stuff into experimental
2009-01-24 13:22:04 +0100 mba r266870 : moved svx stuff to svx
2009-01-05 16:35:34 +0100 jcn r265879 : config_office/configure: Regenerate. Fixes naive builds.
2008-12-17 16:06:25 +0100 jcn r265638 : Wordcount: minor HIG tweaks.
2008-12-17 16:06:21 +0100 jcn r265637 : Zoom: minor HIG spacing tweaks.
2008-12-17 16:06:16 +0100 jcn r265636 : Zoom: fix align-test and update zoom.xml.
2008-12-17 16:06:12 +0100 jcn r265635 : Zoom: add align-test.xml to illustrate zoom alignment bug.
2008-12-17 16:06:07 +0100 jcn r265634 : Find-and-Replace: request font-style-name="Bold", does not seem to work.
2008-12-17 16:06:03 +0100 jcn r265633 : Find-and-Replace: Add alignment for combobox labels.
2008-12-17 16:05:59 +0100 jcn r265632 : Find-and-Replace: Replace pairs of <flow> with <align>. Fixes ugly non-emptiness of more-<hbox>.
2008-12-17 16:05:56 +0100 jcn r265631 : Find-and-Replace: add nice 12pt border.
2008-12-17 16:05:51 +0100 jcn r265630 : Find-and-Replace: also add rowsep at lower fixedline.
2008-12-17 16:05:47 +0100 jcn r265629 : Find-and-Replace: Add poor man's colsep and rowsep substitute spaces.
2008-12-17 16:05:43 +0100 jcn r265628 : Find-and-Replace: use <vbox cnt:x-expand="false"> for buttons.
2008-12-17 16:05:40 +0100 jcn r265627 : Find-and-Replace: add <vbox>s and use cnt:expand="false" to stop vertical button expansion.
2008-12-17 16:05:36 +0100 jcn r265626 : Find-and-Replace: use sc icon. Fixes FIND button height.
2008-12-17 16:05:31 +0100 jcn r265625 : Bugfix have empty/invisible containers not take up space.
2008-12-17 16:05:27 +0100 jcn r265624 : Find-and-replace: Fix/remove most property errors.
2008-12-17 16:05:23 +0100 jcn r265623 : Table: make x, y expand default.
2008-12-17 16:05:18 +0100 jcn r265622 : Use OSL_TRACE rather than printf. Fixes warning visibility.
2008-12-17 16:05:14 +0100 jcn r265621 : Boxtest: add <vbox><table x-expand="true"> pair to trigger property errors.
2008-12-17 16:05:10 +0100 jcn r265620 : Junk extra <table> from boxtest. Fixes visual output.
2008-12-17 16:05:05 +0100 jcn r265619 : Eradicate PROPHELPER_SET_INFO: junk static caching.
2008-12-17 16:05:01 +0100 jcn r265618 : Update awk+sed localize generation rules. Fixes multiple (wrong) titles in Find & Replace.
2008-12-17 16:04:56 +0100 jcn r265617 : Use dash (-) instead of underscore (_) to separate language modifiers. Fixes en_GB etc.
2008-12-17 16:04:51 +0100 jcn r265616 : Add "defbutton=true" to dialogs. Fixes ENTER doing default action: n#439222.
2008-12-17 16:04:45 +0100 jcn r265615 : Michael's new table-based find and replace.
2008-12-17 16:04:40 +0100 jcn r265614 : Apply Michael's boxtest patch.
2008-12-17 16:04:36 +0100 jcn r265613 : Make sort-options experimental. Part II. Fixes crasher n-44.patch. Fixes crasher: n#442036.
2008-12-17 16:04:31 +0100 jcn r265612 : Make sort-options experimental. Part I.
2008-12-17 16:04:26 +0100 jcn r265611 : Add --enable-layout-experimental configure switch. Part II. Typo in configure.in, add set_soenv entry.
2008-12-17 16:04:21 +0100 jcn r265610 : Add --enable-layout-experimental configure switch. Default off.
2008-11-26 16:25:18 +0100 mba r264417 : fixed compiler warnings
2008-11-26 15:52:02 +0100 mba r264407 : fixed compiler warnings
2008-11-26 15:40:44 +0100 mba r264402 : fixed compiler warnings
2008-11-26 14:50:47 +0100 mba r264395 : fixed compiler warnings
2008-11-26 14:39:12 +0100 mba r264393 : fixed compiler warnings
2008-11-26 14:38:49 +0100 mba r264392 : fixed compiler warnings
2008-11-26 14:38:31 +0100 mba r264391 : fixed compiler warnings
2008-11-26 14:38:13 +0100 mba r264390 : fixed compiler warnings
2008-11-26 14:37:38 +0100 mba r264389 : fixed compiler warnings
2008-11-26 10:11:17 +0100 mba r264352 : fixed compiler warnings
2008-11-26 10:06:12 +0100 mba r264351 : fixed compiler warnings
2008-11-26 09:58:28 +0100 mba r264347 : fixed compiler warnings
2008-11-26 09:50:41 +0100 mba r264345 : fixed compiler warnings
2008-11-26 09:46:10 +0100 mba r264343 : fixed compiler warnings
2008-10-22 10:57:09 +0200 mba r262584 : fixed small error resulting from resolved merged conflicts
2008-10-22 10:56:21 +0200 mba r262583 : fixed some small errors resulting from resolved merged conflicts
2008-10-20 19:29:27 +0200 jcn r262557 : layoutdialogs2: Remove stray patches.
2008-10-20 19:29:22 +0200 jcn r262556 : layoutdialogs2: Force resize also on second show after hiding.
2008-10-20 19:29:17 +0200 jcn r262555 : layoutdialogs2: Do not trigger handlers for api calls.
2008-10-20 19:29:13 +0200 jcn r262554 : layoutdialogs2: Use disable/enable instead of hide/show for currency box. Fixes monster lisbox.
2008-10-20 19:29:09 +0200 jcn r262553 : layoutdialogs2: Use line-count instead of linecount. Fixes sizing of listboxes.
2008-10-20 19:29:04 +0200 jcn r262552 : layoutdialogs2: vcl: respect line-count also for non-dropdown listbox.
2008-10-20 19:28:59 +0200 jcn r262551 : layoutdialogs2: Update to svn:r14142 patched.
2008-10-20 19:28:51 +0200 jcn r262550 : layoutdialogs2: Manual tweaks in number-format.xml.
2008-10-20 19:28:45 +0200 jcn r262549 : layoutdialogs2: Integrate Number Format tabpage into Format Cell dialog.
2008-10-20 19:28:36 +0200 jcn r262548 : layoutdialogs2: Windows build fixes. Thanks Noel.
2008-10-20 19:28:31 +0200 jcn r262547 : layoutdialogs2: Layout Format Cells/Number Format tabpage.
2008-10-20 19:28:24 +0200 jcn r262546 : layoutdialogs2: Remove sc/uiconfig/layout/localize.sdf.
2008-10-20 19:28:20 +0200 jcn r262545 : layoutdialogs2: --enable-debug link fix
2008-10-20 19:28:16 +0200 jcn r262544 : layoutdialogs2: Add missing localize.sdf dependency. Thanks, Petr.
2008-10-20 19:28:12 +0200 jcn r262543 : layoutdialogs2: svx linx fixlet.
2008-10-20 19:28:06 +0200 jcn r262542 : layoutdialogs2: Move layout/* to layout/core, vclcompat to layout/vcl. Distribute layout headers. Fixes sfx2 layout core includes.
2008-10-20 19:27:58 +0200 jcn r262541 : layoutdialogs2: Build fix for --enable-layout.
2008-10-20 19:27:54 +0200 jcn r262540 : layoutdialogs2: Generate localize.sdf files in uiconfig.
2008-10-20 19:27:47 +0200 jcn r262539 : layoutdialogs2: Minimalize deprecated String use further by using OUString.
2008-10-20 19:27:42 +0200 jcn r262538 : layoutdialogs2: Implement LocalizedString.GetToken and use it for aCalcBtn. Fixes empty label.
2008-10-20 19:27:36 +0200 jcn r262537 : layoutdialogs2: Add layout::Sfx*Dialog wrapper.
2008-10-20 19:27:29 +0200 jcn r262536 : layoutdialogs2: Introduce Closing*Dialog wrappers fixing closing with ESC.
2008-10-20 19:27:24 +0200 jcn r262535 : layoutdialogs2: Support <sfxmodelessdialog> from sfx2.
2008-10-20 19:27:17 +0200 jcn r262534 : layoutdialogs2: Rename find-&-replace.xml to find-and-replace.xml. Fixes split build with failing solenv patch.
2008-10-20 19:27:12 +0200 jcn r262533 : layoutdialogs2: Do not build sfx2 when --disable-layout.
2008-10-20 19:27:08 +0200 jcn r262532 : layoutdialogs2: Ignore ja/ too.
2008-10-20 19:27:04 +0200 jcn r262531 : layoutdialogs2: Add destructors for VCLXButton, VCLXComboBox.
2008-10-20 19:26:58 +0200 jcn r262530 : layoutdialogs2: Make dialogs closable with ESC: wordcount, zoom, message-box, move-copy-sheet, insert-sheet.
2008-10-20 19:26:52 +0200 jcn r262529 : layoutdialogs2: Move some implementations to .cxx.
2008-10-20 19:26:47 +0200 jcn r262528 : layoutdialogs2: Fix simple editor crasher.
2008-10-20 19:26:43 +0200 jcn r262527 : layoutdialogs2: Further cleanup: remove clean & delete from wrapperGone.
2008-10-20 19:26:38 +0200 jcn r262526 : layoutdialogs2: Add reset logic to ~WindowImpl, plugs ComboBox and Dialog leaks.
2008-10-20 19:26:34 +0200 jcn r262525 : layoutdialogs2: Interesting hack: only leaks ::ComboBox and ::Dialog.
2008-10-20 19:26:29 +0200 jcn r262524 : layoutdialogs2: Build fix.
2008-10-20 19:26:24 +0200 jcn r262523 : layoutdialogs2: Find&Replace duplicate disposal workaround inside layout.
2008-10-20 19:26:19 +0200 jcn r262522 : layoutdialogs2: Revert "Terrible crasher-fix hack. Do not dispose Dialog or any FocusHandler owners."
This reverts commit 5222b5b123a2e6c88494983bd875de574f365bae.
2008-10-20 19:26:14 +0200 jcn r262521 : layoutdialogs2: Terrible crasher-fix hack. Do not dispose Dialog or any FocusHandler owners.
2008-10-20 19:26:08 +0200 jcn r262520 : layoutdialogs2: Revert "ComboBox: crash down to (Dialog's) VCLXWindowImpl::DestroyOutputDevice();"
This reverts commit b423129aca295e84ef5986149b6ee71eb7ba0aa3.
2008-10-20 19:26:03 +0200 jcn r262519 : layoutdialogs2: ComboBox: crash down to (Dialog's) VCLXWindowImpl::DestroyOutputDevice();
2008-10-20 19:25:57 +0200 jcn r262518 : layoutdialogs2: Handler and debug cleanup.
2008-10-20 19:25:52 +0200 jcn r262517 : layoutdialogs2: Minimally remove FixedText workaround.
2008-10-20 19:25:47 +0200 jcn r262516 : layoutdialogs2: Preparations for FocusHdl fix.
2008-10-20 19:25:42 +0200 jcn r262515 : layoutdialogs2: Remove vclxwindows patch by using handler hackery.
2008-10-20 19:25:38 +0200 jcn r262514 : layoutdialogs2: Don't call deleted dialog. Hdler reset tweaks. Fixes Find&Replace.
2008-10-20 19:25:34 +0200 jcn r262513 : layoutdialogs2: Hdler and disposing cleanups.
2008-10-20 19:25:29 +0200 jcn r262512 : layoutdialogs2: Prevent Find&Replace window from being deleted twice.
2008-10-20 19:25:24 +0200 jcn r262511 : layoutdialogs2: Add destructor to SvxSearchDialogWrapper. Fixes second invocation crasher.
2008-10-20 19:25:19 +0200 jcn r262510 : layoutdialogs2: Make Find&Replace work (once) with minimal client code changes.
2008-10-20 19:25:13 +0200 jcn r262509 : layoutdialogs2: Add ComboBox/FixedText debug switching.
2008-10-20 19:25:08 +0200 jcn r262508 : layoutdialogs2: Add destructors resetting handlers.
2008-10-20 19:25:03 +0200 jcn r262507 : layoutdialogs2: Static cast fixes.
2008-10-20 19:24:59 +0200 jcn r262506 : layoutdialogs2: Always set button handler. Fixes pushbuttons.
2008-10-20 19:24:55 +0200 jcn r262505 : layoutdialogs2: Revert "Move FocusHandlers from Control down to ListBox, ComboBox, FixedText."
This reverts commit 8bc4b991539a74373bfb1ef8792276ada8c958e4.
2008-10-20 19:24:50 +0200 jcn r262504 : layoutdialogs2: Disable Timer for ENABLE_LAYOUT.
2008-10-20 19:24:45 +0200 jcn r262503 : layoutdialogs2: Move FocusHandlers from Control down to ListBox, ComboBox, FixedText.
2008-10-20 19:24:40 +0200 jcn r262502 : layoutdialogs2: Wider small symbol.
2008-10-20 19:24:36 +0200 jcn r262501 : layoutdialogs2: Listener and SetHandler cleanup.
2008-10-20 19:24:31 +0200 jcn r262500 : layoutdialogs2: Clear mxWindow upon deletion. Fixes Find&Replace crasher.
2008-10-20 19:24:27 +0200 jcn r262499 : layoutdialogs2: Typo, fixes build.
2008-10-20 19:24:22 +0200 jcn r262498 : layoutdialogs2: Ignore .log files too.
2008-10-20 19:24:19 +0200 jcn r262497 : layoutdialogs2: By default, work around #define protected public Resource hack.
2008-10-20 19:24:15 +0200 jcn r262496 : layoutdialogs2: Sw:Find&Replace: Remove wrong static cast. Fixes crasher.
2008-10-20 19:24:10 +0200 jcn r262495 : layoutdialogs2: Find&Replace: do not vertically expand buttons, add title.
2008-10-20 19:24:06 +0200 jcn r262494 : layoutdialogs2: Find&Replace: Remove need for ResId, set help id.
2008-10-20 19:24:01 +0200 jcn r262493 : layoutdialogs2: MoreButton: redraw upon resize, fix labels, use small symbol.
2008-10-20 19:23:57 +0200 jcn r262492 : layoutdialogs2: Support setting and querying small symbol on vcl:button.
2008-10-20 19:23:52 +0200 jcn r262491 : layoutdialogs2: Support redrawing of only this, make parent optional.
2008-10-20 19:23:48 +0200 jcn r262490 : layoutdialogs2: Add Kohei's wfield patch https://bugzilla.novell.com/attachment.cgi?id=235398. Fixes n#417840.
2008-10-20 19:23:44 +0200 jcn r262489 : layoutdialogs2: Redraw [parent] upon first time visibility.
Fixes weird listbox dropdown sizing in Find & Replace.
2008-10-20 19:23:39 +0200 jcn r262488 : layoutdialogs2: Add manual layouting for Find & Replace.
2008-10-20 19:23:35 +0200 jcn r262487 : layoutdialogs2: src2xml: use label instead of text for buttons.
Run on Find & Replace; fixes button texts.
2008-10-20 19:23:31 +0200 jcn r262486 : layoutdialogs2: Add initial auto-translated find-&-replace-.xml.
2008-10-20 19:23:26 +0200 jcn r262485 : layoutdialogs2: layout importer: handle ModelessDialog.
Fixes Find & Replace parsing error.
2008-10-20 19:23:22 +0200 jcn r262484 : layoutdialogs2: src2xml: Handle multiple widgets at same x,y.
Fixes silent removal of widgets in Find & Replace dialog.
2008-10-20 19:23:18 +0200 jcn r262483 : layoutdialogs2: src2xml: Handle hide= attribute, translate to show=.
2008-10-20 19:23:14 +0200 jcn r262482 : layoutdialogs2: Only use __PRETTY_FUNCTION__ on gcc. Fixes Windows build. Thanks Tor!
2008-10-20 19:23:10 +0200 jcn r262481 : layoutdialogs2: Add two missing SAL_CALL decorations. Fixes Windows build. Thanks Tor!
2008-10-20 19:23:05 +0200 jcn r262480 : layoutdialogs2: Build fixes for layout'ed Find & Replace dialog.
2008-10-20 19:22:54 +0200 jcn r262479 : layoutdialogs2: Do not use layout::SfxTabDialog for now.
2008-10-20 19:22:47 +0200 jcn r262478 : layoutdialogs2: Crufty sizing tweaks.
2008-10-20 19:22:42 +0200 jcn r262477 : layoutdialogs2: More debugging cleanups.
2008-10-20 19:22:37 +0200 jcn r262476 : layoutdialogs2: More cleanups that result in constant manual resizing...
2008-10-20 19:22:33 +0200 jcn r262475 : layoutdialogs2: Tabdlg cleanups.
2008-10-20 19:22:28 +0200 jcn r262474 : layoutdialogs2: Add GetOptimalSize () to InPlug. Fixes auto-sizing of tabcontrol.
2008-10-20 19:22:21 +0200 jcn r262473 : layoutdialogs2: Get VCLXTabControl to resize automatically (too tall), not mousable.
2008-10-20 19:22:13 +0200 jcn r262472 : layoutdialogs2: Respect show=false property; do not show everything.
2008-10-20 19:22:09 +0200 jcn r262471 : layoutdialogs2: Add show=false on buttons. Fixes displaying everything.
2008-10-20 19:22:05 +0200 jcn r262470 : layoutdialogs2: Move some code to reduce namespace and #if hacking.
2008-10-20 19:22:00 +0200 jcn r262469 : layoutdialogs2: Cleanup, remove unneeded #defines.
2008-10-20 19:21:56 +0200 jcn r262468 : layoutdialogs2: Replace static casts with dynamic_cast, fixes layout::SfxTabDialog.
Explicitly add 2 tabpages while adding tabpages, instead of relying on ResId.
2008-10-20 19:21:51 +0200 jcn r262467 : layoutdialogs2: Use cpp hacking to remove layout-tabdialog.hxx duplication.
2008-10-20 19:21:45 +0200 jcn r262466 : layoutdialogs2: Minimize diff between layout-tabdialog.hxx and tabdlg.hxx.
2008-10-20 19:21:41 +0200 jcn r262465 : layoutdialogs2: Remove copy of SfxTabDialog; use cpp logic to create both flavours.
2008-10-20 19:21:36 +0200 jcn r262464 : layoutdialogs2: Minimize diff between layout/sfxtabdialog.cxx and source/tabdlg.cxx.
This enables the next step: use cpp logic instead of code duplication.
2008-10-20 19:21:31 +0200 jcn r262463 : layoutdialogs2: Hello world on layout::SfxTabDialog.
2008-10-20 19:21:24 +0200 jcn r262462 : layoutdialogs2: Nice `Compiling:' message that shows the file being compiled.
2008-10-20 19:21:20 +0200 jcn r262461 : layoutdialogs2: Use layout::SfxTabDialog for sort options.
2008-10-20 19:21:15 +0200 jcn r262460 : layoutdialogs2: Update sort options tab.
2008-10-20 19:21:10 +0200 jcn r262459 : layoutdialogs2: Add layout::SfxTabDialog.
2008-10-20 19:21:04 +0200 jcn r262458 : layoutdialogs2: Cleanup previous attempt using layout::SfxTabPage == layout::TabPage.
2008-10-20 19:20:57 +0200 jcn r262457 : layoutdialogs2: Windows 2003 compile fixes, i#92397.
2008-10-20 19:20:52 +0200 jcn r262456 : layoutdialogs2: Set default radiogroup when none provided.
2008-10-20 19:20:48 +0200 jcn r262455 : layoutdialogs2: Add radiogroup to sort-options. Fixes crasher.
2008-10-20 19:20:43 +0200 jcn r262454 : layoutdialogs2: Cleanup ParentSet fix.
2008-10-20 19:20:36 +0200 jcn r262453 : layoutdialogs2: Add debugging in ParentSet. Works standalone, not integrated.
2008-10-20 19:20:31 +0200 jcn r262452 : layoutdialogs2: Revert "Have InPlug not derive from Window, but have as member."
This reverts commit 50ea26eec3fe14943f24900081ad923e72550345.
2008-10-20 19:20:25 +0200 jcn r262451 : layoutdialogs2: Have InPlug not derive from Window, but have as member.
2008-10-20 19:20:20 +0200 jcn r262450 : layoutdialogs2: Move layout plugin implementation from layout::SfxTabPage to InPlug.
2008-10-20 19:20:14 +0200 jcn r262449 : layoutdialogs2: Get all widgets to display in sfxtabpage plugin with Window::SetParent hack.
2008-10-20 19:20:09 +0200 jcn r262448 : layoutdialogs2: Two-button manual hello world with sfxtabpage plugin.
2008-10-20 19:20:03 +0200 jcn r262447 : layoutdialogs2: WIP: layout::SfxTabPage derived from SfxTabPage.
2008-10-20 19:19:55 +0200 jcn r262446 : layoutdialogs2: Always set parent after construction, fixes listbox dropdown.
2008-10-20 19:19:51 +0200 jcn r262445 : layoutdialogs2: Fix radio button crasher.
2008-10-20 19:19:47 +0200 jcn r262444 : layoutdialogs2: Implement ListBox method wrappers. Fixes filling of listbox.
2008-10-20 19:19:42 +0200 jcn r262443 : layoutdialogs2: Convert Move/Copy sheet to layout engine.
2008-10-20 19:19:35 +0200 jcn r262442 : layoutdialogs2: Also hide yes/no buttons if not used.
2008-10-20 19:19:31 +0200 jcn r262441 : layoutdialogs2: Elaborate on changing client code.
2008-10-20 19:19:26 +0200 jcn r262440 : layoutdialogs2: Implement winbits client-code compatibility for Message Boxes.
2008-10-20 19:19:21 +0200 jcn r262439 : layoutdialogs2: Add localize.sdf to toolkit uiconfig. Fixes build.
2008-10-20 19:19:17 +0200 jcn r262438 : layoutdialogs2: Do not use ti_layout twice in toolkit build.lst. Fixes build.
2008-10-20 19:19:13 +0200 jcn r262437 : layoutdialogs2: Oops, also dist toolkit-layout.zip.
2008-10-20 19:19:09 +0200 jcn r262436 : layoutdialogs2: Move layout.mk to solenv.
2008-10-20 19:19:03 +0200 jcn r262435 : layoutdialogs2: Add handy TEST file.
2008-10-20 19:18:58 +0200 jcn r262434 : layoutdialogs2: Implement MessageBox and wrappers ErrorBox, InfoBox, QueryBox, WarningBox.
2008-10-20 19:18:52 +0200 jcn r262433 : layoutdialogs2: QueryBox without image used for Delete Sheet dialog.
2008-10-20 19:18:46 +0200 jcn r262432 : layoutdialogs2: WIP QueryBox.
2008-10-20 19:18:39 +0200 jcn r262431 : layoutdialogs2: Add insert-sheet localization.
2008-10-20 19:18:34 +0200 jcn r262430 : layoutdialogs2: Run indent-region on zoom.xml, distribute it.
2008-10-20 19:18:30 +0200 jcn r262429 : layoutdialogs2: Dist xml files too.
2008-10-20 19:18:26 +0200 jcn r262428 : layoutdialogs2: Add insert-sheet.xml to workben.
2008-10-20 19:18:22 +0200 jcn r262427 : layoutdialogs2: Update layout TODO.
2008-10-20 19:18:18 +0200 jcn r262426 : layoutdialogs2: Cleanups and add comments.
2008-10-20 19:18:13 +0200 jcn r262425 : layoutdialogs2: Keep RadioButtons::RadioButton callback at HEAD of list.
Fixes radiobutton grouping.
2008-10-20 19:18:07 +0200 jcn r262424 : layoutdialogs2: Remove IMPORT_RADIOGROUP cruft.
2008-10-20 19:18:02 +0200 jcn r262423 : layoutdialogs2: Have code check fire event for radio button.
Fixes radio button grouping.
2008-10-20 19:17:58 +0200 jcn r262422 : layoutdialogs2: Enable IMPORT_RADIOGROUP flag.
2008-10-20 19:17:54 +0200 jcn r262421 : layoutdialogs2: Add radio groups to zoom.xml.
2008-10-20 19:17:50 +0200 jcn r262420 : layoutdialogs2: Move RadioGroup implementation to cxx file.
2008-10-20 19:17:45 +0200 jcn r262419 : layoutdialogs2: Manually set help id for insert table.
2008-10-20 19:17:41 +0200 jcn r262418 : layoutdialogs2: Cosmetic fixes for insert-sheet.
2008-10-20 19:17:37 +0200 jcn r262417 : layoutdialogs2: FindAndRemove now also skips translation prefix.
Fixes setting of title etc. from nontranslated xml.
2008-10-20 19:17:32 +0200 jcn r262416 : layoutdialogs2: Manually set help id for zoom and wordcount dialogs.
2008-10-20 19:17:27 +0200 jcn r262415 : layoutdialogs2: Set help-id from xml.
2008-10-20 19:17:21 +0200 jcn r262414 : layoutdialogs2: Move -DENABLE_LAYOUT from stray makefiles to settings.mk.
2008-10-20 19:17:13 +0200 jcn r262413 : layoutdialogs2: Initial conversion of insert-sheet dialog.
2008-10-20 19:17:08 +0200 jcn r262412 : layoutdialogs2: Add wrappers for {Get,Set}{Pointer,Text}.
2008-10-20 19:17:04 +0200 jcn r262411 : layoutdialogs2: Toolkit layout dialog copy updates.
2008-10-20 19:16:59 +0200 jcn r262410 : layoutdialogs2: Cleanup #include <layout*> disaster.
Fixes multiple inclusions of layout-pre, layout-post.
2008-10-20 19:16:53 +0200 jcn r262409 : layoutdialogs2: Implement Get,Set{,Smart}HelpId ().
2008-10-20 19:16:49 +0200 jcn r262408 : layoutdialogs2: Make some getters const.
2008-10-20 19:16:45 +0200 jcn r262407 : layoutdialogs2: Manual tweaks for string-input.xml.
2008-10-20 19:16:40 +0200 jcn r262406 : layoutdialogs2: Add string-input.xml.
2008-10-20 19:16:36 +0200 jcn r262405 : layoutdialogs2: Add dummy implementation for SetHelpId etc.
2008-10-20 19:16:32 +0200 jcn r262404 : layoutdialogs2: Actually say *what* file cannot be copied *where*. Sigh.
2008-10-20 19:16:27 +0200 jcn r262403 : layoutdialogs2: Thinko in macro name. Fixes compilation of strindlg.cxx.
2008-10-20 19:16:22 +0200 jcn r262402 : layoutdialogs2: Add layout includes to stringdlg and makefile.
2008-10-20 19:16:17 +0200 jcn r262401 : layoutdialogs2: Add sc/uiconfig/layout/localize.sdf
2008-10-20 19:16:13 +0200 jcn r262400 : layoutdialogs2: Oops, build sc/uiconfig/layout.
2008-10-20 19:16:09 +0200 jcn r262399 : layoutdialogs2: Have virtual destructor on Context, delete TabPage when deleting TabDialog.
2008-10-20 19:16:04 +0200 jcn r262398 : layoutdialogs2: Actually delete layout::TabPage objects when deleting SfxTabdialog.
2008-10-20 19:16:00 +0200 jcn r262397 : layoutdialogs2: Workaround for second invocation crash of sort dialog options tab.
2008-10-20 19:15:56 +0200 jcn r262396 : layoutdialogs2: Handle Reset button.
2008-10-20 19:15:51 +0200 jcn r262395 : layoutdialogs2: Also install sc xml zip file.
2008-10-20 19:15:46 +0200 jcn r262394 : layoutdialogs2: Integrate sort-options into sc.
2008-10-20 19:15:41 +0200 jcn r262393 : layoutdialogs2: Revert "Fix sfx2 compile warnings."
This reverts commit 8b55d402af7bd217db35f67b02dc92f93f3ada5d.
2008-10-20 19:15:34 +0200 jcn r262392 : layoutdialogs2: Remove debuging.
2008-10-20 19:15:30 +0200 jcn r262391 : layoutdialogs2: Pass set argument to layout::TabPage. Fixes OO.o integration crasher.
2008-10-20 19:15:24 +0200 jcn r262390 : layoutdialogs2: Ignore more.
2008-10-20 19:15:20 +0200 jcn r262389 : layoutdialogs2: Oops, make just one (1) sort-options tab.
2008-10-20 19:15:15 +0200 jcn r262388 : layoutdialogs2: Revert macroconf compile warnings.
2008-10-20 19:15:09 +0200 jcn r262387 : layoutdialogs2: Fix sfx2 compile warnings.
2008-10-20 19:15:01 +0200 jcn r262386 : layoutdialogs2: Collapsed tabpage and sort-options development.
2008-10-20 19:14:51 +0200 jcn r262385 : layoutdialogs2: Make dev300/src680 install layout switchable at compile time.
2008-10-20 19:14:47 +0200 jcn r262384 : layoutdialogs2: Update README, add README.
2008-10-20 19:14:43 +0200 jcn r262383 : layoutdialogs2: Repainting, hiding stuff.
2008-10-20 19:14:38 +0200 jcn r262382 : layoutdialogs2: Add allocateArea to VCLXTabPage.
2008-10-20 19:14:34 +0200 jcn r262381 : layoutdialogs2: Revert "Use VCLXContainer as base for VCLXTabPage."
This reverts commit 06a984434d0d2c356fd0cdaf96d6d613d5147b7c.
2008-10-20 19:14:30 +0200 jcn r262380 : layoutdialogs2: Use VCLXContainer as base for VCLXTabPage.
2008-10-20 19:14:26 +0200 jcn r262379 : layoutdialogs2: Revert "Derive VCLXTabPage from VBox."
This reverts commit 8ab66364bdc08151ce2c982c1aa03f7881d86b84.
2008-10-20 19:14:22 +0200 jcn r262378 : layoutdialogs2: Derive VCLXTabPage from VBox.
2008-10-20 19:14:17 +0200 jcn r262377 : layoutdialogs2: More cleanups and testing.
2008-10-20 19:14:12 +0200 jcn r262376 : layoutdialogs2: Get layout tabpage to nicely select. No content visible, though.
2008-10-20 19:14:07 +0200 jcn r262375 : layoutdialogs2: Support ScTabPageSortOptions in standalone test.
2008-10-20 19:14:02 +0200 jcn r262374 : layoutdialogs2: Support tabpage creation from xml.
2008-10-20 19:13:56 +0200 jcn r262373 : layoutdialogs2: Remove most TEST_LAYOUT conditionals.
2008-10-20 19:13:52 +0200 jcn r262372 : layoutdialogs2: Remove Args effort.
2008-10-20 19:13:48 +0200 jcn r262371 : layoutdialogs2: Attempt to create ArgSet.
2008-10-20 19:13:44 +0200 jcn r262370 : layoutdialogs2: Compile more.
2008-10-20 19:13:39 +0200 jcn r262369 : layoutdialogs2: Add sortdlg.
2008-10-20 19:13:35 +0200 jcn r262368 : layoutdialogs2: Oops, ID fix.
2008-10-20 19:13:30 +0200 jcn r262367 : layoutdialogs2: Build fix.
2008-10-20 19:13:26 +0200 jcn r262366 : layoutdialogs2: Revert "Use ::Window for plugin base iso ::Control."
This reverts commit 919ddaf2f52ad5e4df877a094cd1e336888d6210.
2008-10-20 19:13:21 +0200 jcn r262365 : layoutdialogs2: Plugin dialog cleanups.
2008-10-20 19:13:17 +0200 jcn r262364 : layoutdialogs2: Use ::Window for plugin base iso ::Control.
2008-10-20 19:13:12 +0200 jcn r262363 : layoutdialogs2: Use cstdio, remove cruft.
2008-10-20 19:13:07 +0200 jcn r262362 : layoutdialogs2: Remove cruft.
2008-10-20 19:13:02 +0200 jcn r262361 : layoutdialogs2: Remove sizing mess.
2008-10-20 19:12:57 +0200 jcn r262360 : layoutdialogs2: Trigger [re]draw of DialControl.
2008-10-20 19:12:53 +0200 jcn r262359 : layoutdialogs2: DialControl window behaves nicely and invisible.
2008-10-20 19:12:48 +0200 jcn r262358 : layoutdialogs2: Revert adding of setparent.
2008-10-20 19:12:43 +0200 jcn r262357 : layoutdialogs2: Add dialog::setparent to plugin.
2008-10-20 19:12:39 +0200 jcn r262356 : layoutdialogs2: Add a setProperty for VCLXPlugin.
2008-10-20 19:12:34 +0200 jcn r262355 : layoutdialogs2: Unhide plugin.
2008-10-20 19:12:30 +0200 jcn r262354 : layoutdialogs2: Revert.
2008-10-20 19:12:25 +0200 jcn r262353 : layoutdialogs2: Use window instead of control.
2008-10-20 19:12:20 +0200 jcn r262352 : layoutdialogs2: Lots of plugin settings.
2008-10-20 19:12:16 +0200 jcn r262351 : layoutdialogs2: More hacks.
2008-10-20 19:12:11 +0200 jcn r262350 : layoutdialogs2: Compile fixes.
2008-10-20 19:12:05 +0200 jcn r262349 : layoutdialogs2: Use c++ includes.
2008-10-20 19:12:00 +0200 jcn r262348 : layoutdialogs2: Junk UnoTunnel nonsense.
2008-10-20 19:11:55 +0200 jcn r262347 : layoutdialogs2: Remove more cruft.
2008-10-20 19:11:50 +0200 jcn r262346 : layoutdialogs2: Remove cruft.
2008-10-20 19:11:44 +0200 jcn r262345 : layoutdialogs2: Rename wrap to plugin.
2008-10-20 19:11:39 +0200 jcn r262344 : layoutdialogs2: All sorry tries.
2008-10-20 19:11:33 +0200 jcn r262343 : layoutdialogs2: Rename plugin to wrap.
2008-10-20 19:11:28 +0200 jcn r262342 : layoutdialogs2: Add ifdefs, no UNOTUNNEL, no crash on exit.
2008-10-20 19:11:23 +0200 jcn r262341 : layoutdialogs2: Redo all kind of Uno and XIface weirdness.
2008-10-20 19:11:17 +0200 jcn r262340 : layoutdialogs2: Remove extra UnoTunnel.
2008-10-20 19:11:12 +0200 jcn r262339 : layoutdialogs2: Plugin hello world. TODO: parenting/owning/sizing, ... etc.
2008-10-20 19:11:06 +0200 jcn r262338 : layoutdialogs2: Zoom updates.
2008-10-20 19:11:01 +0200 jcn r262337 : layoutdialogs2: Add missing controls.
2008-10-20 19:10:56 +0200 jcn r262336 : layoutdialogs2: Add .gitignore.
2009-04-21 16:06:18 +00:00
|
|
|
bool Button::IsSmallSymbol () const
|
|
|
|
{
|
|
|
|
return mpButtonData->mbSmallSymbol;
|
|
|
|
}
|
2004-11-26 15:12:52 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
// =======================================================================
|
|
|
|
|
2006-06-19 18:15:23 +00:00
|
|
|
void PushButton::ImplInitPushButtonData()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
mpWindowImpl->mbPushButton = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
meSymbol = SYMBOL_NOSYMBOL;
|
|
|
|
meState = STATE_NOCHECK;
|
|
|
|
meSaveValue = STATE_NOCHECK;
|
|
|
|
mnDDStyle = 0;
|
2010-09-29 15:46:40 +08:00
|
|
|
mbPressed = sal_False;
|
|
|
|
mbInUserDraw = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void PushButton::ImplInit( Window* pParent, WinBits nStyle )
|
|
|
|
{
|
|
|
|
nStyle = ImplInitStyle( pParent->GetWindow( WINDOW_LASTCHILD ), nStyle );
|
|
|
|
Button::ImplInit( pParent, nStyle, NULL );
|
|
|
|
|
|
|
|
if ( nStyle & WB_NOLIGHTBORDER )
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() |= BUTTON_DRAW_NOLIGHTBORDER;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
ImplInitSettings( sal_True, sal_True, sal_True );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
WinBits PushButton::ImplInitStyle( const Window* pPrevWindow, WinBits nStyle )
|
|
|
|
{
|
|
|
|
if ( !(nStyle & WB_NOTABSTOP) )
|
|
|
|
nStyle |= WB_TABSTOP;
|
2004-07-05 14:41:27 +00:00
|
|
|
|
|
|
|
// if no alignment is given, default to "vertically centered". This is because since
|
|
|
|
// #i26046#, we respect the vertical alignment flags (previously we didn't completely),
|
|
|
|
// but we of course want to look as before when no vertical alignment is specified
|
|
|
|
if ( ( nStyle & ( WB_TOP | WB_VCENTER | WB_BOTTOM ) ) == 0 )
|
|
|
|
nStyle |= WB_VCENTER;
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( !(nStyle & WB_NOGROUP) &&
|
|
|
|
(!pPrevWindow ||
|
2010-11-13 00:35:47 -08:00
|
|
|
((pPrevWindow->GetType() != WINDOW_PUSHBUTTON ) &&
|
|
|
|
(pPrevWindow->GetType() != WINDOW_OKBUTTON ) &&
|
2000-09-18 16:07:07 +00:00
|
|
|
(pPrevWindow->GetType() != WINDOW_CANCELBUTTON) &&
|
2010-11-13 00:35:47 -08:00
|
|
|
(pPrevWindow->GetType() != WINDOW_HELPBUTTON )) ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
nStyle |= WB_GROUP;
|
|
|
|
return nStyle;
|
|
|
|
}
|
|
|
|
|
2009-09-14 12:09:22 +00:00
|
|
|
// -----------------------------------------------------------------
|
|
|
|
|
|
|
|
const Font& PushButton::GetCanonicalFont( const StyleSettings& _rStyle ) const
|
|
|
|
{
|
|
|
|
return _rStyle.GetPushButtonFont();
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------
|
|
|
|
const Color& PushButton::GetCanonicalTextColor( const StyleSettings& _rStyle ) const
|
|
|
|
{
|
|
|
|
return _rStyle.GetButtonTextColor();
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void PushButton::ImplInitSettings( sal_Bool bFont,
|
|
|
|
sal_Bool bForeground, sal_Bool bBackground )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2009-09-14 12:09:22 +00:00
|
|
|
Button::ImplInitSettings( bFont, bForeground );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( bBackground )
|
2004-05-10 14:45:59 +00:00
|
|
|
{
|
2005-01-21 12:32:58 +00:00
|
|
|
SetBackground();
|
|
|
|
// #i38498#: do not check for GetParent()->IsChildTransparentModeEnabled()
|
|
|
|
// otherwise the formcontrol button will be overdrawn due to PARENTCLIPMODE_NOCLIP
|
|
|
|
// for radio and checkbox this is ok as they shoud appear transparent in documents
|
2010-08-11 15:44:43 +02:00
|
|
|
if ( IsNativeControlSupported( CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL ) ||
|
|
|
|
(GetStyle() & WB_FLATBUTTON) != 0 )
|
2004-05-10 14:45:59 +00:00
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
EnableChildTransparentMode( sal_True );
|
2004-05-10 14:45:59 +00:00
|
|
|
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
|
2010-09-29 15:46:40 +08:00
|
|
|
SetPaintTransparent( sal_True );
|
2010-04-15 16:37:39 +02:00
|
|
|
mpWindowImpl->mbUseNativeFocus = (GetStyle() & WB_FLATBUTTON)
|
|
|
|
? false
|
|
|
|
: ImplGetSVData()->maNWFData.mbNoFocusRects;
|
2004-05-10 14:45:59 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
EnableChildTransparentMode( sal_False );
|
2004-05-10 14:45:59 +00:00
|
|
|
SetParentClipMode( 0 );
|
2010-09-29 15:46:40 +08:00
|
|
|
SetPaintTransparent( sal_False );
|
2004-05-10 14:45:59 +00:00
|
|
|
}
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void PushButton::ImplDrawPushButtonFrame( Window* pDev,
|
2010-09-29 15:46:40 +08:00
|
|
|
Rectangle& rRect, sal_uInt16 nStyle )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if ( !(pDev->GetStyle() & (WB_RECTSTYLE | WB_SMALLSTYLE)) )
|
|
|
|
{
|
|
|
|
StyleSettings aStyleSettings = pDev->GetSettings().GetStyleSettings();
|
|
|
|
if ( pDev->IsControlBackground() )
|
|
|
|
aStyleSettings.Set3DColors( pDev->GetControlBackground() );
|
|
|
|
}
|
|
|
|
|
|
|
|
DecorationView aDecoView( pDev );
|
|
|
|
if ( pDev->IsControlBackground() )
|
|
|
|
{
|
|
|
|
AllSettings aSettings = pDev->GetSettings();
|
|
|
|
AllSettings aOldSettings = aSettings;
|
|
|
|
StyleSettings aStyleSettings = aSettings.GetStyleSettings();
|
|
|
|
aStyleSettings.Set3DColors( pDev->GetControlBackground() );
|
|
|
|
aSettings.SetStyleSettings( aStyleSettings );
|
2007-01-25 10:23:47 +00:00
|
|
|
pDev->OutputDevice::SetSettings( aSettings );
|
2000-09-18 16:07:07 +00:00
|
|
|
rRect = aDecoView.DrawButton( rRect, nStyle );
|
2007-01-25 10:23:47 +00:00
|
|
|
pDev->OutputDevice::SetSettings( aOldSettings );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
rRect = aDecoView.DrawButton( rRect, nStyle );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool PushButton::ImplHitTestPushButton( Window* pDev,
|
2006-06-19 18:15:23 +00:00
|
|
|
const Point& rPos )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
Point aTempPoint;
|
|
|
|
Rectangle aTestRect( aTempPoint, pDev->GetOutputSizePixel() );
|
|
|
|
|
|
|
|
return aTestRect.IsInside( rPos );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2011-01-12 15:07:10 +01:00
|
|
|
sal_uInt16 PushButton::ImplGetTextStyle( sal_uLong nDrawFlags ) const
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 nTextStyle = TEXT_DRAW_MNEMONIC | TEXT_DRAW_MULTILINE | TEXT_DRAW_ENDELLIPSIS;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( ( rStyleSettings.GetOptions() & STYLE_OPTION_MONO ) ||
|
|
|
|
( nDrawFlags & WINDOW_DRAW_MONO ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
nTextStyle |= TEXT_DRAW_MONO;
|
2004-07-05 14:41:27 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( GetStyle() & WB_WORDBREAK )
|
|
|
|
nTextStyle |= TEXT_DRAW_WORDBREAK;
|
|
|
|
if ( GetStyle() & WB_NOLABEL )
|
|
|
|
nTextStyle &= ~TEXT_DRAW_MNEMONIC;
|
2004-07-05 14:41:27 +00:00
|
|
|
|
|
|
|
if ( GetStyle() & WB_LEFT )
|
|
|
|
nTextStyle |= TEXT_DRAW_LEFT;
|
|
|
|
else if ( GetStyle() & WB_RIGHT )
|
|
|
|
nTextStyle |= TEXT_DRAW_RIGHT;
|
|
|
|
else
|
|
|
|
nTextStyle |= TEXT_DRAW_CENTER;
|
|
|
|
|
|
|
|
if ( GetStyle() & WB_TOP )
|
|
|
|
nTextStyle |= TEXT_DRAW_TOP;
|
|
|
|
else if ( GetStyle() & WB_BOTTOM )
|
|
|
|
nTextStyle |= TEXT_DRAW_BOTTOM;
|
|
|
|
else
|
|
|
|
nTextStyle |= TEXT_DRAW_VCENTER;
|
|
|
|
|
|
|
|
if ( ! ( (nDrawFlags & WINDOW_DRAW_NODISABLE) || IsEnabled() ) )
|
|
|
|
nTextStyle |= TEXT_DRAW_DISABLE;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
return nTextStyle;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
static void ImplDrawBtnDropDownArrow( OutputDevice* pDev,
|
|
|
|
long nX, long nY,
|
2010-09-29 15:46:40 +08:00
|
|
|
Color& rColor, sal_Bool bBlack )
|
2006-01-26 17:07:58 +00:00
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
Color aOldLineColor = pDev->GetLineColor();
|
|
|
|
Color aOldFillColor = pDev->GetFillColor();
|
|
|
|
|
|
|
|
pDev->SetLineColor();
|
|
|
|
if ( bBlack )
|
|
|
|
pDev->SetFillColor( Color( COL_BLACK ) );
|
2006-01-26 17:07:58 +00:00
|
|
|
else
|
2000-09-18 16:07:07 +00:00
|
|
|
pDev->SetFillColor( rColor );
|
|
|
|
pDev->DrawRect( Rectangle( nX+0, nY+0, nX+6, nY+0 ) );
|
|
|
|
pDev->DrawRect( Rectangle( nX+1, nY+1, nX+5, nY+1 ) );
|
|
|
|
pDev->DrawRect( Rectangle( nX+2, nY+2, nX+4, nY+2 ) );
|
|
|
|
pDev->DrawRect( Rectangle( nX+3, nY+3, nX+3, nY+3 ) );
|
|
|
|
if ( bBlack )
|
2006-01-26 17:07:58 +00:00
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
pDev->SetFillColor( rColor );
|
|
|
|
pDev->DrawRect( Rectangle( nX+2, nY+1, nX+4, nY+1 ) );
|
|
|
|
pDev->DrawRect( Rectangle( nX+3, nY+2, nX+3, nY+2 ) );
|
2006-01-26 17:07:58 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
pDev->SetLineColor( aOldLineColor );
|
|
|
|
pDev->SetFillColor( aOldFillColor );
|
2006-01-26 17:07:58 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2011-01-12 15:07:10 +01:00
|
|
|
void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, sal_uLong nDrawFlags,
|
2006-06-19 18:15:23 +00:00
|
|
|
const Rectangle& rRect,
|
2010-07-27 17:19:20 +02:00
|
|
|
bool bLayout,
|
|
|
|
bool bMenuBtnSep
|
|
|
|
)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
|
|
|
|
Rectangle aInRect = rRect;
|
2004-07-05 14:41:27 +00:00
|
|
|
Color aColor;
|
2000-09-18 16:07:07 +00:00
|
|
|
XubString aText = PushButton::GetText(); // PushButton:: wegen MoreButton
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 nTextStyle = ImplGetTextStyle( nDrawFlags );
|
|
|
|
sal_uInt16 nStyle;
|
2001-03-23 13:34:56 +00:00
|
|
|
|
|
|
|
if( aInRect.nRight < aInRect.nLeft || aInRect.nBottom < aInRect.nTop )
|
|
|
|
aInRect.SetEmpty();
|
|
|
|
|
2001-04-10 11:42:24 +00:00
|
|
|
pDev->Push( PUSH_CLIPREGION );
|
|
|
|
pDev->IntersectClipRegion( aInRect );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( nDrawFlags & WINDOW_DRAW_MONO )
|
|
|
|
aColor = Color( COL_BLACK );
|
|
|
|
else if ( IsControlForeground() )
|
|
|
|
aColor = GetControlForeground();
|
2006-01-26 17:07:58 +00:00
|
|
|
else if( nDrawFlags & WINDOW_DRAW_ROLLOVER )
|
|
|
|
aColor = rStyleSettings.GetButtonRolloverTextColor();
|
2004-07-05 14:41:27 +00:00
|
|
|
else
|
|
|
|
aColor = rStyleSettings.GetButtonTextColor();
|
|
|
|
|
|
|
|
pDev->SetTextColor( aColor );
|
|
|
|
|
|
|
|
if ( IsEnabled() || (nDrawFlags & WINDOW_DRAW_NODISABLE) )
|
|
|
|
nStyle = 0;
|
2000-09-18 16:07:07 +00:00
|
|
|
else
|
2004-07-05 14:41:27 +00:00
|
|
|
nStyle = SYMBOL_DRAW_DISABLE;
|
|
|
|
|
|
|
|
Size aSize = rRect.GetSize();
|
|
|
|
Point aPos = rRect.TopLeft();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-01-12 15:07:10 +01:00
|
|
|
sal_uLong nImageSep = 1 + (pDev->GetTextHeight()-10)/2;
|
2010-07-05 15:10:02 +02:00
|
|
|
if( nImageSep < 1 )
|
|
|
|
nImageSep = 1;
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( mnDDStyle == PUSHBUTTON_DROPDOWN_MENUBUTTON )
|
|
|
|
{
|
2012-07-25 22:28:48 +04:00
|
|
|
long nSeparatorX = 0;
|
|
|
|
Rectangle aSymbolRect = aInRect;
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( aText.Len() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2012-07-24 23:49:54 -07:00
|
|
|
// calculate symbol size
|
2004-09-09 15:19:40 +00:00
|
|
|
long nSymbolSize = pDev->GetTextHeight() / 2 + 1;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2012-07-25 22:28:48 +04:00
|
|
|
nSeparatorX = aInRect.Right() - 2*nSymbolSize;
|
|
|
|
aSize.Width() -= 2*nSymbolSize;
|
2012-07-24 23:49:54 -07:00
|
|
|
|
2012-07-25 22:28:48 +04:00
|
|
|
// center symbol rectangle in the separated area
|
|
|
|
aSymbolRect.Right() -= nSymbolSize/2;
|
|
|
|
aSymbolRect.Left() = aSymbolRect.Right() - nSymbolSize;
|
2012-07-24 23:49:54 -07:00
|
|
|
|
2012-07-25 20:53:37 +04:00
|
|
|
ImplDrawAlignedImage( pDev, aPos, aSize, bLayout, nImageSep,
|
|
|
|
nDrawFlags, nTextStyle, NULL, true );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
2012-07-25 22:28:48 +04:00
|
|
|
ImplCalcSymbolRect( aSymbolRect );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2002-04-29 16:46:18 +00:00
|
|
|
if( ! bLayout )
|
|
|
|
{
|
2012-07-25 22:28:48 +04:00
|
|
|
long nDistance = (aSymbolRect.GetHeight() > 10) ? 2 : 1;
|
2002-04-29 16:46:18 +00:00
|
|
|
DecorationView aDecoView( pDev );
|
2012-07-25 22:28:48 +04:00
|
|
|
if( bMenuBtnSep && nSeparatorX > 0 )
|
2010-07-27 17:19:20 +02:00
|
|
|
{
|
2012-07-25 22:28:48 +04:00
|
|
|
Point aStartPt( nSeparatorX, aSymbolRect.Top()+nDistance );
|
|
|
|
Point aEndPt( nSeparatorX, aSymbolRect.Bottom()-nDistance );
|
2010-07-27 17:19:20 +02:00
|
|
|
aDecoView.DrawSeparator( aStartPt, aEndPt );
|
|
|
|
}
|
2012-07-25 22:28:48 +04:00
|
|
|
ImplSetSeparatorX( nSeparatorX );
|
2012-07-24 23:49:54 -07:00
|
|
|
|
2012-07-25 22:28:48 +04:00
|
|
|
aDecoView.DrawSymbol( aSymbolRect, SYMBOL_SPIN_DOWN, aColor, nStyle );
|
2002-04-29 16:46:18 +00:00
|
|
|
}
|
2012-07-24 23:49:54 -07:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2005-04-12 11:18:06 +00:00
|
|
|
Rectangle aSymbolRect;
|
2010-04-15 20:50:30 +02:00
|
|
|
// FIXME: (GetStyle() & WB_FLATBUTTON) != 0 is preliminary
|
|
|
|
// in the next major this should be replaced by "true"
|
2010-02-03 13:27:39 +01:00
|
|
|
ImplDrawAlignedImage( pDev, aPos, aSize, bLayout, nImageSep, nDrawFlags,
|
2010-07-27 17:35:21 +02:00
|
|
|
nTextStyle, IsSymbol() ? &aSymbolRect : NULL, true );
|
2001-03-23 13:34:56 +00:00
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( IsSymbol() && ! bLayout )
|
2001-03-23 13:34:56 +00:00
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
DecorationView aDecoView( pDev );
|
2005-04-12 11:18:06 +00:00
|
|
|
aDecoView.DrawSymbol( aSymbolRect, meSymbol, aColor, nStyle );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( mnDDStyle == PUSHBUTTON_DROPDOWN_TOOLBOX && !bLayout )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool bBlack = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
Color aArrowColor( COL_BLACK );
|
2004-07-05 14:41:27 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( !(nDrawFlags & WINDOW_DRAW_MONO) )
|
|
|
|
{
|
|
|
|
if ( !IsEnabled() )
|
|
|
|
aArrowColor = rStyleSettings.GetShadowColor();
|
|
|
|
else
|
|
|
|
{
|
|
|
|
aArrowColor = Color( COL_LIGHTGREEN );
|
2010-09-29 15:46:40 +08:00
|
|
|
bBlack = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ImplDrawBtnDropDownArrow( pDev, aInRect.Right()-6, aInRect.Top()+1,
|
|
|
|
aArrowColor, bBlack );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
UserDrawEvent aUDEvt( this, aInRect, 0 );
|
|
|
|
UserDraw( aUDEvt );
|
2001-03-23 13:34:56 +00:00
|
|
|
|
2001-04-10 11:42:24 +00:00
|
|
|
pDev->Pop(); // restore clipregion
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void PushButton::UserDraw( const UserDrawEvent& )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2002-04-29 16:46:18 +00:00
|
|
|
void PushButton::ImplDrawPushButton( bool bLayout )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2002-04-29 16:46:18 +00:00
|
|
|
if( !bLayout )
|
|
|
|
HideFocus();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 nButtonStyle = ImplGetButtonState();
|
2000-09-18 16:07:07 +00:00
|
|
|
Point aPoint;
|
|
|
|
Size aOutSz( GetOutputSizePixel() );
|
|
|
|
Rectangle aRect( aPoint, aOutSz );
|
|
|
|
Rectangle aInRect = aRect;
|
|
|
|
Rectangle aTextRect;
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool bNativeOK = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2001-03-23 13:34:56 +00:00
|
|
|
// adjust style if button should be rendered 'pressed'
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( mbPressed )
|
|
|
|
nButtonStyle |= BUTTON_DRAW_PRESSED;
|
|
|
|
|
2004-05-10 14:45:59 +00:00
|
|
|
// TODO: move this to Window class or make it a member !!!
|
|
|
|
ControlType aCtrlType = 0;
|
|
|
|
switch( GetParent()->GetType() )
|
|
|
|
{
|
|
|
|
case WINDOW_LISTBOX:
|
|
|
|
case WINDOW_MULTILISTBOX:
|
|
|
|
case WINDOW_TREELISTBOX:
|
|
|
|
aCtrlType = CTRL_LISTBOX;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WINDOW_COMBOBOX:
|
|
|
|
case WINDOW_PATTERNBOX:
|
|
|
|
case WINDOW_NUMERICBOX:
|
|
|
|
case WINDOW_METRICBOX:
|
|
|
|
case WINDOW_CURRENCYBOX:
|
|
|
|
case WINDOW_DATEBOX:
|
|
|
|
case WINDOW_TIMEBOX:
|
|
|
|
case WINDOW_LONGCURRENCYBOX:
|
|
|
|
aCtrlType = CTRL_COMBOBOX;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool bDropDown = ( IsSymbol() && (GetSymbol()==SYMBOL_SPIN_DOWN) && !GetText().Len() );
|
2004-05-10 14:45:59 +00:00
|
|
|
|
|
|
|
if( bDropDown && (aCtrlType == CTRL_COMBOBOX || aCtrlType == CTRL_LISTBOX ) )
|
|
|
|
{
|
|
|
|
if( GetParent()->IsNativeControlSupported( aCtrlType, PART_ENTIRE_CONTROL) )
|
|
|
|
{
|
2005-04-12 11:18:06 +00:00
|
|
|
// skip painting if the button was already drawn by the theme
|
|
|
|
if( aCtrlType == CTRL_COMBOBOX )
|
|
|
|
{
|
|
|
|
Edit* pEdit = static_cast<Edit*>(GetParent());
|
|
|
|
if( pEdit->ImplUseNativeBorder( pEdit->GetStyle() ) )
|
2010-09-29 15:46:40 +08:00
|
|
|
bNativeOK = sal_True;
|
2005-04-12 11:18:06 +00:00
|
|
|
}
|
|
|
|
else if( GetParent()->IsNativeControlSupported( aCtrlType, HAS_BACKGROUND_TEXTURE) )
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
bNativeOK = sal_True;
|
2005-04-12 11:18:06 +00:00
|
|
|
}
|
|
|
|
if( !bNativeOK && GetParent()->IsNativeControlSupported( aCtrlType, PART_BUTTON_DOWN ) )
|
2004-05-10 14:45:59 +00:00
|
|
|
{
|
|
|
|
// let the theme draw it, note we then need support
|
|
|
|
// for CTRL_LISTBOX/PART_BUTTON_DOWN and CTRL_COMBOBOX/PART_BUTTON_DOWN
|
|
|
|
|
|
|
|
ImplControlValue aControlValue;
|
|
|
|
ControlState nState = 0;
|
|
|
|
|
|
|
|
if ( mbPressed ) nState |= CTRL_STATE_PRESSED;
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED ) nState |= CTRL_STATE_PRESSED;
|
2004-05-10 14:45:59 +00:00
|
|
|
if ( HasFocus() ) nState |= CTRL_STATE_FOCUSED;
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( ImplGetButtonState() & BUTTON_DRAW_DEFAULT ) nState |= CTRL_STATE_DEFAULT;
|
2004-05-10 14:45:59 +00:00
|
|
|
if ( Window::IsEnabled() ) nState |= CTRL_STATE_ENABLED;
|
|
|
|
|
|
|
|
if ( IsMouseOver() && aInRect.IsInside( GetPointerPosPixel() ) )
|
|
|
|
nState |= CTRL_STATE_ROLLOVER;
|
|
|
|
|
2010-07-05 11:20:24 +02:00
|
|
|
bNativeOK = DrawNativeControl( aCtrlType, PART_BUTTON_DOWN, aInRect, nState,
|
2004-05-10 14:45:59 +00:00
|
|
|
aControlValue, rtl::OUString() );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-05-10 14:45:59 +00:00
|
|
|
if( bNativeOK )
|
|
|
|
return;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2010-03-26 17:21:42 +01:00
|
|
|
bool bRollOver = (IsMouseOver() && aInRect.IsInside( GetPointerPosPixel() ));
|
2010-07-27 17:19:20 +02:00
|
|
|
bool bDrawMenuSep = true;
|
|
|
|
if( (GetStyle() & WB_FLATBUTTON) )
|
|
|
|
{
|
|
|
|
if( ! bRollOver && ! HasFocus() )
|
|
|
|
bDrawMenuSep = false;
|
|
|
|
}
|
2010-09-29 15:46:40 +08:00
|
|
|
if ( (bNativeOK=IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL)) == sal_True )
|
2001-03-23 13:34:56 +00:00
|
|
|
{
|
2010-07-05 11:20:24 +02:00
|
|
|
PushButtonValue aControlValue;
|
|
|
|
Rectangle aCtrlRegion( aInRect );
|
2004-05-10 14:45:59 +00:00
|
|
|
ControlState nState = 0;
|
|
|
|
|
2005-07-06 08:19:53 +00:00
|
|
|
if ( mbPressed || IsChecked() ) nState |= CTRL_STATE_PRESSED;
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED ) nState |= CTRL_STATE_PRESSED;
|
2004-05-10 14:45:59 +00:00
|
|
|
if ( HasFocus() ) nState |= CTRL_STATE_FOCUSED;
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( ImplGetButtonState() & BUTTON_DRAW_DEFAULT ) nState |= CTRL_STATE_DEFAULT;
|
2004-05-10 14:45:59 +00:00
|
|
|
if ( Window::IsEnabled() ) nState |= CTRL_STATE_ENABLED;
|
|
|
|
|
2010-03-26 17:21:42 +01:00
|
|
|
if ( bRollOver )
|
2004-05-10 14:45:59 +00:00
|
|
|
nState |= CTRL_STATE_ROLLOVER;
|
|
|
|
|
2008-03-05 16:07:33 +00:00
|
|
|
if( GetStyle() & WB_BEVELBUTTON )
|
2010-07-05 11:20:24 +02:00
|
|
|
aControlValue.mbBevelButton = true;
|
2008-03-05 16:07:33 +00:00
|
|
|
|
2004-05-10 14:45:59 +00:00
|
|
|
// draw frame into invisible window to have aInRect modified correctly
|
|
|
|
// but do not shift the inner rect for pressed buttons (ie remove BUTTON_DRAW_PRESSED)
|
|
|
|
// this assumes the theme has enough visual cues to signalize the button was pressed
|
|
|
|
//Window aWin( this );
|
|
|
|
//ImplDrawPushButtonFrame( &aWin, aInRect, nButtonStyle & ~BUTTON_DRAW_PRESSED );
|
|
|
|
|
|
|
|
// looks better this way as symbols were displaced slightly using the above approach
|
|
|
|
aInRect.Top()+=4;
|
|
|
|
aInRect.Bottom()-=4;
|
|
|
|
aInRect.Left()+=4;
|
|
|
|
aInRect.Right()-=4;
|
|
|
|
|
2008-05-30 07:06:39 +00:00
|
|
|
// prepare single line hint (needed on mac to decide between normal push button and
|
|
|
|
// rectangular bevel button look)
|
|
|
|
Size aFontSize( Application::GetSettings().GetStyleSettings().GetPushButtonFont().GetSize() );
|
|
|
|
aFontSize = LogicToPixel( aFontSize, MapMode( MAP_POINT ) );
|
|
|
|
Size aInRectSize( LogicToPixel( Size( aInRect.GetWidth(), aInRect.GetHeight() ) ) );
|
2010-07-05 11:20:24 +02:00
|
|
|
aControlValue.mbSingleLine = (aInRectSize.Height() < 2 * aFontSize.Height() );
|
2008-05-30 07:06:39 +00:00
|
|
|
|
2010-04-15 16:37:39 +02:00
|
|
|
if( ((nState & CTRL_STATE_ROLLOVER)) || ! (GetStyle() & WB_FLATBUTTON) )
|
2010-03-26 17:21:42 +01:00
|
|
|
{
|
|
|
|
bNativeOK = DrawNativeControl( CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL, aCtrlRegion, nState,
|
|
|
|
aControlValue, rtl::OUString()/*PushButton::GetText()*/ );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
bNativeOK = true;
|
|
|
|
}
|
2008-05-30 07:06:39 +00:00
|
|
|
|
2004-05-10 14:45:59 +00:00
|
|
|
// draw content using the same aInRect as non-native VCL would do
|
2006-01-26 17:07:58 +00:00
|
|
|
ImplDrawPushButtonContent( this,
|
|
|
|
(nState&CTRL_STATE_ROLLOVER) ? WINDOW_DRAW_ROLLOVER : 0,
|
2010-07-27 17:19:20 +02:00
|
|
|
aInRect, bLayout, bDrawMenuSep );
|
2004-05-10 14:45:59 +00:00
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( HasFocus() )
|
|
|
|
ShowFocus( ImplGetFocusRect() );
|
2004-05-10 14:45:59 +00:00
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
if ( bNativeOK == sal_False )
|
2004-05-10 14:45:59 +00:00
|
|
|
{
|
|
|
|
// draw PushButtonFrame, aInRect has content size afterwards
|
2010-03-26 17:21:42 +01:00
|
|
|
if( (GetStyle() & WB_FLATBUTTON) )
|
|
|
|
{
|
|
|
|
Rectangle aTempRect( aInRect );
|
2010-04-15 16:37:39 +02:00
|
|
|
if( ! bLayout && bRollOver )
|
2010-03-26 17:21:42 +01:00
|
|
|
ImplDrawPushButtonFrame( this, aTempRect, nButtonStyle );
|
|
|
|
aInRect.Left() += 2;
|
|
|
|
aInRect.Top() += 2;
|
|
|
|
aInRect.Right() -= 2;
|
|
|
|
aInRect.Bottom() -= 2;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if( ! bLayout )
|
|
|
|
ImplDrawPushButtonFrame( this, aInRect, nButtonStyle );
|
|
|
|
}
|
2004-05-10 14:45:59 +00:00
|
|
|
|
|
|
|
// draw content
|
2010-07-27 17:19:20 +02:00
|
|
|
ImplDrawPushButtonContent( this, 0, aInRect, bLayout, bDrawMenuSep );
|
2004-05-10 14:45:59 +00:00
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
if( ! bLayout && HasFocus() )
|
2004-05-10 14:45:59 +00:00
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
ShowFocus( ImplGetFocusRect() );
|
2001-03-23 13:34:56 +00:00
|
|
|
}
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void PushButton::ImplSetDefButton( sal_Bool bSet )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-05-10 14:45:59 +00:00
|
|
|
Size aSize( GetSizePixel() );
|
|
|
|
Point aPos( GetPosPixel() );
|
|
|
|
int dLeft(0), dRight(0), dTop(0), dBottom(0);
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool bSetPos = sal_False;
|
2004-05-10 14:45:59 +00:00
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
if ( (IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL)) == sal_True )
|
2004-05-10 14:45:59 +00:00
|
|
|
{
|
2010-07-05 11:20:24 +02:00
|
|
|
Rectangle aBound, aCont;
|
2004-05-10 14:45:59 +00:00
|
|
|
Rectangle aCtrlRect( 0, 0, 80, 20 ); // use a constant size to avoid accumulating
|
|
|
|
// will not work if the theme has dynamic adornment sizes
|
|
|
|
ImplControlValue aControlValue;
|
2010-07-05 11:20:24 +02:00
|
|
|
Rectangle aCtrlRegion( aCtrlRect );
|
2004-05-10 14:45:59 +00:00
|
|
|
ControlState nState = CTRL_STATE_DEFAULT|CTRL_STATE_ENABLED;
|
|
|
|
|
|
|
|
// get native size of a 'default' button
|
|
|
|
// and adjust the VCL button if more space for adornment is required
|
|
|
|
if( GetNativeControlRegion( CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL, aCtrlRegion,
|
|
|
|
nState, aControlValue, rtl::OUString(),
|
2010-07-05 11:20:24 +02:00
|
|
|
aBound, aCont ) )
|
2004-05-10 14:45:59 +00:00
|
|
|
{
|
|
|
|
dLeft = aCont.Left() - aBound.Left();
|
|
|
|
dTop = aCont.Top() - aBound.Top();
|
|
|
|
dRight = aBound.Right() - aCont.Right();
|
|
|
|
dBottom = aBound.Bottom() - aCont.Bottom();
|
|
|
|
bSetPos = dLeft || dTop || dRight || dBottom;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( bSet )
|
2004-05-10 14:45:59 +00:00
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
if( !(ImplGetButtonState() & BUTTON_DRAW_DEFAULT) && bSetPos )
|
2004-05-10 14:45:59 +00:00
|
|
|
{
|
|
|
|
// adjust pos/size when toggling from non-default to default
|
|
|
|
aPos.Move(-dLeft, -dTop);
|
|
|
|
aSize.Width() += dLeft + dRight;
|
|
|
|
aSize.Height() += dTop + dBottom;
|
|
|
|
}
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() |= BUTTON_DRAW_DEFAULT;
|
2004-05-10 14:45:59 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
else
|
2004-05-10 14:45:59 +00:00
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
if( (ImplGetButtonState() & BUTTON_DRAW_DEFAULT) && bSetPos )
|
2004-05-10 14:45:59 +00:00
|
|
|
{
|
|
|
|
// adjust pos/size when toggling from default to non-default
|
|
|
|
aPos.Move(dLeft, dTop);
|
|
|
|
aSize.Width() -= dLeft + dRight;
|
|
|
|
aSize.Height() -= dTop + dBottom;
|
|
|
|
}
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() &= ~BUTTON_DRAW_DEFAULT;
|
2004-05-10 14:45:59 +00:00
|
|
|
}
|
|
|
|
if( bSetPos )
|
|
|
|
SetPosSizePixel( aPos.X(), aPos.Y(), aSize.Width(), aSize.Height(), WINDOW_POSSIZE_ALL );
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool PushButton::ImplIsDefButton() const
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
return (ImplGetButtonState() & BUTTON_DRAW_DEFAULT) != 0;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
PushButton::PushButton( WindowType nType ) :
|
|
|
|
Button( nType )
|
|
|
|
{
|
2006-06-19 18:15:23 +00:00
|
|
|
ImplInitPushButtonData();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
PushButton::PushButton( Window* pParent, WinBits nStyle ) :
|
|
|
|
Button( WINDOW_PUSHBUTTON )
|
|
|
|
{
|
2006-06-19 18:15:23 +00:00
|
|
|
ImplInitPushButtonData();
|
2000-09-18 16:07:07 +00:00
|
|
|
ImplInit( pParent, nStyle );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
PushButton::PushButton( Window* pParent, const ResId& rResId ) :
|
|
|
|
Button( WINDOW_PUSHBUTTON )
|
|
|
|
{
|
2012-08-20 09:59:16 +01:00
|
|
|
rResId.SetRT( RSC_PUSHBUTTON );
|
|
|
|
WinBits nStyle = ImplInitRes( rResId );
|
|
|
|
|
|
|
|
if (VclBuilderContainer::replace_buildable(pParent, rResId, *this))
|
2012-05-22 12:33:28 +01:00
|
|
|
return;
|
|
|
|
|
2006-06-19 18:15:23 +00:00
|
|
|
ImplInitPushButtonData();
|
2000-09-18 16:07:07 +00:00
|
|
|
ImplInit( pParent, nStyle );
|
|
|
|
ImplLoadRes( rResId );
|
|
|
|
|
|
|
|
if ( !(nStyle & WB_HIDE) )
|
|
|
|
Show();
|
|
|
|
}
|
|
|
|
|
2012-06-01 13:40:01 +01:00
|
|
|
void PushButton::take_properties(Window &rOther)
|
|
|
|
{
|
|
|
|
if (!GetParent())
|
|
|
|
{
|
|
|
|
ImplInitPushButtonData();
|
|
|
|
ImplInit(rOther.GetParent(), rOther.GetStyle());
|
|
|
|
}
|
|
|
|
|
|
|
|
Button::take_properties(rOther);
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
PushButton::~PushButton()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void PushButton::MouseButtonDown( const MouseEvent& rMEvt )
|
|
|
|
{
|
|
|
|
if ( rMEvt.IsLeft() &&
|
2006-06-19 18:15:23 +00:00
|
|
|
ImplHitTestPushButton( this, rMEvt.GetPosPixel() ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 nTrackFlags = 0;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( ( GetStyle() & WB_REPEAT ) &&
|
|
|
|
! ( GetStyle() & WB_TOGGLE ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
nTrackFlags |= STARTTRACK_BUTTONREPEAT;
|
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() |= BUTTON_DRAW_PRESSED;
|
2000-09-18 16:07:07 +00:00
|
|
|
ImplDrawPushButton();
|
|
|
|
StartTracking( nTrackFlags );
|
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( nTrackFlags & STARTTRACK_BUTTONREPEAT )
|
2000-09-18 16:07:07 +00:00
|
|
|
Click();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void PushButton::Tracking( const TrackingEvent& rTEvt )
|
|
|
|
{
|
|
|
|
if ( rTEvt.IsTrackingEnded() )
|
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if ( !(GetStyle() & WB_NOPOINTERFOCUS) && !rTEvt.IsTrackingCanceled() )
|
|
|
|
GrabFocus();
|
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( GetStyle() & WB_TOGGLE )
|
|
|
|
{
|
|
|
|
// Don't toggle, when aborted
|
|
|
|
if ( !rTEvt.IsTrackingCanceled() )
|
|
|
|
{
|
|
|
|
if ( IsChecked() )
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
Check( sal_False );
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() &= ~BUTTON_DRAW_PRESSED;
|
|
|
|
}
|
|
|
|
else
|
2010-09-29 15:46:40 +08:00
|
|
|
Check( sal_True );
|
2004-07-05 14:41:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
ImplGetButtonState() &= ~BUTTON_DRAW_PRESSED;
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
ImplDrawPushButton();
|
|
|
|
|
2012-07-01 21:10:41 +02:00
|
|
|
// do not call Click handler if aborted
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( !rTEvt.IsTrackingCanceled() )
|
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( ! ( ( GetStyle() & WB_REPEAT ) &&
|
|
|
|
! ( GetStyle() & WB_TOGGLE ) ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
Click();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2006-06-19 18:15:23 +00:00
|
|
|
if ( ImplHitTestPushButton( this, rTEvt.GetMouseEvent().GetPosPixel() ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( rTEvt.IsTrackingRepeat() && (GetStyle() & WB_REPEAT) &&
|
|
|
|
! ( GetStyle() & WB_TOGGLE ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
Click();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() |= BUTTON_DRAW_PRESSED;
|
2000-09-18 16:07:07 +00:00
|
|
|
ImplDrawPushButton();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() &= ~BUTTON_DRAW_PRESSED;
|
2000-09-18 16:07:07 +00:00
|
|
|
ImplDrawPushButton();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void PushButton::KeyInput( const KeyEvent& rKEvt )
|
|
|
|
{
|
|
|
|
KeyCode aKeyCode = rKEvt.GetKeyCode();
|
|
|
|
|
|
|
|
if ( !aKeyCode.GetModifier() &&
|
|
|
|
((aKeyCode.GetCode() == KEY_RETURN) || (aKeyCode.GetCode() == KEY_SPACE)) )
|
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( !(ImplGetButtonState() & BUTTON_DRAW_PRESSED) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() |= BUTTON_DRAW_PRESSED;
|
2000-09-18 16:07:07 +00:00
|
|
|
ImplDrawPushButton();
|
|
|
|
}
|
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( ( GetStyle() & WB_REPEAT ) &&
|
|
|
|
! ( GetStyle() & WB_TOGGLE ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
Click();
|
|
|
|
}
|
2004-07-05 14:41:27 +00:00
|
|
|
else if ( (ImplGetButtonState() & BUTTON_DRAW_PRESSED) && (aKeyCode.GetCode() == KEY_ESCAPE) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() &= ~BUTTON_DRAW_PRESSED;
|
2000-09-18 16:07:07 +00:00
|
|
|
ImplDrawPushButton();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
Button::KeyInput( rKEvt );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void PushButton::KeyUp( const KeyEvent& rKEvt )
|
|
|
|
{
|
|
|
|
KeyCode aKeyCode = rKEvt.GetKeyCode();
|
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( (ImplGetButtonState() & BUTTON_DRAW_PRESSED) &&
|
2000-09-18 16:07:07 +00:00
|
|
|
((aKeyCode.GetCode() == KEY_RETURN) || (aKeyCode.GetCode() == KEY_SPACE)) )
|
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( GetStyle() & WB_TOGGLE )
|
|
|
|
{
|
|
|
|
if ( IsChecked() )
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
Check( sal_False );
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() &= ~BUTTON_DRAW_PRESSED;
|
|
|
|
}
|
|
|
|
else
|
2010-09-29 15:46:40 +08:00
|
|
|
Check( sal_True );
|
2004-07-05 14:41:27 +00:00
|
|
|
|
|
|
|
Toggle();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
ImplGetButtonState() &= ~BUTTON_DRAW_PRESSED;
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
ImplDrawPushButton();
|
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( !( ( GetStyle() & WB_REPEAT ) &&
|
|
|
|
! ( GetStyle() & WB_TOGGLE ) ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
Click();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
Button::KeyUp( rKEvt );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2002-04-29 16:46:18 +00:00
|
|
|
void PushButton::FillLayoutData() const
|
|
|
|
{
|
2009-09-14 12:09:22 +00:00
|
|
|
mpControlData->mpLayoutData = new vcl::ControlLayoutData();
|
2002-04-29 16:46:18 +00:00
|
|
|
const_cast<PushButton*>(this)->ImplDrawPushButton( true );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2006-06-19 18:15:23 +00:00
|
|
|
void PushButton::Paint( const Rectangle& )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
ImplDrawPushButton();
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void PushButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
|
2011-01-12 15:07:10 +01:00
|
|
|
sal_uLong nFlags )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
Point aPos = pDev->LogicToPixel( rPos );
|
|
|
|
Size aSize = pDev->LogicToPixel( rSize );
|
|
|
|
Rectangle aRect( aPos, aSize );
|
|
|
|
Rectangle aTextRect;
|
|
|
|
Font aFont = GetDrawPixelFont( pDev );
|
|
|
|
|
|
|
|
pDev->Push();
|
|
|
|
pDev->SetMapMode();
|
|
|
|
pDev->SetFont( aFont );
|
|
|
|
if ( nFlags & WINDOW_DRAW_MONO )
|
2003-09-04 06:42:10 +00:00
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
pDev->SetTextColor( Color( COL_BLACK ) );
|
2003-09-04 06:42:10 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
else
|
2003-09-04 06:42:10 +00:00
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
pDev->SetTextColor( GetTextColor() );
|
2003-09-04 06:42:10 +00:00
|
|
|
|
|
|
|
// DecoView uses the FaceColor...
|
|
|
|
AllSettings aSettings = pDev->GetSettings();
|
|
|
|
StyleSettings aStyleSettings = aSettings.GetStyleSettings();
|
|
|
|
if ( IsControlBackground() )
|
|
|
|
aStyleSettings.SetFaceColor( GetControlBackground() );
|
|
|
|
else
|
|
|
|
aStyleSettings.SetFaceColor( GetSettings().GetStyleSettings().GetFaceColor() );
|
|
|
|
aSettings.SetStyleSettings( aStyleSettings );
|
2011-05-20 09:47:43 +00:00
|
|
|
pDev->OutputDevice::SetSettings( aSettings );
|
2003-09-04 06:42:10 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
pDev->SetTextFillColor();
|
|
|
|
|
|
|
|
DecorationView aDecoView( pDev );
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 nButtonStyle = 0;
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( nFlags & WINDOW_DRAW_MONO )
|
|
|
|
nButtonStyle |= BUTTON_DRAW_MONO;
|
|
|
|
if ( IsChecked() )
|
|
|
|
nButtonStyle |= BUTTON_DRAW_CHECKED;
|
|
|
|
aRect = aDecoView.DrawButton( aRect, nButtonStyle );
|
|
|
|
|
2010-07-27 17:19:20 +02:00
|
|
|
ImplDrawPushButtonContent( pDev, nFlags, aRect, false, true );
|
2000-09-18 16:07:07 +00:00
|
|
|
pDev->Pop();
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void PushButton::Resize()
|
|
|
|
{
|
2002-05-08 15:05:42 +00:00
|
|
|
Control::Resize();
|
2000-09-18 16:07:07 +00:00
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void PushButton::GetFocus()
|
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
ShowFocus( ImplGetFocusRect() );
|
2000-09-18 16:07:07 +00:00
|
|
|
SetInputContext( InputContext( GetFont() ) );
|
|
|
|
Button::GetFocus();
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void PushButton::LoseFocus()
|
|
|
|
{
|
|
|
|
EndSelection();
|
|
|
|
HideFocus();
|
|
|
|
Button::LoseFocus();
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void PushButton::StateChanged( StateChangedType nType )
|
|
|
|
{
|
|
|
|
Button::StateChanged( nType );
|
|
|
|
|
|
|
|
if ( (nType == STATE_CHANGE_ENABLE) ||
|
|
|
|
(nType == STATE_CHANGE_TEXT) ||
|
|
|
|
(nType == STATE_CHANGE_IMAGE) ||
|
|
|
|
(nType == STATE_CHANGE_DATA) ||
|
|
|
|
(nType == STATE_CHANGE_STATE) ||
|
|
|
|
(nType == STATE_CHANGE_UPDATEMODE) )
|
|
|
|
{
|
|
|
|
if ( IsReallyVisible() && IsUpdateMode() )
|
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
else if ( nType == STATE_CHANGE_STYLE )
|
|
|
|
{
|
|
|
|
SetStyle( ImplInitStyle( GetWindow( WINDOW_PREV ), GetStyle() ) );
|
|
|
|
|
2008-06-06 13:20:37 +00:00
|
|
|
bool bIsDefButton = ( GetStyle() & WB_DEFBUTTON ) != 0;
|
|
|
|
bool bWasDefButton = ( GetPrevStyle() & WB_DEFBUTTON ) != 0;
|
|
|
|
if ( bIsDefButton != bWasDefButton )
|
|
|
|
ImplSetDefButton( bIsDefButton );
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( IsReallyVisible() && IsUpdateMode() )
|
|
|
|
{
|
|
|
|
if ( (GetPrevStyle() & PUSHBUTTON_VIEW_STYLE) !=
|
|
|
|
(GetStyle() & PUSHBUTTON_VIEW_STYLE) )
|
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ( (nType == STATE_CHANGE_ZOOM) ||
|
|
|
|
(nType == STATE_CHANGE_CONTROLFONT) )
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
ImplInitSettings( sal_True, sal_False, sal_False );
|
2000-09-18 16:07:07 +00:00
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
ImplInitSettings( sal_False, sal_True, sal_False );
|
2000-09-18 16:07:07 +00:00
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
ImplInitSettings( sal_False, sal_False, sal_True );
|
2000-09-18 16:07:07 +00:00
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void PushButton::DataChanged( const DataChangedEvent& rDCEvt )
|
|
|
|
{
|
|
|
|
Button::DataChanged( rDCEvt );
|
|
|
|
|
|
|
|
if ( (rDCEvt.GetType() == DATACHANGED_FONTS) ||
|
|
|
|
(rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) ||
|
|
|
|
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
|
|
|
|
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
ImplInitSettings( sal_True, sal_True, sal_True );
|
2000-09-18 16:07:07 +00:00
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2004-02-20 07:50:15 +00:00
|
|
|
long PushButton::PreNotify( NotifyEvent& rNEvt )
|
|
|
|
{
|
2004-05-10 14:45:59 +00:00
|
|
|
long nDone = 0;
|
|
|
|
const MouseEvent* pMouseEvt = NULL;
|
|
|
|
|
2006-06-19 18:15:23 +00:00
|
|
|
if( (rNEvt.GetType() == EVENT_MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != NULL )
|
2004-05-10 14:45:59 +00:00
|
|
|
{
|
|
|
|
if( pMouseEvt->IsEnterWindow() || pMouseEvt->IsLeaveWindow() )
|
|
|
|
{
|
|
|
|
// trigger redraw as mouse over state has changed
|
|
|
|
|
|
|
|
// TODO: move this to Window class or make it a member !!!
|
|
|
|
ControlType aCtrlType = 0;
|
|
|
|
switch( GetParent()->GetType() )
|
|
|
|
{
|
|
|
|
case WINDOW_LISTBOX:
|
|
|
|
case WINDOW_MULTILISTBOX:
|
|
|
|
case WINDOW_TREELISTBOX:
|
|
|
|
aCtrlType = CTRL_LISTBOX;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WINDOW_COMBOBOX:
|
|
|
|
case WINDOW_PATTERNBOX:
|
|
|
|
case WINDOW_NUMERICBOX:
|
|
|
|
case WINDOW_METRICBOX:
|
|
|
|
case WINDOW_CURRENCYBOX:
|
|
|
|
case WINDOW_DATEBOX:
|
|
|
|
case WINDOW_TIMEBOX:
|
|
|
|
case WINDOW_LONGCURRENCYBOX:
|
|
|
|
aCtrlType = CTRL_COMBOBOX;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool bDropDown = ( IsSymbol() && (GetSymbol()==SYMBOL_SPIN_DOWN) && !GetText().Len() );
|
2004-05-10 14:45:59 +00:00
|
|
|
|
|
|
|
if( bDropDown && GetParent()->IsNativeControlSupported( aCtrlType, PART_ENTIRE_CONTROL) &&
|
|
|
|
!GetParent()->IsNativeControlSupported( aCtrlType, PART_BUTTON_DOWN) )
|
|
|
|
{
|
|
|
|
Window *pBorder = GetParent()->GetWindow( WINDOW_BORDER );
|
|
|
|
if(aCtrlType == CTRL_COMBOBOX)
|
|
|
|
{
|
|
|
|
// only paint the button part to avoid flickering of the combobox text
|
|
|
|
Point aPt;
|
|
|
|
Rectangle aClipRect( aPt, GetOutputSizePixel() );
|
|
|
|
aClipRect.SetPos(pBorder->ScreenToOutputPixel(OutputToScreenPixel(aClipRect.TopLeft())));
|
|
|
|
pBorder->Invalidate( aClipRect );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
pBorder->Invalidate( INVALIDATE_NOERASE );
|
|
|
|
pBorder->Update();
|
|
|
|
}
|
|
|
|
}
|
2010-04-12 19:59:19 +02:00
|
|
|
else if( (GetStyle() & WB_FLATBUTTON) ||
|
|
|
|
IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL) )
|
2004-05-10 14:45:59 +00:00
|
|
|
{
|
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return nDone ? nDone : Button::PreNotify(rNEvt);
|
2004-02-20 07:50:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
void PushButton::Toggle()
|
|
|
|
{
|
2004-10-22 11:12:18 +00:00
|
|
|
ImplCallEventListenersAndHandler( VCLEVENT_PUSHBUTTON_TOGGLE, maToggleHdl, this );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void PushButton::SetSymbol( SymbolType eSymbol )
|
|
|
|
{
|
|
|
|
if ( meSymbol != eSymbol )
|
|
|
|
{
|
|
|
|
meSymbol = eSymbol;
|
|
|
|
StateChanged( STATE_CHANGE_DATA );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-02-25 12:10:56 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void PushButton::SetSymbolAlign( SymbolAlign eAlign )
|
|
|
|
{
|
|
|
|
ImplSetSymbolAlign( eAlign );
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void PushButton::SetDropDown( sal_uInt16 nStyle )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if ( mnDDStyle != nStyle )
|
|
|
|
{
|
|
|
|
mnDDStyle = nStyle;
|
|
|
|
StateChanged( STATE_CHANGE_DATA );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void PushButton::SetState( TriState eState )
|
|
|
|
{
|
|
|
|
if ( meState != eState )
|
|
|
|
{
|
|
|
|
meState = eState;
|
|
|
|
if ( meState == STATE_NOCHECK )
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() &= ~(BUTTON_DRAW_CHECKED | BUTTON_DRAW_DONTKNOW);
|
2000-09-18 16:07:07 +00:00
|
|
|
else if ( meState == STATE_CHECK )
|
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() &= ~BUTTON_DRAW_DONTKNOW;
|
|
|
|
ImplGetButtonState() |= BUTTON_DRAW_CHECKED;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else // STATE_DONTKNOW
|
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() &= ~BUTTON_DRAW_CHECKED;
|
|
|
|
ImplGetButtonState() |= BUTTON_DRAW_DONTKNOW;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
StateChanged( STATE_CHANGE_STATE );
|
2001-06-15 11:56:11 +00:00
|
|
|
Toggle();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void PushButton::SetPressed( sal_Bool bPressed )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if ( mbPressed != bPressed )
|
|
|
|
{
|
|
|
|
mbPressed = bPressed;
|
|
|
|
StateChanged( STATE_CHANGE_DATA );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void PushButton::EndSelection()
|
|
|
|
{
|
|
|
|
EndTracking( ENDTRACK_CANCEL );
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() &= ~BUTTON_DRAW_PRESSED;
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( !mbPressed )
|
|
|
|
ImplDrawPushButton();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
Size PushButton::CalcMinimumSize( long nMaxWidth ) const
|
|
|
|
{
|
|
|
|
Size aSize;
|
|
|
|
|
|
|
|
if ( IsSymbol() )
|
CWS-TOOLING: integrate CWS layoutdialogs2
2009-04-09 10:11:14 +0200 mba r270680 : defective merge sets seem to have brought config_office back
2009-04-02 18:00:52 +0200 mba r270429 : #i100503#: make tralay work without LD_LIBRARY_PATH
2009-04-01 13:27:58 +0200 mba r270320 : warning on Solaris fixed
2009-03-31 22:15:03 +0200 mba r270293 : CWS-TOOLING: rebase CWS layoutdialogs2 to trunk@270033 (milestone: DEV300:m45)
2009-03-16 13:05:08 +0100 mba r269526 : fixed some compiler warnings of the Sun compiler
2009-03-11 15:32:42 +0100 mba r269337 : some problems for ENABLE_LAYOUT fixed
2009-03-09 16:05:32 +0100 mba r269197 : merge conflict solved
2009-03-09 15:09:55 +0100 mba r269194 : merge conflict solved
2009-03-09 15:09:35 +0100 mba r269193 : merge conflict solved
2009-03-06 22:12:47 +0100 mba r269052 : compilation error fixed
2009-03-06 17:36:37 +0100 mba r269033 : integer warning fixed
2009-03-06 10:31:19 +0100 mba r268983 : CWS-TOOLING: rebase CWS layoutdialogs2 to trunk@268395 (milestone: DEV300:m42)
2009-03-03 20:03:59 +0100 jcn r268777 : Add Notes checkbox to find-and-replace dialog in anticipation of m40 resync.
2009-03-03 15:56:20 +0100 jcn r268737 : Apply layout-find-dialog-crash-fix.diff -- fixes crasher.
From http://svn.gnome.org/viewvc/ooo-build?view=revision&revision=15378
2009-02-06 17:41:24 +0100 mba r267479 : arrrrgh - svx headers must be included behind the magic define
2009-02-05 19:44:42 +0100 mba r267439 : seems that msvc preprocessor is thick as a brick
2009-02-05 15:15:16 +0100 mba r267425 : pch added
2009-02-05 08:14:01 +0100 mba r267409 : double defined symbols fixed
2009-02-05 08:13:14 +0100 mba r267408 : compile Languagebox and FontListbox with ENABLE_LAYOUT
2009-02-05 08:07:35 +0100 mba r267406 : warning fixed
2009-02-05 08:06:42 +0100 mba r267405 : warnings and errors fixed
2009-01-30 15:51:52 +0100 mba r267206 : export Container class to compile code in sfx2
2009-01-30 15:51:14 +0100 mba r267205 : remove LAYOUT_EXPERIMENTAL from sfx2, everything now compiles with ENABLE_LAYOUT
2009-01-28 17:01:27 +0100 mba r267069 : fixed namespace problems in sfx2
2009-01-28 16:59:48 +0100 mba r267068 : fixed namespace problems
2009-01-24 13:57:06 +0100 mba r266877 : move svx stuff to experimental
2009-01-24 13:56:11 +0100 mba r266876 : move svx stuff to experimental
2009-01-24 13:52:09 +0100 mba r266875 : put sfx stuff into experimental
2009-01-24 13:28:08 +0100 mba r266874 : put sfx stuff into experimental
2009-01-24 13:26:38 +0100 mba r266873 : help msvc++ compiler a bit
2009-01-24 13:24:43 +0100 mba r266872 : warning removed
2009-01-24 13:23:21 +0100 mba r266871 : moved svx stuff to svx; put sfx stuff into experimental
2009-01-24 13:22:04 +0100 mba r266870 : moved svx stuff to svx
2009-01-05 16:35:34 +0100 jcn r265879 : config_office/configure: Regenerate. Fixes naive builds.
2008-12-17 16:06:25 +0100 jcn r265638 : Wordcount: minor HIG tweaks.
2008-12-17 16:06:21 +0100 jcn r265637 : Zoom: minor HIG spacing tweaks.
2008-12-17 16:06:16 +0100 jcn r265636 : Zoom: fix align-test and update zoom.xml.
2008-12-17 16:06:12 +0100 jcn r265635 : Zoom: add align-test.xml to illustrate zoom alignment bug.
2008-12-17 16:06:07 +0100 jcn r265634 : Find-and-Replace: request font-style-name="Bold", does not seem to work.
2008-12-17 16:06:03 +0100 jcn r265633 : Find-and-Replace: Add alignment for combobox labels.
2008-12-17 16:05:59 +0100 jcn r265632 : Find-and-Replace: Replace pairs of <flow> with <align>. Fixes ugly non-emptiness of more-<hbox>.
2008-12-17 16:05:56 +0100 jcn r265631 : Find-and-Replace: add nice 12pt border.
2008-12-17 16:05:51 +0100 jcn r265630 : Find-and-Replace: also add rowsep at lower fixedline.
2008-12-17 16:05:47 +0100 jcn r265629 : Find-and-Replace: Add poor man's colsep and rowsep substitute spaces.
2008-12-17 16:05:43 +0100 jcn r265628 : Find-and-Replace: use <vbox cnt:x-expand="false"> for buttons.
2008-12-17 16:05:40 +0100 jcn r265627 : Find-and-Replace: add <vbox>s and use cnt:expand="false" to stop vertical button expansion.
2008-12-17 16:05:36 +0100 jcn r265626 : Find-and-Replace: use sc icon. Fixes FIND button height.
2008-12-17 16:05:31 +0100 jcn r265625 : Bugfix have empty/invisible containers not take up space.
2008-12-17 16:05:27 +0100 jcn r265624 : Find-and-replace: Fix/remove most property errors.
2008-12-17 16:05:23 +0100 jcn r265623 : Table: make x, y expand default.
2008-12-17 16:05:18 +0100 jcn r265622 : Use OSL_TRACE rather than printf. Fixes warning visibility.
2008-12-17 16:05:14 +0100 jcn r265621 : Boxtest: add <vbox><table x-expand="true"> pair to trigger property errors.
2008-12-17 16:05:10 +0100 jcn r265620 : Junk extra <table> from boxtest. Fixes visual output.
2008-12-17 16:05:05 +0100 jcn r265619 : Eradicate PROPHELPER_SET_INFO: junk static caching.
2008-12-17 16:05:01 +0100 jcn r265618 : Update awk+sed localize generation rules. Fixes multiple (wrong) titles in Find & Replace.
2008-12-17 16:04:56 +0100 jcn r265617 : Use dash (-) instead of underscore (_) to separate language modifiers. Fixes en_GB etc.
2008-12-17 16:04:51 +0100 jcn r265616 : Add "defbutton=true" to dialogs. Fixes ENTER doing default action: n#439222.
2008-12-17 16:04:45 +0100 jcn r265615 : Michael's new table-based find and replace.
2008-12-17 16:04:40 +0100 jcn r265614 : Apply Michael's boxtest patch.
2008-12-17 16:04:36 +0100 jcn r265613 : Make sort-options experimental. Part II. Fixes crasher n-44.patch. Fixes crasher: n#442036.
2008-12-17 16:04:31 +0100 jcn r265612 : Make sort-options experimental. Part I.
2008-12-17 16:04:26 +0100 jcn r265611 : Add --enable-layout-experimental configure switch. Part II. Typo in configure.in, add set_soenv entry.
2008-12-17 16:04:21 +0100 jcn r265610 : Add --enable-layout-experimental configure switch. Default off.
2008-11-26 16:25:18 +0100 mba r264417 : fixed compiler warnings
2008-11-26 15:52:02 +0100 mba r264407 : fixed compiler warnings
2008-11-26 15:40:44 +0100 mba r264402 : fixed compiler warnings
2008-11-26 14:50:47 +0100 mba r264395 : fixed compiler warnings
2008-11-26 14:39:12 +0100 mba r264393 : fixed compiler warnings
2008-11-26 14:38:49 +0100 mba r264392 : fixed compiler warnings
2008-11-26 14:38:31 +0100 mba r264391 : fixed compiler warnings
2008-11-26 14:38:13 +0100 mba r264390 : fixed compiler warnings
2008-11-26 14:37:38 +0100 mba r264389 : fixed compiler warnings
2008-11-26 10:11:17 +0100 mba r264352 : fixed compiler warnings
2008-11-26 10:06:12 +0100 mba r264351 : fixed compiler warnings
2008-11-26 09:58:28 +0100 mba r264347 : fixed compiler warnings
2008-11-26 09:50:41 +0100 mba r264345 : fixed compiler warnings
2008-11-26 09:46:10 +0100 mba r264343 : fixed compiler warnings
2008-10-22 10:57:09 +0200 mba r262584 : fixed small error resulting from resolved merged conflicts
2008-10-22 10:56:21 +0200 mba r262583 : fixed some small errors resulting from resolved merged conflicts
2008-10-20 19:29:27 +0200 jcn r262557 : layoutdialogs2: Remove stray patches.
2008-10-20 19:29:22 +0200 jcn r262556 : layoutdialogs2: Force resize also on second show after hiding.
2008-10-20 19:29:17 +0200 jcn r262555 : layoutdialogs2: Do not trigger handlers for api calls.
2008-10-20 19:29:13 +0200 jcn r262554 : layoutdialogs2: Use disable/enable instead of hide/show for currency box. Fixes monster lisbox.
2008-10-20 19:29:09 +0200 jcn r262553 : layoutdialogs2: Use line-count instead of linecount. Fixes sizing of listboxes.
2008-10-20 19:29:04 +0200 jcn r262552 : layoutdialogs2: vcl: respect line-count also for non-dropdown listbox.
2008-10-20 19:28:59 +0200 jcn r262551 : layoutdialogs2: Update to svn:r14142 patched.
2008-10-20 19:28:51 +0200 jcn r262550 : layoutdialogs2: Manual tweaks in number-format.xml.
2008-10-20 19:28:45 +0200 jcn r262549 : layoutdialogs2: Integrate Number Format tabpage into Format Cell dialog.
2008-10-20 19:28:36 +0200 jcn r262548 : layoutdialogs2: Windows build fixes. Thanks Noel.
2008-10-20 19:28:31 +0200 jcn r262547 : layoutdialogs2: Layout Format Cells/Number Format tabpage.
2008-10-20 19:28:24 +0200 jcn r262546 : layoutdialogs2: Remove sc/uiconfig/layout/localize.sdf.
2008-10-20 19:28:20 +0200 jcn r262545 : layoutdialogs2: --enable-debug link fix
2008-10-20 19:28:16 +0200 jcn r262544 : layoutdialogs2: Add missing localize.sdf dependency. Thanks, Petr.
2008-10-20 19:28:12 +0200 jcn r262543 : layoutdialogs2: svx linx fixlet.
2008-10-20 19:28:06 +0200 jcn r262542 : layoutdialogs2: Move layout/* to layout/core, vclcompat to layout/vcl. Distribute layout headers. Fixes sfx2 layout core includes.
2008-10-20 19:27:58 +0200 jcn r262541 : layoutdialogs2: Build fix for --enable-layout.
2008-10-20 19:27:54 +0200 jcn r262540 : layoutdialogs2: Generate localize.sdf files in uiconfig.
2008-10-20 19:27:47 +0200 jcn r262539 : layoutdialogs2: Minimalize deprecated String use further by using OUString.
2008-10-20 19:27:42 +0200 jcn r262538 : layoutdialogs2: Implement LocalizedString.GetToken and use it for aCalcBtn. Fixes empty label.
2008-10-20 19:27:36 +0200 jcn r262537 : layoutdialogs2: Add layout::Sfx*Dialog wrapper.
2008-10-20 19:27:29 +0200 jcn r262536 : layoutdialogs2: Introduce Closing*Dialog wrappers fixing closing with ESC.
2008-10-20 19:27:24 +0200 jcn r262535 : layoutdialogs2: Support <sfxmodelessdialog> from sfx2.
2008-10-20 19:27:17 +0200 jcn r262534 : layoutdialogs2: Rename find-&-replace.xml to find-and-replace.xml. Fixes split build with failing solenv patch.
2008-10-20 19:27:12 +0200 jcn r262533 : layoutdialogs2: Do not build sfx2 when --disable-layout.
2008-10-20 19:27:08 +0200 jcn r262532 : layoutdialogs2: Ignore ja/ too.
2008-10-20 19:27:04 +0200 jcn r262531 : layoutdialogs2: Add destructors for VCLXButton, VCLXComboBox.
2008-10-20 19:26:58 +0200 jcn r262530 : layoutdialogs2: Make dialogs closable with ESC: wordcount, zoom, message-box, move-copy-sheet, insert-sheet.
2008-10-20 19:26:52 +0200 jcn r262529 : layoutdialogs2: Move some implementations to .cxx.
2008-10-20 19:26:47 +0200 jcn r262528 : layoutdialogs2: Fix simple editor crasher.
2008-10-20 19:26:43 +0200 jcn r262527 : layoutdialogs2: Further cleanup: remove clean & delete from wrapperGone.
2008-10-20 19:26:38 +0200 jcn r262526 : layoutdialogs2: Add reset logic to ~WindowImpl, plugs ComboBox and Dialog leaks.
2008-10-20 19:26:34 +0200 jcn r262525 : layoutdialogs2: Interesting hack: only leaks ::ComboBox and ::Dialog.
2008-10-20 19:26:29 +0200 jcn r262524 : layoutdialogs2: Build fix.
2008-10-20 19:26:24 +0200 jcn r262523 : layoutdialogs2: Find&Replace duplicate disposal workaround inside layout.
2008-10-20 19:26:19 +0200 jcn r262522 : layoutdialogs2: Revert "Terrible crasher-fix hack. Do not dispose Dialog or any FocusHandler owners."
This reverts commit 5222b5b123a2e6c88494983bd875de574f365bae.
2008-10-20 19:26:14 +0200 jcn r262521 : layoutdialogs2: Terrible crasher-fix hack. Do not dispose Dialog or any FocusHandler owners.
2008-10-20 19:26:08 +0200 jcn r262520 : layoutdialogs2: Revert "ComboBox: crash down to (Dialog's) VCLXWindowImpl::DestroyOutputDevice();"
This reverts commit b423129aca295e84ef5986149b6ee71eb7ba0aa3.
2008-10-20 19:26:03 +0200 jcn r262519 : layoutdialogs2: ComboBox: crash down to (Dialog's) VCLXWindowImpl::DestroyOutputDevice();
2008-10-20 19:25:57 +0200 jcn r262518 : layoutdialogs2: Handler and debug cleanup.
2008-10-20 19:25:52 +0200 jcn r262517 : layoutdialogs2: Minimally remove FixedText workaround.
2008-10-20 19:25:47 +0200 jcn r262516 : layoutdialogs2: Preparations for FocusHdl fix.
2008-10-20 19:25:42 +0200 jcn r262515 : layoutdialogs2: Remove vclxwindows patch by using handler hackery.
2008-10-20 19:25:38 +0200 jcn r262514 : layoutdialogs2: Don't call deleted dialog. Hdler reset tweaks. Fixes Find&Replace.
2008-10-20 19:25:34 +0200 jcn r262513 : layoutdialogs2: Hdler and disposing cleanups.
2008-10-20 19:25:29 +0200 jcn r262512 : layoutdialogs2: Prevent Find&Replace window from being deleted twice.
2008-10-20 19:25:24 +0200 jcn r262511 : layoutdialogs2: Add destructor to SvxSearchDialogWrapper. Fixes second invocation crasher.
2008-10-20 19:25:19 +0200 jcn r262510 : layoutdialogs2: Make Find&Replace work (once) with minimal client code changes.
2008-10-20 19:25:13 +0200 jcn r262509 : layoutdialogs2: Add ComboBox/FixedText debug switching.
2008-10-20 19:25:08 +0200 jcn r262508 : layoutdialogs2: Add destructors resetting handlers.
2008-10-20 19:25:03 +0200 jcn r262507 : layoutdialogs2: Static cast fixes.
2008-10-20 19:24:59 +0200 jcn r262506 : layoutdialogs2: Always set button handler. Fixes pushbuttons.
2008-10-20 19:24:55 +0200 jcn r262505 : layoutdialogs2: Revert "Move FocusHandlers from Control down to ListBox, ComboBox, FixedText."
This reverts commit 8bc4b991539a74373bfb1ef8792276ada8c958e4.
2008-10-20 19:24:50 +0200 jcn r262504 : layoutdialogs2: Disable Timer for ENABLE_LAYOUT.
2008-10-20 19:24:45 +0200 jcn r262503 : layoutdialogs2: Move FocusHandlers from Control down to ListBox, ComboBox, FixedText.
2008-10-20 19:24:40 +0200 jcn r262502 : layoutdialogs2: Wider small symbol.
2008-10-20 19:24:36 +0200 jcn r262501 : layoutdialogs2: Listener and SetHandler cleanup.
2008-10-20 19:24:31 +0200 jcn r262500 : layoutdialogs2: Clear mxWindow upon deletion. Fixes Find&Replace crasher.
2008-10-20 19:24:27 +0200 jcn r262499 : layoutdialogs2: Typo, fixes build.
2008-10-20 19:24:22 +0200 jcn r262498 : layoutdialogs2: Ignore .log files too.
2008-10-20 19:24:19 +0200 jcn r262497 : layoutdialogs2: By default, work around #define protected public Resource hack.
2008-10-20 19:24:15 +0200 jcn r262496 : layoutdialogs2: Sw:Find&Replace: Remove wrong static cast. Fixes crasher.
2008-10-20 19:24:10 +0200 jcn r262495 : layoutdialogs2: Find&Replace: do not vertically expand buttons, add title.
2008-10-20 19:24:06 +0200 jcn r262494 : layoutdialogs2: Find&Replace: Remove need for ResId, set help id.
2008-10-20 19:24:01 +0200 jcn r262493 : layoutdialogs2: MoreButton: redraw upon resize, fix labels, use small symbol.
2008-10-20 19:23:57 +0200 jcn r262492 : layoutdialogs2: Support setting and querying small symbol on vcl:button.
2008-10-20 19:23:52 +0200 jcn r262491 : layoutdialogs2: Support redrawing of only this, make parent optional.
2008-10-20 19:23:48 +0200 jcn r262490 : layoutdialogs2: Add Kohei's wfield patch https://bugzilla.novell.com/attachment.cgi?id=235398. Fixes n#417840.
2008-10-20 19:23:44 +0200 jcn r262489 : layoutdialogs2: Redraw [parent] upon first time visibility.
Fixes weird listbox dropdown sizing in Find & Replace.
2008-10-20 19:23:39 +0200 jcn r262488 : layoutdialogs2: Add manual layouting for Find & Replace.
2008-10-20 19:23:35 +0200 jcn r262487 : layoutdialogs2: src2xml: use label instead of text for buttons.
Run on Find & Replace; fixes button texts.
2008-10-20 19:23:31 +0200 jcn r262486 : layoutdialogs2: Add initial auto-translated find-&-replace-.xml.
2008-10-20 19:23:26 +0200 jcn r262485 : layoutdialogs2: layout importer: handle ModelessDialog.
Fixes Find & Replace parsing error.
2008-10-20 19:23:22 +0200 jcn r262484 : layoutdialogs2: src2xml: Handle multiple widgets at same x,y.
Fixes silent removal of widgets in Find & Replace dialog.
2008-10-20 19:23:18 +0200 jcn r262483 : layoutdialogs2: src2xml: Handle hide= attribute, translate to show=.
2008-10-20 19:23:14 +0200 jcn r262482 : layoutdialogs2: Only use __PRETTY_FUNCTION__ on gcc. Fixes Windows build. Thanks Tor!
2008-10-20 19:23:10 +0200 jcn r262481 : layoutdialogs2: Add two missing SAL_CALL decorations. Fixes Windows build. Thanks Tor!
2008-10-20 19:23:05 +0200 jcn r262480 : layoutdialogs2: Build fixes for layout'ed Find & Replace dialog.
2008-10-20 19:22:54 +0200 jcn r262479 : layoutdialogs2: Do not use layout::SfxTabDialog for now.
2008-10-20 19:22:47 +0200 jcn r262478 : layoutdialogs2: Crufty sizing tweaks.
2008-10-20 19:22:42 +0200 jcn r262477 : layoutdialogs2: More debugging cleanups.
2008-10-20 19:22:37 +0200 jcn r262476 : layoutdialogs2: More cleanups that result in constant manual resizing...
2008-10-20 19:22:33 +0200 jcn r262475 : layoutdialogs2: Tabdlg cleanups.
2008-10-20 19:22:28 +0200 jcn r262474 : layoutdialogs2: Add GetOptimalSize () to InPlug. Fixes auto-sizing of tabcontrol.
2008-10-20 19:22:21 +0200 jcn r262473 : layoutdialogs2: Get VCLXTabControl to resize automatically (too tall), not mousable.
2008-10-20 19:22:13 +0200 jcn r262472 : layoutdialogs2: Respect show=false property; do not show everything.
2008-10-20 19:22:09 +0200 jcn r262471 : layoutdialogs2: Add show=false on buttons. Fixes displaying everything.
2008-10-20 19:22:05 +0200 jcn r262470 : layoutdialogs2: Move some code to reduce namespace and #if hacking.
2008-10-20 19:22:00 +0200 jcn r262469 : layoutdialogs2: Cleanup, remove unneeded #defines.
2008-10-20 19:21:56 +0200 jcn r262468 : layoutdialogs2: Replace static casts with dynamic_cast, fixes layout::SfxTabDialog.
Explicitly add 2 tabpages while adding tabpages, instead of relying on ResId.
2008-10-20 19:21:51 +0200 jcn r262467 : layoutdialogs2: Use cpp hacking to remove layout-tabdialog.hxx duplication.
2008-10-20 19:21:45 +0200 jcn r262466 : layoutdialogs2: Minimize diff between layout-tabdialog.hxx and tabdlg.hxx.
2008-10-20 19:21:41 +0200 jcn r262465 : layoutdialogs2: Remove copy of SfxTabDialog; use cpp logic to create both flavours.
2008-10-20 19:21:36 +0200 jcn r262464 : layoutdialogs2: Minimize diff between layout/sfxtabdialog.cxx and source/tabdlg.cxx.
This enables the next step: use cpp logic instead of code duplication.
2008-10-20 19:21:31 +0200 jcn r262463 : layoutdialogs2: Hello world on layout::SfxTabDialog.
2008-10-20 19:21:24 +0200 jcn r262462 : layoutdialogs2: Nice `Compiling:' message that shows the file being compiled.
2008-10-20 19:21:20 +0200 jcn r262461 : layoutdialogs2: Use layout::SfxTabDialog for sort options.
2008-10-20 19:21:15 +0200 jcn r262460 : layoutdialogs2: Update sort options tab.
2008-10-20 19:21:10 +0200 jcn r262459 : layoutdialogs2: Add layout::SfxTabDialog.
2008-10-20 19:21:04 +0200 jcn r262458 : layoutdialogs2: Cleanup previous attempt using layout::SfxTabPage == layout::TabPage.
2008-10-20 19:20:57 +0200 jcn r262457 : layoutdialogs2: Windows 2003 compile fixes, i#92397.
2008-10-20 19:20:52 +0200 jcn r262456 : layoutdialogs2: Set default radiogroup when none provided.
2008-10-20 19:20:48 +0200 jcn r262455 : layoutdialogs2: Add radiogroup to sort-options. Fixes crasher.
2008-10-20 19:20:43 +0200 jcn r262454 : layoutdialogs2: Cleanup ParentSet fix.
2008-10-20 19:20:36 +0200 jcn r262453 : layoutdialogs2: Add debugging in ParentSet. Works standalone, not integrated.
2008-10-20 19:20:31 +0200 jcn r262452 : layoutdialogs2: Revert "Have InPlug not derive from Window, but have as member."
This reverts commit 50ea26eec3fe14943f24900081ad923e72550345.
2008-10-20 19:20:25 +0200 jcn r262451 : layoutdialogs2: Have InPlug not derive from Window, but have as member.
2008-10-20 19:20:20 +0200 jcn r262450 : layoutdialogs2: Move layout plugin implementation from layout::SfxTabPage to InPlug.
2008-10-20 19:20:14 +0200 jcn r262449 : layoutdialogs2: Get all widgets to display in sfxtabpage plugin with Window::SetParent hack.
2008-10-20 19:20:09 +0200 jcn r262448 : layoutdialogs2: Two-button manual hello world with sfxtabpage plugin.
2008-10-20 19:20:03 +0200 jcn r262447 : layoutdialogs2: WIP: layout::SfxTabPage derived from SfxTabPage.
2008-10-20 19:19:55 +0200 jcn r262446 : layoutdialogs2: Always set parent after construction, fixes listbox dropdown.
2008-10-20 19:19:51 +0200 jcn r262445 : layoutdialogs2: Fix radio button crasher.
2008-10-20 19:19:47 +0200 jcn r262444 : layoutdialogs2: Implement ListBox method wrappers. Fixes filling of listbox.
2008-10-20 19:19:42 +0200 jcn r262443 : layoutdialogs2: Convert Move/Copy sheet to layout engine.
2008-10-20 19:19:35 +0200 jcn r262442 : layoutdialogs2: Also hide yes/no buttons if not used.
2008-10-20 19:19:31 +0200 jcn r262441 : layoutdialogs2: Elaborate on changing client code.
2008-10-20 19:19:26 +0200 jcn r262440 : layoutdialogs2: Implement winbits client-code compatibility for Message Boxes.
2008-10-20 19:19:21 +0200 jcn r262439 : layoutdialogs2: Add localize.sdf to toolkit uiconfig. Fixes build.
2008-10-20 19:19:17 +0200 jcn r262438 : layoutdialogs2: Do not use ti_layout twice in toolkit build.lst. Fixes build.
2008-10-20 19:19:13 +0200 jcn r262437 : layoutdialogs2: Oops, also dist toolkit-layout.zip.
2008-10-20 19:19:09 +0200 jcn r262436 : layoutdialogs2: Move layout.mk to solenv.
2008-10-20 19:19:03 +0200 jcn r262435 : layoutdialogs2: Add handy TEST file.
2008-10-20 19:18:58 +0200 jcn r262434 : layoutdialogs2: Implement MessageBox and wrappers ErrorBox, InfoBox, QueryBox, WarningBox.
2008-10-20 19:18:52 +0200 jcn r262433 : layoutdialogs2: QueryBox without image used for Delete Sheet dialog.
2008-10-20 19:18:46 +0200 jcn r262432 : layoutdialogs2: WIP QueryBox.
2008-10-20 19:18:39 +0200 jcn r262431 : layoutdialogs2: Add insert-sheet localization.
2008-10-20 19:18:34 +0200 jcn r262430 : layoutdialogs2: Run indent-region on zoom.xml, distribute it.
2008-10-20 19:18:30 +0200 jcn r262429 : layoutdialogs2: Dist xml files too.
2008-10-20 19:18:26 +0200 jcn r262428 : layoutdialogs2: Add insert-sheet.xml to workben.
2008-10-20 19:18:22 +0200 jcn r262427 : layoutdialogs2: Update layout TODO.
2008-10-20 19:18:18 +0200 jcn r262426 : layoutdialogs2: Cleanups and add comments.
2008-10-20 19:18:13 +0200 jcn r262425 : layoutdialogs2: Keep RadioButtons::RadioButton callback at HEAD of list.
Fixes radiobutton grouping.
2008-10-20 19:18:07 +0200 jcn r262424 : layoutdialogs2: Remove IMPORT_RADIOGROUP cruft.
2008-10-20 19:18:02 +0200 jcn r262423 : layoutdialogs2: Have code check fire event for radio button.
Fixes radio button grouping.
2008-10-20 19:17:58 +0200 jcn r262422 : layoutdialogs2: Enable IMPORT_RADIOGROUP flag.
2008-10-20 19:17:54 +0200 jcn r262421 : layoutdialogs2: Add radio groups to zoom.xml.
2008-10-20 19:17:50 +0200 jcn r262420 : layoutdialogs2: Move RadioGroup implementation to cxx file.
2008-10-20 19:17:45 +0200 jcn r262419 : layoutdialogs2: Manually set help id for insert table.
2008-10-20 19:17:41 +0200 jcn r262418 : layoutdialogs2: Cosmetic fixes for insert-sheet.
2008-10-20 19:17:37 +0200 jcn r262417 : layoutdialogs2: FindAndRemove now also skips translation prefix.
Fixes setting of title etc. from nontranslated xml.
2008-10-20 19:17:32 +0200 jcn r262416 : layoutdialogs2: Manually set help id for zoom and wordcount dialogs.
2008-10-20 19:17:27 +0200 jcn r262415 : layoutdialogs2: Set help-id from xml.
2008-10-20 19:17:21 +0200 jcn r262414 : layoutdialogs2: Move -DENABLE_LAYOUT from stray makefiles to settings.mk.
2008-10-20 19:17:13 +0200 jcn r262413 : layoutdialogs2: Initial conversion of insert-sheet dialog.
2008-10-20 19:17:08 +0200 jcn r262412 : layoutdialogs2: Add wrappers for {Get,Set}{Pointer,Text}.
2008-10-20 19:17:04 +0200 jcn r262411 : layoutdialogs2: Toolkit layout dialog copy updates.
2008-10-20 19:16:59 +0200 jcn r262410 : layoutdialogs2: Cleanup #include <layout*> disaster.
Fixes multiple inclusions of layout-pre, layout-post.
2008-10-20 19:16:53 +0200 jcn r262409 : layoutdialogs2: Implement Get,Set{,Smart}HelpId ().
2008-10-20 19:16:49 +0200 jcn r262408 : layoutdialogs2: Make some getters const.
2008-10-20 19:16:45 +0200 jcn r262407 : layoutdialogs2: Manual tweaks for string-input.xml.
2008-10-20 19:16:40 +0200 jcn r262406 : layoutdialogs2: Add string-input.xml.
2008-10-20 19:16:36 +0200 jcn r262405 : layoutdialogs2: Add dummy implementation for SetHelpId etc.
2008-10-20 19:16:32 +0200 jcn r262404 : layoutdialogs2: Actually say *what* file cannot be copied *where*. Sigh.
2008-10-20 19:16:27 +0200 jcn r262403 : layoutdialogs2: Thinko in macro name. Fixes compilation of strindlg.cxx.
2008-10-20 19:16:22 +0200 jcn r262402 : layoutdialogs2: Add layout includes to stringdlg and makefile.
2008-10-20 19:16:17 +0200 jcn r262401 : layoutdialogs2: Add sc/uiconfig/layout/localize.sdf
2008-10-20 19:16:13 +0200 jcn r262400 : layoutdialogs2: Oops, build sc/uiconfig/layout.
2008-10-20 19:16:09 +0200 jcn r262399 : layoutdialogs2: Have virtual destructor on Context, delete TabPage when deleting TabDialog.
2008-10-20 19:16:04 +0200 jcn r262398 : layoutdialogs2: Actually delete layout::TabPage objects when deleting SfxTabdialog.
2008-10-20 19:16:00 +0200 jcn r262397 : layoutdialogs2: Workaround for second invocation crash of sort dialog options tab.
2008-10-20 19:15:56 +0200 jcn r262396 : layoutdialogs2: Handle Reset button.
2008-10-20 19:15:51 +0200 jcn r262395 : layoutdialogs2: Also install sc xml zip file.
2008-10-20 19:15:46 +0200 jcn r262394 : layoutdialogs2: Integrate sort-options into sc.
2008-10-20 19:15:41 +0200 jcn r262393 : layoutdialogs2: Revert "Fix sfx2 compile warnings."
This reverts commit 8b55d402af7bd217db35f67b02dc92f93f3ada5d.
2008-10-20 19:15:34 +0200 jcn r262392 : layoutdialogs2: Remove debuging.
2008-10-20 19:15:30 +0200 jcn r262391 : layoutdialogs2: Pass set argument to layout::TabPage. Fixes OO.o integration crasher.
2008-10-20 19:15:24 +0200 jcn r262390 : layoutdialogs2: Ignore more.
2008-10-20 19:15:20 +0200 jcn r262389 : layoutdialogs2: Oops, make just one (1) sort-options tab.
2008-10-20 19:15:15 +0200 jcn r262388 : layoutdialogs2: Revert macroconf compile warnings.
2008-10-20 19:15:09 +0200 jcn r262387 : layoutdialogs2: Fix sfx2 compile warnings.
2008-10-20 19:15:01 +0200 jcn r262386 : layoutdialogs2: Collapsed tabpage and sort-options development.
2008-10-20 19:14:51 +0200 jcn r262385 : layoutdialogs2: Make dev300/src680 install layout switchable at compile time.
2008-10-20 19:14:47 +0200 jcn r262384 : layoutdialogs2: Update README, add README.
2008-10-20 19:14:43 +0200 jcn r262383 : layoutdialogs2: Repainting, hiding stuff.
2008-10-20 19:14:38 +0200 jcn r262382 : layoutdialogs2: Add allocateArea to VCLXTabPage.
2008-10-20 19:14:34 +0200 jcn r262381 : layoutdialogs2: Revert "Use VCLXContainer as base for VCLXTabPage."
This reverts commit 06a984434d0d2c356fd0cdaf96d6d613d5147b7c.
2008-10-20 19:14:30 +0200 jcn r262380 : layoutdialogs2: Use VCLXContainer as base for VCLXTabPage.
2008-10-20 19:14:26 +0200 jcn r262379 : layoutdialogs2: Revert "Derive VCLXTabPage from VBox."
This reverts commit 8ab66364bdc08151ce2c982c1aa03f7881d86b84.
2008-10-20 19:14:22 +0200 jcn r262378 : layoutdialogs2: Derive VCLXTabPage from VBox.
2008-10-20 19:14:17 +0200 jcn r262377 : layoutdialogs2: More cleanups and testing.
2008-10-20 19:14:12 +0200 jcn r262376 : layoutdialogs2: Get layout tabpage to nicely select. No content visible, though.
2008-10-20 19:14:07 +0200 jcn r262375 : layoutdialogs2: Support ScTabPageSortOptions in standalone test.
2008-10-20 19:14:02 +0200 jcn r262374 : layoutdialogs2: Support tabpage creation from xml.
2008-10-20 19:13:56 +0200 jcn r262373 : layoutdialogs2: Remove most TEST_LAYOUT conditionals.
2008-10-20 19:13:52 +0200 jcn r262372 : layoutdialogs2: Remove Args effort.
2008-10-20 19:13:48 +0200 jcn r262371 : layoutdialogs2: Attempt to create ArgSet.
2008-10-20 19:13:44 +0200 jcn r262370 : layoutdialogs2: Compile more.
2008-10-20 19:13:39 +0200 jcn r262369 : layoutdialogs2: Add sortdlg.
2008-10-20 19:13:35 +0200 jcn r262368 : layoutdialogs2: Oops, ID fix.
2008-10-20 19:13:30 +0200 jcn r262367 : layoutdialogs2: Build fix.
2008-10-20 19:13:26 +0200 jcn r262366 : layoutdialogs2: Revert "Use ::Window for plugin base iso ::Control."
This reverts commit 919ddaf2f52ad5e4df877a094cd1e336888d6210.
2008-10-20 19:13:21 +0200 jcn r262365 : layoutdialogs2: Plugin dialog cleanups.
2008-10-20 19:13:17 +0200 jcn r262364 : layoutdialogs2: Use ::Window for plugin base iso ::Control.
2008-10-20 19:13:12 +0200 jcn r262363 : layoutdialogs2: Use cstdio, remove cruft.
2008-10-20 19:13:07 +0200 jcn r262362 : layoutdialogs2: Remove cruft.
2008-10-20 19:13:02 +0200 jcn r262361 : layoutdialogs2: Remove sizing mess.
2008-10-20 19:12:57 +0200 jcn r262360 : layoutdialogs2: Trigger [re]draw of DialControl.
2008-10-20 19:12:53 +0200 jcn r262359 : layoutdialogs2: DialControl window behaves nicely and invisible.
2008-10-20 19:12:48 +0200 jcn r262358 : layoutdialogs2: Revert adding of setparent.
2008-10-20 19:12:43 +0200 jcn r262357 : layoutdialogs2: Add dialog::setparent to plugin.
2008-10-20 19:12:39 +0200 jcn r262356 : layoutdialogs2: Add a setProperty for VCLXPlugin.
2008-10-20 19:12:34 +0200 jcn r262355 : layoutdialogs2: Unhide plugin.
2008-10-20 19:12:30 +0200 jcn r262354 : layoutdialogs2: Revert.
2008-10-20 19:12:25 +0200 jcn r262353 : layoutdialogs2: Use window instead of control.
2008-10-20 19:12:20 +0200 jcn r262352 : layoutdialogs2: Lots of plugin settings.
2008-10-20 19:12:16 +0200 jcn r262351 : layoutdialogs2: More hacks.
2008-10-20 19:12:11 +0200 jcn r262350 : layoutdialogs2: Compile fixes.
2008-10-20 19:12:05 +0200 jcn r262349 : layoutdialogs2: Use c++ includes.
2008-10-20 19:12:00 +0200 jcn r262348 : layoutdialogs2: Junk UnoTunnel nonsense.
2008-10-20 19:11:55 +0200 jcn r262347 : layoutdialogs2: Remove more cruft.
2008-10-20 19:11:50 +0200 jcn r262346 : layoutdialogs2: Remove cruft.
2008-10-20 19:11:44 +0200 jcn r262345 : layoutdialogs2: Rename wrap to plugin.
2008-10-20 19:11:39 +0200 jcn r262344 : layoutdialogs2: All sorry tries.
2008-10-20 19:11:33 +0200 jcn r262343 : layoutdialogs2: Rename plugin to wrap.
2008-10-20 19:11:28 +0200 jcn r262342 : layoutdialogs2: Add ifdefs, no UNOTUNNEL, no crash on exit.
2008-10-20 19:11:23 +0200 jcn r262341 : layoutdialogs2: Redo all kind of Uno and XIface weirdness.
2008-10-20 19:11:17 +0200 jcn r262340 : layoutdialogs2: Remove extra UnoTunnel.
2008-10-20 19:11:12 +0200 jcn r262339 : layoutdialogs2: Plugin hello world. TODO: parenting/owning/sizing, ... etc.
2008-10-20 19:11:06 +0200 jcn r262338 : layoutdialogs2: Zoom updates.
2008-10-20 19:11:01 +0200 jcn r262337 : layoutdialogs2: Add missing controls.
2008-10-20 19:10:56 +0200 jcn r262336 : layoutdialogs2: Add .gitignore.
2009-04-21 16:06:18 +00:00
|
|
|
{
|
|
|
|
if ( IsSmallSymbol ())
|
|
|
|
aSize = Size( 16, 12 );
|
|
|
|
else
|
|
|
|
aSize = Size( 26, 24 );
|
2010-07-05 15:10:02 +02:00
|
|
|
if( mnDDStyle == PUSHBUTTON_DROPDOWN_MENUBUTTON )
|
|
|
|
aSize.Width() += 4;
|
CWS-TOOLING: integrate CWS layoutdialogs2
2009-04-09 10:11:14 +0200 mba r270680 : defective merge sets seem to have brought config_office back
2009-04-02 18:00:52 +0200 mba r270429 : #i100503#: make tralay work without LD_LIBRARY_PATH
2009-04-01 13:27:58 +0200 mba r270320 : warning on Solaris fixed
2009-03-31 22:15:03 +0200 mba r270293 : CWS-TOOLING: rebase CWS layoutdialogs2 to trunk@270033 (milestone: DEV300:m45)
2009-03-16 13:05:08 +0100 mba r269526 : fixed some compiler warnings of the Sun compiler
2009-03-11 15:32:42 +0100 mba r269337 : some problems for ENABLE_LAYOUT fixed
2009-03-09 16:05:32 +0100 mba r269197 : merge conflict solved
2009-03-09 15:09:55 +0100 mba r269194 : merge conflict solved
2009-03-09 15:09:35 +0100 mba r269193 : merge conflict solved
2009-03-06 22:12:47 +0100 mba r269052 : compilation error fixed
2009-03-06 17:36:37 +0100 mba r269033 : integer warning fixed
2009-03-06 10:31:19 +0100 mba r268983 : CWS-TOOLING: rebase CWS layoutdialogs2 to trunk@268395 (milestone: DEV300:m42)
2009-03-03 20:03:59 +0100 jcn r268777 : Add Notes checkbox to find-and-replace dialog in anticipation of m40 resync.
2009-03-03 15:56:20 +0100 jcn r268737 : Apply layout-find-dialog-crash-fix.diff -- fixes crasher.
From http://svn.gnome.org/viewvc/ooo-build?view=revision&revision=15378
2009-02-06 17:41:24 +0100 mba r267479 : arrrrgh - svx headers must be included behind the magic define
2009-02-05 19:44:42 +0100 mba r267439 : seems that msvc preprocessor is thick as a brick
2009-02-05 15:15:16 +0100 mba r267425 : pch added
2009-02-05 08:14:01 +0100 mba r267409 : double defined symbols fixed
2009-02-05 08:13:14 +0100 mba r267408 : compile Languagebox and FontListbox with ENABLE_LAYOUT
2009-02-05 08:07:35 +0100 mba r267406 : warning fixed
2009-02-05 08:06:42 +0100 mba r267405 : warnings and errors fixed
2009-01-30 15:51:52 +0100 mba r267206 : export Container class to compile code in sfx2
2009-01-30 15:51:14 +0100 mba r267205 : remove LAYOUT_EXPERIMENTAL from sfx2, everything now compiles with ENABLE_LAYOUT
2009-01-28 17:01:27 +0100 mba r267069 : fixed namespace problems in sfx2
2009-01-28 16:59:48 +0100 mba r267068 : fixed namespace problems
2009-01-24 13:57:06 +0100 mba r266877 : move svx stuff to experimental
2009-01-24 13:56:11 +0100 mba r266876 : move svx stuff to experimental
2009-01-24 13:52:09 +0100 mba r266875 : put sfx stuff into experimental
2009-01-24 13:28:08 +0100 mba r266874 : put sfx stuff into experimental
2009-01-24 13:26:38 +0100 mba r266873 : help msvc++ compiler a bit
2009-01-24 13:24:43 +0100 mba r266872 : warning removed
2009-01-24 13:23:21 +0100 mba r266871 : moved svx stuff to svx; put sfx stuff into experimental
2009-01-24 13:22:04 +0100 mba r266870 : moved svx stuff to svx
2009-01-05 16:35:34 +0100 jcn r265879 : config_office/configure: Regenerate. Fixes naive builds.
2008-12-17 16:06:25 +0100 jcn r265638 : Wordcount: minor HIG tweaks.
2008-12-17 16:06:21 +0100 jcn r265637 : Zoom: minor HIG spacing tweaks.
2008-12-17 16:06:16 +0100 jcn r265636 : Zoom: fix align-test and update zoom.xml.
2008-12-17 16:06:12 +0100 jcn r265635 : Zoom: add align-test.xml to illustrate zoom alignment bug.
2008-12-17 16:06:07 +0100 jcn r265634 : Find-and-Replace: request font-style-name="Bold", does not seem to work.
2008-12-17 16:06:03 +0100 jcn r265633 : Find-and-Replace: Add alignment for combobox labels.
2008-12-17 16:05:59 +0100 jcn r265632 : Find-and-Replace: Replace pairs of <flow> with <align>. Fixes ugly non-emptiness of more-<hbox>.
2008-12-17 16:05:56 +0100 jcn r265631 : Find-and-Replace: add nice 12pt border.
2008-12-17 16:05:51 +0100 jcn r265630 : Find-and-Replace: also add rowsep at lower fixedline.
2008-12-17 16:05:47 +0100 jcn r265629 : Find-and-Replace: Add poor man's colsep and rowsep substitute spaces.
2008-12-17 16:05:43 +0100 jcn r265628 : Find-and-Replace: use <vbox cnt:x-expand="false"> for buttons.
2008-12-17 16:05:40 +0100 jcn r265627 : Find-and-Replace: add <vbox>s and use cnt:expand="false" to stop vertical button expansion.
2008-12-17 16:05:36 +0100 jcn r265626 : Find-and-Replace: use sc icon. Fixes FIND button height.
2008-12-17 16:05:31 +0100 jcn r265625 : Bugfix have empty/invisible containers not take up space.
2008-12-17 16:05:27 +0100 jcn r265624 : Find-and-replace: Fix/remove most property errors.
2008-12-17 16:05:23 +0100 jcn r265623 : Table: make x, y expand default.
2008-12-17 16:05:18 +0100 jcn r265622 : Use OSL_TRACE rather than printf. Fixes warning visibility.
2008-12-17 16:05:14 +0100 jcn r265621 : Boxtest: add <vbox><table x-expand="true"> pair to trigger property errors.
2008-12-17 16:05:10 +0100 jcn r265620 : Junk extra <table> from boxtest. Fixes visual output.
2008-12-17 16:05:05 +0100 jcn r265619 : Eradicate PROPHELPER_SET_INFO: junk static caching.
2008-12-17 16:05:01 +0100 jcn r265618 : Update awk+sed localize generation rules. Fixes multiple (wrong) titles in Find & Replace.
2008-12-17 16:04:56 +0100 jcn r265617 : Use dash (-) instead of underscore (_) to separate language modifiers. Fixes en_GB etc.
2008-12-17 16:04:51 +0100 jcn r265616 : Add "defbutton=true" to dialogs. Fixes ENTER doing default action: n#439222.
2008-12-17 16:04:45 +0100 jcn r265615 : Michael's new table-based find and replace.
2008-12-17 16:04:40 +0100 jcn r265614 : Apply Michael's boxtest patch.
2008-12-17 16:04:36 +0100 jcn r265613 : Make sort-options experimental. Part II. Fixes crasher n-44.patch. Fixes crasher: n#442036.
2008-12-17 16:04:31 +0100 jcn r265612 : Make sort-options experimental. Part I.
2008-12-17 16:04:26 +0100 jcn r265611 : Add --enable-layout-experimental configure switch. Part II. Typo in configure.in, add set_soenv entry.
2008-12-17 16:04:21 +0100 jcn r265610 : Add --enable-layout-experimental configure switch. Default off.
2008-11-26 16:25:18 +0100 mba r264417 : fixed compiler warnings
2008-11-26 15:52:02 +0100 mba r264407 : fixed compiler warnings
2008-11-26 15:40:44 +0100 mba r264402 : fixed compiler warnings
2008-11-26 14:50:47 +0100 mba r264395 : fixed compiler warnings
2008-11-26 14:39:12 +0100 mba r264393 : fixed compiler warnings
2008-11-26 14:38:49 +0100 mba r264392 : fixed compiler warnings
2008-11-26 14:38:31 +0100 mba r264391 : fixed compiler warnings
2008-11-26 14:38:13 +0100 mba r264390 : fixed compiler warnings
2008-11-26 14:37:38 +0100 mba r264389 : fixed compiler warnings
2008-11-26 10:11:17 +0100 mba r264352 : fixed compiler warnings
2008-11-26 10:06:12 +0100 mba r264351 : fixed compiler warnings
2008-11-26 09:58:28 +0100 mba r264347 : fixed compiler warnings
2008-11-26 09:50:41 +0100 mba r264345 : fixed compiler warnings
2008-11-26 09:46:10 +0100 mba r264343 : fixed compiler warnings
2008-10-22 10:57:09 +0200 mba r262584 : fixed small error resulting from resolved merged conflicts
2008-10-22 10:56:21 +0200 mba r262583 : fixed some small errors resulting from resolved merged conflicts
2008-10-20 19:29:27 +0200 jcn r262557 : layoutdialogs2: Remove stray patches.
2008-10-20 19:29:22 +0200 jcn r262556 : layoutdialogs2: Force resize also on second show after hiding.
2008-10-20 19:29:17 +0200 jcn r262555 : layoutdialogs2: Do not trigger handlers for api calls.
2008-10-20 19:29:13 +0200 jcn r262554 : layoutdialogs2: Use disable/enable instead of hide/show for currency box. Fixes monster lisbox.
2008-10-20 19:29:09 +0200 jcn r262553 : layoutdialogs2: Use line-count instead of linecount. Fixes sizing of listboxes.
2008-10-20 19:29:04 +0200 jcn r262552 : layoutdialogs2: vcl: respect line-count also for non-dropdown listbox.
2008-10-20 19:28:59 +0200 jcn r262551 : layoutdialogs2: Update to svn:r14142 patched.
2008-10-20 19:28:51 +0200 jcn r262550 : layoutdialogs2: Manual tweaks in number-format.xml.
2008-10-20 19:28:45 +0200 jcn r262549 : layoutdialogs2: Integrate Number Format tabpage into Format Cell dialog.
2008-10-20 19:28:36 +0200 jcn r262548 : layoutdialogs2: Windows build fixes. Thanks Noel.
2008-10-20 19:28:31 +0200 jcn r262547 : layoutdialogs2: Layout Format Cells/Number Format tabpage.
2008-10-20 19:28:24 +0200 jcn r262546 : layoutdialogs2: Remove sc/uiconfig/layout/localize.sdf.
2008-10-20 19:28:20 +0200 jcn r262545 : layoutdialogs2: --enable-debug link fix
2008-10-20 19:28:16 +0200 jcn r262544 : layoutdialogs2: Add missing localize.sdf dependency. Thanks, Petr.
2008-10-20 19:28:12 +0200 jcn r262543 : layoutdialogs2: svx linx fixlet.
2008-10-20 19:28:06 +0200 jcn r262542 : layoutdialogs2: Move layout/* to layout/core, vclcompat to layout/vcl. Distribute layout headers. Fixes sfx2 layout core includes.
2008-10-20 19:27:58 +0200 jcn r262541 : layoutdialogs2: Build fix for --enable-layout.
2008-10-20 19:27:54 +0200 jcn r262540 : layoutdialogs2: Generate localize.sdf files in uiconfig.
2008-10-20 19:27:47 +0200 jcn r262539 : layoutdialogs2: Minimalize deprecated String use further by using OUString.
2008-10-20 19:27:42 +0200 jcn r262538 : layoutdialogs2: Implement LocalizedString.GetToken and use it for aCalcBtn. Fixes empty label.
2008-10-20 19:27:36 +0200 jcn r262537 : layoutdialogs2: Add layout::Sfx*Dialog wrapper.
2008-10-20 19:27:29 +0200 jcn r262536 : layoutdialogs2: Introduce Closing*Dialog wrappers fixing closing with ESC.
2008-10-20 19:27:24 +0200 jcn r262535 : layoutdialogs2: Support <sfxmodelessdialog> from sfx2.
2008-10-20 19:27:17 +0200 jcn r262534 : layoutdialogs2: Rename find-&-replace.xml to find-and-replace.xml. Fixes split build with failing solenv patch.
2008-10-20 19:27:12 +0200 jcn r262533 : layoutdialogs2: Do not build sfx2 when --disable-layout.
2008-10-20 19:27:08 +0200 jcn r262532 : layoutdialogs2: Ignore ja/ too.
2008-10-20 19:27:04 +0200 jcn r262531 : layoutdialogs2: Add destructors for VCLXButton, VCLXComboBox.
2008-10-20 19:26:58 +0200 jcn r262530 : layoutdialogs2: Make dialogs closable with ESC: wordcount, zoom, message-box, move-copy-sheet, insert-sheet.
2008-10-20 19:26:52 +0200 jcn r262529 : layoutdialogs2: Move some implementations to .cxx.
2008-10-20 19:26:47 +0200 jcn r262528 : layoutdialogs2: Fix simple editor crasher.
2008-10-20 19:26:43 +0200 jcn r262527 : layoutdialogs2: Further cleanup: remove clean & delete from wrapperGone.
2008-10-20 19:26:38 +0200 jcn r262526 : layoutdialogs2: Add reset logic to ~WindowImpl, plugs ComboBox and Dialog leaks.
2008-10-20 19:26:34 +0200 jcn r262525 : layoutdialogs2: Interesting hack: only leaks ::ComboBox and ::Dialog.
2008-10-20 19:26:29 +0200 jcn r262524 : layoutdialogs2: Build fix.
2008-10-20 19:26:24 +0200 jcn r262523 : layoutdialogs2: Find&Replace duplicate disposal workaround inside layout.
2008-10-20 19:26:19 +0200 jcn r262522 : layoutdialogs2: Revert "Terrible crasher-fix hack. Do not dispose Dialog or any FocusHandler owners."
This reverts commit 5222b5b123a2e6c88494983bd875de574f365bae.
2008-10-20 19:26:14 +0200 jcn r262521 : layoutdialogs2: Terrible crasher-fix hack. Do not dispose Dialog or any FocusHandler owners.
2008-10-20 19:26:08 +0200 jcn r262520 : layoutdialogs2: Revert "ComboBox: crash down to (Dialog's) VCLXWindowImpl::DestroyOutputDevice();"
This reverts commit b423129aca295e84ef5986149b6ee71eb7ba0aa3.
2008-10-20 19:26:03 +0200 jcn r262519 : layoutdialogs2: ComboBox: crash down to (Dialog's) VCLXWindowImpl::DestroyOutputDevice();
2008-10-20 19:25:57 +0200 jcn r262518 : layoutdialogs2: Handler and debug cleanup.
2008-10-20 19:25:52 +0200 jcn r262517 : layoutdialogs2: Minimally remove FixedText workaround.
2008-10-20 19:25:47 +0200 jcn r262516 : layoutdialogs2: Preparations for FocusHdl fix.
2008-10-20 19:25:42 +0200 jcn r262515 : layoutdialogs2: Remove vclxwindows patch by using handler hackery.
2008-10-20 19:25:38 +0200 jcn r262514 : layoutdialogs2: Don't call deleted dialog. Hdler reset tweaks. Fixes Find&Replace.
2008-10-20 19:25:34 +0200 jcn r262513 : layoutdialogs2: Hdler and disposing cleanups.
2008-10-20 19:25:29 +0200 jcn r262512 : layoutdialogs2: Prevent Find&Replace window from being deleted twice.
2008-10-20 19:25:24 +0200 jcn r262511 : layoutdialogs2: Add destructor to SvxSearchDialogWrapper. Fixes second invocation crasher.
2008-10-20 19:25:19 +0200 jcn r262510 : layoutdialogs2: Make Find&Replace work (once) with minimal client code changes.
2008-10-20 19:25:13 +0200 jcn r262509 : layoutdialogs2: Add ComboBox/FixedText debug switching.
2008-10-20 19:25:08 +0200 jcn r262508 : layoutdialogs2: Add destructors resetting handlers.
2008-10-20 19:25:03 +0200 jcn r262507 : layoutdialogs2: Static cast fixes.
2008-10-20 19:24:59 +0200 jcn r262506 : layoutdialogs2: Always set button handler. Fixes pushbuttons.
2008-10-20 19:24:55 +0200 jcn r262505 : layoutdialogs2: Revert "Move FocusHandlers from Control down to ListBox, ComboBox, FixedText."
This reverts commit 8bc4b991539a74373bfb1ef8792276ada8c958e4.
2008-10-20 19:24:50 +0200 jcn r262504 : layoutdialogs2: Disable Timer for ENABLE_LAYOUT.
2008-10-20 19:24:45 +0200 jcn r262503 : layoutdialogs2: Move FocusHandlers from Control down to ListBox, ComboBox, FixedText.
2008-10-20 19:24:40 +0200 jcn r262502 : layoutdialogs2: Wider small symbol.
2008-10-20 19:24:36 +0200 jcn r262501 : layoutdialogs2: Listener and SetHandler cleanup.
2008-10-20 19:24:31 +0200 jcn r262500 : layoutdialogs2: Clear mxWindow upon deletion. Fixes Find&Replace crasher.
2008-10-20 19:24:27 +0200 jcn r262499 : layoutdialogs2: Typo, fixes build.
2008-10-20 19:24:22 +0200 jcn r262498 : layoutdialogs2: Ignore .log files too.
2008-10-20 19:24:19 +0200 jcn r262497 : layoutdialogs2: By default, work around #define protected public Resource hack.
2008-10-20 19:24:15 +0200 jcn r262496 : layoutdialogs2: Sw:Find&Replace: Remove wrong static cast. Fixes crasher.
2008-10-20 19:24:10 +0200 jcn r262495 : layoutdialogs2: Find&Replace: do not vertically expand buttons, add title.
2008-10-20 19:24:06 +0200 jcn r262494 : layoutdialogs2: Find&Replace: Remove need for ResId, set help id.
2008-10-20 19:24:01 +0200 jcn r262493 : layoutdialogs2: MoreButton: redraw upon resize, fix labels, use small symbol.
2008-10-20 19:23:57 +0200 jcn r262492 : layoutdialogs2: Support setting and querying small symbol on vcl:button.
2008-10-20 19:23:52 +0200 jcn r262491 : layoutdialogs2: Support redrawing of only this, make parent optional.
2008-10-20 19:23:48 +0200 jcn r262490 : layoutdialogs2: Add Kohei's wfield patch https://bugzilla.novell.com/attachment.cgi?id=235398. Fixes n#417840.
2008-10-20 19:23:44 +0200 jcn r262489 : layoutdialogs2: Redraw [parent] upon first time visibility.
Fixes weird listbox dropdown sizing in Find & Replace.
2008-10-20 19:23:39 +0200 jcn r262488 : layoutdialogs2: Add manual layouting for Find & Replace.
2008-10-20 19:23:35 +0200 jcn r262487 : layoutdialogs2: src2xml: use label instead of text for buttons.
Run on Find & Replace; fixes button texts.
2008-10-20 19:23:31 +0200 jcn r262486 : layoutdialogs2: Add initial auto-translated find-&-replace-.xml.
2008-10-20 19:23:26 +0200 jcn r262485 : layoutdialogs2: layout importer: handle ModelessDialog.
Fixes Find & Replace parsing error.
2008-10-20 19:23:22 +0200 jcn r262484 : layoutdialogs2: src2xml: Handle multiple widgets at same x,y.
Fixes silent removal of widgets in Find & Replace dialog.
2008-10-20 19:23:18 +0200 jcn r262483 : layoutdialogs2: src2xml: Handle hide= attribute, translate to show=.
2008-10-20 19:23:14 +0200 jcn r262482 : layoutdialogs2: Only use __PRETTY_FUNCTION__ on gcc. Fixes Windows build. Thanks Tor!
2008-10-20 19:23:10 +0200 jcn r262481 : layoutdialogs2: Add two missing SAL_CALL decorations. Fixes Windows build. Thanks Tor!
2008-10-20 19:23:05 +0200 jcn r262480 : layoutdialogs2: Build fixes for layout'ed Find & Replace dialog.
2008-10-20 19:22:54 +0200 jcn r262479 : layoutdialogs2: Do not use layout::SfxTabDialog for now.
2008-10-20 19:22:47 +0200 jcn r262478 : layoutdialogs2: Crufty sizing tweaks.
2008-10-20 19:22:42 +0200 jcn r262477 : layoutdialogs2: More debugging cleanups.
2008-10-20 19:22:37 +0200 jcn r262476 : layoutdialogs2: More cleanups that result in constant manual resizing...
2008-10-20 19:22:33 +0200 jcn r262475 : layoutdialogs2: Tabdlg cleanups.
2008-10-20 19:22:28 +0200 jcn r262474 : layoutdialogs2: Add GetOptimalSize () to InPlug. Fixes auto-sizing of tabcontrol.
2008-10-20 19:22:21 +0200 jcn r262473 : layoutdialogs2: Get VCLXTabControl to resize automatically (too tall), not mousable.
2008-10-20 19:22:13 +0200 jcn r262472 : layoutdialogs2: Respect show=false property; do not show everything.
2008-10-20 19:22:09 +0200 jcn r262471 : layoutdialogs2: Add show=false on buttons. Fixes displaying everything.
2008-10-20 19:22:05 +0200 jcn r262470 : layoutdialogs2: Move some code to reduce namespace and #if hacking.
2008-10-20 19:22:00 +0200 jcn r262469 : layoutdialogs2: Cleanup, remove unneeded #defines.
2008-10-20 19:21:56 +0200 jcn r262468 : layoutdialogs2: Replace static casts with dynamic_cast, fixes layout::SfxTabDialog.
Explicitly add 2 tabpages while adding tabpages, instead of relying on ResId.
2008-10-20 19:21:51 +0200 jcn r262467 : layoutdialogs2: Use cpp hacking to remove layout-tabdialog.hxx duplication.
2008-10-20 19:21:45 +0200 jcn r262466 : layoutdialogs2: Minimize diff between layout-tabdialog.hxx and tabdlg.hxx.
2008-10-20 19:21:41 +0200 jcn r262465 : layoutdialogs2: Remove copy of SfxTabDialog; use cpp logic to create both flavours.
2008-10-20 19:21:36 +0200 jcn r262464 : layoutdialogs2: Minimize diff between layout/sfxtabdialog.cxx and source/tabdlg.cxx.
This enables the next step: use cpp logic instead of code duplication.
2008-10-20 19:21:31 +0200 jcn r262463 : layoutdialogs2: Hello world on layout::SfxTabDialog.
2008-10-20 19:21:24 +0200 jcn r262462 : layoutdialogs2: Nice `Compiling:' message that shows the file being compiled.
2008-10-20 19:21:20 +0200 jcn r262461 : layoutdialogs2: Use layout::SfxTabDialog for sort options.
2008-10-20 19:21:15 +0200 jcn r262460 : layoutdialogs2: Update sort options tab.
2008-10-20 19:21:10 +0200 jcn r262459 : layoutdialogs2: Add layout::SfxTabDialog.
2008-10-20 19:21:04 +0200 jcn r262458 : layoutdialogs2: Cleanup previous attempt using layout::SfxTabPage == layout::TabPage.
2008-10-20 19:20:57 +0200 jcn r262457 : layoutdialogs2: Windows 2003 compile fixes, i#92397.
2008-10-20 19:20:52 +0200 jcn r262456 : layoutdialogs2: Set default radiogroup when none provided.
2008-10-20 19:20:48 +0200 jcn r262455 : layoutdialogs2: Add radiogroup to sort-options. Fixes crasher.
2008-10-20 19:20:43 +0200 jcn r262454 : layoutdialogs2: Cleanup ParentSet fix.
2008-10-20 19:20:36 +0200 jcn r262453 : layoutdialogs2: Add debugging in ParentSet. Works standalone, not integrated.
2008-10-20 19:20:31 +0200 jcn r262452 : layoutdialogs2: Revert "Have InPlug not derive from Window, but have as member."
This reverts commit 50ea26eec3fe14943f24900081ad923e72550345.
2008-10-20 19:20:25 +0200 jcn r262451 : layoutdialogs2: Have InPlug not derive from Window, but have as member.
2008-10-20 19:20:20 +0200 jcn r262450 : layoutdialogs2: Move layout plugin implementation from layout::SfxTabPage to InPlug.
2008-10-20 19:20:14 +0200 jcn r262449 : layoutdialogs2: Get all widgets to display in sfxtabpage plugin with Window::SetParent hack.
2008-10-20 19:20:09 +0200 jcn r262448 : layoutdialogs2: Two-button manual hello world with sfxtabpage plugin.
2008-10-20 19:20:03 +0200 jcn r262447 : layoutdialogs2: WIP: layout::SfxTabPage derived from SfxTabPage.
2008-10-20 19:19:55 +0200 jcn r262446 : layoutdialogs2: Always set parent after construction, fixes listbox dropdown.
2008-10-20 19:19:51 +0200 jcn r262445 : layoutdialogs2: Fix radio button crasher.
2008-10-20 19:19:47 +0200 jcn r262444 : layoutdialogs2: Implement ListBox method wrappers. Fixes filling of listbox.
2008-10-20 19:19:42 +0200 jcn r262443 : layoutdialogs2: Convert Move/Copy sheet to layout engine.
2008-10-20 19:19:35 +0200 jcn r262442 : layoutdialogs2: Also hide yes/no buttons if not used.
2008-10-20 19:19:31 +0200 jcn r262441 : layoutdialogs2: Elaborate on changing client code.
2008-10-20 19:19:26 +0200 jcn r262440 : layoutdialogs2: Implement winbits client-code compatibility for Message Boxes.
2008-10-20 19:19:21 +0200 jcn r262439 : layoutdialogs2: Add localize.sdf to toolkit uiconfig. Fixes build.
2008-10-20 19:19:17 +0200 jcn r262438 : layoutdialogs2: Do not use ti_layout twice in toolkit build.lst. Fixes build.
2008-10-20 19:19:13 +0200 jcn r262437 : layoutdialogs2: Oops, also dist toolkit-layout.zip.
2008-10-20 19:19:09 +0200 jcn r262436 : layoutdialogs2: Move layout.mk to solenv.
2008-10-20 19:19:03 +0200 jcn r262435 : layoutdialogs2: Add handy TEST file.
2008-10-20 19:18:58 +0200 jcn r262434 : layoutdialogs2: Implement MessageBox and wrappers ErrorBox, InfoBox, QueryBox, WarningBox.
2008-10-20 19:18:52 +0200 jcn r262433 : layoutdialogs2: QueryBox without image used for Delete Sheet dialog.
2008-10-20 19:18:46 +0200 jcn r262432 : layoutdialogs2: WIP QueryBox.
2008-10-20 19:18:39 +0200 jcn r262431 : layoutdialogs2: Add insert-sheet localization.
2008-10-20 19:18:34 +0200 jcn r262430 : layoutdialogs2: Run indent-region on zoom.xml, distribute it.
2008-10-20 19:18:30 +0200 jcn r262429 : layoutdialogs2: Dist xml files too.
2008-10-20 19:18:26 +0200 jcn r262428 : layoutdialogs2: Add insert-sheet.xml to workben.
2008-10-20 19:18:22 +0200 jcn r262427 : layoutdialogs2: Update layout TODO.
2008-10-20 19:18:18 +0200 jcn r262426 : layoutdialogs2: Cleanups and add comments.
2008-10-20 19:18:13 +0200 jcn r262425 : layoutdialogs2: Keep RadioButtons::RadioButton callback at HEAD of list.
Fixes radiobutton grouping.
2008-10-20 19:18:07 +0200 jcn r262424 : layoutdialogs2: Remove IMPORT_RADIOGROUP cruft.
2008-10-20 19:18:02 +0200 jcn r262423 : layoutdialogs2: Have code check fire event for radio button.
Fixes radio button grouping.
2008-10-20 19:17:58 +0200 jcn r262422 : layoutdialogs2: Enable IMPORT_RADIOGROUP flag.
2008-10-20 19:17:54 +0200 jcn r262421 : layoutdialogs2: Add radio groups to zoom.xml.
2008-10-20 19:17:50 +0200 jcn r262420 : layoutdialogs2: Move RadioGroup implementation to cxx file.
2008-10-20 19:17:45 +0200 jcn r262419 : layoutdialogs2: Manually set help id for insert table.
2008-10-20 19:17:41 +0200 jcn r262418 : layoutdialogs2: Cosmetic fixes for insert-sheet.
2008-10-20 19:17:37 +0200 jcn r262417 : layoutdialogs2: FindAndRemove now also skips translation prefix.
Fixes setting of title etc. from nontranslated xml.
2008-10-20 19:17:32 +0200 jcn r262416 : layoutdialogs2: Manually set help id for zoom and wordcount dialogs.
2008-10-20 19:17:27 +0200 jcn r262415 : layoutdialogs2: Set help-id from xml.
2008-10-20 19:17:21 +0200 jcn r262414 : layoutdialogs2: Move -DENABLE_LAYOUT from stray makefiles to settings.mk.
2008-10-20 19:17:13 +0200 jcn r262413 : layoutdialogs2: Initial conversion of insert-sheet dialog.
2008-10-20 19:17:08 +0200 jcn r262412 : layoutdialogs2: Add wrappers for {Get,Set}{Pointer,Text}.
2008-10-20 19:17:04 +0200 jcn r262411 : layoutdialogs2: Toolkit layout dialog copy updates.
2008-10-20 19:16:59 +0200 jcn r262410 : layoutdialogs2: Cleanup #include <layout*> disaster.
Fixes multiple inclusions of layout-pre, layout-post.
2008-10-20 19:16:53 +0200 jcn r262409 : layoutdialogs2: Implement Get,Set{,Smart}HelpId ().
2008-10-20 19:16:49 +0200 jcn r262408 : layoutdialogs2: Make some getters const.
2008-10-20 19:16:45 +0200 jcn r262407 : layoutdialogs2: Manual tweaks for string-input.xml.
2008-10-20 19:16:40 +0200 jcn r262406 : layoutdialogs2: Add string-input.xml.
2008-10-20 19:16:36 +0200 jcn r262405 : layoutdialogs2: Add dummy implementation for SetHelpId etc.
2008-10-20 19:16:32 +0200 jcn r262404 : layoutdialogs2: Actually say *what* file cannot be copied *where*. Sigh.
2008-10-20 19:16:27 +0200 jcn r262403 : layoutdialogs2: Thinko in macro name. Fixes compilation of strindlg.cxx.
2008-10-20 19:16:22 +0200 jcn r262402 : layoutdialogs2: Add layout includes to stringdlg and makefile.
2008-10-20 19:16:17 +0200 jcn r262401 : layoutdialogs2: Add sc/uiconfig/layout/localize.sdf
2008-10-20 19:16:13 +0200 jcn r262400 : layoutdialogs2: Oops, build sc/uiconfig/layout.
2008-10-20 19:16:09 +0200 jcn r262399 : layoutdialogs2: Have virtual destructor on Context, delete TabPage when deleting TabDialog.
2008-10-20 19:16:04 +0200 jcn r262398 : layoutdialogs2: Actually delete layout::TabPage objects when deleting SfxTabdialog.
2008-10-20 19:16:00 +0200 jcn r262397 : layoutdialogs2: Workaround for second invocation crash of sort dialog options tab.
2008-10-20 19:15:56 +0200 jcn r262396 : layoutdialogs2: Handle Reset button.
2008-10-20 19:15:51 +0200 jcn r262395 : layoutdialogs2: Also install sc xml zip file.
2008-10-20 19:15:46 +0200 jcn r262394 : layoutdialogs2: Integrate sort-options into sc.
2008-10-20 19:15:41 +0200 jcn r262393 : layoutdialogs2: Revert "Fix sfx2 compile warnings."
This reverts commit 8b55d402af7bd217db35f67b02dc92f93f3ada5d.
2008-10-20 19:15:34 +0200 jcn r262392 : layoutdialogs2: Remove debuging.
2008-10-20 19:15:30 +0200 jcn r262391 : layoutdialogs2: Pass set argument to layout::TabPage. Fixes OO.o integration crasher.
2008-10-20 19:15:24 +0200 jcn r262390 : layoutdialogs2: Ignore more.
2008-10-20 19:15:20 +0200 jcn r262389 : layoutdialogs2: Oops, make just one (1) sort-options tab.
2008-10-20 19:15:15 +0200 jcn r262388 : layoutdialogs2: Revert macroconf compile warnings.
2008-10-20 19:15:09 +0200 jcn r262387 : layoutdialogs2: Fix sfx2 compile warnings.
2008-10-20 19:15:01 +0200 jcn r262386 : layoutdialogs2: Collapsed tabpage and sort-options development.
2008-10-20 19:14:51 +0200 jcn r262385 : layoutdialogs2: Make dev300/src680 install layout switchable at compile time.
2008-10-20 19:14:47 +0200 jcn r262384 : layoutdialogs2: Update README, add README.
2008-10-20 19:14:43 +0200 jcn r262383 : layoutdialogs2: Repainting, hiding stuff.
2008-10-20 19:14:38 +0200 jcn r262382 : layoutdialogs2: Add allocateArea to VCLXTabPage.
2008-10-20 19:14:34 +0200 jcn r262381 : layoutdialogs2: Revert "Use VCLXContainer as base for VCLXTabPage."
This reverts commit 06a984434d0d2c356fd0cdaf96d6d613d5147b7c.
2008-10-20 19:14:30 +0200 jcn r262380 : layoutdialogs2: Use VCLXContainer as base for VCLXTabPage.
2008-10-20 19:14:26 +0200 jcn r262379 : layoutdialogs2: Revert "Derive VCLXTabPage from VBox."
This reverts commit 8ab66364bdc08151ce2c982c1aa03f7881d86b84.
2008-10-20 19:14:22 +0200 jcn r262378 : layoutdialogs2: Derive VCLXTabPage from VBox.
2008-10-20 19:14:17 +0200 jcn r262377 : layoutdialogs2: More cleanups and testing.
2008-10-20 19:14:12 +0200 jcn r262376 : layoutdialogs2: Get layout tabpage to nicely select. No content visible, though.
2008-10-20 19:14:07 +0200 jcn r262375 : layoutdialogs2: Support ScTabPageSortOptions in standalone test.
2008-10-20 19:14:02 +0200 jcn r262374 : layoutdialogs2: Support tabpage creation from xml.
2008-10-20 19:13:56 +0200 jcn r262373 : layoutdialogs2: Remove most TEST_LAYOUT conditionals.
2008-10-20 19:13:52 +0200 jcn r262372 : layoutdialogs2: Remove Args effort.
2008-10-20 19:13:48 +0200 jcn r262371 : layoutdialogs2: Attempt to create ArgSet.
2008-10-20 19:13:44 +0200 jcn r262370 : layoutdialogs2: Compile more.
2008-10-20 19:13:39 +0200 jcn r262369 : layoutdialogs2: Add sortdlg.
2008-10-20 19:13:35 +0200 jcn r262368 : layoutdialogs2: Oops, ID fix.
2008-10-20 19:13:30 +0200 jcn r262367 : layoutdialogs2: Build fix.
2008-10-20 19:13:26 +0200 jcn r262366 : layoutdialogs2: Revert "Use ::Window for plugin base iso ::Control."
This reverts commit 919ddaf2f52ad5e4df877a094cd1e336888d6210.
2008-10-20 19:13:21 +0200 jcn r262365 : layoutdialogs2: Plugin dialog cleanups.
2008-10-20 19:13:17 +0200 jcn r262364 : layoutdialogs2: Use ::Window for plugin base iso ::Control.
2008-10-20 19:13:12 +0200 jcn r262363 : layoutdialogs2: Use cstdio, remove cruft.
2008-10-20 19:13:07 +0200 jcn r262362 : layoutdialogs2: Remove cruft.
2008-10-20 19:13:02 +0200 jcn r262361 : layoutdialogs2: Remove sizing mess.
2008-10-20 19:12:57 +0200 jcn r262360 : layoutdialogs2: Trigger [re]draw of DialControl.
2008-10-20 19:12:53 +0200 jcn r262359 : layoutdialogs2: DialControl window behaves nicely and invisible.
2008-10-20 19:12:48 +0200 jcn r262358 : layoutdialogs2: Revert adding of setparent.
2008-10-20 19:12:43 +0200 jcn r262357 : layoutdialogs2: Add dialog::setparent to plugin.
2008-10-20 19:12:39 +0200 jcn r262356 : layoutdialogs2: Add a setProperty for VCLXPlugin.
2008-10-20 19:12:34 +0200 jcn r262355 : layoutdialogs2: Unhide plugin.
2008-10-20 19:12:30 +0200 jcn r262354 : layoutdialogs2: Revert.
2008-10-20 19:12:25 +0200 jcn r262353 : layoutdialogs2: Use window instead of control.
2008-10-20 19:12:20 +0200 jcn r262352 : layoutdialogs2: Lots of plugin settings.
2008-10-20 19:12:16 +0200 jcn r262351 : layoutdialogs2: More hacks.
2008-10-20 19:12:11 +0200 jcn r262350 : layoutdialogs2: Compile fixes.
2008-10-20 19:12:05 +0200 jcn r262349 : layoutdialogs2: Use c++ includes.
2008-10-20 19:12:00 +0200 jcn r262348 : layoutdialogs2: Junk UnoTunnel nonsense.
2008-10-20 19:11:55 +0200 jcn r262347 : layoutdialogs2: Remove more cruft.
2008-10-20 19:11:50 +0200 jcn r262346 : layoutdialogs2: Remove cruft.
2008-10-20 19:11:44 +0200 jcn r262345 : layoutdialogs2: Rename wrap to plugin.
2008-10-20 19:11:39 +0200 jcn r262344 : layoutdialogs2: All sorry tries.
2008-10-20 19:11:33 +0200 jcn r262343 : layoutdialogs2: Rename plugin to wrap.
2008-10-20 19:11:28 +0200 jcn r262342 : layoutdialogs2: Add ifdefs, no UNOTUNNEL, no crash on exit.
2008-10-20 19:11:23 +0200 jcn r262341 : layoutdialogs2: Redo all kind of Uno and XIface weirdness.
2008-10-20 19:11:17 +0200 jcn r262340 : layoutdialogs2: Remove extra UnoTunnel.
2008-10-20 19:11:12 +0200 jcn r262339 : layoutdialogs2: Plugin hello world. TODO: parenting/owning/sizing, ... etc.
2008-10-20 19:11:06 +0200 jcn r262338 : layoutdialogs2: Zoom updates.
2008-10-20 19:11:01 +0200 jcn r262337 : layoutdialogs2: Add missing controls.
2008-10-20 19:10:56 +0200 jcn r262336 : layoutdialogs2: Add .gitignore.
2009-04-21 16:06:18 +00:00
|
|
|
}
|
2004-07-05 14:41:27 +00:00
|
|
|
else if ( IsImage() && ! (ImplGetButtonState() & BUTTON_DRAW_NOIMAGE) )
|
|
|
|
aSize = GetModeImage().GetSizePixel();
|
2008-01-14 12:04:30 +00:00
|
|
|
if ( PushButton::GetText().Len() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2011-01-12 15:07:10 +01:00
|
|
|
sal_uLong nDrawFlags = 0;
|
2008-01-14 12:04:30 +00:00
|
|
|
Size textSize = GetTextRect( Rectangle( Point(), Size( nMaxWidth ? nMaxWidth : 0x7fffffff, 0x7fffffff ) ),
|
|
|
|
PushButton::GetText(), ImplGetTextStyle( nDrawFlags ) ).GetSize();
|
|
|
|
aSize.Width() += int( textSize.Width () * 1.15 );
|
|
|
|
aSize.Height() = std::max( aSize.Height(), long( textSize.Height() * 1.15 ) );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2007-07-03 13:05:08 +00:00
|
|
|
// cf. ImplDrawPushButton ...
|
2009-07-27 18:42:13 +00:00
|
|
|
if( (GetStyle() & WB_SMALLSTYLE) == 0 )
|
|
|
|
{
|
|
|
|
aSize.Width() += 8;
|
|
|
|
aSize.Height() += 8;
|
|
|
|
}
|
2007-07-03 13:05:08 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
return CalcWindowSize( aSize );
|
|
|
|
}
|
|
|
|
|
2008-01-14 12:04:30 +00:00
|
|
|
Size PushButton::GetOptimalSize(WindowSizeType eType) const
|
|
|
|
{
|
|
|
|
switch (eType) {
|
|
|
|
case WINDOWSIZE_MINIMUM: {
|
|
|
|
return CalcMinimumSize();
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
return Button::GetOptimalSize( eType );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
// =======================================================================
|
|
|
|
|
|
|
|
void OKButton::ImplInit( Window* pParent, WinBits nStyle )
|
|
|
|
{
|
|
|
|
PushButton::ImplInit( pParent, nStyle );
|
|
|
|
|
|
|
|
SetText( Button::GetStandardText( BUTTON_OK ) );
|
|
|
|
SetHelpText( Button::GetStandardHelpText( BUTTON_OK ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
OKButton::OKButton( Window* pParent, WinBits nStyle ) :
|
|
|
|
PushButton( WINDOW_OKBUTTON )
|
|
|
|
{
|
|
|
|
ImplInit( pParent, nStyle );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
OKButton::OKButton( Window* pParent, const ResId& rResId ) :
|
|
|
|
PushButton( WINDOW_OKBUTTON )
|
|
|
|
{
|
|
|
|
rResId.SetRT( RSC_OKBUTTON );
|
|
|
|
WinBits nStyle = ImplInitRes( rResId );
|
2012-08-20 09:59:16 +01:00
|
|
|
|
|
|
|
if (VclBuilderContainer::replace_buildable(pParent, rResId, *this))
|
|
|
|
return;
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
ImplInit( pParent, nStyle );
|
|
|
|
ImplLoadRes( rResId );
|
|
|
|
|
|
|
|
if ( !(nStyle & WB_HIDE) )
|
|
|
|
Show();
|
|
|
|
}
|
|
|
|
|
2012-06-01 13:40:01 +01:00
|
|
|
void OKButton::take_properties(Window &rOther)
|
|
|
|
{
|
|
|
|
if (!GetParent())
|
|
|
|
ImplInit(rOther.GetParent(), rOther.GetStyle());
|
|
|
|
PushButton::take_properties(rOther);
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void OKButton::Click()
|
|
|
|
{
|
2012-07-01 21:10:41 +02:00
|
|
|
// close parent if no link set
|
2001-11-27 08:54:45 +00:00
|
|
|
if ( !GetClickHdl() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2012-03-21 11:26:30 +00:00
|
|
|
Window* pParent = getLegacyNonLayoutParent(GetParent());
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( pParent->IsSystemWindow() )
|
|
|
|
{
|
|
|
|
if ( pParent->IsDialog() )
|
|
|
|
{
|
2001-08-07 11:32:22 +00:00
|
|
|
if ( ((Dialog*)pParent)->IsInExecute() )
|
2010-09-29 15:46:40 +08:00
|
|
|
((Dialog*)pParent)->EndDialog( sal_True );
|
2012-07-01 21:10:41 +02:00
|
|
|
// prevent recursive calls
|
2001-08-07 11:32:22 +00:00
|
|
|
else if ( !((Dialog*)pParent)->IsInClose() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2001-08-07 11:32:22 +00:00
|
|
|
if ( pParent->GetStyle() & WB_CLOSEABLE )
|
2000-09-18 16:07:07 +00:00
|
|
|
((Dialog*)pParent)->Close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if ( pParent->GetStyle() & WB_CLOSEABLE )
|
|
|
|
((SystemWindow*)pParent)->Close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2001-11-27 08:54:45 +00:00
|
|
|
else
|
2001-11-08 15:05:45 +00:00
|
|
|
{
|
|
|
|
PushButton::Click();
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// =======================================================================
|
|
|
|
|
|
|
|
void CancelButton::ImplInit( Window* pParent, WinBits nStyle )
|
|
|
|
{
|
|
|
|
PushButton::ImplInit( pParent, nStyle );
|
|
|
|
|
|
|
|
SetText( Button::GetStandardText( BUTTON_CANCEL ) );
|
|
|
|
SetHelpText( Button::GetStandardHelpText( BUTTON_CANCEL ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
CancelButton::CancelButton( Window* pParent, WinBits nStyle ) :
|
|
|
|
PushButton( WINDOW_CANCELBUTTON )
|
|
|
|
{
|
|
|
|
ImplInit( pParent, nStyle );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
CancelButton::CancelButton( Window* pParent, const ResId& rResId ) :
|
|
|
|
PushButton( WINDOW_CANCELBUTTON )
|
|
|
|
{
|
|
|
|
rResId.SetRT( RSC_CANCELBUTTON );
|
|
|
|
WinBits nStyle = ImplInitRes( rResId );
|
2012-08-20 09:59:16 +01:00
|
|
|
|
|
|
|
if (VclBuilderContainer::replace_buildable(pParent, rResId, *this))
|
|
|
|
return;
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
ImplInit( pParent, nStyle );
|
|
|
|
ImplLoadRes( rResId );
|
|
|
|
|
|
|
|
if ( !(nStyle & WB_HIDE) )
|
|
|
|
Show();
|
|
|
|
}
|
|
|
|
|
2012-06-01 13:40:01 +01:00
|
|
|
void CancelButton::take_properties(Window &rOther)
|
|
|
|
{
|
|
|
|
if (!GetParent())
|
|
|
|
ImplInit(rOther.GetParent(), rOther.GetStyle());
|
|
|
|
PushButton::take_properties(rOther);
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void CancelButton::Click()
|
|
|
|
{
|
2012-07-01 21:10:41 +02:00
|
|
|
// close parent if link not set
|
2001-11-27 08:54:45 +00:00
|
|
|
if ( !GetClickHdl() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2012-03-21 11:26:30 +00:00
|
|
|
Window* pParent = getLegacyNonLayoutParent(GetParent());
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( pParent->IsSystemWindow() )
|
|
|
|
{
|
|
|
|
if ( pParent->IsDialog() )
|
|
|
|
{
|
2001-08-07 11:32:22 +00:00
|
|
|
if ( ((Dialog*)pParent)->IsInExecute() )
|
2010-09-29 15:46:40 +08:00
|
|
|
((Dialog*)pParent)->EndDialog( sal_False );
|
2012-07-01 21:10:41 +02:00
|
|
|
// prevent recursive calls
|
2001-08-07 11:32:22 +00:00
|
|
|
else if ( !((Dialog*)pParent)->IsInClose() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2001-08-07 11:32:22 +00:00
|
|
|
if ( pParent->GetStyle() & WB_CLOSEABLE )
|
2000-09-18 16:07:07 +00:00
|
|
|
((Dialog*)pParent)->Close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if ( pParent->GetStyle() & WB_CLOSEABLE )
|
|
|
|
((SystemWindow*)pParent)->Close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2001-11-27 08:54:45 +00:00
|
|
|
else
|
2001-11-08 15:05:45 +00:00
|
|
|
{
|
|
|
|
PushButton::Click();
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// =======================================================================
|
|
|
|
|
|
|
|
void HelpButton::ImplInit( Window* pParent, WinBits nStyle )
|
|
|
|
{
|
|
|
|
PushButton::ImplInit( pParent, nStyle | WB_NOPOINTERFOCUS );
|
|
|
|
|
|
|
|
SetText( Button::GetStandardText( BUTTON_HELP ) );
|
|
|
|
SetHelpText( Button::GetStandardHelpText( BUTTON_HELP ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
HelpButton::HelpButton( Window* pParent, WinBits nStyle ) :
|
|
|
|
PushButton( WINDOW_HELPBUTTON )
|
|
|
|
{
|
|
|
|
ImplInit( pParent, nStyle );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
HelpButton::HelpButton( Window* pParent, const ResId& rResId ) :
|
|
|
|
PushButton( WINDOW_HELPBUTTON )
|
|
|
|
{
|
|
|
|
rResId.SetRT( RSC_HELPBUTTON );
|
|
|
|
WinBits nStyle = ImplInitRes( rResId );
|
2012-08-20 09:59:16 +01:00
|
|
|
|
|
|
|
if (VclBuilderContainer::replace_buildable(pParent, rResId, *this))
|
|
|
|
return;
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
ImplInit( pParent, nStyle );
|
|
|
|
ImplLoadRes( rResId );
|
|
|
|
|
|
|
|
if ( !(nStyle & WB_HIDE) )
|
|
|
|
Show();
|
|
|
|
}
|
|
|
|
|
2012-06-01 13:40:01 +01:00
|
|
|
void HelpButton::take_properties(Window &rOther)
|
|
|
|
{
|
|
|
|
if (!GetParent())
|
|
|
|
ImplInit(rOther.GetParent(), rOther.GetStyle());
|
|
|
|
PushButton::take_properties(rOther);
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void HelpButton::Click()
|
|
|
|
{
|
2012-07-01 21:10:41 +02:00
|
|
|
// trigger help if no link set
|
2001-11-27 08:54:45 +00:00
|
|
|
if ( !GetClickHdl() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
Window* pFocusWin = Application::GetFocusWindow();
|
|
|
|
if ( !pFocusWin )
|
|
|
|
pFocusWin = this;
|
|
|
|
|
|
|
|
HelpEvent aEvt( pFocusWin->GetPointerPosPixel(), HELPMODE_CONTEXT );
|
|
|
|
pFocusWin->RequestHelp( aEvt );
|
|
|
|
}
|
2001-11-02 09:36:06 +00:00
|
|
|
PushButton::Click();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// =======================================================================
|
|
|
|
|
2006-06-19 18:15:23 +00:00
|
|
|
void RadioButton::ImplInitRadioButtonData()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
mbChecked = sal_False;
|
|
|
|
mbSaveValue = sal_False;
|
|
|
|
mbRadioCheck = sal_True;
|
|
|
|
mbStateChanged = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void RadioButton::ImplInit( Window* pParent, WinBits nStyle )
|
|
|
|
{
|
|
|
|
nStyle = ImplInitStyle( pParent->GetWindow( WINDOW_LASTCHILD ), nStyle );
|
|
|
|
Button::ImplInit( pParent, nStyle, NULL );
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
ImplInitSettings( sal_True, sal_True, sal_True );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
WinBits RadioButton::ImplInitStyle( const Window* pPrevWindow, WinBits nStyle )
|
|
|
|
{
|
|
|
|
if ( !(nStyle & WB_NOGROUP) &&
|
|
|
|
(!pPrevWindow || (pPrevWindow->GetType() != WINDOW_RADIOBUTTON)) )
|
|
|
|
nStyle |= WB_GROUP;
|
|
|
|
if ( !(nStyle & WB_NOTABSTOP) )
|
|
|
|
{
|
|
|
|
if ( IsChecked() )
|
|
|
|
nStyle |= WB_TABSTOP;
|
|
|
|
else
|
|
|
|
nStyle &= ~WB_TABSTOP;
|
|
|
|
}
|
|
|
|
return nStyle;
|
|
|
|
}
|
|
|
|
|
2009-09-14 12:09:22 +00:00
|
|
|
// -----------------------------------------------------------------
|
|
|
|
|
|
|
|
const Font& RadioButton::GetCanonicalFont( const StyleSettings& _rStyle ) const
|
|
|
|
{
|
|
|
|
return _rStyle.GetRadioCheckFont();
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------
|
|
|
|
const Color& RadioButton::GetCanonicalTextColor( const StyleSettings& _rStyle ) const
|
|
|
|
{
|
|
|
|
return _rStyle.GetRadioCheckTextColor();
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void RadioButton::ImplInitSettings( sal_Bool bFont,
|
|
|
|
sal_Bool bForeground, sal_Bool bBackground )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2009-09-14 12:09:22 +00:00
|
|
|
Button::ImplInitSettings( bFont, bForeground );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( bBackground )
|
|
|
|
{
|
|
|
|
Window* pParent = GetParent();
|
2005-01-31 08:17:00 +00:00
|
|
|
if ( !IsControlBackground() &&
|
|
|
|
(pParent->IsChildTransparentModeEnabled() || IsNativeControlSupported( CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL ) ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
EnableChildTransparentMode( sal_True );
|
2000-09-18 16:07:07 +00:00
|
|
|
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
|
2010-09-29 15:46:40 +08:00
|
|
|
SetPaintTransparent( sal_True );
|
2000-09-18 16:07:07 +00:00
|
|
|
SetBackground();
|
2007-07-05 07:38:41 +00:00
|
|
|
if( IsNativeControlSupported( CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL ) )
|
|
|
|
mpWindowImpl->mbUseNativeFocus = ImplGetSVData()->maNWFData.mbNoFocusRects;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
EnableChildTransparentMode( sal_False );
|
2000-09-18 16:07:07 +00:00
|
|
|
SetParentClipMode( 0 );
|
2010-09-29 15:46:40 +08:00
|
|
|
SetPaintTransparent( sal_False );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( IsControlBackground() )
|
|
|
|
SetBackground( GetControlBackground() );
|
|
|
|
else
|
|
|
|
SetBackground( pParent->GetBackground() );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-04-17 16:55:28 +00:00
|
|
|
void RadioButton::DrawRadioButtonState( )
|
|
|
|
{
|
|
|
|
ImplDrawRadioButtonState( );
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2008-03-05 16:07:33 +00:00
|
|
|
void RadioButton::ImplInvalidateOrDrawRadioButtonState()
|
|
|
|
{
|
|
|
|
if( ImplGetSVData()->maNWFData.mbCheckBoxNeedsErase )
|
|
|
|
{
|
|
|
|
if ( IsNativeControlSupported(CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL) )
|
|
|
|
{
|
|
|
|
Invalidate();
|
|
|
|
Update();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ImplDrawRadioButtonState();
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
void RadioButton::ImplDrawRadioButtonState()
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool bNativeOK = sal_False;
|
2004-05-10 14:45:59 +00:00
|
|
|
|
|
|
|
// no native drawing for image radio buttons
|
2010-09-29 15:46:40 +08:00
|
|
|
if ( !maImage && (bNativeOK=IsNativeControlSupported(CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL)) == sal_True )
|
2004-05-10 14:45:59 +00:00
|
|
|
{
|
2010-07-05 11:20:24 +02:00
|
|
|
ImplControlValue aControlValue( mbChecked ? BUTTONVALUE_ON : BUTTONVALUE_OFF );
|
2004-05-10 14:45:59 +00:00
|
|
|
Rectangle aCtrlRect( maStateRect.TopLeft(), maStateRect.GetSize() );
|
|
|
|
ControlState nState = 0;
|
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED ) nState |= CTRL_STATE_PRESSED;
|
2004-05-10 14:45:59 +00:00
|
|
|
if ( HasFocus() ) nState |= CTRL_STATE_FOCUSED;
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( ImplGetButtonState() & BUTTON_DRAW_DEFAULT ) nState |= CTRL_STATE_DEFAULT;
|
2004-05-10 14:45:59 +00:00
|
|
|
if ( IsEnabled() ) nState |= CTRL_STATE_ENABLED;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-05-10 14:45:59 +00:00
|
|
|
if ( IsMouseOver() && maMouseRect.IsInside( GetPointerPosPixel() ) )
|
|
|
|
nState |= CTRL_STATE_ROLLOVER;
|
|
|
|
|
2010-07-05 11:20:24 +02:00
|
|
|
bNativeOK = DrawNativeControl( CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL, aCtrlRect, nState,
|
2004-05-10 14:45:59 +00:00
|
|
|
aControlValue,rtl::OUString() );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
if ( bNativeOK == sal_False )
|
2004-05-10 14:45:59 +00:00
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
// kein Image-RadioButton
|
|
|
|
if ( !maImage )
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 nStyle = ImplGetButtonState();
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( !IsEnabled() )
|
|
|
|
nStyle |= BUTTON_DRAW_DISABLED;
|
|
|
|
if ( mbChecked )
|
|
|
|
nStyle |= BUTTON_DRAW_CHECKED;
|
|
|
|
Image aImage = GetRadioImage( GetSettings(), nStyle );
|
|
|
|
if ( IsZoom() )
|
|
|
|
DrawImage( maStateRect.TopLeft(), maStateRect.GetSize(), aImage );
|
|
|
|
else
|
|
|
|
DrawImage( maStateRect.TopLeft(), aImage );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
HideFocus();
|
|
|
|
|
|
|
|
DecorationView aDecoView( this );
|
|
|
|
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
|
|
|
|
Rectangle aImageRect = maStateRect;
|
|
|
|
Size aImageSize = maImage.GetSizePixel();
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool bEnabled = IsEnabled();
|
Merge commit 'ooo/DEV300_m101' into intm101
The following builds for me:
basebmp, basegfx, comphelper, dtrans, i18npool, i18nutil, l10ntools, o3tl,
psprint_config, regexp, rsc, sax, sot, tools, ucbhelper, unotools, vcl
The rest still needs fixing ;-)
Conflicts:
canvas/prj/build.lst
canvas/source/cairo/cairo_textlayout.cxx
canvas/source/directx/dx_winstuff.hxx
canvas/source/tools/image.cxx
canvas/source/vcl/canvashelper.cxx
comphelper/inc/comphelper/documentconstants.hxx
comphelper/inc/comphelper/optionalvalue.hxx
comphelper/inc/comphelper/querydeep.hxx
comphelper/prj/build.lst
comphelper/qa/complex/makefile.mk
comphelper/qa/string/test_string_noadditional.cxx
comphelper/source/misc/componentmodule.cxx
comphelper/source/misc/mimeconfighelper.cxx
comphelper/source/misc/querydeep.cxx
comphelper/source/misc/uieventslogger.cxx
comphelper/source/property/TypeGeneration.cxx
comphelper/test/uno_iterators/uno_iterators.cxx
comphelper/util/makefile.mk
cppcanvas/source/mtfrenderer/implrenderer.cxx
dtrans/prj/build.lst
dtrans/source/generic/dtrans.cxx
dtrans/source/win32/dtobj/FmtFilter.cxx
i18npool/prj/build.lst
i18npool/source/localedata/data/localedata_others.map
i18npool/source/localedata/data/makefile.mk
i18npool/source/localedata/localedata.cxx
i18npool/source/localedata/saxparser.cxx
i18npool/source/registerservices/registerservices.cxx
i18npool/source/search/textsearch.cxx
l10ntools/inc/cfgmerge.hxx
l10ntools/inc/export.hxx
l10ntools/inc/gsicheck.hxx
l10ntools/inc/l10ntools/vosapp.hxx
l10ntools/inc/tagtest.hxx
l10ntools/inc/xmlparse.hxx
l10ntools/layout/layoutparse.cxx
l10ntools/layout/tralay.cxx
l10ntools/source/cfgmerge.cxx
l10ntools/source/export.cxx
l10ntools/source/export2.cxx
l10ntools/source/gsicheck.cxx
l10ntools/source/help/HelpLinker.cxx
l10ntools/source/lngex.cxx
l10ntools/source/lngmerge.cxx
l10ntools/source/merge.cxx
l10ntools/source/tagtest.cxx
l10ntools/source/xmlparse.cxx
padmin/source/fontentry.cxx
padmin/source/padialog.cxx
padmin/source/padialog.src
padmin/source/pamain.cxx
rsc/inc/rscarray.hxx
rsc/inc/rscclass.hxx
rsc/inc/rscclobj.hxx
rsc/inc/rsccont.hxx
rsc/inc/rscdb.hxx
rsc/inc/rscdef.hxx
rsc/inc/rscmgr.hxx
rsc/inc/rscrange.hxx
rsc/inc/rsctop.hxx
rsc/inc/vclrsc.hxx
rsc/source/parser/rscdb.cxx
rsc/source/parser/rscicpx.cxx
rsc/source/parser/rscinit.cxx
rsc/source/prj/start.cxx
rsc/source/res/rscarray.cxx
rsc/source/res/rscclass.cxx
rsc/source/res/rscclobj.cxx
rsc/source/res/rsccont.cxx
rsc/source/res/rscmgr.cxx
rsc/source/res/rscrange.cxx
rsc/source/res/rsctop.cxx
rsc/source/rsc/rsc.cxx
rsc/source/tools/rscdef.cxx
rsc/source/tools/rsctools.cxx
sax/source/expatwrap/sax_expat.cxx
sax/source/fastparser/facreg.cxx
sax/source/tools/fastserializer.cxx
sot/inc/sot/filelist.hxx
sot/inc/sot/object.hxx
sot/source/base/factory.cxx
sot/source/base/filelist.cxx
sot/source/sdstor/stg.cxx
sot/source/sdstor/stgcache.cxx
sot/source/sdstor/stgole.cxx
sot/source/sdstor/stgstrms.cxx
sot/source/sdstor/storage.cxx
sot/source/sdstor/ucbstorage.cxx
svl/inc/svl/cenumitm.hxx
svl/inc/svl/cintitem.hxx
svl/inc/svl/cntwall.hxx
svl/inc/svl/ctypeitm.hxx
svl/inc/svl/custritm.hxx
svl/inc/svl/dateitem.hxx
svl/inc/svl/filerec.hxx
svl/inc/svl/globalnameitem.hxx
svl/inc/svl/ilstitem.hxx
svl/inc/svl/imageitm.hxx
svl/inc/svl/intitem.hxx
svl/inc/svl/itempool.hxx
svl/inc/svl/itemset.hxx
svl/inc/svl/lckbitem.hxx
svl/inc/svl/poolitem.hxx
svl/inc/svl/ptitem.hxx
svl/inc/svl/rectitem.hxx
svl/inc/svl/sfontitm.hxx
svl/inc/svl/slstitm.hxx
svl/inc/svl/srchitem.hxx
svl/inc/svl/svarray.hxx
svl/inc/svl/svdde.hxx
svl/inc/svl/svstdarr.hxx
svl/inc/svl/szitem.hxx
svl/inc/svl/visitem.hxx
svl/inc/svl/zforlist.hxx
svl/inc/svl/zformat.hxx
svl/prj/build.lst
svl/qa/complex/ConfigItems/helper/ConfigItemTest.cxx
svl/qa/complex/ConfigItems/helper/makefile.mk
svl/qa/makefile.mk
svl/source/filepicker/pickerhelper.cxx
svl/source/filerec/filerec.cxx
svl/source/items/cenumitm.cxx
svl/source/items/cintitem.cxx
svl/source/items/cntwall.cxx
svl/source/items/ctypeitm.cxx
svl/source/items/custritm.cxx
svl/source/items/dateitem.cxx
svl/source/items/globalnameitem.cxx
svl/source/items/ilstitem.cxx
svl/source/items/imageitm.cxx
svl/source/items/intitem.cxx
svl/source/items/itempool.cxx
svl/source/items/itemprop.cxx
svl/source/items/itemset.cxx
svl/source/items/lckbitem.cxx
svl/source/items/poolio.cxx
svl/source/items/poolitem.cxx
svl/source/items/ptitem.cxx
svl/source/items/rectitem.cxx
svl/source/items/slstitm.cxx
svl/source/items/srchitem.cxx
svl/source/items/style.cxx
svl/source/items/szitem.cxx
svl/source/items/visitem.cxx
svl/source/items/whiter.cxx
svl/source/memtools/svarray.cxx
svl/source/misc/PasswordHelper.cxx
svl/source/misc/adrparse.cxx
svl/source/misc/lngmisc.cxx
svl/source/notify/brdcst.cxx
svl/source/notify/listener.cxx
svl/source/notify/listenerbase.cxx
svl/source/numbers/makefile.mk
svl/source/numbers/nbdll.cxx
svl/source/numbers/zforfind.cxx
svl/source/numbers/zforlist.cxx
svl/source/numbers/zformat.cxx
svl/source/numbers/zforscan.cxx
svl/source/passwordcontainer/passwordcontainer.cxx
svl/source/svdde/ddecli.cxx
svl/source/svdde/ddeimp.hxx
svl/source/svdde/ddemlos2.h
svl/source/svdde/ddesvr.cxx
svl/source/undo/undo.cxx
svl/source/uno/registerservices.cxx
svl/util/makefile.mk
svtools/bmpmaker/bmpsum.cxx
svtools/bmpmaker/g2g.cxx
svtools/bmpmaker/makefile.mk
svtools/inc/borderhelper.hxx
svtools/inc/svtools/accessiblefactory.hxx
svtools/inc/svtools/apearcfg.hxx
svtools/inc/svtools/brwbox.hxx
svtools/inc/svtools/ctrlbox.hxx
svtools/inc/svtools/ctrltool.hxx
svtools/inc/svtools/editbrowsebox.hxx
svtools/inc/svtools/ehdl.hxx
svtools/inc/svtools/embedhlp.hxx
svtools/inc/svtools/filter.hxx
svtools/inc/svtools/ivctrl.hxx
svtools/inc/svtools/parhtml.hxx
svtools/inc/svtools/printdlg.hxx
svtools/inc/svtools/rtftoken.h
svtools/inc/svtools/ruler.hxx
svtools/inc/svtools/svicnvw.hxx
svtools/inc/svtools/svlbitm.hxx
svtools/inc/svtools/svlbox.hxx
svtools/inc/svtools/svtreebx.hxx
svtools/inc/svtools/tabbar.hxx
svtools/inc/svtools/table/abstracttablecontrol.hxx
svtools/inc/svtools/taskbar.hxx
svtools/inc/svtools/textview.hxx
svtools/inc/svtools/valueset.hxx
svtools/source/brwbox/brwbox1.cxx
svtools/source/brwbox/brwbox2.cxx
svtools/source/brwbox/datwin.cxx
svtools/source/brwbox/datwin.hxx
svtools/source/brwbox/makefile.mk
svtools/source/config/apearcfg.cxx
svtools/source/config/htmlcfg.cxx
svtools/source/config/menuoptions.cxx
svtools/source/config/miscopt.cxx
svtools/source/contnr/cont_pch.cxx
svtools/source/contnr/ctrdll.cxx
svtools/source/contnr/fileview.cxx
svtools/source/contnr/imivctl1.cxx
svtools/source/contnr/ivctrl.cxx
svtools/source/contnr/makefile.mk
svtools/source/contnr/svcontnr.src
svtools/source/contnr/svicnvw.cxx
svtools/source/contnr/svimpbox.cxx
svtools/source/contnr/svimpicn.cxx
svtools/source/contnr/svlbitm.cxx
svtools/source/contnr/svtreebx.cxx
svtools/source/contnr/templwin.cxx
svtools/source/contnr/templwin.hxx
svtools/source/control/asynclink.cxx
svtools/source/control/ctrlbox.cxx
svtools/source/control/ctrldll.cxx
svtools/source/control/ctrltool.cxx
svtools/source/control/filectrl.cxx
svtools/source/control/filectrl.src
svtools/source/control/headbar.cxx
svtools/source/control/inettbc.cxx
svtools/source/control/makefile.mk
svtools/source/control/prgsbar.cxx
svtools/source/control/roadmap.cxx
svtools/source/control/ruler.cxx
svtools/source/control/scriptedtext.cxx
svtools/source/control/stdmenu.cxx
svtools/source/control/tabbar.cxx
svtools/source/control/taskbar.cxx
svtools/source/control/taskbox.cxx
svtools/source/control/taskmisc.cxx
svtools/source/control/taskstat.cxx
svtools/source/control/valueacc.cxx
svtools/source/control/valueset.cxx
svtools/source/dialogs/addresstemplate.cxx
svtools/source/dialogs/addresstemplate.src
svtools/source/dialogs/colrdlg.src
svtools/source/dialogs/filedlg2.cxx
svtools/source/dialogs/filedlg2.hxx
svtools/source/dialogs/makefile.mk
svtools/source/dialogs/printdlg.cxx
svtools/source/dialogs/printdlg.src
svtools/source/dialogs/propctrl.cxx
svtools/source/dialogs/propctrl.hxx
svtools/source/dialogs/property.cxx
svtools/source/edit/makefile.mk
svtools/source/edit/sychconv.cxx
svtools/source/edit/syntaxhighlight.cxx
svtools/source/edit/textdoc.cxx
svtools/source/edit/texteng.cxx
svtools/source/edit/textundo.cxx
svtools/source/edit/textview.cxx
svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx
svtools/source/filter.vcl/filter/dlgejpg.cxx
svtools/source/filter.vcl/filter/dlgejpg.hxx
svtools/source/filter.vcl/filter/dlgejpg.src
svtools/source/filter.vcl/filter/dlgepng.cxx
svtools/source/filter.vcl/filter/dlgepng.hxx
svtools/source/filter.vcl/filter/dlgepng.src
svtools/source/filter.vcl/filter/dlgexpor.cxx
svtools/source/filter.vcl/filter/dlgexpor.hxx
svtools/source/filter.vcl/filter/dlgexpor.src
svtools/source/filter.vcl/filter/filter2.cxx
svtools/source/filter.vcl/filter/makefile.mk
svtools/source/filter.vcl/filter/sgfbram.cxx
svtools/source/filter.vcl/filter/sgvmain.cxx
svtools/source/filter.vcl/filter/sgvspln.cxx
svtools/source/filter.vcl/filter/strings.src
svtools/source/filter.vcl/jpeg/makefile.mk
svtools/source/filter.vcl/wmf/emfwr.cxx
svtools/source/filter.vcl/wmf/emfwr.hxx
svtools/source/filter.vcl/wmf/enhwmf.cxx
svtools/source/filter.vcl/wmf/winmtf.hxx
svtools/source/filter.vcl/wmf/wmfwr.cxx
svtools/source/filter.vcl/wmf/wmfwr.hxx
svtools/source/graphic/grfcache.cxx
svtools/source/graphic/grfcache.hxx
svtools/source/graphic/grfmgr.cxx
svtools/source/graphic/makefile.mk
svtools/source/inc/accessibletableimp.hxx
svtools/source/inc/svimpbox.hxx
svtools/source/java/patchjavaerror.src
svtools/source/misc/ehdl.cxx
svtools/source/misc/errtxt.src
svtools/source/misc/helpagentwindow.cxx
svtools/source/misc/imagemgr.cxx
svtools/source/misc/imagemgr.src
svtools/source/misc/imageresourceaccess.cxx
svtools/source/misc/imap.cxx
svtools/source/misc/langtab.src
svtools/source/misc/makefile.mk
svtools/source/misc/svtdata.cxx
svtools/source/misc/templatefoldercache.cxx
svtools/source/misc/transfer2.cxx
svtools/source/misc/undo.src
svtools/source/plugapp/commtest.cxx
svtools/source/plugapp/commtest.src
svtools/source/plugapp/makefile.mk
svtools/source/plugapp/testtool.src
svtools/source/productregistration/productregistration.cxx
svtools/source/svhtml/htmlkywd.cxx
svtools/source/svhtml/parhtml.cxx
svtools/source/svrtf/rtfkey2.cxx
svtools/source/svrtf/rtfkeywd.cxx
svtools/source/table/defaultinputhandler.cxx
svtools/source/table/makefile.mk
svtools/source/table/tablecontrol.cxx
svtools/source/table/tablecontrol_impl.cxx
svtools/source/table/tablecontrol_impl.hxx
svtools/source/table/tabledatawindow.cxx
svtools/source/table/tablegeometry.cxx
svtools/source/table/tablegeometry.hxx
svtools/source/toolpanel/makefile.mk
svtools/source/toolpanel/toolpaneldrawer.cxx
svtools/source/uno/addrtempuno.cxx
svtools/source/uno/miscservices.cxx
svtools/source/uno/svtxgridcontrol.cxx
svtools/source/uno/svtxgridcontrol.hxx
svtools/source/uno/toolboxcontroller.cxx
svtools/source/uno/treecontrolpeer.cxx
svtools/source/uno/unocontroltablemodel.cxx
svtools/source/uno/unocontroltablemodel.hxx
svtools/source/uno/unoimap.cxx
svtools/source/urlobj/inetimg.cxx
svtools/util/makefile.mk
svtools/workben/browser.cxx
svtools/workben/cui/makefile.mk
svtools/workben/makefile.mk
svtools/workben/stest.cxx
svtools/workben/toolpanel/makefile.mk
svtools/workben/urange.cxx
toolkit/inc/toolkit/awt/vclxdevice.hxx
toolkit/inc/toolkit/awt/vclxgraphics.hxx
toolkit/inc/toolkit/awt/vclxwindows.hxx
toolkit/inc/toolkit/controls/dialogcontrol.hxx
toolkit/inc/toolkit/helper/property.hxx
toolkit/inc/toolkit/helper/servicenames.hxx
toolkit/inc/toolkit/helper/throbberimpl.hxx
toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent.java
toolkit/source/awt/asynccallback.cxx
toolkit/source/awt/vclxgraphics.cxx
toolkit/source/awt/vclxtoolkit.cxx
toolkit/source/awt/vclxwindow.cxx
toolkit/source/awt/xsimpleanimation.cxx
toolkit/source/awt/xthrobber.cxx
toolkit/source/controls/dialogcontrol.cxx
toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
toolkit/source/controls/grid/defaultgriddatamodel.cxx
toolkit/source/controls/grid/gridcontrol.cxx
toolkit/source/controls/grid/initguard.hxx
toolkit/source/controls/unocontrol.cxx
toolkit/source/controls/unocontrolcontainer.cxx
toolkit/source/controls/unocontrols.cxx
toolkit/source/helper/listenermultiplexer.cxx
toolkit/source/helper/property.cxx
toolkit/source/helper/registerservices.cxx
toolkit/source/helper/servicenames.cxx
toolkit/source/helper/throbberimpl.cxx
toolkit/source/helper/tkresmgr.cxx
tools/StaticLibrary_ooopathutils.mk
tools/bootstrp/addexes/makefile.mk
tools/bootstrp/addexes2/makefile.mk
tools/bootstrp/addexes2/mkfilt.cxx
tools/bootstrp/command.cxx
tools/bootstrp/cppdep.cxx
tools/bootstrp/iserver.cxx
tools/bootstrp/makefile.mk
tools/bootstrp/mkcreate.cxx
tools/bootstrp/prj.cxx
tools/bootstrp/rscdep.cxx
tools/bootstrp/sstring.cxx
tools/inc/bootstrp/command.hxx
tools/inc/bootstrp/mkcreate.hxx
tools/inc/bootstrp/prj.hxx
tools/inc/bootstrp/sstring.hxx
tools/inc/tools/agapi.hxx
tools/inc/tools/agitem.hxx
tools/inc/tools/chapi.hxx
tools/inc/tools/download.hxx
tools/inc/tools/eacopier.hxx
tools/inc/tools/fract.hxx
tools/inc/tools/fsys.hxx
tools/inc/tools/geninfo.hxx
tools/inc/tools/globname.hxx
tools/inc/tools/inetmime.hxx
tools/inc/tools/multisel.hxx
tools/inc/tools/poly.hxx
tools/inc/tools/postsys.h
tools/inc/tools/postwin.h
tools/inc/tools/presys.h
tools/inc/tools/prewin.h
tools/inc/tools/pstm.hxx
tools/inc/tools/ref.hxx
tools/inc/tools/simplerm.hxx
tools/inc/tools/solar.h
tools/inc/tools/table.hxx
tools/inc/tools/urlkeys.hxx
tools/inc/tools/urlobj.hxx
tools/prj/build.lst
tools/prj/d.lst
tools/qa/makefile.mk
tools/source/communi/geninfo.cxx
tools/source/debug/debug.cxx
tools/source/fsys/dirent.cxx
tools/source/fsys/tdir.cxx
tools/source/fsys/unx.cxx
tools/source/fsys/urlobj.cxx
tools/source/generic/color.cxx
tools/source/generic/config.cxx
tools/source/generic/fract.cxx
tools/source/inet/inetmime.cxx
tools/source/memtools/multisel.cxx
tools/source/memtools/table.cxx
tools/source/rc/resmgr.cxx
tools/source/ref/globname.cxx
tools/source/ref/pstm.cxx
tools/source/solar/solar.c
tools/source/stream/strmos2.cxx
tools/source/stream/strmunx.cxx
tools/source/stream/strmwnt.cxx
tools/source/string/makefile.mk
tools/source/testtoolloader/testtoolloader.cxx
tools/test/makefile.mk
tools/util/makefile.mk
tools/win/inc/dll.hxx
tools/win/inc/parser.hxx
tools/win/inc/shellex.h
tools/win/inc/shutil.h
tools/win/inc/toolsdll.hxx
tools/win/inc/winshell.hxx
tools/workben/makefile.mk
ucbhelper/source/client/proxydecider.cxx
ucbhelper/workben/ucbexplorer/ucbexplorer.hrc
unotools/inc/unotools/unotunnelhelper.hxx
unotools/source/config/fltrcfg.cxx
unotools/source/config/lingucfg.cxx
unotools/source/config/misccfg.cxx
unotools/source/config/pathoptions.cxx
unotools/source/config/searchopt.cxx
unotools/source/i18n/localedatawrapper.cxx
unotools/source/ucbhelper/localfilehelper.cxx
unotools/source/ucbhelper/ucbhelper.cxx
unotools/source/ucbhelper/xtempfile.cxx
vcl/aqua/inc/salbmp.h
vcl/aqua/inc/salgdi.h
vcl/aqua/inc/salinst.h
vcl/aqua/source/app/salinst.cxx
vcl/aqua/source/gdi/aquaprintaccessoryview.mm
vcl/aqua/source/gdi/salgdi.cxx
vcl/aqua/source/gdi/salprn.cxx
vcl/aqua/source/window/salframeview.mm
vcl/aqua/source/window/salobj.cxx
vcl/inc/vcl/bitmap.hxx
vcl/inc/vcl/brdwin.hxx
vcl/inc/vcl/button.hxx
vcl/inc/vcl/cmdevt.hxx
vcl/inc/vcl/cvtgrf.hxx
vcl/inc/vcl/dialog.hxx
vcl/inc/vcl/dockwin.hxx
vcl/inc/vcl/event.hxx
vcl/inc/vcl/fixed.hxx
vcl/inc/vcl/fldunit.hxx
vcl/inc/vcl/floatwin.hxx
vcl/inc/vcl/gdimtf.hxx
vcl/inc/vcl/glyphcache.hxx
vcl/inc/vcl/graphite_adaptors.hxx
vcl/inc/vcl/graphite_features.hxx
vcl/inc/vcl/graphite_layout.hxx
vcl/inc/vcl/ilstbox.hxx
vcl/inc/vcl/image.h
vcl/inc/vcl/imgctrl.hxx
vcl/inc/vcl/impbmpconv.hxx
vcl/inc/vcl/impprn.hxx
vcl/inc/vcl/jobset.h
vcl/inc/vcl/keycodes.hxx
vcl/inc/vcl/lstbox.hxx
vcl/inc/vcl/mapunit.hxx
vcl/inc/vcl/menu.hxx
vcl/inc/vcl/msgbox.hxx
vcl/inc/vcl/outdev.hxx
vcl/inc/vcl/prndlg.hxx
vcl/inc/vcl/salatype.hxx
vcl/inc/vcl/salbmp.hxx
vcl/inc/vcl/salgdi.hxx
vcl/inc/vcl/salinst.hxx
vcl/inc/vcl/seleng.hxx
vcl/inc/vcl/settings.hxx
vcl/inc/vcl/smartid.hxx
vcl/inc/vcl/status.hxx
vcl/inc/vcl/strhelper.hxx
vcl/inc/vcl/svapp.hxx
vcl/inc/vcl/svdata.hxx
vcl/inc/vcl/syschild.hxx
vcl/inc/vcl/sysdata.hxx
vcl/inc/vcl/taskpanelist.hxx
vcl/inc/vcl/toolbox.hxx
vcl/inc/vcl/vclevent.hxx
vcl/inc/vcl/windata.hxx
vcl/inc/vcl/window.hxx
vcl/inc/vcl/wintypes.hxx
vcl/os2/source/app/salinst.cxx
vcl/os2/source/gdi/salgdi.cxx
vcl/os2/source/window/salmenu.cxx
vcl/os2/source/window/salobj.cxx
vcl/prj/build.lst
vcl/source/app/dbggui.cxx
vcl/source/app/help.cxx
vcl/source/app/idlemgr.cxx
vcl/source/app/settings.cxx
vcl/source/app/svapp.cxx
vcl/source/app/svdata.cxx
vcl/source/app/svmain.cxx
vcl/source/app/svmainhook.cxx
vcl/source/app/unohelp.cxx
vcl/source/app/vclevent.cxx
vcl/source/control/button.cxx
vcl/source/control/combobox.cxx
vcl/source/control/edit.cxx
vcl/source/control/field.cxx
vcl/source/control/fixed.cxx
vcl/source/control/ilstbox.cxx
vcl/source/control/imgctrl.cxx
vcl/source/control/makefile.mk
vcl/source/control/tabctrl.cxx
vcl/source/gdi/bitmap.cxx
vcl/source/gdi/bitmap2.cxx
vcl/source/gdi/bitmap4.cxx
vcl/source/gdi/bmpconv.cxx
vcl/source/gdi/cvtsvm.cxx
vcl/source/gdi/font.cxx
vcl/source/gdi/gdimtf.cxx
vcl/source/gdi/image.cxx
vcl/source/gdi/impimage.cxx
vcl/source/gdi/jobset.cxx
vcl/source/gdi/makefile.mk
vcl/source/gdi/metaact.cxx
vcl/source/gdi/outdev.cxx
vcl/source/gdi/outdev3.cxx
vcl/source/gdi/outdev4.cxx
vcl/source/gdi/outdevnative.cxx
vcl/source/gdi/pdfwriter.cxx
vcl/source/gdi/pdfwriter_impl.cxx
vcl/source/gdi/print3.cxx
vcl/source/gdi/salmisc.cxx
vcl/source/glyphs/gcach_ftyp.cxx
vcl/source/glyphs/gcach_ftyp.hxx
vcl/source/glyphs/glyphcache.cxx
vcl/source/glyphs/graphite_cache.cxx
vcl/source/glyphs/graphite_layout.cxx
vcl/source/glyphs/graphite_textsrc.hxx
vcl/source/helper/canvasbitmap.cxx
vcl/source/helper/smartid.cxx
vcl/source/helper/xconnection.cxx
vcl/source/src/btntext.src
vcl/source/src/images.src
vcl/source/src/print.src
vcl/source/window/accel.cxx
vcl/source/window/accmgr.cxx
vcl/source/window/brdwin.cxx
vcl/source/window/btndlg.cxx
vcl/source/window/dlgctrl.cxx
vcl/source/window/javachild.cxx
vcl/source/window/menu.cxx
vcl/source/window/msgbox.cxx
vcl/source/window/printdlg.cxx
vcl/source/window/status.cxx
vcl/source/window/syschild.cxx
vcl/source/window/toolbox.cxx
vcl/source/window/toolbox2.cxx
vcl/source/window/window.cxx
vcl/source/window/window2.cxx
vcl/source/window/wrkwin.cxx
vcl/unx/gtk/app/gtkdata.cxx
vcl/unx/gtk/app/gtkinst.cxx
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
vcl/unx/gtk/window/gtkframe.cxx
vcl/unx/gtk/window/gtkobject.cxx
vcl/unx/headless/svpbmp.hxx
vcl/unx/headless/svpgdi.cxx
vcl/unx/headless/svpgdi.hxx
vcl/unx/headless/svpinst.cxx
vcl/unx/headless/svpinst.hxx
vcl/unx/headless/svpprn.cxx
vcl/unx/headless/svpprn.hxx
vcl/unx/headless/svppspgraphics.cxx
vcl/unx/headless/svppspgraphics.hxx
vcl/unx/headless/svptext.cxx
vcl/unx/inc/dtint.hxx
vcl/unx/inc/plugins/gtk/gtkdata.hxx
vcl/unx/inc/pspgraphics.h
vcl/unx/inc/salbmp.h
vcl/unx/inc/saldata.hxx
vcl/unx/inc/saldisp.hxx
vcl/unx/inc/salgdi.h
vcl/unx/inc/salinst.h
vcl/unx/inc/xfont.hxx
vcl/unx/kde/kdedata.cxx
vcl/unx/kde4/KDESalGraphics.cxx
vcl/unx/source/app/keysymnames.cxx
vcl/unx/source/app/saldata.cxx
vcl/unx/source/app/saldisp.cxx
vcl/unx/source/app/salinst.cxx
vcl/unx/source/app/wmadaptor.cxx
vcl/unx/source/dtrans/X11_selection.cxx
vcl/unx/source/dtrans/X11_service.cxx
vcl/unx/source/gdi/makefile.mk
vcl/unx/source/gdi/pspgraphics.cxx
vcl/unx/source/gdi/salgdi.cxx
vcl/unx/source/gdi/salgdi3.cxx
vcl/unx/source/gdi/salprnpsp.cxx
vcl/unx/source/gdi/xfont.cxx
vcl/unx/source/gdi/xlfd_attr.cxx
vcl/unx/source/gdi/xlfd_attr.hxx
vcl/unx/source/gdi/xlfd_extd.cxx
vcl/unx/source/gdi/xlfd_extd.hxx
vcl/unx/source/gdi/xlfd_smpl.cxx
vcl/unx/source/gdi/xlfd_smpl.hxx
vcl/unx/source/printer/ppdparser.cxx
vcl/unx/source/printer/printerinfomanager.cxx
vcl/unx/source/window/salframe.cxx
vcl/unx/source/window/salmenu.cxx
vcl/unx/source/window/salobj.cxx
vcl/util/makefile2.pmk
vcl/win/inc/salbmp.h
vcl/win/inc/saldata.hxx
vcl/win/inc/salgdi.h
vcl/win/inc/salinst.h
vcl/win/source/app/saldata.cxx
vcl/win/source/app/salinst.cxx
vcl/win/source/gdi/salgdi.cxx
vcl/win/source/gdi/salgdi3.cxx
vcl/win/source/gdi/salprn.cxx
vcl/win/source/gdi/winlayout.cxx
vcl/win/source/window/salframe.cxx
vcl/win/source/window/salobj.cxx
vcl/workben/outdevgrind.cxx
vos/inc/vos/execabl.hxx
vos/inc/vos/macros.hxx
vos/inc/vos/pipe.hxx
vos/inc/vos/process.hxx
vos/inc/vos/refernce.hxx
vos/inc/vos/signal.hxx
vos/inc/vos/socket.hxx
vos/inc/vos/stream.hxx
vos/inc/vos/thread.hxx
vos/source/pipe.cxx
vos/source/process.cxx
vos/source/signal.cxx
vos/source/thread.cxx
vos/source/timer.cxx
2011-03-11 14:24:23 +01:00
|
|
|
sal_uInt16 nButtonStyle = FRAME_DRAW_DOUBLEIN;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
aImageSize.Width() = CalcZoom( aImageSize.Width() );
|
|
|
|
aImageSize.Height() = CalcZoom( aImageSize.Height() );
|
|
|
|
|
2012-07-01 21:10:41 +02:00
|
|
|
// display border and selection status
|
2006-06-19 18:15:23 +00:00
|
|
|
aImageRect = aDecoView.DrawFrame( aImageRect, nButtonStyle );
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( (ImplGetButtonState() & BUTTON_DRAW_PRESSED) || !bEnabled )
|
2000-09-18 16:07:07 +00:00
|
|
|
SetFillColor( rStyleSettings.GetFaceColor() );
|
|
|
|
else
|
|
|
|
SetFillColor( rStyleSettings.GetFieldColor() );
|
|
|
|
SetLineColor();
|
|
|
|
DrawRect( aImageRect );
|
|
|
|
|
2012-07-01 21:10:41 +02:00
|
|
|
// display image
|
2006-06-19 18:15:23 +00:00
|
|
|
nButtonStyle = 0;
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( !bEnabled )
|
2006-06-19 18:15:23 +00:00
|
|
|
nButtonStyle |= IMAGE_DRAW_DISABLE;
|
2002-04-18 07:11:17 +00:00
|
|
|
|
|
|
|
Image *pImage = &maImage;
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
Point aImagePos( aImageRect.TopLeft() );
|
|
|
|
aImagePos.X() += (aImageRect.GetWidth()-aImageSize.Width())/2;
|
|
|
|
aImagePos.Y() += (aImageRect.GetHeight()-aImageSize.Height())/2;
|
|
|
|
if ( IsZoom() )
|
2006-06-19 18:15:23 +00:00
|
|
|
DrawImage( aImagePos, aImageSize, *pImage, nButtonStyle );
|
2000-09-18 16:07:07 +00:00
|
|
|
else
|
2006-06-19 18:15:23 +00:00
|
|
|
DrawImage( aImagePos, *pImage, nButtonStyle );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
aImageRect.Left()++;
|
|
|
|
aImageRect.Top()++;
|
|
|
|
aImageRect.Right()--;
|
|
|
|
aImageRect.Bottom()--;
|
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplSetFocusRect( aImageRect );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( mbChecked )
|
|
|
|
{
|
|
|
|
SetLineColor( rStyleSettings.GetHighlightColor() );
|
|
|
|
SetFillColor();
|
|
|
|
if ( (aImageSize.Width() >= 20) || (aImageSize.Height() >= 20) )
|
|
|
|
{
|
|
|
|
aImageRect.Left()++;
|
|
|
|
aImageRect.Top()++;
|
|
|
|
aImageRect.Right()--;
|
|
|
|
aImageRect.Bottom()--;
|
|
|
|
}
|
|
|
|
DrawRect( aImageRect );
|
|
|
|
aImageRect.Left()++;
|
|
|
|
aImageRect.Top()++;
|
|
|
|
aImageRect.Right()--;
|
|
|
|
aImageRect.Bottom()--;
|
|
|
|
DrawRect( aImageRect );
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( HasFocus() )
|
2004-07-05 14:41:27 +00:00
|
|
|
ShowFocus( ImplGetFocusRect() );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
2004-05-10 14:45:59 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2011-01-12 15:07:10 +01:00
|
|
|
void RadioButton::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
|
2000-09-18 16:07:07 +00:00
|
|
|
const Point& rPos, const Size& rSize,
|
2009-09-25 12:26:30 +00:00
|
|
|
const Size& rImageSize, Rectangle& rStateRect,
|
|
|
|
Rectangle& rMouseRect, bool bLayout )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
WinBits nWinStyle = GetStyle();
|
|
|
|
XubString aText( GetText() );
|
|
|
|
Rectangle aRect( rPos, rSize );
|
2009-09-14 12:09:22 +00:00
|
|
|
MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
|
|
|
|
String* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-03-29 10:25:02 +00:00
|
|
|
pDev->Push( PUSH_CLIPREGION );
|
|
|
|
pDev->IntersectClipRegion( Rectangle( rPos, rSize ) );
|
|
|
|
|
2012-07-01 21:10:41 +02:00
|
|
|
// no image radio button
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( !maImage )
|
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( ( aText.Len() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) ) ||
|
|
|
|
( HasImage() && ! (ImplGetButtonState() & BUTTON_DRAW_NOIMAGE) ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 nTextStyle = Button::ImplGetTextStyle( aText, nWinStyle, nDrawFlags );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2009-09-25 12:26:30 +00:00
|
|
|
const long nImageSep = GetDrawPixel( pDev, ImplGetImageToTextDistance() );
|
2004-07-05 14:41:27 +00:00
|
|
|
Size aSize( rSize );
|
|
|
|
Point aPos( rPos );
|
|
|
|
aPos.X() += rImageSize.Width() + nImageSep;
|
|
|
|
aSize.Width() -= rImageSize.Width() + nImageSep;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2008-03-05 16:07:33 +00:00
|
|
|
// if the text rect height is smaller than the height of the image
|
|
|
|
// then for single lines the default should be centered text
|
2008-08-18 12:05:04 +00:00
|
|
|
if( (nWinStyle & (WB_TOP|WB_VCENTER|WB_BOTTOM)) == 0 &&
|
2008-03-05 16:07:33 +00:00
|
|
|
(rImageSize.Height() > rSize.Height() || ! (nWinStyle & WB_WORDBREAK) ) )
|
|
|
|
{
|
|
|
|
nTextStyle &= ~(TEXT_DRAW_TOP|TEXT_DRAW_BOTTOM);
|
|
|
|
nTextStyle |= TEXT_DRAW_VCENTER;
|
|
|
|
aSize.Height() = rImageSize.Height();
|
|
|
|
}
|
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplDrawAlignedImage( pDev, aPos, aSize, bLayout, 1,
|
|
|
|
nDrawFlags, nTextStyle, NULL );
|
|
|
|
|
|
|
|
rMouseRect = Rectangle( aPos, aSize );
|
2000-09-18 16:07:07 +00:00
|
|
|
rMouseRect.Left() = rPos.X();
|
2004-07-05 14:41:27 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
rStateRect.Left() = rPos.X();
|
|
|
|
rStateRect.Top() = rMouseRect.Top();
|
2004-07-05 14:41:27 +00:00
|
|
|
|
|
|
|
if ( aSize.Height() > rImageSize.Height() )
|
|
|
|
rStateRect.Top() += ( aSize.Height() - rImageSize.Height() ) / 2;
|
2008-03-05 16:07:33 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
rStateRect.Top() -= ( rImageSize.Height() - aSize.Height() ) / 2;
|
|
|
|
if( rStateRect.Top() < 0 )
|
|
|
|
rStateRect.Top() = 0;
|
|
|
|
}
|
2004-07-05 14:41:27 +00:00
|
|
|
|
|
|
|
rStateRect.Right() = rStateRect.Left() + rImageSize.Width()-1;
|
|
|
|
rStateRect.Bottom() = rStateRect.Top() + rImageSize.Height()-1;
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( rStateRect.Bottom() > rMouseRect.Bottom() )
|
|
|
|
rMouseRect.Bottom() = rStateRect.Bottom();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-08-01 17:01:44 +01:00
|
|
|
if ( mbLegacyNoTextAlign && ( nWinStyle & WB_CENTER ) )
|
2012-07-31 20:42:04 +01:00
|
|
|
rStateRect.Left() = rPos.X()+((rSize.Width()-rImageSize.Width())/2);
|
2012-08-01 17:01:44 +01:00
|
|
|
else if ( mbLegacyNoTextAlign && ( nWinStyle & WB_RIGHT ) )
|
2012-07-31 20:42:04 +01:00
|
|
|
rStateRect.Left() = rPos.X()+rSize.Width()-rImageSize.Width(); //-1;
|
|
|
|
else
|
|
|
|
rStateRect.Left() = rPos.X(); //+1;
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( nWinStyle & WB_VCENTER )
|
|
|
|
rStateRect.Top() = rPos.Y()+((rSize.Height()-rImageSize.Height())/2);
|
|
|
|
else if ( nWinStyle & WB_BOTTOM )
|
|
|
|
rStateRect.Top() = rPos.Y()+rSize.Height()-rImageSize.Height(); //-1;
|
|
|
|
else
|
|
|
|
rStateRect.Top() = rPos.Y(); //+1;
|
|
|
|
rStateRect.Right() = rStateRect.Left()+rImageSize.Width()-1;
|
|
|
|
rStateRect.Bottom() = rStateRect.Top()+rImageSize.Height()-1;
|
|
|
|
rMouseRect = rStateRect;
|
2004-07-05 14:41:27 +00:00
|
|
|
|
|
|
|
ImplSetFocusRect( rStateRect );
|
|
|
|
|
2012-07-01 21:10:41 +02:00
|
|
|
/* and above -1 because CalcSize() does not include focus-rectangle since images would be even
|
|
|
|
positioned higher in writer
|
2000-09-18 16:07:07 +00:00
|
|
|
rFocusRect = rStateRect;
|
|
|
|
rFocusRect.Left()--;
|
|
|
|
rFocusRect.Top()--;
|
|
|
|
rFocusRect.Right()++;
|
|
|
|
rFocusRect.Bottom()++;
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool bTopImage = (nWinStyle & WB_TOP) != 0;
|
2000-09-18 16:07:07 +00:00
|
|
|
Size aImageSize = maImage.GetSizePixel();
|
|
|
|
Rectangle aImageRect( rPos, rSize );
|
|
|
|
long nTextHeight = pDev->GetTextHeight();
|
|
|
|
long nTextWidth = pDev->GetCtrlTextWidth( aText );
|
|
|
|
|
2012-07-01 21:10:41 +02:00
|
|
|
// calculate position and sizes
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( aText.Len() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
Size aTmpSize( (aImageSize.Width()+8), (aImageSize.Height()+8) );
|
|
|
|
if ( bTopImage )
|
|
|
|
{
|
|
|
|
aImageRect.Left() = (rSize.Width()-aTmpSize.Width())/2;
|
|
|
|
aImageRect.Top() = (rSize.Height()-(aTmpSize.Height()+nTextHeight+6))/2;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
aImageRect.Top() = (rSize.Height()-aTmpSize.Height())/2;
|
|
|
|
|
|
|
|
aImageRect.Right() = aImageRect.Left()+aTmpSize.Width();
|
|
|
|
aImageRect.Bottom() = aImageRect.Top()+aTmpSize.Height();
|
|
|
|
|
2012-07-01 21:10:41 +02:00
|
|
|
// display text
|
2000-09-18 16:07:07 +00:00
|
|
|
Point aTxtPos = rPos;
|
|
|
|
if ( bTopImage )
|
|
|
|
{
|
|
|
|
aTxtPos.X() += (rSize.Width()-nTextWidth)/2;
|
|
|
|
aTxtPos.Y() += aImageRect.Bottom()+6;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
aTxtPos.X() += aImageRect.Right()+8;
|
|
|
|
aTxtPos.Y() += (rSize.Height()-nTextHeight)/2;
|
|
|
|
}
|
2002-04-29 16:46:18 +00:00
|
|
|
pDev->DrawCtrlText( aTxtPos, aText, 0, STRING_LEN, TEXT_DRAW_MNEMONIC, pVector, pDisplayText );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
rMouseRect = aImageRect;
|
|
|
|
rStateRect = aImageRect;
|
|
|
|
}
|
2006-03-29 10:25:02 +00:00
|
|
|
|
|
|
|
pDev->Pop();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2002-04-29 16:46:18 +00:00
|
|
|
void RadioButton::ImplDrawRadioButton( bool bLayout )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2002-04-29 16:46:18 +00:00
|
|
|
if( !bLayout )
|
|
|
|
HideFocus();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
Size aImageSize;
|
|
|
|
if ( !maImage )
|
2005-03-18 16:51:14 +00:00
|
|
|
aImageSize = ImplGetRadioImageSize();
|
2000-09-18 16:07:07 +00:00
|
|
|
else
|
|
|
|
aImageSize = maImage.GetSizePixel();
|
|
|
|
aImageSize.Width() = CalcZoom( aImageSize.Width() );
|
|
|
|
aImageSize.Height() = CalcZoom( aImageSize.Height() );
|
|
|
|
|
2004-05-10 14:45:59 +00:00
|
|
|
// Draw control text
|
2000-09-18 16:07:07 +00:00
|
|
|
ImplDraw( this, 0, Point(), GetOutputSizePixel(),
|
2009-09-25 12:26:30 +00:00
|
|
|
aImageSize, maStateRect, maMouseRect, bLayout );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
if( !bLayout || (IsNativeControlSupported(CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL)==sal_True) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( !maImage && HasFocus() )
|
|
|
|
ShowFocus( ImplGetFocusRect() );
|
|
|
|
|
2002-04-29 16:46:18 +00:00
|
|
|
ImplDrawRadioButtonState();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-04-30 10:19:19 +01:00
|
|
|
void RadioButton::group(RadioButton &rOther)
|
|
|
|
{
|
|
|
|
if (!m_xGroup)
|
|
|
|
{
|
|
|
|
m_xGroup.reset(new std::set<RadioButton*>);
|
|
|
|
m_xGroup->insert(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (rOther.m_xGroup)
|
2012-05-22 13:58:59 +01:00
|
|
|
m_xGroup->insert(rOther.m_xGroup->begin(), rOther.m_xGroup->end());
|
2012-04-30 10:19:19 +01:00
|
|
|
|
|
|
|
m_xGroup->insert(&rOther);
|
|
|
|
|
2012-05-22 13:58:59 +01:00
|
|
|
//make all members of the group share the same button group
|
|
|
|
for (std::set<RadioButton*>::iterator aI = m_xGroup->begin(), aEnd = m_xGroup->end();
|
|
|
|
aI != aEnd; ++aI)
|
|
|
|
{
|
|
|
|
RadioButton* pButton = *aI;
|
|
|
|
pButton->m_xGroup = m_xGroup;
|
|
|
|
}
|
2012-04-30 10:19:19 +01:00
|
|
|
|
|
|
|
//if this one is checked, uncheck all the others
|
|
|
|
if (mbChecked)
|
|
|
|
ImplUncheckAllOther();
|
|
|
|
}
|
|
|
|
|
|
|
|
// .-----------------------------------------------------------------------
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2012-04-30 10:25:34 +01:00
|
|
|
std::vector< RadioButton* > RadioButton::GetRadioButtonGroup(bool bIncludeThis) const
|
2008-01-28 13:16:22 +00:00
|
|
|
{
|
2012-04-30 10:25:34 +01:00
|
|
|
std::vector< RadioButton* > aGroup;
|
2008-01-28 13:16:22 +00:00
|
|
|
|
2012-04-30 10:19:19 +01:00
|
|
|
if (m_xGroup)
|
|
|
|
{
|
|
|
|
for (std::set<RadioButton*>::iterator aI = m_xGroup->begin(), aEnd = m_xGroup->end(); aI != aEnd; ++aI)
|
|
|
|
{
|
|
|
|
RadioButton *pRadioButton = *aI;
|
2012-04-30 10:25:34 +01:00
|
|
|
if (!bIncludeThis && pRadioButton == this)
|
2012-04-30 10:19:19 +01:00
|
|
|
continue;
|
2012-04-30 10:25:34 +01:00
|
|
|
aGroup.push_back(pRadioButton);
|
2012-04-30 10:19:19 +01:00
|
|
|
}
|
2012-04-30 10:25:34 +01:00
|
|
|
return aGroup;
|
2012-04-30 10:19:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
//old-school
|
2012-04-30 10:25:34 +01:00
|
|
|
SAL_WARN("vcl", "No new-style group set on radiobutton, using old-style digging around");
|
2012-04-30 10:19:19 +01:00
|
|
|
|
2008-01-28 13:16:22 +00:00
|
|
|
// go back to first in group;
|
|
|
|
Window* pFirst = const_cast<RadioButton*>(this);
|
|
|
|
while( ( pFirst->GetStyle() & WB_GROUP ) == 0 )
|
|
|
|
{
|
|
|
|
Window* pWindow = pFirst->GetWindow( WINDOW_PREV );
|
|
|
|
if( pWindow )
|
|
|
|
pFirst = pWindow;
|
|
|
|
else
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
// insert radiobuttons up to next group
|
|
|
|
do
|
|
|
|
{
|
|
|
|
if( pFirst->GetType() == WINDOW_RADIOBUTTON )
|
|
|
|
{
|
|
|
|
if( pFirst != this || bIncludeThis )
|
2012-04-30 10:25:34 +01:00
|
|
|
aGroup.push_back( static_cast<RadioButton*>(pFirst) );
|
2008-01-28 13:16:22 +00:00
|
|
|
}
|
|
|
|
pFirst = pFirst->GetWindow( WINDOW_NEXT );
|
|
|
|
} while( pFirst && ( ( pFirst->GetStyle() & WB_GROUP ) == 0 ) );
|
2012-04-30 10:25:34 +01:00
|
|
|
|
|
|
|
return aGroup;
|
2008-01-28 13:16:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
void RadioButton::ImplUncheckAllOther()
|
|
|
|
{
|
2005-01-13 16:58:41 +00:00
|
|
|
mpWindowImpl->mnStyle |= WB_TABSTOP;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2012-04-30 10:25:34 +01:00
|
|
|
std::vector<RadioButton*> aGroup(GetRadioButtonGroup(false));
|
2012-07-01 21:10:41 +02:00
|
|
|
// iterate over radio button group and checked buttons
|
2012-04-30 08:59:54 +01:00
|
|
|
for (std::vector<RadioButton*>::iterator aI = aGroup.begin(), aEnd = aGroup.end(); aI != aEnd; ++aI)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2012-04-30 08:59:54 +01:00
|
|
|
RadioButton *pWindow = *aI;
|
|
|
|
if ( pWindow->IsChecked() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2012-04-30 08:59:54 +01:00
|
|
|
ImplDelData aDelData;
|
|
|
|
pWindow->ImplAddDel( &aDelData );
|
|
|
|
pWindow->SetState( sal_False );
|
|
|
|
if ( aDelData.IsDead() )
|
|
|
|
return;
|
|
|
|
pWindow->ImplRemoveDel( &aDelData );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2012-04-30 08:59:54 +01:00
|
|
|
// not inside if clause to always remove wrongly set WB_TABSTOPS
|
|
|
|
pWindow->mpWindowImpl->mnStyle &= ~WB_TABSTOP;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void RadioButton::ImplCallClick( sal_Bool bGrabFocus, sal_uInt16 nFocusFlags )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
mbStateChanged = !mbChecked;
|
2010-09-29 15:46:40 +08:00
|
|
|
mbChecked = sal_True;
|
2005-01-13 16:58:41 +00:00
|
|
|
mpWindowImpl->mnStyle |= WB_TABSTOP;
|
2008-03-05 16:07:33 +00:00
|
|
|
ImplInvalidateOrDrawRadioButtonState();
|
2000-09-18 16:07:07 +00:00
|
|
|
ImplDelData aDelData;
|
|
|
|
ImplAddDel( &aDelData );
|
|
|
|
if ( mbRadioCheck )
|
|
|
|
ImplUncheckAllOther();
|
2012-07-16 12:18:02 +03:00
|
|
|
if ( aDelData.IsDead() )
|
2000-09-18 16:07:07 +00:00
|
|
|
return;
|
|
|
|
if ( bGrabFocus )
|
|
|
|
ImplGrabFocus( nFocusFlags );
|
2012-07-16 12:18:02 +03:00
|
|
|
if ( aDelData.IsDead() )
|
2000-09-18 16:07:07 +00:00
|
|
|
return;
|
|
|
|
if ( mbStateChanged )
|
|
|
|
Toggle();
|
2012-07-16 12:18:02 +03:00
|
|
|
if ( aDelData.IsDead() )
|
2000-09-18 16:07:07 +00:00
|
|
|
return;
|
|
|
|
Click();
|
2012-07-16 12:18:02 +03:00
|
|
|
if ( aDelData.IsDead() )
|
2000-09-18 16:07:07 +00:00
|
|
|
return;
|
|
|
|
ImplRemoveDel( &aDelData );
|
2010-09-29 15:46:40 +08:00
|
|
|
mbStateChanged = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
RadioButton::RadioButton( Window* pParent, WinBits nStyle ) :
|
2012-08-01 17:01:44 +01:00
|
|
|
Button( WINDOW_RADIOBUTTON ), mbLegacyNoTextAlign( false )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-06-19 18:15:23 +00:00
|
|
|
ImplInitRadioButtonData();
|
2000-09-18 16:07:07 +00:00
|
|
|
ImplInit( pParent, nStyle );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
RadioButton::RadioButton( Window* pParent, const ResId& rResId ) :
|
2012-08-01 17:01:44 +01:00
|
|
|
Button( WINDOW_RADIOBUTTON ), mbLegacyNoTextAlign( false )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2012-08-20 09:59:16 +01:00
|
|
|
rResId.SetRT( RSC_RADIOBUTTON );
|
|
|
|
WinBits nStyle = ImplInitRes( rResId );
|
|
|
|
|
|
|
|
if (VclBuilderContainer::replace_buildable(pParent, rResId, *this))
|
2012-05-22 12:33:28 +01:00
|
|
|
return;
|
|
|
|
|
2006-06-19 18:15:23 +00:00
|
|
|
ImplInitRadioButtonData();
|
2000-09-18 16:07:07 +00:00
|
|
|
ImplInit( pParent, nStyle );
|
|
|
|
ImplLoadRes( rResId );
|
|
|
|
|
|
|
|
if ( !(nStyle & WB_HIDE) )
|
|
|
|
Show();
|
|
|
|
}
|
|
|
|
|
2012-06-01 13:40:01 +01:00
|
|
|
void RadioButton::take_properties(Window &rOther)
|
|
|
|
{
|
|
|
|
if (!GetParent())
|
|
|
|
{
|
|
|
|
ImplInitRadioButtonData();
|
|
|
|
ImplInit(rOther.GetParent(), rOther.GetStyle());
|
|
|
|
}
|
|
|
|
|
|
|
|
Button::take_properties(rOther);
|
|
|
|
|
|
|
|
RadioButton &rOtherRadio = static_cast<RadioButton&>(rOther);
|
|
|
|
if (rOtherRadio.m_xGroup.get())
|
|
|
|
{
|
|
|
|
rOtherRadio.m_xGroup->erase(&rOtherRadio);
|
|
|
|
rOtherRadio.m_xGroup->insert(this);
|
|
|
|
}
|
|
|
|
std::swap(m_xGroup, rOtherRadio.m_xGroup);
|
|
|
|
mbChecked = rOtherRadio.mbChecked;
|
|
|
|
mbSaveValue = rOtherRadio.mbSaveValue;
|
|
|
|
mbRadioCheck = rOtherRadio.mbRadioCheck;
|
|
|
|
mbStateChanged = rOtherRadio.mbStateChanged;
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void RadioButton::ImplLoadRes( const ResId& rResId )
|
|
|
|
{
|
|
|
|
Button::ImplLoadRes( rResId );
|
|
|
|
|
|
|
|
//anderer Wert als Default ?
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 nChecked = ReadShortRes();
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( nChecked )
|
2010-09-29 15:46:40 +08:00
|
|
|
SetState( sal_True );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
RadioButton::~RadioButton()
|
|
|
|
{
|
2012-04-30 10:19:19 +01:00
|
|
|
if (m_xGroup)
|
|
|
|
m_xGroup->erase(this);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void RadioButton::MouseButtonDown( const MouseEvent& rMEvt )
|
|
|
|
{
|
|
|
|
if ( rMEvt.IsLeft() && maMouseRect.IsInside( rMEvt.GetPosPixel() ) )
|
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() |= BUTTON_DRAW_PRESSED;
|
2008-03-05 16:07:33 +00:00
|
|
|
ImplInvalidateOrDrawRadioButtonState();
|
2000-09-18 16:07:07 +00:00
|
|
|
StartTracking();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
Button::MouseButtonDown( rMEvt );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void RadioButton::Tracking( const TrackingEvent& rTEvt )
|
|
|
|
{
|
|
|
|
if ( rTEvt.IsTrackingEnded() )
|
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if ( !(GetStyle() & WB_NOPOINTERFOCUS) && !rTEvt.IsTrackingCanceled() )
|
|
|
|
GrabFocus();
|
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() &= ~BUTTON_DRAW_PRESSED;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2012-07-01 21:10:41 +02:00
|
|
|
// do not call click handler if aborted
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( !rTEvt.IsTrackingCanceled() )
|
|
|
|
ImplCallClick();
|
|
|
|
else
|
2008-03-05 16:07:33 +00:00
|
|
|
ImplInvalidateOrDrawRadioButtonState();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if ( maMouseRect.IsInside( rTEvt.GetMouseEvent().GetPosPixel() ) )
|
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( !(ImplGetButtonState() & BUTTON_DRAW_PRESSED) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() |= BUTTON_DRAW_PRESSED;
|
2008-03-05 16:07:33 +00:00
|
|
|
ImplInvalidateOrDrawRadioButtonState();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() &= ~BUTTON_DRAW_PRESSED;
|
2008-03-05 16:07:33 +00:00
|
|
|
ImplInvalidateOrDrawRadioButtonState();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void RadioButton::KeyInput( const KeyEvent& rKEvt )
|
|
|
|
{
|
|
|
|
KeyCode aKeyCode = rKEvt.GetKeyCode();
|
|
|
|
|
|
|
|
if ( !aKeyCode.GetModifier() && (aKeyCode.GetCode() == KEY_SPACE) )
|
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( !(ImplGetButtonState() & BUTTON_DRAW_PRESSED) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() |= BUTTON_DRAW_PRESSED;
|
2008-03-05 16:07:33 +00:00
|
|
|
ImplInvalidateOrDrawRadioButtonState();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
2004-07-05 14:41:27 +00:00
|
|
|
else if ( (ImplGetButtonState() & BUTTON_DRAW_PRESSED) && (aKeyCode.GetCode() == KEY_ESCAPE) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() &= ~BUTTON_DRAW_PRESSED;
|
2008-03-05 16:07:33 +00:00
|
|
|
ImplInvalidateOrDrawRadioButtonState();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
Button::KeyInput( rKEvt );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void RadioButton::KeyUp( const KeyEvent& rKEvt )
|
|
|
|
{
|
|
|
|
KeyCode aKeyCode = rKEvt.GetKeyCode();
|
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( (ImplGetButtonState() & BUTTON_DRAW_PRESSED) && (aKeyCode.GetCode() == KEY_SPACE) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() &= ~BUTTON_DRAW_PRESSED;
|
2000-09-18 16:07:07 +00:00
|
|
|
ImplCallClick();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
Button::KeyUp( rKEvt );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2002-04-29 16:46:18 +00:00
|
|
|
void RadioButton::FillLayoutData() const
|
|
|
|
{
|
2009-09-14 12:09:22 +00:00
|
|
|
mpControlData->mpLayoutData = new vcl::ControlLayoutData();
|
2002-04-29 16:46:18 +00:00
|
|
|
const_cast<RadioButton*>(this)->ImplDrawRadioButton( true );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2006-06-19 18:15:23 +00:00
|
|
|
void RadioButton::Paint( const Rectangle& )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
ImplDrawRadioButton();
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void RadioButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
|
2011-01-12 15:07:10 +01:00
|
|
|
sal_uLong nFlags )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if ( !maImage )
|
|
|
|
{
|
|
|
|
MapMode aResMapMode( MAP_100TH_MM );
|
|
|
|
Point aPos = pDev->LogicToPixel( rPos );
|
|
|
|
Size aSize = pDev->LogicToPixel( rSize );
|
|
|
|
Size aImageSize = pDev->LogicToPixel( Size( 300, 300 ), aResMapMode );
|
|
|
|
Size aBrd1Size = pDev->LogicToPixel( Size( 20, 20 ), aResMapMode );
|
|
|
|
Size aBrd2Size = pDev->LogicToPixel( Size( 60, 60 ), aResMapMode );
|
|
|
|
Font aFont = GetDrawPixelFont( pDev );
|
|
|
|
Rectangle aStateRect;
|
|
|
|
Rectangle aMouseRect;
|
|
|
|
Rectangle aFocusRect;
|
|
|
|
|
|
|
|
aImageSize.Width() = CalcZoom( aImageSize.Width() );
|
|
|
|
aImageSize.Height() = CalcZoom( aImageSize.Height() );
|
|
|
|
aBrd1Size.Width() = CalcZoom( aBrd1Size.Width() );
|
|
|
|
aBrd1Size.Height() = CalcZoom( aBrd1Size.Height() );
|
|
|
|
aBrd2Size.Width() = CalcZoom( aBrd2Size.Width() );
|
|
|
|
aBrd2Size.Height() = CalcZoom( aBrd2Size.Height() );
|
|
|
|
|
|
|
|
if ( !aBrd1Size.Width() )
|
|
|
|
aBrd1Size.Width() = 1;
|
|
|
|
if ( !aBrd1Size.Height() )
|
|
|
|
aBrd1Size.Height() = 1;
|
|
|
|
if ( !aBrd2Size.Width() )
|
|
|
|
aBrd2Size.Width() = 1;
|
|
|
|
if ( !aBrd2Size.Height() )
|
|
|
|
aBrd2Size.Height() = 1;
|
|
|
|
|
|
|
|
pDev->Push();
|
|
|
|
pDev->SetMapMode();
|
|
|
|
pDev->SetFont( aFont );
|
|
|
|
if ( nFlags & WINDOW_DRAW_MONO )
|
|
|
|
pDev->SetTextColor( Color( COL_BLACK ) );
|
|
|
|
else
|
|
|
|
pDev->SetTextColor( GetTextColor() );
|
|
|
|
pDev->SetTextFillColor();
|
|
|
|
|
|
|
|
ImplDraw( pDev, nFlags, aPos, aSize,
|
2009-09-25 12:26:30 +00:00
|
|
|
aImageSize, aStateRect, aMouseRect );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
Point aCenterPos = aStateRect.Center();
|
|
|
|
long nRadX = aImageSize.Width()/2;
|
|
|
|
long nRadY = aImageSize.Height()/2;
|
|
|
|
|
|
|
|
pDev->SetLineColor();
|
|
|
|
pDev->SetFillColor( Color( COL_BLACK ) );
|
|
|
|
pDev->DrawPolygon( Polygon( aCenterPos, nRadX, nRadY ) );
|
|
|
|
nRadX -= aBrd1Size.Width();
|
|
|
|
nRadY -= aBrd1Size.Height();
|
|
|
|
pDev->SetFillColor( Color( COL_WHITE ) );
|
|
|
|
pDev->DrawPolygon( Polygon( aCenterPos, nRadX, nRadY ) );
|
|
|
|
if ( mbChecked )
|
|
|
|
{
|
|
|
|
nRadX -= aBrd1Size.Width();
|
|
|
|
nRadY -= aBrd1Size.Height();
|
|
|
|
if ( !nRadX )
|
|
|
|
nRadX = 1;
|
|
|
|
if ( !nRadY )
|
|
|
|
nRadY = 1;
|
|
|
|
pDev->SetFillColor( Color( COL_BLACK ) );
|
|
|
|
pDev->DrawPolygon( Polygon( aCenterPos, nRadX, nRadY ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
pDev->Pop();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2011-03-01 19:08:19 +01:00
|
|
|
OSL_FAIL( "RadioButton::Draw() - not implemented for RadioButton with Image" );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void RadioButton::Resize()
|
|
|
|
{
|
2002-05-08 15:05:42 +00:00
|
|
|
Control::Resize();
|
2000-09-18 16:07:07 +00:00
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void RadioButton::GetFocus()
|
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
ShowFocus( ImplGetFocusRect() );
|
2000-09-18 16:07:07 +00:00
|
|
|
SetInputContext( InputContext( GetFont() ) );
|
|
|
|
Button::GetFocus();
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void RadioButton::LoseFocus()
|
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() &= ~BUTTON_DRAW_PRESSED;
|
2008-03-05 16:07:33 +00:00
|
|
|
ImplInvalidateOrDrawRadioButtonState();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
HideFocus();
|
|
|
|
Button::LoseFocus();
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void RadioButton::StateChanged( StateChangedType nType )
|
|
|
|
{
|
|
|
|
Button::StateChanged( nType );
|
|
|
|
|
|
|
|
if ( nType == STATE_CHANGE_STATE )
|
|
|
|
{
|
|
|
|
if ( IsReallyVisible() && IsUpdateMode() )
|
2005-04-12 11:18:06 +00:00
|
|
|
Invalidate( maStateRect );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else if ( (nType == STATE_CHANGE_ENABLE) ||
|
|
|
|
(nType == STATE_CHANGE_TEXT) ||
|
|
|
|
(nType == STATE_CHANGE_IMAGE) ||
|
|
|
|
(nType == STATE_CHANGE_DATA) ||
|
|
|
|
(nType == STATE_CHANGE_UPDATEMODE) )
|
|
|
|
{
|
|
|
|
if ( IsUpdateMode() )
|
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
else if ( nType == STATE_CHANGE_STYLE )
|
|
|
|
{
|
|
|
|
SetStyle( ImplInitStyle( GetWindow( WINDOW_PREV ), GetStyle() ) );
|
|
|
|
|
|
|
|
if ( (GetPrevStyle() & RADIOBUTTON_VIEW_STYLE) !=
|
|
|
|
(GetStyle() & RADIOBUTTON_VIEW_STYLE) )
|
|
|
|
{
|
|
|
|
if ( IsUpdateMode() )
|
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ( (nType == STATE_CHANGE_ZOOM) ||
|
|
|
|
(nType == STATE_CHANGE_CONTROLFONT) )
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
ImplInitSettings( sal_True, sal_False, sal_False );
|
2000-09-18 16:07:07 +00:00
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
ImplInitSettings( sal_False, sal_True, sal_False );
|
2000-09-18 16:07:07 +00:00
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
ImplInitSettings( sal_False, sal_False, sal_True );
|
2000-09-18 16:07:07 +00:00
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void RadioButton::DataChanged( const DataChangedEvent& rDCEvt )
|
|
|
|
{
|
|
|
|
Button::DataChanged( rDCEvt );
|
|
|
|
|
|
|
|
if ( (rDCEvt.GetType() == DATACHANGED_FONTS) ||
|
|
|
|
(rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) ||
|
|
|
|
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
|
|
|
|
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
ImplInitSettings( sal_True, sal_True, sal_True );
|
2000-09-18 16:07:07 +00:00
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2004-02-20 07:50:15 +00:00
|
|
|
long RadioButton::PreNotify( NotifyEvent& rNEvt )
|
|
|
|
{
|
2004-05-10 14:45:59 +00:00
|
|
|
long nDone = 0;
|
|
|
|
const MouseEvent* pMouseEvt = NULL;
|
|
|
|
|
2006-06-19 18:15:23 +00:00
|
|
|
if( (rNEvt.GetType() == EVENT_MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != NULL )
|
2004-05-10 14:45:59 +00:00
|
|
|
{
|
|
|
|
if( !pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged() )
|
|
|
|
{
|
|
|
|
// trigger redraw if mouse over state has changed
|
|
|
|
if( IsNativeControlSupported(CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL) )
|
|
|
|
{
|
|
|
|
if( ( maMouseRect.IsInside( GetPointerPosPixel()) &&
|
|
|
|
!maMouseRect.IsInside( GetLastPointerPosPixel()) ) ||
|
|
|
|
( maMouseRect.IsInside( GetLastPointerPosPixel()) &&
|
|
|
|
!maMouseRect.IsInside( GetPointerPosPixel()) ) ||
|
|
|
|
pMouseEvt->IsLeaveWindow() || pMouseEvt->IsEnterWindow() )
|
|
|
|
{
|
|
|
|
Invalidate( maStateRect );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return nDone ? nDone : Button::PreNotify(rNEvt);
|
2004-02-20 07:50:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
void RadioButton::Toggle()
|
|
|
|
{
|
2004-10-22 11:12:18 +00:00
|
|
|
ImplCallEventListenersAndHandler( VCLEVENT_RADIOBUTTON_TOGGLE, maToggleHdl, this );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
Merge commit 'ooo/DEV300_m101' into intm101
The following builds for me:
basebmp, basegfx, comphelper, dtrans, i18npool, i18nutil, l10ntools, o3tl,
psprint_config, regexp, rsc, sax, sot, tools, ucbhelper, unotools, vcl
The rest still needs fixing ;-)
Conflicts:
canvas/prj/build.lst
canvas/source/cairo/cairo_textlayout.cxx
canvas/source/directx/dx_winstuff.hxx
canvas/source/tools/image.cxx
canvas/source/vcl/canvashelper.cxx
comphelper/inc/comphelper/documentconstants.hxx
comphelper/inc/comphelper/optionalvalue.hxx
comphelper/inc/comphelper/querydeep.hxx
comphelper/prj/build.lst
comphelper/qa/complex/makefile.mk
comphelper/qa/string/test_string_noadditional.cxx
comphelper/source/misc/componentmodule.cxx
comphelper/source/misc/mimeconfighelper.cxx
comphelper/source/misc/querydeep.cxx
comphelper/source/misc/uieventslogger.cxx
comphelper/source/property/TypeGeneration.cxx
comphelper/test/uno_iterators/uno_iterators.cxx
comphelper/util/makefile.mk
cppcanvas/source/mtfrenderer/implrenderer.cxx
dtrans/prj/build.lst
dtrans/source/generic/dtrans.cxx
dtrans/source/win32/dtobj/FmtFilter.cxx
i18npool/prj/build.lst
i18npool/source/localedata/data/localedata_others.map
i18npool/source/localedata/data/makefile.mk
i18npool/source/localedata/localedata.cxx
i18npool/source/localedata/saxparser.cxx
i18npool/source/registerservices/registerservices.cxx
i18npool/source/search/textsearch.cxx
l10ntools/inc/cfgmerge.hxx
l10ntools/inc/export.hxx
l10ntools/inc/gsicheck.hxx
l10ntools/inc/l10ntools/vosapp.hxx
l10ntools/inc/tagtest.hxx
l10ntools/inc/xmlparse.hxx
l10ntools/layout/layoutparse.cxx
l10ntools/layout/tralay.cxx
l10ntools/source/cfgmerge.cxx
l10ntools/source/export.cxx
l10ntools/source/export2.cxx
l10ntools/source/gsicheck.cxx
l10ntools/source/help/HelpLinker.cxx
l10ntools/source/lngex.cxx
l10ntools/source/lngmerge.cxx
l10ntools/source/merge.cxx
l10ntools/source/tagtest.cxx
l10ntools/source/xmlparse.cxx
padmin/source/fontentry.cxx
padmin/source/padialog.cxx
padmin/source/padialog.src
padmin/source/pamain.cxx
rsc/inc/rscarray.hxx
rsc/inc/rscclass.hxx
rsc/inc/rscclobj.hxx
rsc/inc/rsccont.hxx
rsc/inc/rscdb.hxx
rsc/inc/rscdef.hxx
rsc/inc/rscmgr.hxx
rsc/inc/rscrange.hxx
rsc/inc/rsctop.hxx
rsc/inc/vclrsc.hxx
rsc/source/parser/rscdb.cxx
rsc/source/parser/rscicpx.cxx
rsc/source/parser/rscinit.cxx
rsc/source/prj/start.cxx
rsc/source/res/rscarray.cxx
rsc/source/res/rscclass.cxx
rsc/source/res/rscclobj.cxx
rsc/source/res/rsccont.cxx
rsc/source/res/rscmgr.cxx
rsc/source/res/rscrange.cxx
rsc/source/res/rsctop.cxx
rsc/source/rsc/rsc.cxx
rsc/source/tools/rscdef.cxx
rsc/source/tools/rsctools.cxx
sax/source/expatwrap/sax_expat.cxx
sax/source/fastparser/facreg.cxx
sax/source/tools/fastserializer.cxx
sot/inc/sot/filelist.hxx
sot/inc/sot/object.hxx
sot/source/base/factory.cxx
sot/source/base/filelist.cxx
sot/source/sdstor/stg.cxx
sot/source/sdstor/stgcache.cxx
sot/source/sdstor/stgole.cxx
sot/source/sdstor/stgstrms.cxx
sot/source/sdstor/storage.cxx
sot/source/sdstor/ucbstorage.cxx
svl/inc/svl/cenumitm.hxx
svl/inc/svl/cintitem.hxx
svl/inc/svl/cntwall.hxx
svl/inc/svl/ctypeitm.hxx
svl/inc/svl/custritm.hxx
svl/inc/svl/dateitem.hxx
svl/inc/svl/filerec.hxx
svl/inc/svl/globalnameitem.hxx
svl/inc/svl/ilstitem.hxx
svl/inc/svl/imageitm.hxx
svl/inc/svl/intitem.hxx
svl/inc/svl/itempool.hxx
svl/inc/svl/itemset.hxx
svl/inc/svl/lckbitem.hxx
svl/inc/svl/poolitem.hxx
svl/inc/svl/ptitem.hxx
svl/inc/svl/rectitem.hxx
svl/inc/svl/sfontitm.hxx
svl/inc/svl/slstitm.hxx
svl/inc/svl/srchitem.hxx
svl/inc/svl/svarray.hxx
svl/inc/svl/svdde.hxx
svl/inc/svl/svstdarr.hxx
svl/inc/svl/szitem.hxx
svl/inc/svl/visitem.hxx
svl/inc/svl/zforlist.hxx
svl/inc/svl/zformat.hxx
svl/prj/build.lst
svl/qa/complex/ConfigItems/helper/ConfigItemTest.cxx
svl/qa/complex/ConfigItems/helper/makefile.mk
svl/qa/makefile.mk
svl/source/filepicker/pickerhelper.cxx
svl/source/filerec/filerec.cxx
svl/source/items/cenumitm.cxx
svl/source/items/cintitem.cxx
svl/source/items/cntwall.cxx
svl/source/items/ctypeitm.cxx
svl/source/items/custritm.cxx
svl/source/items/dateitem.cxx
svl/source/items/globalnameitem.cxx
svl/source/items/ilstitem.cxx
svl/source/items/imageitm.cxx
svl/source/items/intitem.cxx
svl/source/items/itempool.cxx
svl/source/items/itemprop.cxx
svl/source/items/itemset.cxx
svl/source/items/lckbitem.cxx
svl/source/items/poolio.cxx
svl/source/items/poolitem.cxx
svl/source/items/ptitem.cxx
svl/source/items/rectitem.cxx
svl/source/items/slstitm.cxx
svl/source/items/srchitem.cxx
svl/source/items/style.cxx
svl/source/items/szitem.cxx
svl/source/items/visitem.cxx
svl/source/items/whiter.cxx
svl/source/memtools/svarray.cxx
svl/source/misc/PasswordHelper.cxx
svl/source/misc/adrparse.cxx
svl/source/misc/lngmisc.cxx
svl/source/notify/brdcst.cxx
svl/source/notify/listener.cxx
svl/source/notify/listenerbase.cxx
svl/source/numbers/makefile.mk
svl/source/numbers/nbdll.cxx
svl/source/numbers/zforfind.cxx
svl/source/numbers/zforlist.cxx
svl/source/numbers/zformat.cxx
svl/source/numbers/zforscan.cxx
svl/source/passwordcontainer/passwordcontainer.cxx
svl/source/svdde/ddecli.cxx
svl/source/svdde/ddeimp.hxx
svl/source/svdde/ddemlos2.h
svl/source/svdde/ddesvr.cxx
svl/source/undo/undo.cxx
svl/source/uno/registerservices.cxx
svl/util/makefile.mk
svtools/bmpmaker/bmpsum.cxx
svtools/bmpmaker/g2g.cxx
svtools/bmpmaker/makefile.mk
svtools/inc/borderhelper.hxx
svtools/inc/svtools/accessiblefactory.hxx
svtools/inc/svtools/apearcfg.hxx
svtools/inc/svtools/brwbox.hxx
svtools/inc/svtools/ctrlbox.hxx
svtools/inc/svtools/ctrltool.hxx
svtools/inc/svtools/editbrowsebox.hxx
svtools/inc/svtools/ehdl.hxx
svtools/inc/svtools/embedhlp.hxx
svtools/inc/svtools/filter.hxx
svtools/inc/svtools/ivctrl.hxx
svtools/inc/svtools/parhtml.hxx
svtools/inc/svtools/printdlg.hxx
svtools/inc/svtools/rtftoken.h
svtools/inc/svtools/ruler.hxx
svtools/inc/svtools/svicnvw.hxx
svtools/inc/svtools/svlbitm.hxx
svtools/inc/svtools/svlbox.hxx
svtools/inc/svtools/svtreebx.hxx
svtools/inc/svtools/tabbar.hxx
svtools/inc/svtools/table/abstracttablecontrol.hxx
svtools/inc/svtools/taskbar.hxx
svtools/inc/svtools/textview.hxx
svtools/inc/svtools/valueset.hxx
svtools/source/brwbox/brwbox1.cxx
svtools/source/brwbox/brwbox2.cxx
svtools/source/brwbox/datwin.cxx
svtools/source/brwbox/datwin.hxx
svtools/source/brwbox/makefile.mk
svtools/source/config/apearcfg.cxx
svtools/source/config/htmlcfg.cxx
svtools/source/config/menuoptions.cxx
svtools/source/config/miscopt.cxx
svtools/source/contnr/cont_pch.cxx
svtools/source/contnr/ctrdll.cxx
svtools/source/contnr/fileview.cxx
svtools/source/contnr/imivctl1.cxx
svtools/source/contnr/ivctrl.cxx
svtools/source/contnr/makefile.mk
svtools/source/contnr/svcontnr.src
svtools/source/contnr/svicnvw.cxx
svtools/source/contnr/svimpbox.cxx
svtools/source/contnr/svimpicn.cxx
svtools/source/contnr/svlbitm.cxx
svtools/source/contnr/svtreebx.cxx
svtools/source/contnr/templwin.cxx
svtools/source/contnr/templwin.hxx
svtools/source/control/asynclink.cxx
svtools/source/control/ctrlbox.cxx
svtools/source/control/ctrldll.cxx
svtools/source/control/ctrltool.cxx
svtools/source/control/filectrl.cxx
svtools/source/control/filectrl.src
svtools/source/control/headbar.cxx
svtools/source/control/inettbc.cxx
svtools/source/control/makefile.mk
svtools/source/control/prgsbar.cxx
svtools/source/control/roadmap.cxx
svtools/source/control/ruler.cxx
svtools/source/control/scriptedtext.cxx
svtools/source/control/stdmenu.cxx
svtools/source/control/tabbar.cxx
svtools/source/control/taskbar.cxx
svtools/source/control/taskbox.cxx
svtools/source/control/taskmisc.cxx
svtools/source/control/taskstat.cxx
svtools/source/control/valueacc.cxx
svtools/source/control/valueset.cxx
svtools/source/dialogs/addresstemplate.cxx
svtools/source/dialogs/addresstemplate.src
svtools/source/dialogs/colrdlg.src
svtools/source/dialogs/filedlg2.cxx
svtools/source/dialogs/filedlg2.hxx
svtools/source/dialogs/makefile.mk
svtools/source/dialogs/printdlg.cxx
svtools/source/dialogs/printdlg.src
svtools/source/dialogs/propctrl.cxx
svtools/source/dialogs/propctrl.hxx
svtools/source/dialogs/property.cxx
svtools/source/edit/makefile.mk
svtools/source/edit/sychconv.cxx
svtools/source/edit/syntaxhighlight.cxx
svtools/source/edit/textdoc.cxx
svtools/source/edit/texteng.cxx
svtools/source/edit/textundo.cxx
svtools/source/edit/textview.cxx
svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx
svtools/source/filter.vcl/filter/dlgejpg.cxx
svtools/source/filter.vcl/filter/dlgejpg.hxx
svtools/source/filter.vcl/filter/dlgejpg.src
svtools/source/filter.vcl/filter/dlgepng.cxx
svtools/source/filter.vcl/filter/dlgepng.hxx
svtools/source/filter.vcl/filter/dlgepng.src
svtools/source/filter.vcl/filter/dlgexpor.cxx
svtools/source/filter.vcl/filter/dlgexpor.hxx
svtools/source/filter.vcl/filter/dlgexpor.src
svtools/source/filter.vcl/filter/filter2.cxx
svtools/source/filter.vcl/filter/makefile.mk
svtools/source/filter.vcl/filter/sgfbram.cxx
svtools/source/filter.vcl/filter/sgvmain.cxx
svtools/source/filter.vcl/filter/sgvspln.cxx
svtools/source/filter.vcl/filter/strings.src
svtools/source/filter.vcl/jpeg/makefile.mk
svtools/source/filter.vcl/wmf/emfwr.cxx
svtools/source/filter.vcl/wmf/emfwr.hxx
svtools/source/filter.vcl/wmf/enhwmf.cxx
svtools/source/filter.vcl/wmf/winmtf.hxx
svtools/source/filter.vcl/wmf/wmfwr.cxx
svtools/source/filter.vcl/wmf/wmfwr.hxx
svtools/source/graphic/grfcache.cxx
svtools/source/graphic/grfcache.hxx
svtools/source/graphic/grfmgr.cxx
svtools/source/graphic/makefile.mk
svtools/source/inc/accessibletableimp.hxx
svtools/source/inc/svimpbox.hxx
svtools/source/java/patchjavaerror.src
svtools/source/misc/ehdl.cxx
svtools/source/misc/errtxt.src
svtools/source/misc/helpagentwindow.cxx
svtools/source/misc/imagemgr.cxx
svtools/source/misc/imagemgr.src
svtools/source/misc/imageresourceaccess.cxx
svtools/source/misc/imap.cxx
svtools/source/misc/langtab.src
svtools/source/misc/makefile.mk
svtools/source/misc/svtdata.cxx
svtools/source/misc/templatefoldercache.cxx
svtools/source/misc/transfer2.cxx
svtools/source/misc/undo.src
svtools/source/plugapp/commtest.cxx
svtools/source/plugapp/commtest.src
svtools/source/plugapp/makefile.mk
svtools/source/plugapp/testtool.src
svtools/source/productregistration/productregistration.cxx
svtools/source/svhtml/htmlkywd.cxx
svtools/source/svhtml/parhtml.cxx
svtools/source/svrtf/rtfkey2.cxx
svtools/source/svrtf/rtfkeywd.cxx
svtools/source/table/defaultinputhandler.cxx
svtools/source/table/makefile.mk
svtools/source/table/tablecontrol.cxx
svtools/source/table/tablecontrol_impl.cxx
svtools/source/table/tablecontrol_impl.hxx
svtools/source/table/tabledatawindow.cxx
svtools/source/table/tablegeometry.cxx
svtools/source/table/tablegeometry.hxx
svtools/source/toolpanel/makefile.mk
svtools/source/toolpanel/toolpaneldrawer.cxx
svtools/source/uno/addrtempuno.cxx
svtools/source/uno/miscservices.cxx
svtools/source/uno/svtxgridcontrol.cxx
svtools/source/uno/svtxgridcontrol.hxx
svtools/source/uno/toolboxcontroller.cxx
svtools/source/uno/treecontrolpeer.cxx
svtools/source/uno/unocontroltablemodel.cxx
svtools/source/uno/unocontroltablemodel.hxx
svtools/source/uno/unoimap.cxx
svtools/source/urlobj/inetimg.cxx
svtools/util/makefile.mk
svtools/workben/browser.cxx
svtools/workben/cui/makefile.mk
svtools/workben/makefile.mk
svtools/workben/stest.cxx
svtools/workben/toolpanel/makefile.mk
svtools/workben/urange.cxx
toolkit/inc/toolkit/awt/vclxdevice.hxx
toolkit/inc/toolkit/awt/vclxgraphics.hxx
toolkit/inc/toolkit/awt/vclxwindows.hxx
toolkit/inc/toolkit/controls/dialogcontrol.hxx
toolkit/inc/toolkit/helper/property.hxx
toolkit/inc/toolkit/helper/servicenames.hxx
toolkit/inc/toolkit/helper/throbberimpl.hxx
toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent.java
toolkit/source/awt/asynccallback.cxx
toolkit/source/awt/vclxgraphics.cxx
toolkit/source/awt/vclxtoolkit.cxx
toolkit/source/awt/vclxwindow.cxx
toolkit/source/awt/xsimpleanimation.cxx
toolkit/source/awt/xthrobber.cxx
toolkit/source/controls/dialogcontrol.cxx
toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
toolkit/source/controls/grid/defaultgriddatamodel.cxx
toolkit/source/controls/grid/gridcontrol.cxx
toolkit/source/controls/grid/initguard.hxx
toolkit/source/controls/unocontrol.cxx
toolkit/source/controls/unocontrolcontainer.cxx
toolkit/source/controls/unocontrols.cxx
toolkit/source/helper/listenermultiplexer.cxx
toolkit/source/helper/property.cxx
toolkit/source/helper/registerservices.cxx
toolkit/source/helper/servicenames.cxx
toolkit/source/helper/throbberimpl.cxx
toolkit/source/helper/tkresmgr.cxx
tools/StaticLibrary_ooopathutils.mk
tools/bootstrp/addexes/makefile.mk
tools/bootstrp/addexes2/makefile.mk
tools/bootstrp/addexes2/mkfilt.cxx
tools/bootstrp/command.cxx
tools/bootstrp/cppdep.cxx
tools/bootstrp/iserver.cxx
tools/bootstrp/makefile.mk
tools/bootstrp/mkcreate.cxx
tools/bootstrp/prj.cxx
tools/bootstrp/rscdep.cxx
tools/bootstrp/sstring.cxx
tools/inc/bootstrp/command.hxx
tools/inc/bootstrp/mkcreate.hxx
tools/inc/bootstrp/prj.hxx
tools/inc/bootstrp/sstring.hxx
tools/inc/tools/agapi.hxx
tools/inc/tools/agitem.hxx
tools/inc/tools/chapi.hxx
tools/inc/tools/download.hxx
tools/inc/tools/eacopier.hxx
tools/inc/tools/fract.hxx
tools/inc/tools/fsys.hxx
tools/inc/tools/geninfo.hxx
tools/inc/tools/globname.hxx
tools/inc/tools/inetmime.hxx
tools/inc/tools/multisel.hxx
tools/inc/tools/poly.hxx
tools/inc/tools/postsys.h
tools/inc/tools/postwin.h
tools/inc/tools/presys.h
tools/inc/tools/prewin.h
tools/inc/tools/pstm.hxx
tools/inc/tools/ref.hxx
tools/inc/tools/simplerm.hxx
tools/inc/tools/solar.h
tools/inc/tools/table.hxx
tools/inc/tools/urlkeys.hxx
tools/inc/tools/urlobj.hxx
tools/prj/build.lst
tools/prj/d.lst
tools/qa/makefile.mk
tools/source/communi/geninfo.cxx
tools/source/debug/debug.cxx
tools/source/fsys/dirent.cxx
tools/source/fsys/tdir.cxx
tools/source/fsys/unx.cxx
tools/source/fsys/urlobj.cxx
tools/source/generic/color.cxx
tools/source/generic/config.cxx
tools/source/generic/fract.cxx
tools/source/inet/inetmime.cxx
tools/source/memtools/multisel.cxx
tools/source/memtools/table.cxx
tools/source/rc/resmgr.cxx
tools/source/ref/globname.cxx
tools/source/ref/pstm.cxx
tools/source/solar/solar.c
tools/source/stream/strmos2.cxx
tools/source/stream/strmunx.cxx
tools/source/stream/strmwnt.cxx
tools/source/string/makefile.mk
tools/source/testtoolloader/testtoolloader.cxx
tools/test/makefile.mk
tools/util/makefile.mk
tools/win/inc/dll.hxx
tools/win/inc/parser.hxx
tools/win/inc/shellex.h
tools/win/inc/shutil.h
tools/win/inc/toolsdll.hxx
tools/win/inc/winshell.hxx
tools/workben/makefile.mk
ucbhelper/source/client/proxydecider.cxx
ucbhelper/workben/ucbexplorer/ucbexplorer.hrc
unotools/inc/unotools/unotunnelhelper.hxx
unotools/source/config/fltrcfg.cxx
unotools/source/config/lingucfg.cxx
unotools/source/config/misccfg.cxx
unotools/source/config/pathoptions.cxx
unotools/source/config/searchopt.cxx
unotools/source/i18n/localedatawrapper.cxx
unotools/source/ucbhelper/localfilehelper.cxx
unotools/source/ucbhelper/ucbhelper.cxx
unotools/source/ucbhelper/xtempfile.cxx
vcl/aqua/inc/salbmp.h
vcl/aqua/inc/salgdi.h
vcl/aqua/inc/salinst.h
vcl/aqua/source/app/salinst.cxx
vcl/aqua/source/gdi/aquaprintaccessoryview.mm
vcl/aqua/source/gdi/salgdi.cxx
vcl/aqua/source/gdi/salprn.cxx
vcl/aqua/source/window/salframeview.mm
vcl/aqua/source/window/salobj.cxx
vcl/inc/vcl/bitmap.hxx
vcl/inc/vcl/brdwin.hxx
vcl/inc/vcl/button.hxx
vcl/inc/vcl/cmdevt.hxx
vcl/inc/vcl/cvtgrf.hxx
vcl/inc/vcl/dialog.hxx
vcl/inc/vcl/dockwin.hxx
vcl/inc/vcl/event.hxx
vcl/inc/vcl/fixed.hxx
vcl/inc/vcl/fldunit.hxx
vcl/inc/vcl/floatwin.hxx
vcl/inc/vcl/gdimtf.hxx
vcl/inc/vcl/glyphcache.hxx
vcl/inc/vcl/graphite_adaptors.hxx
vcl/inc/vcl/graphite_features.hxx
vcl/inc/vcl/graphite_layout.hxx
vcl/inc/vcl/ilstbox.hxx
vcl/inc/vcl/image.h
vcl/inc/vcl/imgctrl.hxx
vcl/inc/vcl/impbmpconv.hxx
vcl/inc/vcl/impprn.hxx
vcl/inc/vcl/jobset.h
vcl/inc/vcl/keycodes.hxx
vcl/inc/vcl/lstbox.hxx
vcl/inc/vcl/mapunit.hxx
vcl/inc/vcl/menu.hxx
vcl/inc/vcl/msgbox.hxx
vcl/inc/vcl/outdev.hxx
vcl/inc/vcl/prndlg.hxx
vcl/inc/vcl/salatype.hxx
vcl/inc/vcl/salbmp.hxx
vcl/inc/vcl/salgdi.hxx
vcl/inc/vcl/salinst.hxx
vcl/inc/vcl/seleng.hxx
vcl/inc/vcl/settings.hxx
vcl/inc/vcl/smartid.hxx
vcl/inc/vcl/status.hxx
vcl/inc/vcl/strhelper.hxx
vcl/inc/vcl/svapp.hxx
vcl/inc/vcl/svdata.hxx
vcl/inc/vcl/syschild.hxx
vcl/inc/vcl/sysdata.hxx
vcl/inc/vcl/taskpanelist.hxx
vcl/inc/vcl/toolbox.hxx
vcl/inc/vcl/vclevent.hxx
vcl/inc/vcl/windata.hxx
vcl/inc/vcl/window.hxx
vcl/inc/vcl/wintypes.hxx
vcl/os2/source/app/salinst.cxx
vcl/os2/source/gdi/salgdi.cxx
vcl/os2/source/window/salmenu.cxx
vcl/os2/source/window/salobj.cxx
vcl/prj/build.lst
vcl/source/app/dbggui.cxx
vcl/source/app/help.cxx
vcl/source/app/idlemgr.cxx
vcl/source/app/settings.cxx
vcl/source/app/svapp.cxx
vcl/source/app/svdata.cxx
vcl/source/app/svmain.cxx
vcl/source/app/svmainhook.cxx
vcl/source/app/unohelp.cxx
vcl/source/app/vclevent.cxx
vcl/source/control/button.cxx
vcl/source/control/combobox.cxx
vcl/source/control/edit.cxx
vcl/source/control/field.cxx
vcl/source/control/fixed.cxx
vcl/source/control/ilstbox.cxx
vcl/source/control/imgctrl.cxx
vcl/source/control/makefile.mk
vcl/source/control/tabctrl.cxx
vcl/source/gdi/bitmap.cxx
vcl/source/gdi/bitmap2.cxx
vcl/source/gdi/bitmap4.cxx
vcl/source/gdi/bmpconv.cxx
vcl/source/gdi/cvtsvm.cxx
vcl/source/gdi/font.cxx
vcl/source/gdi/gdimtf.cxx
vcl/source/gdi/image.cxx
vcl/source/gdi/impimage.cxx
vcl/source/gdi/jobset.cxx
vcl/source/gdi/makefile.mk
vcl/source/gdi/metaact.cxx
vcl/source/gdi/outdev.cxx
vcl/source/gdi/outdev3.cxx
vcl/source/gdi/outdev4.cxx
vcl/source/gdi/outdevnative.cxx
vcl/source/gdi/pdfwriter.cxx
vcl/source/gdi/pdfwriter_impl.cxx
vcl/source/gdi/print3.cxx
vcl/source/gdi/salmisc.cxx
vcl/source/glyphs/gcach_ftyp.cxx
vcl/source/glyphs/gcach_ftyp.hxx
vcl/source/glyphs/glyphcache.cxx
vcl/source/glyphs/graphite_cache.cxx
vcl/source/glyphs/graphite_layout.cxx
vcl/source/glyphs/graphite_textsrc.hxx
vcl/source/helper/canvasbitmap.cxx
vcl/source/helper/smartid.cxx
vcl/source/helper/xconnection.cxx
vcl/source/src/btntext.src
vcl/source/src/images.src
vcl/source/src/print.src
vcl/source/window/accel.cxx
vcl/source/window/accmgr.cxx
vcl/source/window/brdwin.cxx
vcl/source/window/btndlg.cxx
vcl/source/window/dlgctrl.cxx
vcl/source/window/javachild.cxx
vcl/source/window/menu.cxx
vcl/source/window/msgbox.cxx
vcl/source/window/printdlg.cxx
vcl/source/window/status.cxx
vcl/source/window/syschild.cxx
vcl/source/window/toolbox.cxx
vcl/source/window/toolbox2.cxx
vcl/source/window/window.cxx
vcl/source/window/window2.cxx
vcl/source/window/wrkwin.cxx
vcl/unx/gtk/app/gtkdata.cxx
vcl/unx/gtk/app/gtkinst.cxx
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
vcl/unx/gtk/window/gtkframe.cxx
vcl/unx/gtk/window/gtkobject.cxx
vcl/unx/headless/svpbmp.hxx
vcl/unx/headless/svpgdi.cxx
vcl/unx/headless/svpgdi.hxx
vcl/unx/headless/svpinst.cxx
vcl/unx/headless/svpinst.hxx
vcl/unx/headless/svpprn.cxx
vcl/unx/headless/svpprn.hxx
vcl/unx/headless/svppspgraphics.cxx
vcl/unx/headless/svppspgraphics.hxx
vcl/unx/headless/svptext.cxx
vcl/unx/inc/dtint.hxx
vcl/unx/inc/plugins/gtk/gtkdata.hxx
vcl/unx/inc/pspgraphics.h
vcl/unx/inc/salbmp.h
vcl/unx/inc/saldata.hxx
vcl/unx/inc/saldisp.hxx
vcl/unx/inc/salgdi.h
vcl/unx/inc/salinst.h
vcl/unx/inc/xfont.hxx
vcl/unx/kde/kdedata.cxx
vcl/unx/kde4/KDESalGraphics.cxx
vcl/unx/source/app/keysymnames.cxx
vcl/unx/source/app/saldata.cxx
vcl/unx/source/app/saldisp.cxx
vcl/unx/source/app/salinst.cxx
vcl/unx/source/app/wmadaptor.cxx
vcl/unx/source/dtrans/X11_selection.cxx
vcl/unx/source/dtrans/X11_service.cxx
vcl/unx/source/gdi/makefile.mk
vcl/unx/source/gdi/pspgraphics.cxx
vcl/unx/source/gdi/salgdi.cxx
vcl/unx/source/gdi/salgdi3.cxx
vcl/unx/source/gdi/salprnpsp.cxx
vcl/unx/source/gdi/xfont.cxx
vcl/unx/source/gdi/xlfd_attr.cxx
vcl/unx/source/gdi/xlfd_attr.hxx
vcl/unx/source/gdi/xlfd_extd.cxx
vcl/unx/source/gdi/xlfd_extd.hxx
vcl/unx/source/gdi/xlfd_smpl.cxx
vcl/unx/source/gdi/xlfd_smpl.hxx
vcl/unx/source/printer/ppdparser.cxx
vcl/unx/source/printer/printerinfomanager.cxx
vcl/unx/source/window/salframe.cxx
vcl/unx/source/window/salmenu.cxx
vcl/unx/source/window/salobj.cxx
vcl/util/makefile2.pmk
vcl/win/inc/salbmp.h
vcl/win/inc/saldata.hxx
vcl/win/inc/salgdi.h
vcl/win/inc/salinst.h
vcl/win/source/app/saldata.cxx
vcl/win/source/app/salinst.cxx
vcl/win/source/gdi/salgdi.cxx
vcl/win/source/gdi/salgdi3.cxx
vcl/win/source/gdi/salprn.cxx
vcl/win/source/gdi/winlayout.cxx
vcl/win/source/window/salframe.cxx
vcl/win/source/window/salobj.cxx
vcl/workben/outdevgrind.cxx
vos/inc/vos/execabl.hxx
vos/inc/vos/macros.hxx
vos/inc/vos/pipe.hxx
vos/inc/vos/process.hxx
vos/inc/vos/refernce.hxx
vos/inc/vos/signal.hxx
vos/inc/vos/socket.hxx
vos/inc/vos/stream.hxx
vos/inc/vos/thread.hxx
vos/source/pipe.cxx
vos/source/process.cxx
vos/source/signal.cxx
vos/source/thread.cxx
vos/source/timer.cxx
2011-03-11 14:24:23 +01:00
|
|
|
sal_Bool RadioButton::SetModeRadioImage( const Image& rImage )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if ( rImage != maImage )
|
|
|
|
{
|
|
|
|
maImage = rImage;
|
|
|
|
StateChanged( STATE_CHANGE_DATA );
|
|
|
|
}
|
2010-09-29 15:46:40 +08:00
|
|
|
return sal_True;
|
2002-03-05 08:20:36 +00:00
|
|
|
}
|
|
|
|
|
2002-04-18 07:11:17 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-11-13 00:35:47 -08:00
|
|
|
const Image& RadioButton::GetModeRadioImage( ) const
|
2002-03-05 08:20:36 +00:00
|
|
|
{
|
2010-11-13 00:35:47 -08:00
|
|
|
return maImage;
|
2002-03-05 08:20:36 +00:00
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void RadioButton::SetState( sal_Bool bCheck )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
// TabStop-Flag richtig mitfuehren
|
|
|
|
if ( bCheck )
|
2005-01-13 16:58:41 +00:00
|
|
|
mpWindowImpl->mnStyle |= WB_TABSTOP;
|
2000-09-18 16:07:07 +00:00
|
|
|
else
|
2005-01-13 16:58:41 +00:00
|
|
|
mpWindowImpl->mnStyle &= ~WB_TABSTOP;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( mbChecked != bCheck )
|
|
|
|
{
|
|
|
|
mbChecked = bCheck;
|
|
|
|
StateChanged( STATE_CHANGE_STATE );
|
2001-06-15 11:56:11 +00:00
|
|
|
Toggle();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-04-25 11:35:17 +01:00
|
|
|
bool RadioButton::set_property(const rtl::OString &rKey, const rtl::OString &rValue)
|
|
|
|
{
|
|
|
|
if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM("active")))
|
|
|
|
SetState(toBool(rValue));
|
|
|
|
else
|
|
|
|
return Window::set_property(rKey, rValue);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void RadioButton::Check( sal_Bool bCheck )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
// TabStop-Flag richtig mitfuehren
|
|
|
|
if ( bCheck )
|
2005-01-13 16:58:41 +00:00
|
|
|
mpWindowImpl->mnStyle |= WB_TABSTOP;
|
2000-09-18 16:07:07 +00:00
|
|
|
else
|
2005-01-13 16:58:41 +00:00
|
|
|
mpWindowImpl->mnStyle &= ~WB_TABSTOP;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( mbChecked != bCheck )
|
|
|
|
{
|
|
|
|
mbChecked = bCheck;
|
|
|
|
ImplDelData aDelData;
|
|
|
|
ImplAddDel( &aDelData );
|
|
|
|
StateChanged( STATE_CHANGE_STATE );
|
2012-07-16 12:18:02 +03:00
|
|
|
if ( aDelData.IsDead() )
|
2000-09-18 16:07:07 +00:00
|
|
|
return;
|
|
|
|
if ( bCheck && mbRadioCheck )
|
|
|
|
ImplUncheckAllOther();
|
2012-07-16 12:18:02 +03:00
|
|
|
if ( aDelData.IsDead() )
|
2001-06-15 11:56:11 +00:00
|
|
|
return;
|
|
|
|
Toggle();
|
|
|
|
ImplRemoveDel( &aDelData );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2009-09-25 12:26:30 +00:00
|
|
|
long RadioButton::ImplGetImageToTextDistance() const
|
|
|
|
{
|
|
|
|
// 4 pixels, but take zoom into account, so the text doesn't "jump" relative to surrounding elements,
|
|
|
|
// which might have been aligned with the text of the check box
|
|
|
|
return CalcZoom( 4 );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2005-03-18 16:51:14 +00:00
|
|
|
Size RadioButton::ImplGetRadioImageSize() const
|
|
|
|
{
|
|
|
|
Size aSize;
|
|
|
|
// why are IsNativeControlSupported and GetNativeControlRegion not const ?
|
|
|
|
RadioButton* pThis = const_cast<RadioButton*>(this);
|
|
|
|
bool bDefaultSize = true;
|
|
|
|
if( pThis->IsNativeControlSupported( CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL ) )
|
|
|
|
{
|
|
|
|
ImplControlValue aControlValue;
|
2005-04-12 11:18:06 +00:00
|
|
|
// #i45896# workaround gcc3.3 temporary problem
|
2010-07-05 11:20:24 +02:00
|
|
|
Rectangle aCtrlRegion( Point( 0, 0 ), GetSizePixel() );
|
2005-03-18 16:51:14 +00:00
|
|
|
ControlState nState = CTRL_STATE_DEFAULT|CTRL_STATE_ENABLED;
|
2010-07-05 11:20:24 +02:00
|
|
|
Rectangle aBoundingRgn, aContentRgn;
|
2005-03-18 16:51:14 +00:00
|
|
|
|
|
|
|
// get native size of a radio button
|
|
|
|
if( pThis->GetNativeControlRegion( CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL, aCtrlRegion,
|
|
|
|
nState, aControlValue, rtl::OUString(),
|
|
|
|
aBoundingRgn, aContentRgn ) )
|
|
|
|
{
|
2010-07-05 11:20:24 +02:00
|
|
|
aSize = aContentRgn.GetSize();
|
2005-03-18 16:51:14 +00:00
|
|
|
bDefaultSize = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if( bDefaultSize )
|
|
|
|
aSize = GetRadioImage( GetSettings(), 0 ).GetSizePixel();
|
|
|
|
return aSize;
|
|
|
|
}
|
|
|
|
|
2007-06-06 13:21:07 +00:00
|
|
|
static void LoadThemedImageList (const StyleSettings &rStyleSettings,
|
|
|
|
ImageList *pList, const ResId &rResId,
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 nImages)
|
2007-06-06 13:21:07 +00:00
|
|
|
{
|
2007-12-12 12:19:37 +00:00
|
|
|
Color aColorAry1[6];
|
|
|
|
Color aColorAry2[6];
|
|
|
|
aColorAry1[0] = Color( 0xC0, 0xC0, 0xC0 );
|
|
|
|
aColorAry1[1] = Color( 0xFF, 0xFF, 0x00 );
|
|
|
|
aColorAry1[2] = Color( 0xFF, 0xFF, 0xFF );
|
|
|
|
aColorAry1[3] = Color( 0x80, 0x80, 0x80 );
|
|
|
|
aColorAry1[4] = Color( 0x00, 0x00, 0x00 );
|
|
|
|
aColorAry1[5] = Color( 0x00, 0xFF, 0x00 );
|
|
|
|
aColorAry2[0] = rStyleSettings.GetFaceColor();
|
|
|
|
aColorAry2[1] = rStyleSettings.GetWindowColor();
|
|
|
|
aColorAry2[2] = rStyleSettings.GetLightColor();
|
|
|
|
aColorAry2[3] = rStyleSettings.GetShadowColor();
|
|
|
|
aColorAry2[4] = rStyleSettings.GetDarkShadowColor();
|
|
|
|
aColorAry2[5] = rStyleSettings.GetWindowTextColor();
|
2007-06-06 13:21:07 +00:00
|
|
|
|
|
|
|
Color aMaskColor(0x00, 0x00, 0xFF );
|
2007-12-12 12:19:37 +00:00
|
|
|
DBG_ASSERT( sizeof(aColorAry1) == sizeof(aColorAry2), "aColorAry1 must match aColorAry2" );
|
2007-06-06 13:21:07 +00:00
|
|
|
// FIXME: do we want the mask for the checkbox ?
|
|
|
|
pList->InsertFromHorizontalBitmap (rResId, nImages, &aMaskColor,
|
2007-12-12 12:19:37 +00:00
|
|
|
aColorAry1, aColorAry2, sizeof(aColorAry1) / sizeof(Color));
|
2007-06-06 13:21:07 +00:00
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
Image RadioButton::GetRadioImage( const AllSettings& rSettings, sal_uInt16 nFlags )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
ImplSVData* pSVData = ImplGetSVData();
|
|
|
|
const StyleSettings& rStyleSettings = rSettings.GetStyleSettings();
|
2011-01-21 17:18:37 +01:00
|
|
|
sal_uInt16 nStyle = 0;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( rStyleSettings.GetOptions() & STYLE_OPTION_MONO )
|
|
|
|
nStyle = STYLE_RADIOBUTTON_MONO;
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( !pSVData->maCtrlData.mpRadioImgList ||
|
|
|
|
(pSVData->maCtrlData.mnRadioStyle != nStyle) ||
|
|
|
|
(pSVData->maCtrlData.mnLastRadioFColor != rStyleSettings.GetFaceColor().GetColor()) ||
|
|
|
|
(pSVData->maCtrlData.mnLastRadioWColor != rStyleSettings.GetWindowColor().GetColor()) ||
|
|
|
|
(pSVData->maCtrlData.mnLastRadioLColor != rStyleSettings.GetLightColor().GetColor()) )
|
|
|
|
{
|
|
|
|
if ( pSVData->maCtrlData.mpRadioImgList )
|
|
|
|
delete pSVData->maCtrlData.mpRadioImgList;
|
|
|
|
|
|
|
|
pSVData->maCtrlData.mnLastRadioFColor = rStyleSettings.GetFaceColor().GetColor();
|
|
|
|
pSVData->maCtrlData.mnLastRadioWColor = rStyleSettings.GetWindowColor().GetColor();
|
|
|
|
pSVData->maCtrlData.mnLastRadioLColor = rStyleSettings.GetLightColor().GetColor();
|
|
|
|
|
2005-09-28 13:39:27 +00:00
|
|
|
ResMgr* pResMgr = ImplGetResMgr();
|
2007-06-06 13:21:07 +00:00
|
|
|
pSVData->maCtrlData.mpRadioImgList = new ImageList();
|
2005-09-28 13:39:27 +00:00
|
|
|
if( pResMgr )
|
2010-11-13 00:35:47 -08:00
|
|
|
LoadThemedImageList( rStyleSettings,
|
2007-06-06 13:21:07 +00:00
|
|
|
pSVData->maCtrlData.mpRadioImgList,
|
2010-11-13 00:35:47 -08:00
|
|
|
ResId( SV_RESID_BITMAP_RADIO+nStyle, *pResMgr ), 6
|
|
|
|
);
|
|
|
|
pSVData->maCtrlData.mnRadioStyle = nStyle;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 nId;
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( nFlags & BUTTON_DRAW_DISABLED )
|
|
|
|
{
|
|
|
|
if ( nFlags & BUTTON_DRAW_CHECKED )
|
|
|
|
nId = 6;
|
|
|
|
else
|
|
|
|
nId = 5;
|
|
|
|
}
|
|
|
|
else if ( nFlags & BUTTON_DRAW_PRESSED )
|
|
|
|
{
|
|
|
|
if ( nFlags & BUTTON_DRAW_CHECKED )
|
|
|
|
nId = 4;
|
|
|
|
else
|
|
|
|
nId = 3;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if ( nFlags & BUTTON_DRAW_CHECKED )
|
|
|
|
nId = 2;
|
|
|
|
else
|
|
|
|
nId = 1;
|
|
|
|
}
|
|
|
|
return pSVData->maCtrlData.mpRadioImgList->GetImage( nId );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2008-04-04 10:01:13 +00:00
|
|
|
void RadioButton::ImplSetMinimumNWFSize()
|
|
|
|
{
|
|
|
|
Push( PUSH_MAPMODE );
|
|
|
|
SetMapMode( MAP_PIXEL );
|
|
|
|
|
|
|
|
ImplControlValue aControlValue;
|
|
|
|
Size aCurSize( GetSizePixel() );
|
2010-07-05 11:20:24 +02:00
|
|
|
Rectangle aCtrlRegion( Point( 0, 0 ), aCurSize );
|
|
|
|
Rectangle aBoundingRgn, aContentRgn;
|
2008-04-04 10:01:13 +00:00
|
|
|
|
|
|
|
// get native size of a radiobutton
|
|
|
|
if( GetNativeControlRegion( CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL, aCtrlRegion,
|
|
|
|
CTRL_STATE_DEFAULT|CTRL_STATE_ENABLED, aControlValue, rtl::OUString(),
|
|
|
|
aBoundingRgn, aContentRgn ) )
|
|
|
|
{
|
2010-07-05 11:20:24 +02:00
|
|
|
Size aSize = aContentRgn.GetSize();
|
2008-04-04 10:01:13 +00:00
|
|
|
|
|
|
|
if( aSize.Height() > aCurSize.Height() )
|
|
|
|
{
|
|
|
|
aCurSize.Height() = aSize.Height();
|
|
|
|
SetSizePixel( aCurSize );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Pop();
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
Size RadioButton::CalcMinimumSize( long nMaxWidth ) const
|
|
|
|
{
|
|
|
|
Size aSize;
|
|
|
|
if ( !maImage )
|
2005-03-18 16:51:14 +00:00
|
|
|
aSize = ImplGetRadioImageSize();
|
2000-09-18 16:07:07 +00:00
|
|
|
else
|
|
|
|
aSize = maImage.GetSizePixel();
|
|
|
|
|
2001-04-27 13:24:48 +00:00
|
|
|
nMaxWidth -= aSize.Width();
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
XubString aText = GetText();
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( aText.Len() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2001-04-27 13:24:48 +00:00
|
|
|
// subtract what will be added later
|
|
|
|
nMaxWidth-=2;
|
2009-09-25 12:26:30 +00:00
|
|
|
nMaxWidth -= ImplGetImageToTextDistance();
|
2001-04-27 13:24:48 +00:00
|
|
|
|
|
|
|
Size aTextSize = GetTextRect( Rectangle( Point(), Size( nMaxWidth > 0 ? nMaxWidth : 0x7fffffff, 0x7fffffff ) ),
|
2000-09-18 16:07:07 +00:00
|
|
|
aText, FixedText::ImplGetTextStyle( GetStyle() ) ).GetSize();
|
2001-04-27 13:24:48 +00:00
|
|
|
aSize.Width()+=2; // for focus rect
|
2009-09-25 12:26:30 +00:00
|
|
|
aSize.Width() += ImplGetImageToTextDistance();
|
2000-09-18 16:07:07 +00:00
|
|
|
aSize.Width() += aTextSize.Width();
|
|
|
|
if ( aSize.Height() < aTextSize.Height() )
|
|
|
|
aSize.Height() = aTextSize.Height();
|
|
|
|
}
|
2010-11-13 00:35:47 -08:00
|
|
|
// else if ( !maImage )
|
|
|
|
// {
|
2000-09-18 16:07:07 +00:00
|
|
|
/* da ansonsten im Writer die Control zu weit oben haengen
|
|
|
|
aSize.Width() += 2;
|
|
|
|
aSize.Height() += 2;
|
|
|
|
*/
|
2010-11-13 00:35:47 -08:00
|
|
|
// }
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
return CalcWindowSize( aSize );
|
|
|
|
}
|
|
|
|
|
2008-01-14 12:04:30 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
Size RadioButton::GetOptimalSize(WindowSizeType eType) const
|
|
|
|
{
|
|
|
|
switch (eType) {
|
|
|
|
case WINDOWSIZE_MINIMUM:
|
|
|
|
return CalcMinimumSize();
|
|
|
|
default:
|
|
|
|
return Button::GetOptimalSize( eType );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
// =======================================================================
|
|
|
|
|
2006-06-19 18:15:23 +00:00
|
|
|
void CheckBox::ImplInitCheckBoxData()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
meState = STATE_NOCHECK;
|
|
|
|
meSaveValue = STATE_NOCHECK;
|
2010-09-29 15:46:40 +08:00
|
|
|
mbTriState = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void CheckBox::ImplInit( Window* pParent, WinBits nStyle )
|
|
|
|
{
|
|
|
|
nStyle = ImplInitStyle( pParent->GetWindow( WINDOW_LASTCHILD ), nStyle );
|
|
|
|
Button::ImplInit( pParent, nStyle, NULL );
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
ImplInitSettings( sal_True, sal_True, sal_True );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
WinBits CheckBox::ImplInitStyle( const Window* pPrevWindow, WinBits nStyle )
|
|
|
|
{
|
|
|
|
if ( !(nStyle & WB_NOTABSTOP) )
|
|
|
|
nStyle |= WB_TABSTOP;
|
|
|
|
if ( !(nStyle & WB_NOGROUP) &&
|
|
|
|
(!pPrevWindow || (pPrevWindow->GetType() != WINDOW_CHECKBOX)) )
|
|
|
|
nStyle |= WB_GROUP;
|
|
|
|
return nStyle;
|
|
|
|
}
|
|
|
|
|
2009-09-14 12:09:22 +00:00
|
|
|
// -----------------------------------------------------------------
|
|
|
|
|
|
|
|
const Font& CheckBox::GetCanonicalFont( const StyleSettings& _rStyle ) const
|
|
|
|
{
|
|
|
|
return _rStyle.GetRadioCheckFont();
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------
|
|
|
|
const Color& CheckBox::GetCanonicalTextColor( const StyleSettings& _rStyle ) const
|
|
|
|
{
|
|
|
|
return _rStyle.GetRadioCheckTextColor();
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void CheckBox::ImplInitSettings( sal_Bool bFont,
|
|
|
|
sal_Bool bForeground, sal_Bool bBackground )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2009-09-14 12:09:22 +00:00
|
|
|
Button::ImplInitSettings( bFont, bForeground );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( bBackground )
|
|
|
|
{
|
|
|
|
Window* pParent = GetParent();
|
2005-01-31 08:17:00 +00:00
|
|
|
if ( !IsControlBackground() &&
|
|
|
|
(pParent->IsChildTransparentModeEnabled() || IsNativeControlSupported( CTRL_CHECKBOX, PART_ENTIRE_CONTROL ) ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
EnableChildTransparentMode( sal_True );
|
2000-09-18 16:07:07 +00:00
|
|
|
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
|
2010-09-29 15:46:40 +08:00
|
|
|
SetPaintTransparent( sal_True );
|
2000-09-18 16:07:07 +00:00
|
|
|
SetBackground();
|
2007-07-05 07:38:41 +00:00
|
|
|
if( IsNativeControlSupported( CTRL_CHECKBOX, PART_ENTIRE_CONTROL ) )
|
|
|
|
ImplGetWindowImpl()->mbUseNativeFocus = ImplGetSVData()->maNWFData.mbNoFocusRects;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
EnableChildTransparentMode( sal_False );
|
2000-09-18 16:07:07 +00:00
|
|
|
SetParentClipMode( 0 );
|
2010-09-29 15:46:40 +08:00
|
|
|
SetPaintTransparent( sal_False );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( IsControlBackground() )
|
|
|
|
SetBackground( GetControlBackground() );
|
|
|
|
else
|
|
|
|
SetBackground( pParent->GetBackground() );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void CheckBox::ImplLoadRes( const ResId& rResId )
|
|
|
|
{
|
|
|
|
Button::ImplLoadRes( rResId );
|
|
|
|
|
|
|
|
if ( rResId.GetRT() != RSC_TRISTATEBOX )
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 nChecked = ReadShortRes();
|
2000-09-18 16:07:07 +00:00
|
|
|
//anderer Wert als Default ?
|
|
|
|
if( nChecked )
|
2010-09-29 15:46:40 +08:00
|
|
|
Check( sal_True );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2008-03-05 16:07:33 +00:00
|
|
|
void CheckBox::ImplInvalidateOrDrawCheckBoxState()
|
|
|
|
{
|
|
|
|
if( ImplGetSVData()->maNWFData.mbCheckBoxNeedsErase )
|
|
|
|
{
|
|
|
|
if ( IsNativeControlSupported(CTRL_CHECKBOX, PART_ENTIRE_CONTROL) )
|
|
|
|
{
|
|
|
|
Invalidate();
|
|
|
|
Update();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ImplDrawCheckBoxState();
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
void CheckBox::ImplDrawCheckBoxState()
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
bool bNativeOK = sal_True;
|
2004-05-10 14:45:59 +00:00
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
if ( (bNativeOK=IsNativeControlSupported(CTRL_CHECKBOX, PART_ENTIRE_CONTROL)) == sal_True )
|
2004-05-10 14:45:59 +00:00
|
|
|
{
|
2010-07-05 11:20:24 +02:00
|
|
|
ImplControlValue aControlValue( meState == STATE_CHECK ? BUTTONVALUE_ON : BUTTONVALUE_OFF );
|
|
|
|
Rectangle aCtrlRegion( maStateRect );
|
2004-05-10 14:45:59 +00:00
|
|
|
ControlState nState = 0;
|
|
|
|
|
|
|
|
if ( HasFocus() ) nState |= CTRL_STATE_FOCUSED;
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( ImplGetButtonState() & BUTTON_DRAW_DEFAULT ) nState |= CTRL_STATE_DEFAULT;
|
|
|
|
if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED ) nState |= CTRL_STATE_PRESSED;
|
2004-05-10 14:45:59 +00:00
|
|
|
if ( IsEnabled() ) nState |= CTRL_STATE_ENABLED;
|
|
|
|
|
|
|
|
if ( meState == STATE_CHECK )
|
|
|
|
aControlValue.setTristateVal( BUTTONVALUE_ON );
|
|
|
|
else if ( meState == STATE_DONTKNOW )
|
|
|
|
aControlValue.setTristateVal( BUTTONVALUE_MIXED );
|
|
|
|
|
|
|
|
if ( IsMouseOver() && maMouseRect.IsInside( GetPointerPosPixel() ) )
|
|
|
|
nState |= CTRL_STATE_ROLLOVER;
|
|
|
|
|
|
|
|
bNativeOK = DrawNativeControl( CTRL_CHECKBOX, PART_ENTIRE_CONTROL, aCtrlRegion, nState,
|
|
|
|
aControlValue, rtl::OUString() );
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
if ( bNativeOK == sal_False )
|
2004-05-10 14:45:59 +00:00
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 nStyle = ImplGetButtonState();
|
2004-05-10 14:45:59 +00:00
|
|
|
if ( !IsEnabled() )
|
|
|
|
nStyle |= BUTTON_DRAW_DISABLED;
|
|
|
|
if ( meState == STATE_DONTKNOW )
|
|
|
|
nStyle |= BUTTON_DRAW_DONTKNOW;
|
|
|
|
else if ( meState == STATE_CHECK )
|
|
|
|
nStyle |= BUTTON_DRAW_CHECKED;
|
|
|
|
Image aImage = GetCheckImage( GetSettings(), nStyle );
|
|
|
|
if ( IsZoom() )
|
|
|
|
DrawImage( maStateRect.TopLeft(), maStateRect.GetSize(), aImage );
|
|
|
|
else
|
|
|
|
DrawImage( maStateRect.TopLeft(), aImage );
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2011-01-12 15:07:10 +01:00
|
|
|
void CheckBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
|
2000-09-18 16:07:07 +00:00
|
|
|
const Point& rPos, const Size& rSize,
|
2009-09-25 12:26:30 +00:00
|
|
|
const Size& rImageSize, Rectangle& rStateRect,
|
|
|
|
Rectangle& rMouseRect, bool bLayout )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
WinBits nWinStyle = GetStyle();
|
|
|
|
XubString aText( GetText() );
|
|
|
|
|
2007-04-26 09:36:08 +00:00
|
|
|
pDev->Push( PUSH_CLIPREGION | PUSH_LINECOLOR );
|
2006-03-29 10:25:02 +00:00
|
|
|
pDev->IntersectClipRegion( Rectangle( rPos, rSize ) );
|
|
|
|
|
2007-04-26 09:36:08 +00:00
|
|
|
long nLineY = rPos.Y() + (rSize.Height()-1)/2;
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( ( aText.Len() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) ) ||
|
|
|
|
( HasImage() && ! (ImplGetButtonState() & BUTTON_DRAW_NOIMAGE) ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 nTextStyle = Button::ImplGetTextStyle( aText, nWinStyle, nDrawFlags );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2009-09-25 12:26:30 +00:00
|
|
|
const long nImageSep = GetDrawPixel( pDev, ImplGetImageToTextDistance() );
|
2004-07-05 14:41:27 +00:00
|
|
|
Size aSize( rSize );
|
|
|
|
Point aPos( rPos );
|
|
|
|
aPos.X() += rImageSize.Width() + nImageSep;
|
|
|
|
aSize.Width() -= rImageSize.Width() + nImageSep;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2008-03-05 16:07:33 +00:00
|
|
|
// if the text rect height is smaller than the height of the image
|
|
|
|
// then for single lines the default should be centered text
|
2008-08-18 12:05:04 +00:00
|
|
|
if( (nWinStyle & (WB_TOP|WB_VCENTER|WB_BOTTOM)) == 0 &&
|
2008-03-05 16:07:33 +00:00
|
|
|
(rImageSize.Height() > rSize.Height() || ! (nWinStyle & WB_WORDBREAK) ) )
|
|
|
|
{
|
|
|
|
nTextStyle &= ~(TEXT_DRAW_TOP|TEXT_DRAW_BOTTOM);
|
|
|
|
nTextStyle |= TEXT_DRAW_VCENTER;
|
|
|
|
aSize.Height() = rImageSize.Height();
|
|
|
|
}
|
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplDrawAlignedImage( pDev, aPos, aSize, bLayout, 1,
|
|
|
|
nDrawFlags, nTextStyle, NULL );
|
2007-04-26 09:36:08 +00:00
|
|
|
nLineY = aPos.Y() + aSize.Height()/2;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
rMouseRect = Rectangle( aPos, aSize );
|
|
|
|
rMouseRect.Left() = rPos.X();
|
2004-05-10 14:45:59 +00:00
|
|
|
rStateRect.Left() = rPos.X();
|
|
|
|
rStateRect.Top() = rMouseRect.Top();
|
2002-07-08 15:11:07 +00:00
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( aSize.Height() > rImageSize.Height() )
|
|
|
|
rStateRect.Top() += ( aSize.Height() - rImageSize.Height() ) / 2;
|
2008-03-05 16:07:33 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
rStateRect.Top() -= ( rImageSize.Height() - aSize.Height() ) / 2;
|
|
|
|
if( rStateRect.Top() < 0 )
|
|
|
|
rStateRect.Top() = 0;
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
rStateRect.Right() = rStateRect.Left()+rImageSize.Width()-1;
|
|
|
|
rStateRect.Bottom() = rStateRect.Top()+rImageSize.Height()-1;
|
|
|
|
if ( rStateRect.Bottom() > rMouseRect.Bottom() )
|
|
|
|
rMouseRect.Bottom() = rStateRect.Bottom();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-08-01 17:01:44 +01:00
|
|
|
if ( mbLegacyNoTextAlign && ( nWinStyle & WB_CENTER ) )
|
2012-07-31 20:41:51 +01:00
|
|
|
rStateRect.Left() = rPos.X()+((rSize.Width()-rImageSize.Width())/2);
|
2012-08-01 17:01:44 +01:00
|
|
|
else if ( mbLegacyNoTextAlign && ( nWinStyle & WB_RIGHT ) )
|
2012-07-31 20:41:51 +01:00
|
|
|
rStateRect.Left() = rPos.X()+rSize.Width()-rImageSize.Width();
|
|
|
|
else
|
|
|
|
rStateRect.Left() = rPos.X();
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( nWinStyle & WB_VCENTER )
|
|
|
|
rStateRect.Top() = rPos.Y()+((rSize.Height()-rImageSize.Height())/2);
|
|
|
|
else if ( nWinStyle & WB_BOTTOM )
|
2004-05-10 14:45:59 +00:00
|
|
|
rStateRect.Top() = rPos.Y()+rSize.Height()-rImageSize.Height();
|
2000-09-18 16:07:07 +00:00
|
|
|
else
|
2004-05-10 14:45:59 +00:00
|
|
|
rStateRect.Top() = rPos.Y();
|
2000-09-18 16:07:07 +00:00
|
|
|
rStateRect.Right() = rStateRect.Left()+rImageSize.Width()-1;
|
|
|
|
rStateRect.Bottom() = rStateRect.Top()+rImageSize.Height()-1;
|
2004-05-10 14:45:59 +00:00
|
|
|
// provide space for focusrect
|
|
|
|
// note: this assumes that the control's size was adjusted
|
|
|
|
// accordingly in Get/LoseFocus, so the onscreen position won't change
|
|
|
|
if( HasFocus() )
|
|
|
|
rStateRect.Move( 1, 1 );
|
2000-09-18 16:07:07 +00:00
|
|
|
rMouseRect = rStateRect;
|
2002-07-08 15:11:07 +00:00
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplSetFocusRect( rStateRect );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2006-03-29 10:25:02 +00:00
|
|
|
|
2007-04-26 09:36:08 +00:00
|
|
|
const int nLineSpace = 4;
|
|
|
|
if( (GetStyle() & WB_CBLINESTYLE) != 0 &&
|
|
|
|
rMouseRect.Right()-1-nLineSpace < rPos.X()+rSize.Width() )
|
|
|
|
{
|
|
|
|
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
|
|
|
|
if ( rStyleSettings.GetOptions() & STYLE_OPTION_MONO )
|
|
|
|
SetLineColor( Color( COL_BLACK ) );
|
|
|
|
else
|
|
|
|
SetLineColor( rStyleSettings.GetShadowColor() );
|
|
|
|
long nLineX = rMouseRect.Right()+nLineSpace;
|
|
|
|
DrawLine( Point( nLineX, nLineY ), Point( rPos.X() + rSize.Width()-1, nLineY ) );
|
|
|
|
if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
|
|
|
|
{
|
|
|
|
SetLineColor( rStyleSettings.GetLightColor() );
|
|
|
|
DrawLine( Point( nLineX, nLineY+1 ), Point( rPos.X() + rSize.Width()-1, nLineY+1 ) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-03-29 10:25:02 +00:00
|
|
|
pDev->Pop();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2002-04-29 16:46:18 +00:00
|
|
|
void CheckBox::ImplDrawCheckBox( bool bLayout )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-03-18 16:51:14 +00:00
|
|
|
Size aImageSize = ImplGetCheckImageSize();
|
2000-09-18 16:07:07 +00:00
|
|
|
aImageSize.Width() = CalcZoom( aImageSize.Width() );
|
|
|
|
aImageSize.Height() = CalcZoom( aImageSize.Height() );
|
|
|
|
|
2002-04-29 16:46:18 +00:00
|
|
|
if( !bLayout )
|
|
|
|
HideFocus();
|
2004-07-05 14:41:27 +00:00
|
|
|
|
|
|
|
ImplDraw( this, 0, Point(), GetOutputSizePixel(), aImageSize,
|
2009-09-25 12:26:30 +00:00
|
|
|
maStateRect, maMouseRect, bLayout );
|
2004-07-05 14:41:27 +00:00
|
|
|
|
2002-04-29 16:46:18 +00:00
|
|
|
if( !bLayout )
|
|
|
|
{
|
2002-07-08 15:11:07 +00:00
|
|
|
ImplDrawCheckBoxState();
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( HasFocus() )
|
|
|
|
ShowFocus( ImplGetFocusRect() );
|
2002-04-29 16:46:18 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void CheckBox::ImplCheck()
|
|
|
|
{
|
|
|
|
TriState eNewState;
|
|
|
|
if ( meState == STATE_NOCHECK )
|
|
|
|
eNewState = STATE_CHECK;
|
|
|
|
else if ( !mbTriState )
|
|
|
|
eNewState = STATE_NOCHECK;
|
|
|
|
else if ( meState == STATE_CHECK )
|
|
|
|
eNewState = STATE_DONTKNOW;
|
|
|
|
else
|
|
|
|
eNewState = STATE_NOCHECK;
|
|
|
|
meState = eNewState;
|
2003-12-01 08:53:28 +00:00
|
|
|
|
|
|
|
ImplDelData aDelData;
|
|
|
|
ImplAddDel( &aDelData );
|
2010-05-20 11:04:13 +02:00
|
|
|
if( (GetStyle() & WB_EARLYTOGGLE) )
|
|
|
|
Toggle();
|
|
|
|
ImplInvalidateOrDrawCheckBoxState();
|
|
|
|
if( ! (GetStyle() & WB_EARLYTOGGLE) )
|
|
|
|
Toggle();
|
2012-07-16 12:18:02 +03:00
|
|
|
if ( aDelData.IsDead() )
|
2003-12-01 08:53:28 +00:00
|
|
|
return;
|
|
|
|
ImplRemoveDel( &aDelData );
|
2000-09-18 16:07:07 +00:00
|
|
|
Click();
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
CheckBox::CheckBox( Window* pParent, WinBits nStyle ) :
|
2012-08-01 17:01:44 +01:00
|
|
|
Button( WINDOW_CHECKBOX ), mbLegacyNoTextAlign( false )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-06-19 18:15:23 +00:00
|
|
|
ImplInitCheckBoxData();
|
2000-09-18 16:07:07 +00:00
|
|
|
ImplInit( pParent, nStyle );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
CheckBox::CheckBox( Window* pParent, const ResId& rResId ) :
|
2012-08-01 17:01:44 +01:00
|
|
|
Button( WINDOW_CHECKBOX ), mbLegacyNoTextAlign( false )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2012-08-20 09:59:16 +01:00
|
|
|
rResId.SetRT( RSC_CHECKBOX );
|
|
|
|
WinBits nStyle = ImplInitRes( rResId );
|
|
|
|
|
|
|
|
if (VclBuilderContainer::replace_buildable(pParent, rResId, *this))
|
2012-05-22 12:33:28 +01:00
|
|
|
return;
|
|
|
|
|
2006-06-19 18:15:23 +00:00
|
|
|
ImplInitCheckBoxData();
|
2000-09-18 16:07:07 +00:00
|
|
|
ImplInit( pParent, nStyle );
|
|
|
|
ImplLoadRes( rResId );
|
|
|
|
|
|
|
|
if ( !(nStyle & WB_HIDE) )
|
|
|
|
Show();
|
|
|
|
}
|
|
|
|
|
2012-06-01 13:40:01 +01:00
|
|
|
void CheckBox::take_properties(Window &rOther)
|
|
|
|
{
|
|
|
|
if (!GetParent())
|
|
|
|
{
|
|
|
|
ImplInitCheckBoxData();
|
|
|
|
ImplInit(rOther.GetParent(), rOther.GetStyle());
|
|
|
|
}
|
|
|
|
|
|
|
|
Button::take_properties(rOther);
|
|
|
|
|
|
|
|
CheckBox &rOtherCheck = static_cast<CheckBox&>(rOther);
|
|
|
|
meState = rOtherCheck.meState;
|
|
|
|
meSaveValue = rOtherCheck.meSaveValue;
|
|
|
|
mbTriState = rOtherCheck.mbTriState;
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void CheckBox::MouseButtonDown( const MouseEvent& rMEvt )
|
|
|
|
{
|
|
|
|
if ( rMEvt.IsLeft() && maMouseRect.IsInside( rMEvt.GetPosPixel() ) )
|
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() |= BUTTON_DRAW_PRESSED;
|
2008-03-05 16:07:33 +00:00
|
|
|
ImplInvalidateOrDrawCheckBoxState();
|
2000-09-18 16:07:07 +00:00
|
|
|
StartTracking();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
Button::MouseButtonDown( rMEvt );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void CheckBox::Tracking( const TrackingEvent& rTEvt )
|
|
|
|
{
|
|
|
|
if ( rTEvt.IsTrackingEnded() )
|
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if ( !(GetStyle() & WB_NOPOINTERFOCUS) && !rTEvt.IsTrackingCanceled() )
|
|
|
|
GrabFocus();
|
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() &= ~BUTTON_DRAW_PRESSED;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2012-07-01 21:10:41 +02:00
|
|
|
// do not call click handler if aborted
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( !rTEvt.IsTrackingCanceled() )
|
|
|
|
ImplCheck();
|
|
|
|
else
|
2008-03-05 16:07:33 +00:00
|
|
|
ImplInvalidateOrDrawCheckBoxState();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if ( maMouseRect.IsInside( rTEvt.GetMouseEvent().GetPosPixel() ) )
|
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( !(ImplGetButtonState() & BUTTON_DRAW_PRESSED) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() |= BUTTON_DRAW_PRESSED;
|
2008-03-05 16:07:33 +00:00
|
|
|
ImplInvalidateOrDrawCheckBoxState();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() &= ~BUTTON_DRAW_PRESSED;
|
2008-03-05 16:07:33 +00:00
|
|
|
ImplInvalidateOrDrawCheckBoxState();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void CheckBox::KeyInput( const KeyEvent& rKEvt )
|
|
|
|
{
|
|
|
|
KeyCode aKeyCode = rKEvt.GetKeyCode();
|
|
|
|
|
|
|
|
if ( !aKeyCode.GetModifier() && (aKeyCode.GetCode() == KEY_SPACE) )
|
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( !(ImplGetButtonState() & BUTTON_DRAW_PRESSED) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() |= BUTTON_DRAW_PRESSED;
|
2008-03-05 16:07:33 +00:00
|
|
|
ImplInvalidateOrDrawCheckBoxState();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
2004-07-05 14:41:27 +00:00
|
|
|
else if ( (ImplGetButtonState() & BUTTON_DRAW_PRESSED) && (aKeyCode.GetCode() == KEY_ESCAPE) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() &= ~BUTTON_DRAW_PRESSED;
|
2008-03-05 16:07:33 +00:00
|
|
|
ImplInvalidateOrDrawCheckBoxState();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
Button::KeyInput( rKEvt );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void CheckBox::KeyUp( const KeyEvent& rKEvt )
|
|
|
|
{
|
|
|
|
KeyCode aKeyCode = rKEvt.GetKeyCode();
|
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( (ImplGetButtonState() & BUTTON_DRAW_PRESSED) && (aKeyCode.GetCode() == KEY_SPACE) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() &= ~BUTTON_DRAW_PRESSED;
|
2000-09-18 16:07:07 +00:00
|
|
|
ImplCheck();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
Button::KeyUp( rKEvt );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2002-04-29 16:46:18 +00:00
|
|
|
void CheckBox::FillLayoutData() const
|
|
|
|
{
|
2009-09-14 12:09:22 +00:00
|
|
|
mpControlData->mpLayoutData = new vcl::ControlLayoutData();
|
2002-04-29 16:46:18 +00:00
|
|
|
const_cast<CheckBox*>(this)->ImplDrawCheckBox( true );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2006-06-19 18:15:23 +00:00
|
|
|
void CheckBox::Paint( const Rectangle& )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
ImplDrawCheckBox();
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void CheckBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
|
2011-01-12 15:07:10 +01:00
|
|
|
sal_uLong nFlags )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
MapMode aResMapMode( MAP_100TH_MM );
|
|
|
|
Point aPos = pDev->LogicToPixel( rPos );
|
|
|
|
Size aSize = pDev->LogicToPixel( rSize );
|
|
|
|
Size aImageSize = pDev->LogicToPixel( Size( 300, 300 ), aResMapMode );
|
|
|
|
Size aBrd1Size = pDev->LogicToPixel( Size( 20, 20 ), aResMapMode );
|
|
|
|
Size aBrd2Size = pDev->LogicToPixel( Size( 30, 30 ), aResMapMode );
|
|
|
|
long nCheckWidth = pDev->LogicToPixel( Size( 20, 20 ), aResMapMode ).Width();
|
|
|
|
Font aFont = GetDrawPixelFont( pDev );
|
|
|
|
Rectangle aStateRect;
|
|
|
|
Rectangle aMouseRect;
|
|
|
|
|
|
|
|
aImageSize.Width() = CalcZoom( aImageSize.Width() );
|
|
|
|
aImageSize.Height() = CalcZoom( aImageSize.Height() );
|
|
|
|
aBrd1Size.Width() = CalcZoom( aBrd1Size.Width() );
|
|
|
|
aBrd1Size.Height() = CalcZoom( aBrd1Size.Height() );
|
|
|
|
aBrd2Size.Width() = CalcZoom( aBrd2Size.Width() );
|
|
|
|
aBrd2Size.Height() = CalcZoom( aBrd2Size.Height() );
|
|
|
|
|
|
|
|
if ( !aBrd1Size.Width() )
|
|
|
|
aBrd1Size.Width() = 1;
|
|
|
|
if ( !aBrd1Size.Height() )
|
|
|
|
aBrd1Size.Height() = 1;
|
|
|
|
if ( !aBrd2Size.Width() )
|
|
|
|
aBrd2Size.Width() = 1;
|
|
|
|
if ( !aBrd2Size.Height() )
|
|
|
|
aBrd2Size.Height() = 1;
|
|
|
|
if ( !nCheckWidth )
|
|
|
|
nCheckWidth = 1;
|
|
|
|
|
|
|
|
pDev->Push();
|
|
|
|
pDev->SetMapMode();
|
|
|
|
pDev->SetFont( aFont );
|
|
|
|
if ( nFlags & WINDOW_DRAW_MONO )
|
|
|
|
pDev->SetTextColor( Color( COL_BLACK ) );
|
|
|
|
else
|
|
|
|
pDev->SetTextColor( GetTextColor() );
|
|
|
|
pDev->SetTextFillColor();
|
|
|
|
|
|
|
|
ImplDraw( pDev, nFlags, aPos, aSize,
|
2009-09-25 12:26:30 +00:00
|
|
|
aImageSize, aStateRect, aMouseRect, false );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
pDev->SetLineColor();
|
|
|
|
pDev->SetFillColor( Color( COL_BLACK ) );
|
|
|
|
pDev->DrawRect( aStateRect );
|
|
|
|
aStateRect.Left() += aBrd1Size.Width();
|
|
|
|
aStateRect.Top() += aBrd1Size.Height();
|
|
|
|
aStateRect.Right() -= aBrd1Size.Width();
|
|
|
|
aStateRect.Bottom() -= aBrd1Size.Height();
|
|
|
|
if ( meState == STATE_DONTKNOW )
|
|
|
|
pDev->SetFillColor( Color( COL_LIGHTGRAY ) );
|
|
|
|
else
|
|
|
|
pDev->SetFillColor( Color( COL_WHITE ) );
|
|
|
|
pDev->DrawRect( aStateRect );
|
|
|
|
|
|
|
|
if ( meState == STATE_CHECK )
|
|
|
|
{
|
|
|
|
aStateRect.Left() += aBrd2Size.Width();
|
|
|
|
aStateRect.Top() += aBrd2Size.Height();
|
|
|
|
aStateRect.Right() -= aBrd2Size.Width();
|
|
|
|
aStateRect.Bottom() -= aBrd2Size.Height();
|
|
|
|
Point aPos11( aStateRect.TopLeft() );
|
|
|
|
Point aPos12( aStateRect.BottomRight() );
|
|
|
|
Point aPos21( aStateRect.TopRight() );
|
|
|
|
Point aPos22( aStateRect.BottomLeft() );
|
|
|
|
Point aTempPos11( aPos11 );
|
|
|
|
Point aTempPos12( aPos12 );
|
|
|
|
Point aTempPos21( aPos21 );
|
|
|
|
Point aTempPos22( aPos22 );
|
|
|
|
pDev->SetLineColor( Color( COL_BLACK ) );
|
|
|
|
long nDX = 0;
|
|
|
|
for ( long i = 0; i < nCheckWidth; i++ )
|
|
|
|
{
|
|
|
|
if ( !(i % 2) )
|
|
|
|
{
|
|
|
|
aTempPos11.X() = aPos11.X()+nDX;
|
|
|
|
aTempPos12.X() = aPos12.X()+nDX;
|
|
|
|
aTempPos21.X() = aPos21.X()+nDX;
|
|
|
|
aTempPos22.X() = aPos22.X()+nDX;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
nDX++;
|
|
|
|
aTempPos11.X() = aPos11.X()-nDX;
|
|
|
|
aTempPos12.X() = aPos12.X()-nDX;
|
|
|
|
aTempPos21.X() = aPos21.X()-nDX;
|
|
|
|
aTempPos22.X() = aPos22.X()-nDX;
|
|
|
|
}
|
|
|
|
pDev->DrawLine( aTempPos11, aTempPos12 );
|
|
|
|
pDev->DrawLine( aTempPos21, aTempPos22 );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pDev->Pop();
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void CheckBox::Resize()
|
|
|
|
{
|
2002-05-08 15:05:42 +00:00
|
|
|
Control::Resize();
|
2000-09-18 16:07:07 +00:00
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void CheckBox::GetFocus()
|
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( !GetText().Len() || (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
|
2004-05-10 14:45:59 +00:00
|
|
|
{
|
|
|
|
// increase button size to have space for focus rect
|
|
|
|
// checkboxes without text will draw focusrect around the check
|
|
|
|
// See CheckBox::ImplDraw()
|
|
|
|
Point aPos( GetPosPixel() );
|
|
|
|
Size aSize( GetSizePixel() );
|
|
|
|
aPos.Move(-1,-1);
|
|
|
|
aSize.Height() += 2;
|
|
|
|
aSize.Width() += 2;
|
|
|
|
SetPosSizePixel( aPos.X(), aPos.Y(), aSize.Width(), aSize.Height(), WINDOW_POSSIZE_ALL );
|
|
|
|
ImplDrawCheckBox();
|
|
|
|
}
|
|
|
|
else
|
2004-07-05 14:41:27 +00:00
|
|
|
ShowFocus( ImplGetFocusRect() );
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
SetInputContext( InputContext( GetFont() ) );
|
|
|
|
Button::GetFocus();
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void CheckBox::LoseFocus()
|
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplGetButtonState() &= ~BUTTON_DRAW_PRESSED;
|
2008-03-05 16:07:33 +00:00
|
|
|
ImplInvalidateOrDrawCheckBoxState();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
HideFocus();
|
|
|
|
Button::LoseFocus();
|
2004-05-10 14:45:59 +00:00
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( !GetText().Len() || (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
|
2004-05-10 14:45:59 +00:00
|
|
|
{
|
|
|
|
// decrease button size again (see GetFocus())
|
|
|
|
// checkboxes without text will draw focusrect around the check
|
|
|
|
Point aPos( GetPosPixel() );
|
|
|
|
Size aSize( GetSizePixel() );
|
|
|
|
aPos.Move(1,1);
|
|
|
|
aSize.Height() -= 2;
|
|
|
|
aSize.Width() -= 2;
|
|
|
|
SetPosSizePixel( aPos.X(), aPos.Y(), aSize.Width(), aSize.Height(), WINDOW_POSSIZE_ALL );
|
|
|
|
ImplDrawCheckBox();
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void CheckBox::StateChanged( StateChangedType nType )
|
|
|
|
{
|
|
|
|
Button::StateChanged( nType );
|
|
|
|
|
|
|
|
if ( nType == STATE_CHANGE_STATE )
|
|
|
|
{
|
|
|
|
if ( IsReallyVisible() && IsUpdateMode() )
|
2005-04-12 11:18:06 +00:00
|
|
|
Invalidate( maStateRect );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else if ( (nType == STATE_CHANGE_ENABLE) ||
|
|
|
|
(nType == STATE_CHANGE_TEXT) ||
|
|
|
|
(nType == STATE_CHANGE_IMAGE) ||
|
|
|
|
(nType == STATE_CHANGE_DATA) ||
|
|
|
|
(nType == STATE_CHANGE_UPDATEMODE) )
|
|
|
|
{
|
|
|
|
if ( IsUpdateMode() )
|
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
else if ( nType == STATE_CHANGE_STYLE )
|
|
|
|
{
|
|
|
|
SetStyle( ImplInitStyle( GetWindow( WINDOW_PREV ), GetStyle() ) );
|
|
|
|
|
|
|
|
if ( (GetPrevStyle() & CHECKBOX_VIEW_STYLE) !=
|
|
|
|
(GetStyle() & CHECKBOX_VIEW_STYLE) )
|
|
|
|
{
|
|
|
|
if ( IsUpdateMode() )
|
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ( (nType == STATE_CHANGE_ZOOM) ||
|
|
|
|
(nType == STATE_CHANGE_CONTROLFONT) )
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
ImplInitSettings( sal_True, sal_False, sal_False );
|
2000-09-18 16:07:07 +00:00
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
ImplInitSettings( sal_False, sal_True, sal_False );
|
2000-09-18 16:07:07 +00:00
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
ImplInitSettings( sal_False, sal_False, sal_True );
|
2000-09-18 16:07:07 +00:00
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void CheckBox::DataChanged( const DataChangedEvent& rDCEvt )
|
|
|
|
{
|
|
|
|
Button::DataChanged( rDCEvt );
|
|
|
|
|
|
|
|
if ( (rDCEvt.GetType() == DATACHANGED_FONTS) ||
|
|
|
|
(rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) ||
|
|
|
|
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
|
|
|
|
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
ImplInitSettings( sal_True, sal_True, sal_True );
|
2000-09-18 16:07:07 +00:00
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2004-02-20 07:50:15 +00:00
|
|
|
long CheckBox::PreNotify( NotifyEvent& rNEvt )
|
|
|
|
{
|
2004-05-10 14:45:59 +00:00
|
|
|
long nDone = 0;
|
|
|
|
const MouseEvent* pMouseEvt = NULL;
|
|
|
|
|
2006-06-19 18:15:23 +00:00
|
|
|
if( (rNEvt.GetType() == EVENT_MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != NULL )
|
2004-05-10 14:45:59 +00:00
|
|
|
{
|
|
|
|
if( !pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged() )
|
|
|
|
{
|
|
|
|
// trigger redraw if mouse over state has changed
|
|
|
|
if( IsNativeControlSupported(CTRL_CHECKBOX, PART_ENTIRE_CONTROL) )
|
|
|
|
{
|
|
|
|
if( ( maMouseRect.IsInside( GetPointerPosPixel()) &&
|
|
|
|
!maMouseRect.IsInside( GetLastPointerPosPixel()) ) ||
|
|
|
|
( maMouseRect.IsInside( GetLastPointerPosPixel()) &&
|
|
|
|
!maMouseRect.IsInside( GetPointerPosPixel()) ) ||
|
|
|
|
pMouseEvt->IsLeaveWindow() || pMouseEvt->IsEnterWindow() )
|
|
|
|
{
|
|
|
|
Invalidate( maStateRect );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return nDone ? nDone : Button::PreNotify(rNEvt);
|
2004-02-20 07:50:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
void CheckBox::Toggle()
|
|
|
|
{
|
2004-10-22 11:12:18 +00:00
|
|
|
ImplCallEventListenersAndHandler( VCLEVENT_CHECKBOX_TOGGLE, maToggleHdl, this );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void CheckBox::SetState( TriState eState )
|
|
|
|
{
|
|
|
|
if ( !mbTriState && (eState == STATE_DONTKNOW) )
|
|
|
|
eState = STATE_NOCHECK;
|
|
|
|
|
|
|
|
if ( meState != eState )
|
|
|
|
{
|
|
|
|
meState = eState;
|
|
|
|
StateChanged( STATE_CHANGE_STATE );
|
2001-06-15 11:56:11 +00:00
|
|
|
Toggle();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-04-25 11:35:17 +01:00
|
|
|
bool CheckBox::set_property(const rtl::OString &rKey, const rtl::OString &rValue)
|
|
|
|
{
|
|
|
|
if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM("active")))
|
|
|
|
SetState(toBool(rValue) ? STATE_CHECK : STATE_NOCHECK);
|
|
|
|
else
|
|
|
|
return Window::set_property(rKey, rValue);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void CheckBox::EnableTriState( sal_Bool bTriState )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if ( mbTriState != bTriState )
|
|
|
|
{
|
|
|
|
mbTriState = bTriState;
|
|
|
|
|
|
|
|
if ( !bTriState && (meState == STATE_DONTKNOW) )
|
|
|
|
SetState( STATE_NOCHECK );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2009-09-25 12:26:30 +00:00
|
|
|
long CheckBox::ImplGetImageToTextDistance() const
|
|
|
|
{
|
|
|
|
// 4 pixels, but take zoom into account, so the text doesn't "jump" relative to surrounding elements,
|
|
|
|
// which might have been aligned with the text of the check box
|
|
|
|
return CalcZoom( 4 );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2005-03-18 16:51:14 +00:00
|
|
|
Size CheckBox::ImplGetCheckImageSize() const
|
|
|
|
{
|
|
|
|
Size aSize;
|
|
|
|
// why are IsNativeControlSupported and GetNativeControlRegion not const ?
|
|
|
|
CheckBox* pThis = const_cast<CheckBox*>(this);
|
|
|
|
bool bDefaultSize = true;
|
|
|
|
if( pThis->IsNativeControlSupported( CTRL_CHECKBOX, PART_ENTIRE_CONTROL ) )
|
|
|
|
{
|
|
|
|
ImplControlValue aControlValue;
|
2005-04-12 11:18:06 +00:00
|
|
|
// #i45896# workaround gcc3.3 temporary problem
|
2010-07-05 11:20:24 +02:00
|
|
|
Rectangle aCtrlRegion( Point( 0, 0 ), GetSizePixel() );
|
2005-03-18 16:51:14 +00:00
|
|
|
ControlState nState = CTRL_STATE_DEFAULT|CTRL_STATE_ENABLED;
|
2010-07-05 11:20:24 +02:00
|
|
|
Rectangle aBoundingRgn, aContentRgn;
|
2005-03-18 16:51:14 +00:00
|
|
|
|
|
|
|
// get native size of a check box
|
|
|
|
if( pThis->GetNativeControlRegion( CTRL_CHECKBOX, PART_ENTIRE_CONTROL, aCtrlRegion,
|
|
|
|
nState, aControlValue, rtl::OUString(),
|
|
|
|
aBoundingRgn, aContentRgn ) )
|
|
|
|
{
|
2010-07-05 11:20:24 +02:00
|
|
|
aSize = aContentRgn.GetSize();
|
2005-03-18 16:51:14 +00:00
|
|
|
bDefaultSize = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if( bDefaultSize )
|
|
|
|
aSize = GetCheckImage( GetSettings(), 0 ).GetSizePixel();
|
|
|
|
return aSize;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
Image CheckBox::GetCheckImage( const AllSettings& rSettings, sal_uInt16 nFlags )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
ImplSVData* pSVData = ImplGetSVData();
|
|
|
|
const StyleSettings& rStyleSettings = rSettings.GetStyleSettings();
|
2011-01-21 17:18:37 +01:00
|
|
|
sal_uInt16 nStyle = 0;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( rStyleSettings.GetOptions() & STYLE_OPTION_MONO )
|
|
|
|
nStyle = STYLE_CHECKBOX_MONO;
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( !pSVData->maCtrlData.mpCheckImgList ||
|
|
|
|
(pSVData->maCtrlData.mnCheckStyle != nStyle) ||
|
|
|
|
(pSVData->maCtrlData.mnLastCheckFColor != rStyleSettings.GetFaceColor().GetColor()) ||
|
|
|
|
(pSVData->maCtrlData.mnLastCheckWColor != rStyleSettings.GetWindowColor().GetColor()) ||
|
|
|
|
(pSVData->maCtrlData.mnLastCheckLColor != rStyleSettings.GetLightColor().GetColor()) )
|
|
|
|
{
|
|
|
|
if ( pSVData->maCtrlData.mpCheckImgList )
|
|
|
|
delete pSVData->maCtrlData.mpCheckImgList;
|
|
|
|
|
|
|
|
pSVData->maCtrlData.mnLastCheckFColor = rStyleSettings.GetFaceColor().GetColor();
|
|
|
|
pSVData->maCtrlData.mnLastCheckWColor = rStyleSettings.GetWindowColor().GetColor();
|
|
|
|
pSVData->maCtrlData.mnLastCheckLColor = rStyleSettings.GetLightColor().GetColor();
|
|
|
|
|
2005-09-28 13:39:27 +00:00
|
|
|
ResMgr* pResMgr = ImplGetResMgr();
|
2007-06-06 13:21:07 +00:00
|
|
|
pSVData->maCtrlData.mpCheckImgList = new ImageList();
|
2005-09-28 13:39:27 +00:00
|
|
|
if( pResMgr )
|
2007-06-06 13:21:07 +00:00
|
|
|
LoadThemedImageList( rStyleSettings,
|
|
|
|
pSVData->maCtrlData.mpCheckImgList,
|
|
|
|
ResId( SV_RESID_BITMAP_CHECK+nStyle, *pResMgr ), 9 );
|
2000-09-18 16:07:07 +00:00
|
|
|
pSVData->maCtrlData.mnCheckStyle = nStyle;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 nId;
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( nFlags & BUTTON_DRAW_DISABLED )
|
|
|
|
{
|
|
|
|
if ( nFlags & BUTTON_DRAW_DONTKNOW )
|
|
|
|
nId = 9;
|
|
|
|
else if ( nFlags & BUTTON_DRAW_CHECKED )
|
|
|
|
nId = 6;
|
|
|
|
else
|
|
|
|
nId = 5;
|
|
|
|
}
|
|
|
|
else if ( nFlags & BUTTON_DRAW_PRESSED )
|
|
|
|
{
|
|
|
|
if ( nFlags & BUTTON_DRAW_DONTKNOW )
|
|
|
|
nId = 8;
|
|
|
|
else if ( nFlags & BUTTON_DRAW_CHECKED )
|
|
|
|
nId = 4;
|
|
|
|
else
|
|
|
|
nId = 3;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if ( nFlags & BUTTON_DRAW_DONTKNOW )
|
|
|
|
nId = 7;
|
|
|
|
else if ( nFlags & BUTTON_DRAW_CHECKED )
|
|
|
|
nId = 2;
|
|
|
|
else
|
|
|
|
nId = 1;
|
|
|
|
}
|
|
|
|
return pSVData->maCtrlData.mpCheckImgList->GetImage( nId );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2008-04-04 10:01:13 +00:00
|
|
|
void CheckBox::ImplSetMinimumNWFSize()
|
|
|
|
{
|
|
|
|
Push( PUSH_MAPMODE );
|
|
|
|
SetMapMode( MAP_PIXEL );
|
|
|
|
|
|
|
|
ImplControlValue aControlValue;
|
|
|
|
Size aCurSize( GetSizePixel() );
|
2010-07-05 11:20:24 +02:00
|
|
|
Rectangle aCtrlRegion( Point( 0, 0 ), aCurSize );
|
|
|
|
Rectangle aBoundingRgn, aContentRgn;
|
2008-04-04 10:01:13 +00:00
|
|
|
|
|
|
|
// get native size of a radiobutton
|
|
|
|
if( GetNativeControlRegion( CTRL_CHECKBOX, PART_ENTIRE_CONTROL, aCtrlRegion,
|
|
|
|
CTRL_STATE_DEFAULT|CTRL_STATE_ENABLED, aControlValue, rtl::OUString(),
|
|
|
|
aBoundingRgn, aContentRgn ) )
|
|
|
|
{
|
2010-07-05 11:20:24 +02:00
|
|
|
Size aSize = aContentRgn.GetSize();
|
2008-04-04 10:01:13 +00:00
|
|
|
|
|
|
|
if( aSize.Height() > aCurSize.Height() )
|
|
|
|
{
|
|
|
|
aCurSize.Height() = aSize.Height();
|
|
|
|
SetSizePixel( aCurSize );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Pop();
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
Size CheckBox::CalcMinimumSize( long nMaxWidth ) const
|
|
|
|
{
|
2005-03-18 16:51:14 +00:00
|
|
|
Size aSize = ImplGetCheckImageSize();
|
2001-04-27 13:24:48 +00:00
|
|
|
nMaxWidth -= aSize.Width();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
XubString aText = GetText();
|
2004-07-05 14:41:27 +00:00
|
|
|
if ( aText.Len() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2001-04-27 13:24:48 +00:00
|
|
|
// subtract what will be added later
|
|
|
|
nMaxWidth-=2;
|
2009-09-25 12:26:30 +00:00
|
|
|
nMaxWidth -= ImplGetImageToTextDistance();
|
2001-04-27 13:24:48 +00:00
|
|
|
|
|
|
|
Size aTextSize = GetTextRect( Rectangle( Point(), Size( nMaxWidth > 0 ? nMaxWidth : 0x7fffffff, 0x7fffffff ) ),
|
2000-09-18 16:07:07 +00:00
|
|
|
aText, FixedText::ImplGetTextStyle( GetStyle() ) ).GetSize();
|
2001-04-27 13:24:48 +00:00
|
|
|
aSize.Width()+=2; // for focus rect
|
2009-09-25 12:26:30 +00:00
|
|
|
aSize.Width() += ImplGetImageToTextDistance();
|
2000-09-18 16:07:07 +00:00
|
|
|
aSize.Width() += aTextSize.Width();
|
|
|
|
if ( aSize.Height() < aTextSize.Height() )
|
|
|
|
aSize.Height() = aTextSize.Height();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2002-07-08 15:11:07 +00:00
|
|
|
// is this still correct ? since the checkbox now
|
|
|
|
// shows a focus rect it should be 2 pixels wider and longer
|
2000-09-18 16:07:07 +00:00
|
|
|
/* da ansonsten im Writer die Control zu weit oben haengen
|
|
|
|
aSize.Width() += 2;
|
|
|
|
aSize.Height() += 2;
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
|
|
|
|
return CalcWindowSize( aSize );
|
|
|
|
}
|
|
|
|
|
2008-01-14 12:04:30 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
Size CheckBox::GetOptimalSize(WindowSizeType eType) const
|
|
|
|
{
|
|
|
|
switch (eType) {
|
|
|
|
case WINDOWSIZE_MINIMUM:
|
|
|
|
return CalcMinimumSize();
|
|
|
|
default:
|
|
|
|
return Button::GetOptimalSize( eType );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
// =======================================================================
|
|
|
|
|
|
|
|
ImageButton::ImageButton( Window* pParent, WinBits nStyle ) :
|
|
|
|
PushButton( pParent, nStyle )
|
|
|
|
{
|
2004-07-05 14:41:27 +00:00
|
|
|
ImplInitStyle();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
ImageButton::ImageButton( Window* pParent, const ResId& rResId ) :
|
|
|
|
PushButton( pParent, rResId.SetRT( RSC_IMAGEBUTTON ) )
|
|
|
|
{
|
2011-01-12 15:07:10 +01:00
|
|
|
sal_uLong nObjMask = ReadLongRes();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( RSC_IMAGEBUTTON_IMAGE & nObjMask )
|
|
|
|
{
|
2007-04-26 08:27:13 +00:00
|
|
|
SetModeImage( Image( ResId( (RSHEADER_TYPE*)GetClassRes(), *rResId.GetResMgr() ) ) );
|
2000-09-18 16:07:07 +00:00
|
|
|
IncrementRes( GetObjSizeRes( (RSHEADER_TYPE*)GetClassRes() ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( RSC_IMAGEBUTTON_SYMBOL & nObjMask )
|
2005-01-03 16:38:30 +00:00
|
|
|
SetSymbol( (SymbolType)ReadLongRes() );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( RSC_IMAGEBUTTON_STATE & nObjMask )
|
2005-01-03 16:38:30 +00:00
|
|
|
SetState( (TriState)ReadLongRes() );
|
2004-07-05 14:41:27 +00:00
|
|
|
|
|
|
|
ImplInitStyle();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
ImageButton::~ImageButton()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2004-07-05 14:41:27 +00:00
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
void ImageButton::ImplInitStyle()
|
|
|
|
{
|
|
|
|
WinBits nStyle = GetStyle();
|
|
|
|
|
|
|
|
if ( ! ( nStyle & ( WB_RIGHT | WB_LEFT ) ) )
|
|
|
|
nStyle |= WB_CENTER;
|
|
|
|
|
|
|
|
if ( ! ( nStyle & ( WB_TOP | WB_BOTTOM ) ) )
|
|
|
|
nStyle |= WB_VCENTER;
|
|
|
|
|
|
|
|
SetStyle( nStyle );
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
// =======================================================================
|
|
|
|
|
|
|
|
ImageRadioButton::ImageRadioButton( Window* pParent, WinBits nStyle ) :
|
|
|
|
RadioButton( pParent, nStyle )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
ImageRadioButton::ImageRadioButton( Window* pParent, const ResId& rResId ) :
|
|
|
|
RadioButton( pParent, rResId.SetRT( RSC_IMAGERADIOBUTTON ) )
|
|
|
|
{
|
2011-01-12 15:07:10 +01:00
|
|
|
sal_uLong nObjMask = ReadLongRes();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( RSC_IMAGERADIOBUTTON_IMAGE & nObjMask )
|
|
|
|
{
|
2007-04-26 08:27:13 +00:00
|
|
|
SetModeRadioImage( Image( ResId( (RSHEADER_TYPE*)GetClassRes(), *rResId.GetResMgr() ) ) );
|
2000-09-18 16:07:07 +00:00
|
|
|
IncrementRes( GetObjSizeRes( (RSHEADER_TYPE*)GetClassRes() ) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
ImageRadioButton::~ImageRadioButton()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// =======================================================================
|
|
|
|
|
|
|
|
TriStateBox::TriStateBox( Window* pParent, WinBits nStyle ) :
|
|
|
|
CheckBox( pParent, nStyle )
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
EnableTriState( sal_True );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
TriStateBox::TriStateBox( Window* pParent, const ResId& rResId ) :
|
|
|
|
CheckBox( pParent, rResId.SetRT( RSC_TRISTATEBOX ) )
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
EnableTriState( sal_True );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-01-12 15:07:10 +01:00
|
|
|
sal_uLong nTriState = ReadLongRes();
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 bDisableTriState = ReadShortRes();
|
2000-09-18 16:07:07 +00:00
|
|
|
//anderer Wert als Default ?
|
|
|
|
if ( (TriState)nTriState != STATE_NOCHECK )
|
|
|
|
SetState( (TriState)nTriState );
|
|
|
|
if ( bDisableTriState )
|
2010-09-29 15:46:40 +08:00
|
|
|
EnableTriState( sal_False );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
TriStateBox::~TriStateBox()
|
|
|
|
{
|
2001-06-15 11:56:11 +00:00
|
|
|
}
|
2009-09-08 19:48:08 +00:00
|
|
|
|
|
|
|
// =======================================================================
|
|
|
|
|
2012-08-23 11:54:40 +01:00
|
|
|
DisclosureButton::DisclosureButton( Window* pParent, WinBits nStyle ) :
|
|
|
|
CheckBox( pParent, nStyle )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2009-09-08 19:48:08 +00:00
|
|
|
DisclosureButton::DisclosureButton( Window* pParent, const ResId& rResId ) :
|
|
|
|
CheckBox( pParent, rResId.SetRT( RSC_CHECKBOX ) )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void DisclosureButton::ImplDrawCheckBoxState()
|
|
|
|
{
|
|
|
|
/* HACK: DisclosureButton is currently assuming, that the disclosure sign
|
|
|
|
will fit into the rectangle occupied by a normal checkbox on all themes.
|
|
|
|
If this does not hold true for some theme, ImplGetCheckImageSize
|
|
|
|
would have to be overloaded for DisclosureButton; also GetNativeControlRegion
|
|
|
|
for CTRL_LISTNODE would have to be implemented and taken into account
|
|
|
|
*/
|
|
|
|
|
|
|
|
Rectangle aStateRect( GetStateRect() );
|
|
|
|
|
2010-07-05 11:20:24 +02:00
|
|
|
ImplControlValue aControlValue( GetState() == STATE_CHECK ? BUTTONVALUE_ON : BUTTONVALUE_OFF );
|
|
|
|
Rectangle aCtrlRegion( aStateRect );
|
2009-09-08 19:48:08 +00:00
|
|
|
ControlState nState = 0;
|
|
|
|
|
|
|
|
if ( HasFocus() ) nState |= CTRL_STATE_FOCUSED;
|
|
|
|
if ( ImplGetButtonState() & BUTTON_DRAW_DEFAULT ) nState |= CTRL_STATE_DEFAULT;
|
|
|
|
if ( Window::IsEnabled() ) nState |= CTRL_STATE_ENABLED;
|
2009-10-29 21:28:35 +01:00
|
|
|
if ( IsMouseOver() && GetMouseRect().IsInside( GetPointerPosPixel() ) )
|
2009-09-08 19:48:08 +00:00
|
|
|
nState |= CTRL_STATE_ROLLOVER;
|
|
|
|
|
|
|
|
if( ! DrawNativeControl( CTRL_LISTNODE, PART_ENTIRE_CONTROL, aCtrlRegion, nState,
|
|
|
|
aControlValue, rtl::OUString() ) )
|
|
|
|
{
|
|
|
|
ImplSVCtrlData& rCtrlData( ImplGetSVData()->maCtrlData );
|
|
|
|
if( ! rCtrlData.mpDisclosurePlus )
|
|
|
|
rCtrlData.mpDisclosurePlus = new Image( BitmapEx( VclResId( SV_DISCLOSURE_PLUS ) ) );
|
|
|
|
if( ! rCtrlData.mpDisclosureMinus )
|
|
|
|
rCtrlData.mpDisclosureMinus = new Image( BitmapEx( VclResId( SV_DISCLOSURE_MINUS ) ) );
|
|
|
|
|
|
|
|
Image* pImg = NULL;
|
2010-11-17 07:41:37 -08:00
|
|
|
pImg = IsChecked() ? rCtrlData.mpDisclosureMinus : rCtrlData.mpDisclosurePlus;
|
2009-09-08 19:48:08 +00:00
|
|
|
|
|
|
|
DBG_ASSERT( pImg, "no disclosure image" );
|
|
|
|
if( ! pImg )
|
|
|
|
return;
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 nStyle = 0;
|
2009-09-08 19:48:08 +00:00
|
|
|
if( ! IsEnabled() )
|
|
|
|
nStyle |= IMAGE_DRAW_DISABLE;
|
|
|
|
|
|
|
|
Size aSize( aStateRect.GetSize() );
|
|
|
|
Size aImgSize( pImg->GetSizePixel() );
|
|
|
|
Point aOff( (aSize.Width() - aImgSize.Width())/2,
|
|
|
|
(aSize.Height() - aImgSize.Height())/2 );
|
|
|
|
aOff += aStateRect.TopLeft();
|
|
|
|
DrawImage( aOff, *pImg, nStyle );
|
|
|
|
}
|
|
|
|
}
|
2009-10-29 14:22:34 +01:00
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void DisclosureButton::KeyInput( const KeyEvent& rKEvt )
|
|
|
|
{
|
|
|
|
KeyCode aKeyCode = rKEvt.GetKeyCode();
|
|
|
|
|
|
|
|
if( !aKeyCode.GetModifier() &&
|
|
|
|
( ( aKeyCode.GetCode() == KEY_ADD ) ||
|
|
|
|
( aKeyCode.GetCode() == KEY_SUBTRACT ) )
|
|
|
|
)
|
|
|
|
{
|
|
|
|
Check( aKeyCode.GetCode() == KEY_ADD );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
Button::KeyInput( rKEvt );
|
|
|
|
}
|
|
|
|
|
2010-10-14 08:27:31 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|