example of Frame with awt uno

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

example of Frame with awt uno

Galileo Teco Juárez
could give me a simple example of code
a frame on .. with menus

check
http://www.openoffice.org/api/docs/common/ref/com/sun/star/awt/XMenu.html #
insertItem

I find information: nItemID, nItemStyle,
I do not understand why

--
*Galileo Teco Juarez*
*Web:* http://80bits.wordpress.com
*Twitter:* @genitalico <http://twitter.com/genitalico>
*Linkedin:* http://mx.linkedin.com/pub/galileo-teco-ju%C3%A1rez/30/690/797
Reply | Threaded
Open this post in threaded view
|

Re: example of Frame with awt uno

Ariel Constenla-Haile-2
Hi,

On Tue, Mar 05, 2013 at 09:13:38PM -0600, Galileo Teco Juárez wrote:
> could give me a simple example of code
> a frame on .. with menus
>
> check
> http://www.openoffice.org/api/docs/common/ref/com/sun/star/awt/XMenu.html #
> insertItem
>
> I find information: nItemID, nItemStyle,
> I do not understand why

A simple example depends on what you are trying to do. Are you trying to
modify the menu bar of on of the application? Are you trying to create
a window with a menu bar? Are you trying to create a button that when
pressed displays a popup menu? (I had a simple example for the later,
but I can't find it right know).


Regards
--
Ariel Constenla-Haile
La Plata, Argentina

attachment0 (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: example of Frame with awt uno

Ariel Constenla-Haile-2
On Wed, Mar 06, 2013 at 05:41:29PM -0300, Ariel Constenla-Haile wrote:

> Hi,
>
> On Tue, Mar 05, 2013 at 09:13:38PM -0600, Galileo Teco Juárez wrote:
> > could give me a simple example of code
> > a frame on .. with menus
> >
> > check
> > http://www.openoffice.org/api/docs/common/ref/com/sun/star/awt/XMenu.html #
> > insertItem
> >
> > I find information: nItemID, nItemStyle,
> > I do not understand why
>
> A simple example depends on what you are trying to do. Are you trying to
> modify the menu bar of on of the application? Are you trying to create
> a window with a menu bar? Are you trying to create a button that when
> pressed displays a popup menu? (I had a simple example for the later,
> but I can't find it right know).
I didn't find the example with the menu button, but found this one with
a context menu:
http://people.apache.org/~arielch/api/DIALOGO_EVENTOS.odt
(It's in Spanish)


Regards
--
Ariel Constenla-Haile
La Plata, Argentina

attachment0 (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: example of Frame with awt uno

Galileo Teco Juárez
thanks reply :D

but as you can make a window and menus with PythonUno, I'm in the process
of doing a port


2013/3/6 Ariel Constenla-Haile <[hidden email]>

> On Wed, Mar 06, 2013 at 05:41:29PM -0300, Ariel Constenla-Haile wrote:
> > Hi,
> >
> > On Tue, Mar 05, 2013 at 09:13:38PM -0600, Galileo Teco Juárez wrote:
> > > could give me a simple example of code
> > > a frame on .. with menus
> > >
> > > check
> > >
> http://www.openoffice.org/api/docs/common/ref/com/sun/star/awt/XMenu.html#
> > > insertItem
> > >
> > > I find information: nItemID, nItemStyle,
> > > I do not understand why
> >
> > A simple example depends on what you are trying to do. Are you trying to
> > modify the menu bar of on of the application? Are you trying to create
> > a window with a menu bar? Are you trying to create a button that when
> > pressed displays a popup menu? (I had a simple example for the later,
> > but I can't find it right know).
>
> I didn't find the example with the menu button, but found this one with
> a context menu:
> http://people.apache.org/~arielch/api/DIALOGO_EVENTOS.odt
> (It's in Spanish)
>
>
> Regards
> --
> Ariel Constenla-Haile
> La Plata, Argentina
>



--
*Galileo Teco Juarez*
*Web:* http://80bits.wordpress.com
*Twitter:* @genitalico <http://twitter.com/genitalico>
*Linkedin:* http://mx.linkedin.com/pub/galileo-teco-ju%C3%A1rez/30/690/797
Reply | Threaded
Open this post in threaded view
|

Re: example of Frame with awt uno

Ariel Constenla-Haile-2
Hi Galileo,

On Sat, Mar 09, 2013 at 12:43:14AM -0600, Galileo Teco Juárez wrote:
> thanks reply :D
>
> but as you can make a window and menus with PythonUno, I'm in the process
> of doing a port

A top window with its own menu, all created using the API, will crash
OpenOffice, that's bug 99010

You can take the Basic code from
https://issues.apache.org/ooo/attachment.cgi?id=60025 and translate it
to python (Basic to Python translation is not that complicated). Notice
that it will crash!

Why do you want to create a window with menu bar? (I'm just curious)


Regards
--
Ariel Constenla-Haile
La Plata, Argentina

attachment0 (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: example of Frame with awt uno

Galileo Teco Juárez
I will pass the application Python Python-Idle-tk to AWT-A,
The application is created in Python-tk, I will do it in Python-One.
and I need references for a frame and menu, but I made some and not adapted


2013/3/9 Ariel Constenla-Haile <[hidden email]>

> Hi Galileo,
>
> On Sat, Mar 09, 2013 at 12:43:14AM -0600, Galileo Teco Juárez wrote:
> > thanks reply :D
> >
> > but as you can make a window and menus with PythonUno, I'm in the process
> > of doing a port
>
> A top window with its own menu, all created using the API, will crash
> OpenOffice, that's bug 99010
>
> You can take the Basic code from
> https://issues.apache.org/ooo/attachment.cgi?id=60025 and translate it
> to python (Basic to Python translation is not that complicated). Notice
> that it will crash!
>
> Why do you want to create a window with menu bar? (I'm just curious)
>
>
> Regards
> --
> Ariel Constenla-Haile
> La Plata, Argentina
>



--
*Galileo Teco Juarez*
*Web:* http://80bits.wordpress.com
*Twitter:* @genitalico <http://twitter.com/genitalico>
*Linkedin:* http://mx.linkedin.com/pub/galileo-teco-ju%C3%A1rez/30/690/797
Reply | Threaded
Open this post in threaded view
|

Re: example of Frame with awt uno

Galileo Teco Juárez
any ideas?


2013/3/10 Galileo Teco Juárez <[hidden email]>

> I will pass the application Python Python-Idle-tk to AWT-A,
> The application is created in Python-tk, I will do it in Python-One.
> and I need references for a frame and menu, but I made some and not adapted
>
>
> 2013/3/9 Ariel Constenla-Haile <[hidden email]>
>
>> Hi Galileo,
>>
>> On Sat, Mar 09, 2013 at 12:43:14AM -0600, Galileo Teco Juárez wrote:
>> > thanks reply :D
>> >
>> > but as you can make a window and menus with PythonUno, I'm in the
>> process
>> > of doing a port
>>
>> A top window with its own menu, all created using the API, will crash
>> OpenOffice, that's bug 99010
>>
>> You can take the Basic code from
>> https://issues.apache.org/ooo/attachment.cgi?id=60025 and translate it
>> to python (Basic to Python translation is not that complicated). Notice
>> that it will crash!
>>
>> Why do you want to create a window with menu bar? (I'm just curious)
>>
>>
>> Regards
>> --
>> Ariel Constenla-Haile
>> La Plata, Argentina
>>
>
>
>
> --
> *Galileo Teco Juarez*
> *Web:* http://80bits.wordpress.com
> *Twitter:* @genitalico <http://twitter.com/genitalico>
> *Linkedin:* http://mx.linkedin.com/pub/galileo-teco-ju%C3%A1rez/30/690/797
>



--
*Galileo Teco Juarez*
*Web:* http://80bits.wordpress.com
*Twitter:* @genitalico <http://twitter.com/genitalico>
*Linkedin:* http://mx.linkedin.com/pub/galileo-teco-ju%C3%A1rez/30/690/797
Reply | Threaded
Open this post in threaded view
|

Re: example of Frame with awt uno

Ariel Constenla-Haile-2
In reply to this post by Galileo Teco Juárez
Hi,

On Sun, Mar 10, 2013 at 12:35:16PM -0600, Galileo Teco Juárez wrote:
> I will pass the application Python Python-Idle-tk to AWT-A,

This isn't still clear to me. Do you want to embed the Python-IDLE
inside a window created using the OpenOffice API?


Regards
--
Ariel Constenla-Haile
La Plata, Argentina

attachment0 (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: example of Frame with awt uno

Galileo Teco Juárez
similar to it
i will create new python-idle , built with AWT-UNO in Python

any idea how to star?

so seeking a example


2013/3/10 Ariel Constenla-Haile <[hidden email]>

> Hi,
>
> On Sun, Mar 10, 2013 at 12:35:16PM -0600, Galileo Teco Juárez wrote:
> > I will pass the application Python Python-Idle-tk to AWT-A,
>
> This isn't still clear to me. Do you want to embed the Python-IDLE
> inside a window created using the OpenOffice API?
>
>
> Regards
> --
> Ariel Constenla-Haile
> La Plata, Argentina
>



--
*Galileo Teco Juarez*
*Web:* http://80bits.wordpress.com
*Twitter:* @genitalico <http://twitter.com/genitalico>
*Linkedin:* http://mx.linkedin.com/pub/galileo-teco-ju%C3%A1rez/30/690/797
Reply | Threaded
Open this post in threaded view
|

Re: example of Frame with awt uno

Ariel Constenla-Haile-2
Hi Galileo,

On Sun, Mar 10, 2013 at 07:37:48PM -0600, Galileo Teco Juárez wrote:
> similar to it
> i will create new python-idle , built with AWT-UNO in Python

Let's see if I get it: you want to develop a Python IDE in AWT-UNO,
Are you planning this as an extension that will be installed in
OpenOffice?

If you want to make an extension that opens a Python IDE written in UNO,
with its own window, its menubar and toolbars, etc., then using the low level
AWT menu/bar API is a bad idea (not only that the menubar actually
crashes, but this menubar won't be integrated with the rest of the
application framework); also, if you want toolbars and statusbar, they
can't be created with UNO.

The proper way of creating a top window with full integration (menubar,
toolbar, statusbar) where your component will be loaded, is defining
a new component type and a new module in the office. This is done in
part with configuration files, but also implementing several components.

The other way, is to simply do what the JavaScript and BeanShell
scripting framework do: they allow editing the scripts, but without
integrating with the rest of the application. I guess you could simple
run openoffice/basis4.0/program/python-core-2.7.3/lib/idlelib/idle.py
(not sure how portable is this, in Linux works at least).


Regards
--
Ariel Constenla-Haile
La Plata, Argentina

attachment0 (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: example of Frame with awt uno

Galileo Teco Juárez
My idea is to get something like the MRI extension.
https://github.com/hanya/MRI/tree/master/pythonpath/mytools_Mri/ui
http://extensions.services.openoffice.org/project/MRI

could help me to achieve something?

Source python-idle in Python-tk
http://hg.python.org/cpython/file/3213fe4a72e0/Lib/idlelib


2013/3/10 Ariel Constenla-Haile <[hidden email]>

> Hi Galileo,
>
> On Sun, Mar 10, 2013 at 07:37:48PM -0600, Galileo Teco Juárez wrote:
> > similar to it
> > i will create new python-idle , built with AWT-UNO in Python
>
> Let's see if I get it: you want to develop a Python IDE in AWT-UNO,
> Are you planning this as an extension that will be installed in
> OpenOffice?
>
> If you want to make an extension that opens a Python IDE written in UNO,
> with its own window, its menubar and toolbars, etc., then using the low
> level
> AWT menu/bar API is a bad idea (not only that the menubar actually
> crashes, but this menubar won't be integrated with the rest of the
> application framework); also, if you want toolbars and statusbar, they
> can't be created with UNO.
>
> The proper way of creating a top window with full integration (menubar,
> toolbar, statusbar) where your component will be loaded, is defining
> a new component type and a new module in the office. This is done in
> part with configuration files, but also implementing several components.
>
> The other way, is to simply do what the JavaScript and BeanShell
> scripting framework do: they allow editing the scripts, but without
> integrating with the rest of the application. I guess you could simple
> run openoffice/basis4.0/program/python-core-2.7.3/lib/idlelib/idle.py
> (not sure how portable is this, in Linux works at least).
>
>
> Regards
> --
> Ariel Constenla-Haile
> La Plata, Argentina
>



--
*Galileo Teco Juarez*
*Web:* http://80bits.wordpress.com
*Twitter:* @genitalico <http://twitter.com/genitalico>
*Linkedin:* http://mx.linkedin.com/pub/galileo-teco-ju%C3%A1rez/30/690/797