2 * This file is part of maemopad+
5 * This software is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public License
7 * as published by the Free Software Foundation; either version 2.1 of
8 * the License, or (at your option) any later version.
10 * This software is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this software; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25 #include <ui/interface.h>
29 void prepareUIforNodeChange(MainView
* mainview
, nodeType typ
);
31 nodeData
*getSelectedNode(MainView
* mainview
);
32 void saveCurrentData(MainView
* mainview
);
33 void saveDataToNode(MainView
* mainview
, nodeData
*selnode
);
35 gboolean
callback_node_view_window_state(GtkWidget
* window
, GdkEventWindowState
* event
, gpointer user_data
);
37 gboolean
callback_treeview_button_press(GtkTreeView
* treeview
, GdkEventButton
* event
, gpointer user_data
);
38 gboolean
callback_treeview_testcollapse(GtkTreeView
* treeview
, GtkTreeIter
* arg1
, GtkTreePath
* arg2
, gpointer user_data
);
39 void callback_treeview_celldatafunc(GtkTreeViewColumn
* tree_column
, GtkCellRenderer
* cell
, GtkTreeModel
* tree_model
, GtkTreeIter
* iter
, gpointer data
);
40 void callback_treeview_change(GtkTreeSelection
* selection
, gpointer data
);
41 gboolean
treeview_canselect(GtkTreeSelection
* selection
, GtkTreeModel
* model
, GtkTreePath
* path
, gboolean path_currently_selected
, gpointer userdata
);
43 gboolean
newnodedlg_key_press_cb(GtkWidget
* widget
, GdkEventKey
* event
, GtkWidget
* dlg
);
44 void add_new_node(nodeData
* node
, MainView
* mainview
, gboolean ischild
);
46 void callback_file_new_text_node(GtkAction
* action
, gpointer data
);
47 void callback_new_node_real(GtkAction
* action
, gpointer data
);
49 void callback_file_new_node(GtkAction
* action
, gpointer data
);
51 void callback_file_export_node(GtkAction
* action
, gpointer data
);
53 void callback_file_delete_node(GtkAction
* action
, gpointer data
);
54 void callback_delete_node_real(MainView
* mainview
);
56 void callback_file_rename_node (GtkAction
*action
, gpointer data
);
57 void callback_rename_node_real(MainView
* mainview
, gchar
* new_name
);
59 void callback_about(GtkAction
* action
, gpointer data
);
64 void callback_move_up_node(GtkAction
* action
, gpointer data
);
65 void callback_move_down_node(GtkAction
* action
, gpointer data
);
66 void callback_move_to_top_level_node(GtkAction
* action
, gpointer data
);
67 void callback_move_to_bottom_level_node(GtkAction
* action
, gpointer data
);
70 * edit-> cut/copy/paste
72 void callback_edit_clear(GtkAction
* action
, gpointer data
);
73 void callback_edit_cut(GtkAction
* action
, gpointer data
);
74 void callback_edit_copy(GtkAction
* action
, gpointer data
);
75 void callback_edit_paste(GtkAction
* action
, gpointer data
);
76 gint
cb_popup(GtkWidget
* widget
, GdkEvent
* event
);
79 * file-> new/open/save
81 gboolean
closefile(MainView
* mainview
);
82 gboolean
callback_file_close(GtkAction
* action
, gpointer data
);
83 void callback_file_new(GtkAction
* action
, gpointer data
);
84 gboolean
reset_ctree(GtkTreeModel
* model
, GtkTreePath
* path
, GtkTreeIter
* iter
, gpointer data
);
85 void new_file(MainView
* mainview
);
86 void callback_file_open(GtkAction
* action
, gpointer data
);
87 gboolean
open_file(gchar
* filename
, MainView
* mainview
);
88 void callback_file_save(GtkAction
* action
, gpointer data
);
93 void callback_shapemenu(GtkAction
* action
, GtkWidget
* wid
);
94 void callback_eraser(GtkAction
* action
, MainView
* mainview
);
95 void callback_menu(GtkAction
* action
, GtkWidget
* menu
);
96 void callback_brushsizetb(GtkAction
* action
, MainView
*mainview
);
97 void callback_brushsize(GtkAction
* action
, GtkWidget
* wid
);
98 void callback_sketchlines(GtkAction
* action
, GtkWidget
* wid
);
99 void callback_color(GtkAction
* action
, MainView
* mainview
);
100 void callback_color_invoke(GtkAction
* action
, gpointer data
);
101 void callback_pressure(GtkAction
* action
, MainView
*mainview
);
102 void callback_wordwrap(GtkAction
* action
, MainView
*mainview
);
103 void callback_font(GtkAction
* action
, gpointer data
);
104 void callback_fontstyle(GtkAction
* action
, GtkWidget
* wid
);
105 void callback_textbuffer_move(WPTextBuffer
*textbuffer
, MainView
*mainview
);
107 gint
wp_savecallback(const gchar
*buffer
, GString
* gstr
);
109 void callback_undo(GtkAction
* action
, MainView
* mainview
);
110 void callback_redo(GtkAction
* action
, MainView
* mainview
);
112 void callback_undotoggle(gpointer widget
, gboolean st
, MainView
* mainview
);
113 void callback_redotoggle(gpointer widget
, gboolean st
, MainView
* mainview
);
115 gboolean
close_cb(GtkWidget
* widget
, GdkEventAny
* event
, MainView
* mainview
);
116 gboolean
key_press_cb(GtkWidget
* widget
, GdkEventKey
* event
, MainView
* mainview
);
118 void callback_fullscreen(GtkToolButton
* tool_button
, gpointer user_data
);
120 void callback_checklist_change(GtkTreeSelection
*selection
, MainView
*mainview
);
121 void callback_checklist_paste(MainView
*mainview
);
122 void callback_checklist_add(GtkAction
*action
, MainView
*mainview
);
123 void callback_checklist_edit(GtkAction
*action
, MainView
*mainview
);
124 void callback_checklist_delete(GtkAction
*action
, MainView
*mainview
);
125 void callback_checklist_delete_real(MainView
* mainview
);
131 void callback_buffer_modified(GtkAction
* action
, gpointer data
);
133 void hw_event_handler(osso_hw_state_t
* state
, gpointer data
);
136 /* UI helper functions needed in callbacks */
138 show_confirmation(MainView
* mainview
, gchar
* question
);
141 show_banner(MainView
* mainview
, const gchar
* text
);
144 show_line_edit_dialog(MainView
* mainview
,
146 const gchar
* label_text
,