2015-11-23 21:32:50 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <wx/panel.h>
|
|
|
|
#include <wx/sizer.h>
|
|
|
|
#include <wx/propgrid/propgrid.h>
|
|
|
|
#include <wx/propgrid/advprops.h>
|
|
|
|
|
2016-07-28 22:50:02 -04:00
|
|
|
#include "DemodulatorInstance.h"
|
2015-11-23 21:32:50 -05:00
|
|
|
#include "Modem.h"
|
|
|
|
|
|
|
|
class ModemProperties : public wxPanel {
|
|
|
|
public:
|
|
|
|
ModemProperties(
|
|
|
|
wxWindow *parent,
|
|
|
|
wxWindowID winid = wxID_ANY,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
|
|
|
|
const wxString& name = wxPanelNameStr
|
|
|
|
);
|
|
|
|
~ModemProperties();
|
|
|
|
|
2016-07-28 22:50:02 -04:00
|
|
|
void initDefaultProperties();
|
|
|
|
void initProperties(ModemArgInfoList newArgs, DemodulatorInstance *demodInstance);
|
2015-11-30 21:58:54 -05:00
|
|
|
bool isMouseInView();
|
2016-07-28 22:50:02 -04:00
|
|
|
void setCollapsed(bool state);
|
2016-07-27 19:56:43 -04:00
|
|
|
bool isCollapsed();
|
|
|
|
void fitColumns();
|
|
|
|
|
|
|
|
void updateTheme();
|
|
|
|
|
2015-11-23 21:32:50 -05:00
|
|
|
private:
|
|
|
|
wxPGProperty *addArgInfoProperty(wxPropertyGrid *pg, ModemArgInfo arg);
|
2015-11-23 22:39:39 -05:00
|
|
|
std::string readProperty(std::string);
|
|
|
|
void OnChange(wxPropertyGridEvent &event);
|
2015-11-24 23:00:43 -05:00
|
|
|
void OnShow(wxShowEvent &event);
|
2016-07-27 19:56:43 -04:00
|
|
|
void OnCollapse(wxPropertyGridEvent &event);
|
|
|
|
void OnExpand(wxPropertyGridEvent &event);
|
2015-11-30 21:58:54 -05:00
|
|
|
|
|
|
|
void OnMouseEnter(wxMouseEvent &event);
|
|
|
|
void OnMouseLeave(wxMouseEvent &event);
|
2015-11-24 23:00:43 -05:00
|
|
|
|
|
|
|
wxBoxSizer* bSizer;
|
2015-11-23 21:32:50 -05:00
|
|
|
wxPropertyGrid* m_propertyGrid;
|
|
|
|
ModemArgInfoList args;
|
2016-07-28 22:50:02 -04:00
|
|
|
DemodulatorInstance *demodContext;
|
2015-11-23 22:39:39 -05:00
|
|
|
std::map<std::string, wxPGProperty *> props;
|
2016-07-27 19:56:43 -04:00
|
|
|
bool mouseInView, collapsed;
|
2016-07-28 22:50:02 -04:00
|
|
|
|
|
|
|
ModemArgInfoList defaultArgs;
|
|
|
|
ModemArgInfo outputArg;
|
|
|
|
std::map<std::string, wxPGProperty *> defaultProps;
|
|
|
|
|
|
|
|
std::vector<RtAudio::DeviceInfo> audioDevices;
|
|
|
|
std::map<int,RtAudio::DeviceInfo> audioInputDevices;
|
|
|
|
std::map<int,RtAudio::DeviceInfo> audioOutputDevices;
|
2015-11-23 21:32:50 -05:00
|
|
|
};
|