Custom Widget question

Olivier Hallot olivier.hallot at documentfoundation.org
Mon Feb 25 16:41:00 PST 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Caolán

Em 25-02-2013 21:01, Caolán McNamara escreveu:
> On Sun, 2013-02-24 at 23:05 -0300, Olivier Hallot wrote:
>> Hi,
>>
>> Following instruction for custom widgets, I tried this implementation
>> below. It seems it screwed something related to rResId at construction
>> time. Thanks in advance for pointing my mistake.
> 
> Yeah, the makeWIDGET calls have to be of form...
> 
> extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeWIDGET(Window *,
> VclBuilder::stringmap &)
> 
> i.e. there is no ResId argument (because the widgets are inside a
> "Resource" anymore)
> 
> which means that you'll need another FrameDirectionListBox ctor that
> doesn't take a RedId
> 
> e.g.
> 
> FrameDirectionListBox::FrameDirectionListBox( Window* pParent, WinBits
> nBits ) :
>     ListBox( pParent, nBits )
> {
> }
> 
> commit 3fd9e569d8a4c00020d5ac2db566e1ed7f920a6e is probably *very*
> similar to what you need, i.e. the pattern of makeSvxTextEncodingBox and
> the addition of the SvxTextEncodingBox::SvxTextEncodingBox( Window*
> pParent, WinBits nBits ) ctor

Yeah... I was already trying to mimick it, but with not much
understanding. Thanks for the explanation.

> 
> p.s. run ./bin/verify-custom-widgets-libs after you've successfully
> gotten it all running under Linux to make sure it'll also work ok under
> Windows.

Thanks for pointing that. I didn't know about it.

> 
> p.p.s. see ffea6fc98fe7137cafd88bc191c850caa9717862 for adding these
> custom widgets to the glade catalog, which doesn't "do" anything, but
> allows you to modify the custom widget inside glade without it silently
> dropping your changes, and cut and paste the custom widget without
> crashing.

I already got it. Nice addition.

Thanks for your attention Caolán.
- -- 
Olivier Hallot
Founder, Board of Directors Member - The Document Foundation
The Document Foundation, Zimmerstr. 69, 10117 Berlin, Germany
Fundação responsável civilmente, de acordo com o direito civil
Detalhes Legais: http://www.documentfoundation.org/imprint
LibreOffice translation leader for Brazilian Portuguese
+55-21-8822-8812
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQEcBAEBAgAGBQJRLAScAAoJEJp3R7nH3vLxZckH/RQ8G8oUmqYEB6mKHRaw2cYL
9wq8EgTWwULF9vT3QFpKsFxwF+V+M3gcI7ll20bQUJx6dFKFoLcnL+Aye6WlqJ0l
+t92ZDsCqf0oAAXYc/NC1I+uFp44mrPsR417t2PmpZlwSM8RBO0Wmhjwk+QwbxoP
FTCLUp+aECBdQrVV4KY/9E++k4SLW7JsO/LAk7cgADBtaZis384nC5Vm/OqAkfdx
uxH1Gg3xxHKXvYxl+o9zf9hFZevwqUHfo0+p+BWjL/rMNJW5eAUKzaPtinfuwtXV
B5darQs3o0K0AKN2uiShfmz/PWaCcACc10LRYnnmqObS8aosXjzkOyP8+5NQAvY=
=EttL
-----END PGP SIGNATURE-----


More information about the LibreOffice mailing list