[280] | 1 | /* rglogview.h |
---|
| 2 | * |
---|
| 3 | * Copyright (c) 2004 Michael Vogt |
---|
| 4 | * |
---|
| 5 | * Author: Michael Vogt <mvo@debian.org> |
---|
| 6 | * |
---|
| 7 | * This program is free software; you can redistribute it and/or |
---|
| 8 | * modify it under the terms of the GNU General Public License as |
---|
| 9 | * published by the Free Software Foundation; either version 2 of the |
---|
| 10 | * License, or (at your option) any later version. |
---|
| 11 | * |
---|
| 12 | * This program is distributed in the hope that it will be useful, |
---|
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 15 | * GNU General Public License for more details. |
---|
| 16 | * |
---|
| 17 | * You should have received a copy of the GNU General Public License |
---|
| 18 | * along with this program; if not, write to the Free Software |
---|
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
---|
| 20 | * USA |
---|
| 21 | */ |
---|
| 22 | |
---|
| 23 | |
---|
| 24 | #ifndef _RGLOGVIEW_H_ |
---|
| 25 | #define _RGLOGVIEW_H_ |
---|
| 26 | |
---|
| 27 | #include "rggladewindow.h" |
---|
| 28 | |
---|
| 29 | |
---|
| 30 | class RGLogView : public RGGladeWindow { |
---|
| 31 | protected: |
---|
| 32 | static void cbCloseClicked(GtkWidget *self, void *data); |
---|
| 33 | static void cbButtonFind(GtkWidget *self, void *data); |
---|
| 34 | static void cbTreeSelectionChanged(GtkTreeSelection *selection, |
---|
| 35 | gpointer data); |
---|
| 36 | static gboolean filter_func(GtkTreeModel *model, GtkTreeIter *iter, |
---|
| 37 | gpointer data); |
---|
| 38 | |
---|
| 39 | // some widgets |
---|
| 40 | GtkWidget *_treeView; |
---|
| 41 | GtkWidget *_entryFind; |
---|
| 42 | GtkWidget *_textView; |
---|
| 43 | GtkTextTag *_markTag; |
---|
| 44 | |
---|
| 45 | // data |
---|
| 46 | const gchar *findStr; |
---|
| 47 | GtkTreeModel *_realModel; |
---|
| 48 | |
---|
| 49 | // set new logbuffer text |
---|
| 50 | void clearLogBuf(); |
---|
| 51 | void appendLogBuf(string text); |
---|
| 52 | |
---|
| 53 | public: |
---|
| 54 | RGLogView(RGWindow *parent); |
---|
| 55 | |
---|
| 56 | virtual void show(); |
---|
| 57 | void readLogs(); |
---|
| 58 | |
---|
| 59 | virtual ~RGLogView() {}; |
---|
| 60 | }; |
---|
| 61 | |
---|
| 62 | |
---|
| 63 | #endif |
---|