Skip to content

Commit

Permalink
Renamed GOPanelView to GOGUIPanelView and moved to the gui directory (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg68 authored Aug 25, 2023
1 parent fd3ea7d commit a2402e3
Show file tree
Hide file tree
Showing 7 changed files with 4,420 additions and 31,335 deletions.
35,686 changes: 4,384 additions & 31,302 deletions ide-projects/NetBeans12/nbproject/configurations.xml

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/grandorgue/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,14 @@ gui/GOGUIControl.cpp
gui/GOGUICouplerPanel.cpp
gui/GOGUIDisplayMetrics.cpp
gui/GOGUIDivisionalsPanel.cpp
gui/GOGUILayoutEngine.cpp
gui/GOGUIHW1DisplayMetrics.cpp
gui/GOGUISetterDisplayMetrics.cpp
gui/GOGUIEnclosure.cpp
gui/GOGUIFloatingPanel.cpp
gui/GOGUIHW1Background.cpp
gui/GOGUIHW1DisplayMetrics.cpp
gui/GOGUIImage.cpp
gui/GOGUILayoutEngine.cpp
gui/GOGUIPanelView.cpp
gui/GOGUISetterDisplayMetrics.cpp
gui/GOGUILabel.cpp
gui/GOGUIManual.cpp
gui/GOGUIManualBackground.cpp
Expand Down Expand Up @@ -212,7 +213,6 @@ GOOrganController.cpp
GOProperties.cpp
GOFrame.cpp
GODocument.cpp
GOPanelView.cpp
GOVirtualCouplerController.cpp
)

Expand Down
4 changes: 2 additions & 2 deletions src/grandorgue/GODocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "dialogs/midi-event/GOMidiEventDialog.h"
#include "document-base/GOView.h"
#include "gui/GOGUIPanel.h"
#include "gui/GOGUIPanelView.h"
#include "midi/GOMidiEvent.h"
#include "sound/GOSound.h"
#include "threading/GOMutexLocker.h"
Expand All @@ -23,7 +24,6 @@
#include "GOFrame.h"
#include "GOOrgan.h"
#include "GOOrganController.h"
#include "GOPanelView.h"
#include "GOResizable.h"
#include "go_ids.h"

Expand Down Expand Up @@ -120,7 +120,7 @@ void GODocument::ShowPanel(unsigned id) {

if (!showWindow(GODocument::PANEL, panel)) {
registerWindow(
GODocument::PANEL, panel, GOPanelView::createWithFrame(this, panel));
GODocument::PANEL, panel, GOGUIPanelView::createWithFrame(this, panel));
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/grandorgue/gui/GOGUIPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
#include "GOGUILayoutEngine.h"
#include "GOGUIManual.h"
#include "GOGUIManualBackground.h"
#include "GOGUIPanelView.h"
#include "GOGUIPanelWidget.h"
#include "GOOrganController.h"
#include "GOPanelView.h"
#include "Images.h"

GOGUIPanel::GOGUIPanel(GOOrganController *organController)
Expand Down Expand Up @@ -75,7 +75,7 @@ GOBitmap GOGUIPanel::LoadBitmap(wxString filename, wxString maskname) {
return m_OrganController->GetBitmapCache().GetBitmap(filename, maskname);
}

void GOGUIPanel::SetView(GOPanelView *view) { m_view = view; }
void GOGUIPanel::SetView(GOGUIPanelView *view) { m_view = view; }

void GOGUIPanel::Init(
GOConfigReader &cfg,
Expand Down
6 changes: 3 additions & 3 deletions src/grandorgue/gui/GOGUIPanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class GOConfigReader;
class GOConfigWriter;
class GOButtonControl;
class GODC;
class GOPanelView;
class GOGUIPanelView;
class GOOrganController;

#define GOBitmapPrefix "../GO:"
Expand Down Expand Up @@ -59,7 +59,7 @@ class GOGUIPanel : public GOGUISizeKeeper {
wxString m_GroupName;
GOGUIDisplayMetrics *m_metrics;
GOGUILayoutEngine *m_layout;
GOPanelView *m_view;
GOGUIPanelView *m_view;
bool m_InitialOpenWindow;

void LoadControl(GOGUIControl *control, GOConfigReader &cfg, wxString group);
Expand All @@ -83,7 +83,7 @@ class GOGUIPanel : public GOGUISizeKeeper {
void Load(GOConfigReader &cfg, const wxString &group);
void Layout();

void SetView(GOPanelView *view);
void SetView(GOGUIPanelView *view);

GOOrganController *GetOrganFile();
const wxString &GetName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,22 @@
* (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
*/

#include "GOPanelView.h"
#include "GOGUIPanelView.h"

#include <wx/display.h>
#include <wx/frame.h>
#include <wx/image.h>

#include "gui/GOGUIPanel.h"
#include "gui/GOGUIPanelWidget.h"
#include "gui/primitives/go_gui_utils.h"
#include "primitives/go_gui_utils.h"

BEGIN_EVENT_TABLE(GOPanelView, wxScrolledWindow)
EVT_SIZE(GOPanelView::OnSize)
#include "GOGUIPanel.h"
#include "GOGUIPanelWidget.h"

BEGIN_EVENT_TABLE(GOGUIPanelView, wxScrolledWindow)
EVT_SIZE(GOGUIPanelView::OnSize)
END_EVENT_TABLE()

GOPanelView *GOPanelView::createWithFrame(
GOGUIPanelView *GOGUIPanelView::createWithFrame(
GODocumentBase *doc, GOGUIPanel *panel) {
wxFrame *frame = new wxFrame(
NULL,
Expand All @@ -35,10 +36,10 @@ GOPanelView *GOPanelView::createWithFrame(
// platforms a full-screen mode would be beneficial (on MacOS is already
// works).
frame->SetIcon(get_go_icon());
return new GOPanelView(doc, panel, frame);
return new GOGUIPanelView(doc, panel, frame);
}

GOPanelView::GOPanelView(
GOGUIPanelView::GOGUIPanelView(
GODocumentBase *doc, GOGUIPanel *panel, wxTopLevelWindow *topWindow)
: wxScrolledWindow(topWindow),
GOView(doc, topWindow),
Expand Down Expand Up @@ -88,41 +89,41 @@ GOPanelView::GOPanelView(
m_panel->SetView(this);
}

GOPanelView::~GOPanelView() {
GOGUIPanelView::~GOGUIPanelView() {
if (m_panel)
m_panel->SetView(NULL);
}

void GOPanelView::RemoveView() {
void GOGUIPanelView::RemoveView() {
if (m_panel)
m_panel->SetView(NULL);
m_panel = NULL;
GOView::RemoveView();
}

void GOPanelView::AddEvent(GOGUIControl *control) {
void GOGUIPanelView::AddEvent(GOGUIControl *control) {
wxCommandEvent event(wxEVT_GOCONTROL, 0);
event.SetClientData(control);
m_panelwidget->GetEventHandler()->AddPendingEvent(event);
}

void GOPanelView::SyncState() {
void GOGUIPanelView::SyncState() {
if (m_TopWindow)
m_panel->CaptureSizeInfo(*m_TopWindow);
}

bool GOPanelView::Destroy() {
bool GOGUIPanelView::Destroy() {
if (m_panel)
m_panel->SetView(NULL);
return wxScrolledWindow::Destroy();
}

void GOPanelView::Raise() {
void GOGUIPanelView::Raise() {
wxScrolledWindow::Raise();
m_panelwidget->CallAfter(&GOGUIPanelWidget::Focus);
}

void GOPanelView::OnSize(wxSizeEvent &event) {
void GOGUIPanelView::OnSize(wxSizeEvent &event) {
if (m_panelwidget) {
// Scale out the panel according the new size

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
*/

#ifndef GOPANELVIEW_H
#define GOPANELVIEW_H
#ifndef GOGUIPANELVIEW_H
#define GOGUIPANELVIEW_H

#include <wx/scrolwin.h>
#include <wx/toplevel.h>
Expand All @@ -17,7 +17,7 @@ class GOGUIControl;
class GOGUIPanel;
class GOGUIPanelWidget;

class GOPanelView : public wxScrolledWindow, public GOView {
class GOGUIPanelView : public wxScrolledWindow, public GOView {
private:
GOGUIPanelWidget *m_panelwidget;
GOGUIPanel *m_panel;
Expand All @@ -27,13 +27,15 @@ class GOPanelView : public wxScrolledWindow, public GOView {
void OnSize(wxSizeEvent &event);

public:
GOPanelView(GODocumentBase *doc, GOGUIPanel *panel, wxTopLevelWindow *parent);
~GOPanelView();
GOGUIPanelView(
GODocumentBase *doc, GOGUIPanel *panel, wxTopLevelWindow *parent);
~GOGUIPanelView();

void AddEvent(GOGUIControl *control);

// creates a PanelView and a wxFrame filled with this PanelView
static GOPanelView *createWithFrame(GODocumentBase *doc, GOGUIPanel *panel);
static GOGUIPanelView *createWithFrame(
GODocumentBase *doc, GOGUIPanel *panel);
void SyncState();

void Raise();
Expand Down

0 comments on commit a2402e3

Please sign in to comment.