From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Mon Apr 15 2002 - 00:11:39 EDT
Hi Folks,
I've made some major improvements to Dom's abiwidget. It can now
be inserted into any gtk container class. See the attached screen shot.
You can edit directly inside it or you can turn off editiing
altogether. Right now the menu, toolbars and status bar are permanantly
disabled but it is not much code to put them back in and make them
togglable.
I did this by replacing the gtk_window/gnomeA-pp with my own
custom widget, subclassed from GtkBin. It is really easy to use and once
completed should enable a bonobo-control to be built pretty easily.
Here is some example code of the code used to produce the screen
shot shown.
_constructWindowDemo();
connectSignalsDemo();
GtkWidget * m_wAbiWidget = abi_widget_new_with_file(filename);
gtk_container_add (GTK_CONTAINER (m_wControlFrame), m_wAbiWidget);
gtk_widget_show(m_wMainWindow);
abi_widget_map_to_screen(ABI_WIDGET(m_wAbiWidget));
abi_widget_draw(ABI_WIDGET(m_wAbiWidget));
gtk_object_set(GTK_OBJECT(m_wAbiWidget),"AbiWidget::cursoron",
(gboolean) TRUE,NULL);
gtk_object_set(GTK_OBJECT(m_wAbiWidget),
"AbiWidget::invoke_noargs",
(gchar *) "viewPara",NULL);
// abi_widget_turnon_cursor(ABI_WIDGET(m_wAbiWidget));
gtk_main();
By using the gtk argument system to control abiword we can setup a bonobo
property bag to control a remotely running abiword.
Bugs: It segfaults on destruction :-( It segfaults on things to do with
the status bar. The latter is a straightforward fix I think. The former
may be really hard.
I'll hold off committing this until 1.0 is out unless
I'm overwhelmed by public demand :-)
Cheers!
Martin
This archive was generated by hypermail 2.1.4 : Mon Apr 15 2002 - 00:12:08 EDT