/*
* vim: softtabstop=4 shiftwidth=4 cindent foldmethod=marker expandtab
*
* $LastChangedDate$
* $Revision$
* $LastChangedBy$
* $URL$
*
* Copyright 2009-2011 Eric Connell
*
* This file is part of Mangler.
*
* Mangler is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Mangler is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Mangler. If not, see .
*/
#ifndef _MANGLERSETTINGS_H
#define _MANGLERSETTINGS_H
#include "manglerconfig.h"
#include
class ManglerSettings
{
public:
ManglerSettings(Glib::RefPtr builder);
Glib::RefPtr builder;
Gtk::Window *settingsWindow;
Gtk::Button *button;
Gtk::Label *label;
Gtk::ComboBox *combobox;
Gtk::Window *window;
Gtk::CheckButton *checkbutton;
Gtk::VBox *vbox;
Gtk::Table *table;
Gtk::SpinButton *spinbutton;
Gtk::HScale *volumehscale;
Gtk::Adjustment *volumeAdjustment;
Gtk::Adjustment *gainAdjustment;
Gtk::HScale *gainhscale;
sigc::connection volumeAdjustSignalConnection;
bool isDetectingKey;
bool isDetectingMouse;
std::map mouseInputDevices;
ManglerConfig config;
// Audio Player List Combo Box Setup
Gtk::ComboBox *audioPlayerComboBox;
class audioPlayerModelColumns : public Gtk::TreeModel::ColumnRecord
{
public:
audioPlayerModelColumns() { add(id); add(name); }
Gtk::TreeModelColumn id;
Gtk::TreeModelColumn name;
};
audioPlayerModelColumns audioPlayerColumns;
Glib::RefPtr audioPlayerTreeModel;
Gtk::ComboBox *audioSubsystemComboBox;
class audioSubsystemModelColumns : public Gtk::TreeModel::ColumnRecord
{
public:
audioSubsystemModelColumns() { add(id); add(name); }
Gtk::TreeModelColumn id;
Gtk::TreeModelColumn name;
};
audioSubsystemModelColumns audioSubsystemColumns;
Glib::RefPtr audioSubsystemTreeModel;
// Input Device Combo Box Setup
Gtk::ComboBox *inputDeviceComboBox;
class inputDeviceModelColumns : public Gtk::TreeModel::ColumnRecord
{
public:
inputDeviceModelColumns() { add(id); add(name); add(description); }
Gtk::TreeModelColumn id;
Gtk::TreeModelColumn name;
Gtk::TreeModelColumn description;
};
inputDeviceModelColumns inputColumns;
Glib::RefPtr inputDeviceTreeModel;
Gtk::Entry *inputDeviceCustomName;
// Output Device Combo Box Setup
Gtk::ComboBox *outputDeviceComboBox;
class outputDeviceModelColumns : public Gtk::TreeModel::ColumnRecord
{
public:
outputDeviceModelColumns() { add(id); add(name); add(description); }
Gtk::TreeModelColumn id;
Gtk::TreeModelColumn name;
Gtk::TreeModelColumn description;
};
outputDeviceModelColumns outputColumns;
Glib::RefPtr outputDeviceTreeModel;
Gtk::Entry *outputDeviceCustomName;
// Notification Device Combo Box Setup
Gtk::ComboBox *notificationDeviceComboBox;
class notificationDeviceModelColumns : public Gtk::TreeModel::ColumnRecord
{
public:
notificationDeviceModelColumns() { add(id); add(name); add(description); }
Gtk::TreeModelColumn id;
Gtk::TreeModelColumn name;
Gtk::TreeModelColumn description;
};
notificationDeviceModelColumns notificationColumns;
Glib::RefPtr notificationDeviceTreeModel;
Gtk::Entry *notificationDeviceCustomName;
// Mouse Input Device Combo Box Setup
Gtk::ComboBox *mouseDeviceComboBox;
class mouseDeviceModelColumns : public Gtk::TreeModel::ColumnRecord
{
public:
mouseDeviceModelColumns() { add(id); add(name); }
Gtk::TreeModelColumn id;
Gtk::TreeModelColumn name;
};
mouseDeviceModelColumns mouseColumns;
Glib::RefPtr mouseDeviceTreeModel;
// on screen display position/alignment
class osdColumns : public Gtk::TreeModel::ColumnRecord
{
public:
osdColumns() { add(id); add(name); }
Gtk::TreeModelColumn id;
Gtk::TreeModelColumn name;
};
osdColumns osdPositionColumns, osdAlignmentColumns;
Glib::RefPtr osdPositionModel, osdAlignmentModel;
Gtk::ComboBox *osdPosition, *osdAlignment;
Gtk::SpinButton *osdFontSize;
Gtk::ColorButton *osdColor;
// members functions
void showSettingsWindow(void);
bool settingsPTTKeyDetect(void);
bool settingsPTTMouseDetect(void);
void applySettings(void);
void initSettings(void);
std::map getInputDeviceList(void);
// callbacks
void settingsWindow_show_cb(void);
void settingsWindow_hide_cb(void);
void settingsCancelButton_clicked_cb(void);
void settingsApplyButton_clicked_cb(void);
void settingsOkButton_clicked_cb(void);
void settingsEnablePTTKeyCheckButton_toggled_cb(void);
void settingsPTTKeyButton_clicked_cb(void);
void settingsEnablePTTMouseCheckButton_toggled_cb(void);
void settingsPTTMouseButton_clicked_cb(void);
void settingsEnableAudioIntegrationCheckButton_toggled_cb(void);
void settingsEnableVoiceActivationCheckButton_toggled_cb(void);
void settingsEnableOnScreenDisplayCheckButton_toggled_cb(void);
void audioSubsystemComboBox_changed_cb(void);
void updateDeviceComboBoxes(void);
void inputDeviceComboBox_changed_cb(void);
void outputDeviceComboBox_changed_cb(void);
void notificationDeviceComboBox_changed_cb(void);
};
#endif