Jean-Marc Lasgouttes wrote: >>> While this is not a good example, I do think that unification of >>> menubar and toolbar would be useful. But of course, I would do it >>> in the existing backend framework... > > Andre> 'QAction'... > > What' so great about QAction? Just that the whole qt GUI uses it? > Is it more than a struct?
It appears that André has been converted to the Qt mind set ;-) QAction is indeed a nice abstraction: QAction* openAction = new QAction(SmallIcon("fileopen.png"), i18n("&Open..."), this); openAction->setShortcut(i18n("Ctrl+O")); connect(openAction, SIGNAL(activated()), view, SLOT(slotFileOpen())); QMenuBar* menubar = menuBar(); QMenu* file_menu = new QMenu(i18n("&File"), menubar); menubar->addMenu(file_menu); QToolBar* toolbar = toolBar(); file_menu->addAction(openAction); toolbar->addAction(openAction); but we can certainly use this abstraction without limiting ourselves to a particular toolkit. In fact, I think that Abdel was proposing some post-1.4 code that does exactly this. Your suggested "unification of menubar and toolbar" amounts essentially to defining these "LyXAction"s. Hey, wait! Isn't that essentially what we have already? ;-) -- Angus