1 /* This file is part of the Linux Trace Toolkit viewer
2 * Copyright (C) 2006 Parisa Heidari
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License Version 2 as
6 * published by the Free Software Foundation;
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
19 #ifndef _HISTOBUTTONWIDGET_H
20 #define _HISTOBUTTONWIDGET_H
23 #include <lttv/state.h>
26 #include "histodrawitem.h"
33 * containing 3 buttons zoomIn,zoonOut and zoomFit to change the vertical scale.
36 #ifndef TYPE_ButtonWidget_DEFINED
37 #define TYPE_ButtonWidget_DEFINED
38 typedef struct _ButtonWidget ButtonWidget
;
39 #endif //TYPE_ButtonWidget_DEFINED
41 #ifndef TYPE_HistoControlFlowData_DEFINED
42 #define TYPE_HistoControlFlowData_DEFINED
43 typedef struct _HistoControlFlowData HistoControlFlowData
;
44 #endif //TYPE_HistoControlFlowData_DEFINED
46 struct _ButtonWidget
{
52 GtkWidget
*vbox1
;//buttons are placed on this vbox
54 GtkWidget
*hbox
;//Parent Widget containing buttons and drawing area.
55 HistoControlFlowData
*histo_control_flow_data
;
60 void histo_copy_pixmap_region(histoDrawing_t
*drawing
,GdkDrawable
*dest
,
61 GdkGC
*gc
, GdkDrawable
*src
,
63 gint xdest
, gint ydest
, gint width
, gint height
);
65 void histo_rectangle_pixmap (GdkGC
*gc
,gboolean filled
, gint x
, gint y
,
66 gint width
, gint height
,histoDrawing_t
*value
);
68 ButtonWidget
*histo_buttonwidget_construct(HistoControlFlowData
*histocontrol_flow_data
);
70 void histo_buttonwidget_destroy(ButtonWidget
*buttonwidget
);
73 static gboolean
gplus( GtkWidget
*widget
,gpointer user_data
);//assigned to zoomIn
74 static gboolean
gMinus( GtkWidget
*widget
,gpointer user_data
);//assigned to zoomOut
75 static gboolean
gFit( GtkWidget
*widget
,gpointer user_data
);//assigned to zoomFit
77 GtkWidget
*histo_buttonwidget_get_widget(ButtonWidget
*button_widget
);
78 void histo_update_pixmap_size(histoDrawing_t
*value
,
80 #endif //_HISTOBUTTONWIDGET_H