Hi Ariel,

*very* interesting, thank you for your findings (and very impressed,
that you were able to find/spot that particular code) !

Regards

---rony


On 16.03.2010 16:28, Ariel Constenla-Haile wrote:
> Hello Rony,
>
> in the meantime I've found
> http://svn.services.openoffice.org/opengrok/xref/DEV300_m75/vcl/inc/vcl/window.hxx#858
>
> //  window extents including border and decoratrion
> Rectangle           GetWindowExtentsRelative( Window *pRelativeWindow );
> // window extents of the client window, coordinates to be used in SetPosPixel
> Rectangle           GetClientWindowExtentsRelative( Window *pRelativeWindow );
>
>
> On Monday 15 March 2010, 16:21, Rony G. Flatscher wrote:
>   
>> just a pointer, having gone through the Javadocs over the weekend: if
>> creating an instance of javax.swing.JFrame and pack it, one can use the
>> getInsets() method to retrieve an Inset object which has the
>> members/fields left, top, right, bottom, giving the respecitve insets.
>>
>> Now if you want to adjust the OOo document's XFrame's containerWindow
>> posSize to include the Window decoration (borders and title bar), you
>> would have to do something like:
>>
>>     posSize~x      -= insets~left
>>     posSize~Y      -= insets~top
>>     posSize~width  += insets~left + insets~right
>>     posSize~height += insets~top  + insets~bottom
>>     
> much like 
> http://svn.services.openoffice.org/opengrok/xref/DEV300_m75/vcl/source/window/window.cxx#7468
>
> I'll try to wrap this in a css::awt::XWindow3 [my god, what awfulness!] API 
> and test how it works (indeed quite easy task, no rocket science).
>
> It's "interesting" to see that some developer needed such a thing (and other 
> missing features in OOo API), but instead of improving the API he designed 
> something ad hoc; that in fact does not work for your use case, because it 
> checks you pass a valid parent window, and top windows have no parent:
>
> http://svn.services.openoffice.org/opengrok/xref/DEV300_m75/sd/source/ui/presenter/PresenterHelper.cxx#325
>
> Regards
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org

Reply via email to