Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
funnel_text_dialog.h
1 /* funnel_text_dialog.h
2  *
3  * Wireshark - Network traffic analyzer
4  * By Gerald Combs <gerald@wireshark.org>
5  * Copyright 1998 Gerald Combs
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  */
9 
10 #ifndef FUNNEL_TEXT_DIALOG_H
11 #define FUNNEL_TEXT_DIALOG_H
12 
13 #include <glib.h>
14 
15 #include "epan/funnel.h"
16 #include "geometry_state_dialog.h"
17 
18 #include <QDialog>
19 
20 namespace Ui {
21 class FunnelTextDialog;
22 }
23 
24 class FunnelTextDialog;
25 struct _funnel_text_window_t {
26  FunnelTextDialog* funnel_text_dialog;
27 };
28 
30 {
31  Q_OBJECT
32 
33 public:
34  explicit FunnelTextDialog(const QString &title = QString());
36 
37  void reject();
38 
39  // Funnel ops
40  static struct _funnel_text_window_t *textWindowNew(const QString title);
41  void setText(const QString text);
42  void appendText(const QString text);
43  void prependText(const QString text);
44  void clearText();
45  const char *getText();
46  void setCloseCallback(text_win_close_cb_t close_cb, void* close_cb_data);
47  void setTextEditable(gboolean editable);
48  void addButton(funnel_bt_t *button_cb, const QString label);
49 
50 private slots:
51  void buttonClicked();
52  void on_findLineEdit_textChanged(const QString &pattern);
53 
54 private:
56 
57  struct _funnel_text_window_t funnel_text_window_;
58  text_win_close_cb_t close_cb_;
59  void *close_cb_data_;
60 };
61 
62 extern "C" {
63 struct _funnel_text_window_t* text_window_new(const char* title);
64 void text_window_set_text(funnel_text_window_t* ftw, const char* text);
65 void text_window_append(funnel_text_window_t *ftw, const char* text);
66 void text_window_prepend(funnel_text_window_t* ftw, const char* text);
67 void text_window_clear(funnel_text_window_t *ftw);
68 const char *text_window_get_text(funnel_text_window_t* ftw);
69 void text_window_set_close_cb(funnel_text_window_t *ftw, text_win_close_cb_t close_cb, void* close_cb_data);
70 void text_window_set_editable(funnel_text_window_t* ftw, gboolean editable);
71 void text_window_destroy(funnel_text_window_t* ftw);
72 void text_window_add_button(funnel_text_window_t* ftw, funnel_bt_t* funnel_button, const char* label);
73 }
74 
75 
76 #endif // FUNNEL_TEXT_DIALOG_H
77 
78 /*
79  * Editor modelines
80  *
81  * Local Variables:
82  * c-basic-offset: 4
83  * tab-width: 8
84  * indent-tabs-mode: nil
85  * End:
86  *
87  * ex: set shiftwidth=4 tabstop=8 expandtab:
88  * :indentSize=4:tabSize=8:noTabs=true:
89  */
Definition: geometry_state_dialog.h:15
Definition: ui_about_dialog.h:291
Definition: funnel_text_dialog.h:29
Definition: tap-funnel.c:25
Definition: funnel.h:39
Definition: ui_funnel_text_dialog.h:94