obs-studio/obs/wx-subclass.hpp

67 lines
2.1 KiB
C++
Raw Normal View History

2013-11-08 23:21:09 -08:00
/******************************************************************************
Copyright (C) 2013 by Hugh Bailey <obs.jim@gmail.com>
This program 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 2 of the License, or
2013-11-08 23:21:09 -08:00
(at your option) any later version.
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#pragma once
2013-12-10 10:21:34 -08:00
#include <wx/dialog.h>
2013-11-08 23:21:09 -08:00
#include <wx/frame.h>
#include <wx/listctrl.h>
#include "obs-app.hpp"
2013-11-08 23:21:09 -08:00
/*
2013-12-10 10:21:34 -08:00
* Fixes windows fonts to be default dialog fonts (the fonts they recommend
* look like garbage)
2013-11-08 23:21:09 -08:00
*/
#ifdef _
#undef _
#define _(str) wxString(Str(str), wxConvUTF8)
#endif
2013-12-10 10:21:34 -08:00
class DialogSubclass : public wxDialog {
public:
DialogSubclass(wxWindow *parent, wxWindowID id,
const wxString &title,
const wxPoint &pos = wxDefaultPosition,
const wxSize &size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString &name = wxDialogNameStr);
};
2013-11-08 23:21:09 -08:00
class WindowSubclass : public wxFrame {
public:
WindowSubclass(wxWindow* parent, wxWindowID id, const wxString& title,
const wxPoint& pos, const wxSize& size, long style);
};
/*
* To fix report view default sizing because it defaults to 10 * fontheight in
* report view. Why? Who knows.
*/
class ListCtrlFixed : public wxListCtrl {
public:
ListCtrlFixed(wxWindow *parent,
2013-11-08 23:21:09 -08:00
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxLC_ICON,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListCtrlNameStr);
2013-11-08 23:21:09 -08:00
virtual wxSize DoGetBestClientSize() const;
};