[Libreoffice] controls in basctl
Michael Meeks
michael.meeks at suse.com
Tue Dec 13 01:49:22 PST 2011
Hi August,
On Tue, 2011-12-13 at 00:20 -0500, August Sodora wrote:
> I've noticed that many of the controls in the basic ide are not
> rendered natively and want to correct that.
Oh - that is odd :-) by which you're talking about theming ?
> It seems like the controls that are used as base controls (like the
> things in svtools/inc/svtools/svtabbx.hxx) should be updated to use
> something newer but I'm not so sure where to start.
Ah - so; of course, the svtools versions are likely to be much more
functional than the VCL versions, at least that is one thought.
SvTabListBox -> SvTreeListBox -> SvLBox -> Control ... oooh - you're
quite right, it is a new base control :-)
> I'm not even sure what the proper base class for a dialog is. Is
> there any reason that basctl uses these ui elements other than the
> fact nobody has gotten around to looking in there for a while?
Noel might know; I suspect that (at one stage) they were somehow more
functional than the equivalent VCL versions - of course; if we do an API
audit we might find that is no longer the case ;-)
class SVT_DLLPUBLIC SvLBox
:public Control
,public SvListView
,public DropTargetHelper
,public DragSourceHelper
,public ::vcl::IMnemonicEntryList
,public ::vcl::ISearchableStringList
vs.
class VCL_DLLPUBLIC ListBox : public Control
would suggest some of the possible differences around D&D etc. though
why VCL should not optionally have this in it's ListBox - I don't know.
Assuming you want to brush it up to use native theming; the rendering
APIs to use (in all their awful oddness ;-) are vcl/inc/vcl/outdev.hxx:
// Request rendering of a particular control and/or part
sal_Bool DrawNativeControl( ControlType nType,
ControlPart nPart,
const Rectangle& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
::rtl::OUString aCaption );
// Query the native control's actual drawing region (including adornment)
sal_Bool GetNativeControlRegion( ControlType nType,
ControlPart nPart,
const Rectangle& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
::rtl::OUString aCaption,
Rectangle &rNativeBoundingRegion,
Rectangle &rNativeContentRegion );
Hopefully that helps ? :-)
ATB,
Michael.
--
michael.meeks at suse.com <><, Pseudo Engineer, itinerant idiot
More information about the LibreOffice
mailing list