2018-03-15 17:06:26 +00:00
|
|
|
#ifndef slic3r_BonjourDialog_hpp_
|
|
|
|
#define slic3r_BonjourDialog_hpp_
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
#include <wx/dialog.h>
|
|
|
|
|
2019-03-12 16:41:43 +00:00
|
|
|
#include "libslic3r/PrintConfig.hpp"
|
|
|
|
|
2018-03-15 17:06:26 +00:00
|
|
|
class wxListView;
|
|
|
|
class wxStaticText;
|
|
|
|
class wxTimer;
|
|
|
|
class wxTimerEvent;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Slic3r {
|
|
|
|
|
|
|
|
class Bonjour;
|
|
|
|
class BonjourReplyEvent;
|
|
|
|
class ReplySet;
|
|
|
|
|
|
|
|
|
|
|
|
class BonjourDialog: public wxDialog
|
|
|
|
{
|
|
|
|
public:
|
2019-03-12 16:41:43 +00:00
|
|
|
BonjourDialog(wxWindow *parent, Slic3r::PrinterTechnology);
|
2018-03-15 17:06:26 +00:00
|
|
|
BonjourDialog(BonjourDialog &&) = delete;
|
|
|
|
BonjourDialog(const BonjourDialog &) = delete;
|
|
|
|
BonjourDialog &operator=(BonjourDialog &&) = delete;
|
|
|
|
BonjourDialog &operator=(const BonjourDialog &) = delete;
|
|
|
|
~BonjourDialog();
|
|
|
|
|
|
|
|
bool show_and_lookup();
|
|
|
|
wxString get_selected() const;
|
|
|
|
private:
|
|
|
|
wxListView *list;
|
|
|
|
std::unique_ptr<ReplySet> replies;
|
|
|
|
wxStaticText *label;
|
|
|
|
std::shared_ptr<Bonjour> bonjour;
|
|
|
|
std::unique_ptr<wxTimer> timer;
|
|
|
|
unsigned timer_state;
|
2019-03-12 16:41:43 +00:00
|
|
|
Slic3r::PrinterTechnology tech;
|
2018-03-15 17:06:26 +00:00
|
|
|
|
|
|
|
void on_reply(BonjourReplyEvent &);
|
|
|
|
void on_timer(wxTimerEvent &);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|