|
List Info
Thread: Re: Questions about com.sun.star.awt.MenuBar and com.sun.star.awt.PopupMenu
|
|
| Re: Questions about
com.sun.star.awt.MenuBar and
com.sun.star.awt.PopupMenu |

|
2007-10-10 02:35:26 |
Ariel Constenla-Haile schrieb:
> Hi people,
>
> FIRST of all, I would like to thank the one who wrote
the code of the
> GUI examples on the new SDK
> (OpenOffice.org_2.3_SDK/examples/DevelopersGuide/GUI):
it answers some
> questions I had for a long time! Thanks hr (I don't
know your real name!)!
Hi Ariel,
the author of the examples and the toolkit API chapter in
the
Developer's Guide is Berend Cornelius. Jürgen integrated the
examples
into the OpenOffice.org SDK.
>
> THEN, some questions about the code examples:
>
>
************************************************************
****************
>
>
> * FIRST QUESTION: On the API reference, I always
founded the XMenu and
> XPopupMenu interfaces (and related ones), but as there
is no service
> specification at all, I just didn't know how to
instantiate this
> interfaces. Well, now I've learn that the services
names used in the
> examples are
>
> "stardiv.Toolkit.VCLXMenuBar" and
> "stardiv.Toolkit.VCLXPopupMenu"
>
> At first sight, they look like the implementation names
you use
> internally, but not like service names published as UNO
services, I
> mean, com.sun.star.awt.MenuBar, and
com.sun.star.awt.PopupMenu
>
> But to my surprise, I used
XComponentContext::getServiceManager() to get
> the XMultiComponentFactory, then used its method
> getAvailableServiceNames() and got a sequence that DOES
contain these
> service names:
>
> "com.sun.star.awt.MenuBar"
> "com.sun.star.awt.PopupMenu"
> "stardiv.vcl.MenuBar"
> "stardiv.vcl.PopupMenu"
>
> And we can use any of the names:
>
> 1. "com.sun.star.awt.PopupMenu"
> 2. "stardiv.vcl.PopupMenu"
> 3. "stardiv.Toolkit.VCLXPopupMenu"
>
> as they instantiate the same type.
>
> And again to my surprise,
"com.sun.star.awt.MenuBar" and
> "com.sun.star.awt.PopupMenu" are not included
on OOo2.3 SDK API
> reference, nor in the source/offapi/com/sun/star/awt
IDL files.
I am the maintainer of the OpenOffice.org toolkit and I know
that the
IDL files need a brush up to be up to date. Luckily Berend
created many
issues about the IDL files which I want to fix in the near
future.
>
> So, are they going to be included in the API? Is it
safe to use them?
> What service name shall we use, out of the tree
options? Since which OOo
> version can they be used?
You should use "com.sun.star.awt.MenuBar" and
"com.sun.star.awt.PopupMenu". The other service
names are outdated and
only supported for compatibility reasons. Could please write
an issue
and set me (cd openoffice.org) as the owner.
>
>
************************************************************
*********
>
> * SECOND QUESTION: the excellent example uses a fixed
text control to
> execute the PopupMenu. I played with an implementation
of the dbaccess
> SQL Direct dialog: I wanted to add a pop up menu to the
edit control to
> insert SQL templates in it (just like OOo Math commands
window's context
> menu).
>
> You can find a picture of the result here:
>
> http://www.arielconstenlahaile.com.ar/o
oo/temp/DBExtras_XSQLDirect_04.png
>
>
> But I found some problems: when I right click on the
edit control
> window, my implementation of the XMouseListener isn't
call first, but
> the edit control own implementation, and it consumes
the event,
> executing its context menu (the "Paste/Select
all/Special chars". one),
> and my XMouseListener implementation gets called just
if I right clik
> on that context menu.
>
> The problem here: FIRST the context menu of the edit
control is
> executed, THEN my pop up menu IF I right click on this
context menu.
> What I really need here is an XContextMenuInterceptor,
but how do I get
> the XContextMenuInterception for the edit control when
it has no
> com.sun.star.frame.Controller ? (as long as I know,
UnoControls
> implement the Model-View Paradigm, NOT the
Frame-Controller-Model Paradigm)
>
>
> The example on the SDK works OK, because the fixed text
implementation
> has no context menu, but how do I intercept the context
menu of
> UnoControls? Is it possible at all? (I mean, using API,
not hacking
> OOo's C++ code).
No, that's no possible. Currently the toolkit uno controls
are just
small wrappers around the VCL based controls. If you need
something like
this you have to write a "request for
enhancement". We want to extend
the current toolkit API, but need feedback from extension
developers.
Only you can give us information what you really miss.
Therefore please
write request for enhancements and let us know your problems
with the API.
You can find the result of a gap analysis I did last year
regarding the
toolkit API here:
http://wiki.services.openoffic
e.org/wiki/Framework/Article/Gap_Analysis_Tookit_API
Regards,
Carsten
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
| Re: Questions about
com.sun.star.awt.MenuBar and
com.sun.star.awt.PopupMenu |

|
2007-10-10 14:55:18 |
Hi Carsten,
Carsten Driesner escribió:
> Ariel Constenla-Haile schrieb:
>> Hi people,
>>
>> FIRST of all, I would like to thank the one who
wrote the code of the
>> GUI examples on the new SDK
>>
(OpenOffice.org_2.3_SDK/examples/DevelopersGuide/GUI): it
answers some
>> questions I had for a long time! Thanks hr (I don't
know your real
>> name!)!
>
> Hi Ariel,
>
> the author of the examples and the toolkit API chapter
in the
> Developer's Guide is Berend Cornelius. Jürgen
integrated the examples
> into the OpenOffice.org SDK.
>
Uou! So here I go again!
Thank you, Berend! Excellent and very helpful job!
By the way, I didn't mention the 20. Chap. of the Dev's
Guide because I
followed the wrong/inverse direction: instead of reading
first the GUI
chap. of the Guide, then the code examples, and finally try
to implement
them by my own, - just like a child with a new toy - I went
right
straight ahead to the code and then to my own
implementation, and
finally today I finished the Dev's Guide GUI chap.: guys,
don't try this
at home!
And once again: Thank you, Berend! with the GUI chap. too,
excellent and
very helpful job!
> I am the maintainer of the OpenOffice.org toolkit
I knew that, one of the reasons for the title of this
message was to
call your attention , as I
succeeded with the "Getting the System
Colors (missing feature in the AWT module?)"
message...[your answer at
http://api.openoffice.org/servlets/ReadMs
g?listName=dev&msgNo=18117
and my issue 81355: "API to get the system's
colors" ]
> and I know that the
> IDL files need a brush up to be up to date. Luckily
Berend created many
> issues about the IDL files which I want to fix in the
near future.
Uou! Thanks again Berend!
> You should use "com.sun.star.awt.MenuBar" and
> "com.sun.star.awt.PopupMenu". The other
service names are outdated and
> only supported for compatibility reasons. Could please
write an issue
> and set me (cd openoffice.org) as the owner.
OK, that's what my mail was intended for
By the way, of what type? RFE, FEATURE...?
>> The example on the SDK works OK, because the fixed
text implementation
>> has no context menu, but how do I intercept the
context menu of
>> UnoControls? Is it possible at all? (I mean, using
API, not hacking
>> OOo's C++ code).
> No, that's no possible. Currently the toolkit uno
controls are just
> small wrappers around the VCL based controls. If you
need something like
> this you have to write a "request for
enhancement".
once again: OK !!!
By the way: which is the project I should write to? the API
or the
Framework? I ask first, because the last time [81355],
although I CC'ed
to you, I received a not very polite answer from someone
telling me to
better implement my own code :-( , so before annoying
anyone, it's
better to know where to write.
> We want to extend
> the current toolkit API,
I am completely aware of that:
[QUOTE from http://www.openoffice.org/editorial/new_leads_cd.html]
" What would you like next to do with the project?
I just started a new series of tutorials to better describe
the features
of the framework project. I hope that more people can use
all available
framework features to create more powerful
extensions..."
And for this spirit, I thank you!
> but need feedback from extension developers.
> Only you can give us information what you really miss.
Therefore please
> write request for enhancements and let us know your
problems with the API.
> You can find the result of a gap analysis I did last
year regarding the
> toolkit API here:
> http://wiki.services.openoffic
e.org/wiki/Framework/Article/Gap_Analysis_Tookit_API
I think I read that the first time you answered me!
Concerning this, I would like to quote your words on the 3rd
part
"Missing functions, classes, controls and information
in the awt toolkit
API" (the emphasis is mine)
"The community was asked to participate in the gap
analysis and provide
their point of view where things should improve and what's
missing in
the current awt toolkit API. Although the *feedback* of the
community
was *not* *overwhelming* some interesting information could
be extracted."
If my memory isn't playing with me, I think that for the
time you did
this analysis there was no (dev-)extensions mailing list, am
I wrong?
If I'm wright, maybe a message posted there with an
interesting title
(like "AWToolkit Improvement for Extensions
Developers" or the like)
could now help you more to know the needs of extensions
developers, than
if I write a mail in this mailing list telling what I
dream of
(concerning the AWToolkit, of course).
(By the way, if could dream without any reasonable limit, I
would dream
of a Java-AWT+Swing-like API; but I've got my feet on the
ground, and I
agree with your point: "It must be carefully discussed
how far the awt
toolkit API should be extended. It should be clear that it
cannot be a
full featured wrapper for the C++ based VCL.")
Bye, and once again, thanks!!!
Ariel.
PS: I have been playing with the new AWT tree module, and
got some
questions, which is the right place to post them, here or in
the
Framework mailing list?
--
Ariel Constenla-Haile
La Plata, Argentina
ariel.constenla.haile gmail.com
ariel arielconstenlahaile.com.ar
http://www
.arielconstenlahaile.com.ar/ooo/
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
[1-2]
|
|