octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Implementation of uimenu objects for fltk backend


From: Kai Habel
Subject: Re: Implementation of uimenu objects for fltk backend
Date: Fri, 24 Sep 2010 17:45:03 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100914 SUSE/3.1.4 Lightning/1.0b2 Thunderbird/3.1.4

 Hi Michael,

thanks for your comments, fortunately you didn't choose uimenu for your current work. Do plan to implement uicontrol using fltk or gtk (for octavede?).

Regarding your remark about my implementation of uimenu. Its true - currently its a waste of CPU cycles. But fltk isn't really made for dynamic menu creation/deletion, there isn't an API for that purpose. All menu information is stored in one big structure. So it is easier if you create the structure at once. But in the meantime I have found some examples [1] for dynamic menu handling. I will have a closer look at it.

Kai

[1] http://www.seriss.com/people/erco/fltk/

On 24.09.2010 14:52, Michael Goffioul wrote:
Hi Kai,

A few weeks ago, I've been working on the uicontrol implementation.
It's not completed yet, but I had to make some modifications to octave
code in order to support it in an efficient way. I also had (and still
have) to make some changes in the callback handling. One significant
change I made is to make use of the initialize/finalize/update methods
to control the graphic object creation/deletion, instead of doing all
the work in drawnow. I thought I'll let you know about it, in case you
had plan to work on this as well.

Just a remark about the implementation (if I understood it correctly):
isn't it overkill to recreate the whole menubar everytime something
changes?

Michael.


On Fri, Sep 24, 2010 at 11:33 AM, Kai Habel<address@hidden>  wrote:
  Hello all,

I have been working on the uimenu functionality lately. It allows the user
to create custom menus when using the fltk backend. I have attached two
changeset which implement the uimenu function:

Changeset.uimenu.go: Implements the uimenu graphic object and the respective
m-file. This changeset should be complete including Changelog, NEWS  entry,
etc.

Changeset.uimenu.fltk: Implements the uimenu function using the fltk
backend. This changeset is for review so far. Since I expect some comments
and changes afterwards, I have not included the Changelog, etc.

I have tested it a lot on linux (32bit intel /intel graphic and 64bit
amd/nvidia graphic), but I may have missed some issues. Please give it a try
and report back problems you encounter. I am also interested in feedback
from Mac and Windows users. I hope Shai is back soon, so that he can have a
closer look ;-) I have attached a menu_test.m file for a quick test.

Q: How can I use "graphics.cc: xget_ancestor (const graphics_object&, const
std::string&  )" in fltk_backend.cc? So far I have just copied the function.

I have noticed some problems with callbacks, I will report them to the bug
tracker later.

Kai




reply via email to

[Prev in Thread] Current Thread [Next in Thread]