[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Texmacs-dev] problem in developing my own tool bar in Texmacs
From: |
Gubinelli Massimiliano |
Subject: |
Re: [Texmacs-dev] problem in developing my own tool bar in Texmacs |
Date: |
Thu, 1 Oct 2009 10:33:48 +0200 |
On 1 oct. 09, at 08:24, siva prasad wrote:
Hello everyone,
I want to create my own tool bar in the Texmacs. For this I have to
write CPP code in Qt. Let me know where I have to write or Edit the
code for developing the tool bar.
Thanks,
siva
address@hidden
Hi,
the abstract gui interface between backends and TeXmacs is described
(in part) in src/src/Graphics/Gui/widget.hpp, in particular the
following functions manage the creation of menus
widget horizontal_menu (array<widget> a);
widget vertical_menu (array<widget> a);
widget tile_menu (array<widget> a, int cols);
widget menu_separator (bool vertical);
widget menu_group (string name, string lan= "");
widget pulldown_button (widget w, promise<widget> pw);
widget pullright_button (widget w, promise<widget> pw);
widget menu_button (widget w, command cmd, string pre, string ks, bool
ok);
widget balloon_widget (widget w, widget help);
widget text_widget (string s, color col, bool tsp= true, string lan="");
widget xpm_widget (url file_name);
The Qt-related code is in the directory src/src/Plugins/Qt/ in
particular the menu widget interface between TeXmacs and Qt is
contained in "qt_menu.{h,c}pp". The toolbars are constructed via
scheme code which calls into functions of the abstract interface above
returning a widget object representing the menu which is then passed
to the widget object associated to the TeXmacs window to be installed
as a Qt Toolbar in the QMainWindow object, see the method
"qt_tm_widget_rep::write" in "qt_widget.cpp", in particular the
handling of the SLOT_*_ICONS messages which install the three
different kinds of toolbars. They are called very often since toolbar
can change when moving cursor.
Part of the scheme code is in src/TeXmacs/progs/texmacs/main-menu.scm
HTH,
Massimiliano
_______________________________________________
Texmacs-dev mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/texmacs-dev