update epan/dissectors/pidl/drsuapi/drsuapi.idl from samba
[wireshark-sm.git] / ui / qt / funnel_text_dialog.h
blob19476dd36b4292794a23de92e4dd6daf3817aea1
1 /** @file
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
10 #ifndef FUNNEL_TEXT_DIALOG_H
11 #define FUNNEL_TEXT_DIALOG_H
13 #include "epan/funnel.h"
14 #include "geometry_state_dialog.h"
16 #include <QDialog>
18 namespace Ui {
19 class FunnelTextDialog;
22 class FunnelTextDialog;
23 struct _funnel_text_window_t {
24 FunnelTextDialog* funnel_text_dialog;
27 class FunnelTextDialog : public GeometryStateDialog
29 Q_OBJECT
31 public:
32 explicit FunnelTextDialog(QWidget *parent, const QString &title = QString());
33 ~FunnelTextDialog();
35 void reject();
37 // Funnel ops
38 static struct _funnel_text_window_t *textWindowNew(QWidget *parent, const QString title);
39 void setText(const QString text);
40 void appendText(const QString text);
41 void prependText(const QString text);
42 void clearText();
43 const char *getText();
44 void setCloseCallback(text_win_close_cb_t close_cb, void* close_cb_data);
45 void setTextEditable(bool editable);
46 void addButton(funnel_bt_t *button_cb, QString label);
48 private slots:
49 void buttonClicked();
50 void on_findLineEdit_textChanged(const QString &pattern);
52 private:
53 Ui::FunnelTextDialog *ui;
55 struct _funnel_text_window_t funnel_text_window_;
56 text_win_close_cb_t close_cb_;
57 void *close_cb_data_;
60 extern "C" {
61 void text_window_set_text(funnel_text_window_t* ftw, const char* text);
62 void text_window_append(funnel_text_window_t *ftw, const char* text);
63 void text_window_prepend(funnel_text_window_t* ftw, const char* text);
64 void text_window_clear(funnel_text_window_t *ftw);
65 const char *text_window_get_text(funnel_text_window_t* ftw);
66 void text_window_set_close_cb(funnel_text_window_t *ftw, text_win_close_cb_t close_cb, void* close_cb_data);
67 void text_window_set_editable(funnel_text_window_t* ftw, bool editable);
68 void text_window_destroy(funnel_text_window_t* ftw);
69 void text_window_add_button(funnel_text_window_t* ftw, funnel_bt_t* funnel_button, const char* label);
73 #endif // FUNNEL_TEXT_DIALOG_H