mp3splt-gtk
tree_tab.h
Go to the documentation of this file.
00001 /**********************************************************
00002  *
00003  * mp3splt-gtk -- utility based on mp3splt,
00004  *                for mp3/ogg splitting without decoding
00005  *
00006  * Copyright (c) 2005-2011 Alexandru Munteanu - io_fx@yahoo.fr
00007  *
00008  * http://mp3splt.sourceforge.net/
00009  *
00010  *********************************************************/
00011 
00012 /**********************************************************
00013  *
00014  * This program is free software; you can redistribute it and/or
00015  * modify it under the terms of the GNU General Public License
00016  * as published by the Free Software Foundation; either version 2
00017  * of the License, or (at your option) any later version.
00018  *
00019  * This program is distributed in the hope that it will be useful,
00020  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00022  * GNU General Public License for more details.
00023  *
00024  * You should have received a copy of the GNU General Public License
00025  * along with this program; if not, write to the Free Software
00026  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
00027  * USA.
00028  *
00029  *********************************************************/
00030 
00031 /*!********************************************************
00032  * \file
00033  *
00034  * header of tree_tab.c
00035  * the tree_tab.c file is used for the Splitpoints tab
00036  * (for the splitpoints table)
00037  *
00038  *********************************************************/
00039 
00040 #ifndef _TREE_TAB_H
00041 #define _TREE_TAB_H
00042 
00043 #include "util.h"
00044 
00045 void add_splitpoint(Split_point my_split_point,
00046                     gint old_index);
00047 gchar *get_splitpoint_name(gint index);
00048 gint get_first_splitpoint_selected();
00049 void select_splitpoint(gint index);
00050 gint get_splitpoint_time(gint this_splitpoint);
00051 void remove_splitpoint(gint index,gint stop_preview);
00052 void update_splitpoint(gint index, Split_point new_point);
00053 void update_splitpoint_from_time(gint index, gdouble time);
00054 void update_splitpoint_check(gint index);
00055 void update_add_button();
00056 void update_minutes_from_spinner( GtkWidget *widget,
00057                                   gpointer   data );
00058 void update_seconds_from_spinner( GtkWidget *widget,
00059                                   gpointer   data );
00060 void update_hundr_secs_from_spinner( GtkWidget *widget,
00061                                      gpointer   data );
00062 GtkTreeModel *create_model();
00063 void order_length_column(GtkTreeView *tree_view);
00064 gboolean check_if_splitpoint_does_not_exists(GtkTreeView *tree_view,
00065                                     gint minutes, 
00066                                     gint seconds,
00067                                     gint hundr_secs,
00068                                     gint current_split);
00069 gboolean check_if_description_exists(gchar *descr,
00070                                      gint number);
00071 void exchange_elements_from_array(gint element_number1,
00072                                   gint element_number2);
00073 void row_selection_event();
00074 void exchange_rows_in_the_tree(gint i, 
00075                                gint j,
00076                                GtkTreeView *tree_view);
00077 void sort_tree(GtkTreeView *tree_view);
00078 void update_current_description(gchar *descr, gint number);
00079 void cell_edited_event (GtkCellRendererText *cell,
00080                         gchar               *path_string,
00081                         gchar               *new_text,
00082                         gpointer             data);
00083 void add_splitpoint_from_player(GtkWidget *widget, 
00084                                 gpointer data);
00085 void add_row(gint checked);
00086 void remove_row (GtkWidget *widget, gpointer data);
00087 void remove_all_rows (GtkWidget *widget, 
00088                       gpointer data);
00089 GtkWidget *create_init_spinner(GtkWidget *bottomhbox1, 
00090                                gint min, 
00091                                gint max, 
00092                                gchar *label_text,
00093                                gint type);
00094 GtkWidget *create_init_spinners_buttons(GtkTreeView *tree_view);
00095 void preview_song (GtkTreeView *tree_view,
00096                    GtkTreePath *path,
00097                    GtkTreeViewColumn *col,
00098                    gpointer user_data);
00099 void create_columns (GtkTreeView *tree_view);
00100 void close_popup_window_event( GtkWidget *window,
00101                                gpointer data );
00102 void handle_detached_event (GtkHandleBox *handlebox,
00103                             GtkWidget *widget,
00104                             gpointer data);
00105 GtkWidget *create_choose_splitpoints_frame(GtkTreeView *tree_view);
00106 void put_splitpoints_in_the_state(splt_state *state);
00107 GtkTreeView *create_tree_view();
00108 
00110 enum {
00112   COL_CHECK,
00114   COL_DESCRIPTION,
00116   COL_MINUTES,
00118   COL_SECONDS,
00120   COL_HUNDR_SECS,
00122   COL_NUMBER,
00124   COL_PREVIEW,
00126   COL_SPLIT_PREVIEW,
00127   NUM_COLUMNS = 8
00128 } tree_columns;
00129 
00130 extern GtkTreeView *tree_view;
00131 
00132 #endif