Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


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@suse.com  <><, Pseudo Engineer, itinerant idiot


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.