Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9,988 changes: 6,479 additions & 3,509 deletions GP/CBPlay.fbp

Large diffs are not rendered by default.

578 changes: 578 additions & 0 deletions GP/CBPlay.xrc

Large diffs are not rendered by default.

45 changes: 27 additions & 18 deletions GP/DlgState.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// DlgState.cpp : implementation file
//
// Copyright (c) 1994-2020 By Dale L. Larson, All Rights Reserved.
// Copyright (c) 1994-2025 By Dale L. Larson & William Su, All Rights Reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
Expand Down Expand Up @@ -34,30 +34,38 @@ static char THIS_FILE[] = __FILE__;
/////////////////////////////////////////////////////////////////////////////
// CSelectStateDialog dialog

CSelectStateDialog::CSelectStateDialog(CWnd* pParent /*=NULL*/)
: CDialog(CSelectStateDialog::IDD, pParent)
CSelectStateDialog::CSelectStateDialog(wxWindow* pParent /*= &CB::GetMainWndWx()*/) :
CB_XRC_BEGIN_CTRLS_DEFN(pParent, CSelectStateDialog)
CB_XRC_CTRL_VAL(m_radioMove, m_nState)
CB_XRC_END_CTRLS_DEFN()
{
//{{AFX_DATA_INIT(CSelectStateDialog)
m_nState = -1;
//}}AFX_DATA_INIT
}
// match the desc + OK button width to rest of dlg's width
wxStaticText& desc = CheckedDeref(XRCCTRL(*this, "m_staticDesc", wxStaticText));
desc.Hide();
// find size w/o desc
wxSize dlgMinSize = GetSizer()->GetMinSize();
wxButton& ok = CheckedDeref(XRCCTRL(*this, "wxID_OK", wxButton));
wxSizer& okSizer = CheckedDeref(ok.GetContainingSizer());
desc.Show();
desc.InvalidateBestSize();
desc.Wrap(dlgMinSize.x - okSizer.GetMinSize().x);

void CSelectStateDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSelectStateDialog)
DDX_Radio(pDX, IDC_D_STATE_MOVEFILE, m_nState);
//}}AFX_DATA_MAP
SetMinSize(wxDefaultSize);
Layout();
Fit();
Centre();

m_nState = -1;
}

BEGIN_MESSAGE_MAP(CSelectStateDialog, CDialog)
//{{AFX_MSG_MAP(CSelectStateDialog)
// NOTE: the ClassWizard will add message map macros here
wxBEGIN_EVENT_TABLE(CSelectStateDialog, wxDialog)
#if 0
ON_WM_HELPINFO()
ON_WM_CONTEXTMENU()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
#endif
wxEND_EVENT_TABLE()

#if 0
/////////////////////////////////////////////////////////////////////////////
// Html Help control ID Map

Expand All @@ -77,4 +85,5 @@ void CSelectStateDialog::OnContextMenu(CWnd* pWnd, CPoint point)
{
GetApp()->DoHelpWhatIsHelp(pWnd, adwHelpMap);
}
#endif

22 changes: 11 additions & 11 deletions GP/DlgState.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// DlgState.h : header file
//
// Copyright (c) 1994-2020 By Dale L. Larson, All Rights Reserved.
// Copyright (c) 1994-2025 By Dale L. Larson & William Su, All Rights Reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
Expand All @@ -25,27 +25,27 @@
/////////////////////////////////////////////////////////////////////////////
// CSelectStateDialog dialog

class CSelectStateDialog : public CDialog
class CSelectStateDialog : public wxDialog
{
// Construction
public:
CSelectStateDialog(CWnd* pParent = NULL); // standard constructor
CSelectStateDialog(wxWindow* parent = &CB::GetMainWndWx()); // standard constructor

// Dialog Data
//{{AFX_DATA(CSelectStateDialog)
enum { IDD = IDD_CHOOSESTATE };
int m_nState;
//}}AFX_DATA
private:
CB_XRC_BEGIN_CTRLS_DECL()
RefPtr<wxRadioButton> m_radioMove;
CB_XRC_END_CTRLS_DECL()
public:

// Implementation
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support

// Generated message map functions
//{{AFX_MSG(CSelectStateDialog)
// NOTE: the ClassWizard will add member functions here
#if 0
afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
#endif
wxDECLARE_EVENT_TABLE();
};
44 changes: 26 additions & 18 deletions GP/DlgTrunc.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// DlgTrunc.cpp : implementation file
//
// Copyright (c) 1994-2020 By Dale L. Larson, All Rights Reserved.
// Copyright (c) 1994-2025 By Dale L. Larson & William Su, All Rights Reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
Expand Down Expand Up @@ -35,30 +35,37 @@ static char THIS_FILE[] = __FILE__;
/////////////////////////////////////////////////////////////////////////////
// CTruncatePlaybackDlg dialog

CTruncatePlaybackDlg::CTruncatePlaybackDlg(CWnd* pParent /*=NULL*/)
: CDialog(CTruncatePlaybackDlg::IDD, pParent)
CTruncatePlaybackDlg::CTruncatePlaybackDlg(wxWindow* pParent /*= &CB::GetMainWndWx()*/) :
CB_XRC_BEGIN_CTRLS_DEFN(pParent, CTruncatePlaybackDlg)
CB_XRC_CTRL_VAL(m_radioTruncateSel, m_nTruncateSel)
CB_XRC_END_CTRLS_DEFN()
{
//{{AFX_DATA_INIT(CTruncatePlaybackDlg)
m_nTruncateSel = 0;
//}}AFX_DATA_INIT
}
// match the desc + OK button width to rest of sizer
wxStaticText& desc = CheckedDeref(XRCCTRL(*this, "m_staticDesc", wxStaticText));
desc.Hide();
// find size w/o desc
wxSizer& sizer = CheckedDeref(desc.GetContainingSizer());
wxSize minSize = sizer.GetMinSize();
desc.Show();
desc.InvalidateBestSize();
desc.Wrap(minSize.x);

void CTruncatePlaybackDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CTruncatePlaybackDlg)
DDX_Radio(pDX, IDC_D_TRUNC_DONT, m_nTruncateSel);
//}}AFX_DATA_MAP
SetMinSize(wxDefaultSize);
Layout();
Fit();
Centre();

m_nTruncateSel = 0;
}

BEGIN_MESSAGE_MAP(CTruncatePlaybackDlg, CDialog)
//{{AFX_MSG_MAP(CTruncatePlaybackDlg)
// NOTE: the ClassWizard will add message map macros here
wxBEGIN_EVENT_TABLE(CTruncatePlaybackDlg, wxDialog)
#if 0
ON_WM_HELPINFO()
ON_WM_CONTEXTMENU()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
#endif
wxEND_EVENT_TABLE()

#if 0
/////////////////////////////////////////////////////////////////////////////
// Html Help control ID Map

Expand All @@ -78,6 +85,7 @@ void CTruncatePlaybackDlg::OnContextMenu(CWnd* pWnd, CPoint point)
{
GetApp()->DoHelpWhatIsHelp(pWnd, adwHelpMap);
}
#endif

/////////////////////////////////////////////////////////////////////////////
// CTruncatePlaybackDlg message handlers
26 changes: 10 additions & 16 deletions GP/DlgTrunc.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// DlgTrunc.h : header file
//
// Copyright (c) 1994-2020 By Dale L. Larson, All Rights Reserved.
// Copyright (c) 1994-2025 By Dale L. Larson & William Su, All Rights Reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
Expand Down Expand Up @@ -32,36 +32,30 @@
/////////////////////////////////////////////////////////////////////////////
// CTruncatePlaybackDlg dialog

class CTruncatePlaybackDlg : public CDialog
class CTruncatePlaybackDlg : public wxDialog
{
// Construction
public:
CTruncatePlaybackDlg(CWnd* pParent = NULL); // standard constructor
CTruncatePlaybackDlg(wxWindow* pParent = &CB::GetMainWndWx()); // standard constructor

// Dialog Data
//{{AFX_DATA(CTruncatePlaybackDlg)
enum { IDD = IDD_TRUNCATE_PLAYBACK };
int m_nTruncateSel;
//}}AFX_DATA
private:
CB_XRC_BEGIN_CTRLS_DECL()
RefPtr<wxRadioButton> m_radioTruncateSel;
CB_XRC_END_CTRLS_DECL()


// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CTruncatePlaybackDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL

// Implementation
protected:

// Generated message map functions
//{{AFX_MSG(CTruncatePlaybackDlg)
// NOTE: the ClassWizard will add member functions here
#if 0
afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
#endif
wxDECLARE_EVENT_TABLE();
};

#endif
49 changes: 17 additions & 32 deletions GP/DlgYnew.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// DlgYnew.cpp : implementation file
//
// Copyright (c) 1994-2020 By Dale L. Larson, All Rights Reserved.
// Copyright (c) 1994-2025 By Dale L. Larson & William Su, All Rights Reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
Expand Down Expand Up @@ -36,48 +36,33 @@ static char THIS_FILE[] = __FILE__;
// CTrayNewDialog dialog


CTrayNewDialog::CTrayNewDialog(CWnd* pParent /*=NULL*/)
: CDialog(CTrayNewDialog::IDD, pParent)
CTrayNewDialog::CTrayNewDialog(CTrayManager& yMgr, wxWindow* pParent /*= &CB::GetMainWndWx()*/) :
CB_XRC_BEGIN_CTRLS_DEFN(pParent, CTrayNewDialog)
CB_XRC_CTRL_VAL(m_editName, m_strName, wxFILTER_EMPTY, 32)
CB_XRC_END_CTRLS_DEFN(),
m_pYMgr(yMgr)
{
//{{AFX_DATA_INIT(CTrayNewDialog)
m_strName = "";
//}}AFX_DATA_INIT
}

void CTrayNewDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CTrayNewDialog)
DDX_Control(pDX, IDC_D_YNEW_NAME, m_editName);
DDX_Text(pDX, IDC_D_YNEW_NAME, m_strName);
DDV_MaxChars(pDX, m_strName, 32);
//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CTrayNewDialog, CDialog)
//{{AFX_MSG_MAP(CTrayNewDialog)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// CTrayNewDialog message handlers

void CTrayNewDialog::OnOK()
bool CTrayNewDialog::TransferDataFromWindow()
{
m_strName = CB::string::GetWindowText(m_editName);
if (m_strName.empty())
if (!wxDialog::TransferDataFromWindow())
{
AfxMessageBox(IDS_ERR_TRAYNAME, MB_OK | MB_ICONINFORMATION);
m_editName.SetFocus();
return;
return false;
}
size_t nSel = m_pYMgr->FindTrayByName(m_strName);

size_t nSel = m_pYMgr.FindTrayByName(m_strName);
if (nSel != Invalid_v<size_t>)
{
AfxMessageBox(IDS_ERR_TRAYNAMEUSED, MB_OK | MB_ICONINFORMATION);
m_editName.SetFocus();
return;
wxMessageBox(CB::string::LoadString(IDS_ERR_TRAYNAMEUSED),
CB::GetAppName(),
wxOK | wxICON_INFORMATION);
m_editName->SetFocus();
return false;
}
CDialog::OnOK();
return true;
}
27 changes: 10 additions & 17 deletions GP/DlgYnew.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// DlgYnew.h : header file
//
// Copyright (c) 1994-2020 By Dale L. Larson, All Rights Reserved.
// Copyright (c) 1994-2025 By Dale L. Larson & William Su, All Rights Reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
Expand Down Expand Up @@ -29,29 +29,22 @@ class CTrayManager;
/////////////////////////////////////////////////////////////////////////////
// CTrayNewDialog dialog

class CTrayNewDialog : public CDialog
class CTrayNewDialog : public wxDialog
{
// Construction
public:
CTrayNewDialog(CWnd* pParent = NULL); // standard constructor
CTrayNewDialog(CTrayManager& yMgr, wxWindow* pParent = &CB::GetMainWndWx()); // standard constructor

// Dialog Data
//{{AFX_DATA(CTrayNewDialog)
enum { IDD = IDD_TRAYNEW };
CEdit m_editName;
CB::string m_strName;
//}}AFX_DATA
wxString m_strName;
private:
CB_XRC_BEGIN_CTRLS_DECL()
RefPtr<wxTextCtrl> m_editName;
CB_XRC_END_CTRLS_DECL()

CTrayManager* m_pYMgr;
const CTrayManager& m_pYMgr;

// Implementation
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support

// Generated message map functions
//{{AFX_MSG(CTrayNewDialog)
virtual void OnOK();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
bool TransferDataFromWindow() override;
};

Loading