problem in developing my own tool bar in Texmacs

View: New views
2 Messages — Rating Filter:   Alert me  

problem in developing my own tool bar in Texmacs

by siva prasad-9 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
siva4080@...

_______________________________________________
Texmacs-dev mailing list
Texmacs-dev@...
http://lists.gnu.org/mailman/listinfo/texmacs-dev

Re: problem in developing my own tool bar in Texmacs

by Massimiliano Gubinelli :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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
> siva4080@...


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
> Texmacs-dev@...
> http://lists.gnu.org/mailman/listinfo/texmacs-dev



_______________________________________________
Texmacs-dev mailing list
Texmacs-dev@...
http://lists.gnu.org/mailman/listinfo/texmacs-dev