From AbiWiki

Jump to: navigation, search



AbiWidget is a full Word Processing canvas which is also a genuine GtkWidget that can be incorporated in other programs. See the AbiWord SDK for some example code of how to embed AbiWidget in C code. We have also documented a small example to show how AbiWidget is embedded in a PyGTK program.

There are many powerful commands that control AbiWidget and python bindings that allow AbiWidget to be used in PyGtk programs. The most prominent is OLPC Write. Here we document the many functions and signals provided by AbiWidget.

AbiWidget C bindings

AbiWidget Python Bindings

Invocation Methods

AbiWidget Canvas()
AbiTable TableCreator()

Insert Table Widget

This little widget can be embedded in a toolbar and allows tables to be interactively inserted into AbiWord

GtkWidget* abi_table_new()
void set_selected(guint rows, guint cols)
(guint rows, guint cols) get_selected()
void set_max_size(guint rows, guint cols)
(guint rows, guint cols) get_max_size()
none set_labels(gchar* szTable", gchar* szCancel)
GtkWidget * label()
void set_icon(GtkWidget * icon)

AbiWidget Bindings

GtkWidget * abi_widget_new()
gboolean load_file(const gchar * fname, const ghcar *  mimetype)
gboolean load_file_from_memory(const gchar * ext_or_mime, const ghcar * buffer, gint sizeBuffer)
gboolean align_center()
gboolean align_justify()
gboolean align_left()
gboolean  align_right()
gboolean copy()
gboolean cut()
gboolean paste()
gboolean paste_special()
gboolean select_all()
gboolean select_block()
gboolean select_line()
gboolean select_word()
gboolean undo()
gboolean redo()
gboolean insert_data(const- gchar* data)
gboolean insert_space()
gboolean delete_bob()
gboolean delete_bod()
gboolean delete_bol()
gboolean delete_bow()
gboolean delete_eob()
gboolean delete_eod()
gboolean delete_eol()
gboolean delete_eow()
gboolean delete_left()
gboolean delete_right()
gboolean edit_header()
gboolean edit_footer()
gboolean file_open()
gboolean file_save()
gboolean remove_header()
gboolean remove_footer()
gboolean save(const gchar* fname, constgchar* extention_or_mimetype, const gchar* exp_props)
gboolean save_immediate()
gboolean select_bob() 
gboolean select_bod() 
gboolean select_bol() 
gboolean select_bow()
gboolean select_eob() 
gboolean select_eod()
gboolean select_eol()   
gboolean select_eow() 
gboolean select_left()
gboolean select_next_line()
gboolean select_page_down()
gboolean select_page_up() 
gboolean select_prev_line()
gboolean select_right()
gboolean select_screen_down()
gboolean select_screen_up()
gboolean select_to_xy(gint32 x, gint32 y)
gboolean toggle_bold()
gboolean toggle_underline()
gboolean toggle_bottomline()
gboolean toggle_insert_mode()
gboolean toggle_italic()
gboolean toggle_overline()
gboolean toggle_plain()
gboolean toggle_strike()
gboolean toggle_sub()
gboolean toggle_super()
gboolean toggle_topline()
gboolean toggle_unindent()
gboolean toggle_bullets()
gboolean toggle_numbering()
gboolean view_formatting_marks()
gboolean view_print_layout()
gboolean view_normal_layout()
gboolean view_online_layout()
gboolean moveto_bob()
gboolean moveto_bod()
gboolean moveto_bol()
gboolean moveto_bop()
gboolean moveto_bow()
gboolean moveto_eob()
gboolean moveto_eod()
gboolean moveto_eol()
gboolean moveto_eow()
gboolean moveto_left()
gboolean moveto_next_line()
gboolean moveto_next_page()
gboolean moveto_next_screen()
gboolean moveto_prev_line()
gboolean moveto_prev_page()
gboolean moveto_prev_screen()
gboolean moveto_right()
gboolean zoom_whole()
gboolean zoom_width()
gboolean set_show_margin( gboolean bShowMargin)
gboolean get_show_margin()
gboolean set_word_selections( gboolean bsetWordSelction)
gboolean  get_word_selections()
(gchar * szContent, gint iLength) get_content( const-gchar* extention_or_mimetype, const gchar* exp_props)
(gchar * szContent, gint iLength) get_selection( const-gchar* extention_or_mimetype, const gchar* exp_props)
gboolean insert_table(gint32 rows, gint32 cols)
gboolean invoke_cmd( gchar* mthdName, gchar* data, gint32 x, gint32 y)
gboolean set_font_name(gchar* szName)
gboolean set_font_size( gchar* szSize)
gboolean set_style(gchar* szName)
gboolean insert_image( gchar* szFile, gboolean positioned)
gboolean set_text_color(guint8 red, guint8 green, guint8 blue)
const gchar ** get_font_names()
gboolean set_zoom_percentage(guint32 zoom)
gboolean get_zoom_percentage()
void set_find_string(gchar * string)
gboolean find_next()
gboolean find_prev()
guint32 get_num_pages()
void set_current_page(guint32 PageNo)
guint32 get_current_page_num()
GdkPixbuf render_page_to_image(guint32 PageNumber)
Personal tools