diff --git a/GP/CBPlay.fbp b/GP/CBPlay.fbp index 28f2522..9a5a2cd 100644 --- a/GP/CBPlay.fbp +++ b/GP/CBPlay.fbp @@ -4316,115 +4316,49 @@ - + 0 wxAUI_MGR_DEFAULT - wxBOTH 1 0 1 impl_virtual - 0 wxID_ANY - CImportTraysDlg + CGsnProjView - - wxDEFAULT_DIALOG_STYLE + -1,-1 ; ; forward_declare - Import Piece Groups 0 - + wxTAB_TRAVERSAL - bSizer17 + bSizer80 wxHORIZONTAL none 5 wxEXPAND - 1 + 0 - bSizer18 + bSizer81 wxVERTICAL none 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Create Trays from the selected Piece Groups: - 0 - - 0 - - - 0 - - 1 - m_staticText16 - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + wxEXPAND|wxTOP|wxRIGHT|wxLEFT 1 - + 1 1 1 @@ -4438,7 +4372,6 @@ 1 0 - 1 1 @@ -4461,7 +4394,7 @@ 0 1 - m_listGroups + m_listProj 1 @@ -4471,14 +4404,10 @@ Resizable 1 - wxLB_EXTENDED|wxLB_SORT - ; ; forward_declare + + CProjListBoxGsn; forward_declare 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -4490,12 +4419,12 @@ 0 - bSizer20 + bSizer83 wxHORIZONTAL none 5 - wxALL + wxTOP|wxBOTTOM|wxLEFT 0 1 @@ -4532,7 +4461,7 @@ 0 0 wxID_ANY - Select All + MyButton 0 @@ -4542,7 +4471,7 @@ 0 1 - OnBnClickedSelectAll + m_btnPrjA 1 @@ -4569,17 +4498,81 @@ 5 - wxEXPAND - 1 - - 0 + wxTOP|wxBOTTOM + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + MyButton + + 0 + + 0 + + + 0 + + 1 + m_btnPrjB + 1 + + protected - 0 + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + 5 - wxALL + wxTOP|wxBOTTOM|wxRIGHT 0 1 @@ -4616,7 +4609,7 @@ 0 0 wxID_ANY - Clear All + MyButton 0 @@ -4626,7 +4619,7 @@ 0 1 - OnBnClickedClearAll + m_btnPrjC 1 @@ -4657,18 +4650,77 @@ 5 - + wxEXPAND 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline1 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_VERTICAL + ; ; forward_declare + 0 + + + + + + + + 5 + wxEXPAND + 1 - bSizer19 + bSizer82 wxVERTICAL none 5 - wxALL - 0 - + wxALL|wxEXPAND + 1 + 1 1 1 @@ -4677,20 +4729,15 @@ 0 0 - 0 - 1 0 1 1 - - 1 0 - Dock 0 Left @@ -4698,14 +4745,10 @@ 1 1 - 0 0 wxID_ANY - OK - - 0 0 @@ -4713,26 +4756,20 @@ 0 1 - wxID_OK + m_listTrays 1 protected 1 - - Resizable 1 - ; ; forward_declare + CTrayListBoxWx; forward_declare 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -4740,9 +4777,9 @@ 5 - wxALL - 0 - + wxALL|wxEXPAND + 1 + 1 1 1 @@ -4751,20 +4788,15 @@ 0 0 - 0 - 1 0 1 1 - - 0 0 - Dock 0 Left @@ -4772,34 +4804,29 @@ 1 1 - 0 - 0 + 1 wxID_ANY - Cancel - - 0 0 + 0 0 1 - wxID_CANCEL + m_editInfo 1 protected 1 - - Resizable 1 - + wxTE_MULTILINE|wxTE_READONLY ; ; forward_declare 0 @@ -4807,6 +4834,7 @@ wxFILTER_NONE wxDefaultValidator + @@ -4833,12 +4861,12 @@ wxID_ANY - CMarkerCountDialog + CImportTraysDlg wxDEFAULT_DIALOG_STYLE ; ; forward_declare - Enter Marker Count + Import Piece Groups 0 @@ -4846,150 +4874,23 @@ - bSizer21 + bSizer17 wxHORIZONTAL none - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Enter the number of markers to be created: - 0 - - 0 - - - 0 - - 1 - m_staticText17 - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_editMarkerCount - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - 5 wxEXPAND 1 - bSizer22 + bSizer18 wxVERTICAL none 5 - wxALL + wxTOP|wxRIGHT|wxLEFT 0 - + 1 1 1 @@ -4998,20 +4899,15 @@ 0 0 - 0 - 1 0 1 1 - - 1 0 - Dock 0 Left @@ -5019,13 +4915,11 @@ 1 1 - 0 0 wxID_ANY - OK - + Create Trays from the selected Piece Groups: 0 0 @@ -5034,15 +4928,13 @@ 0 1 - wxID_OK + m_staticText16 1 protected 1 - - Resizable 1 @@ -5050,20 +4942,17 @@ ; ; forward_declare 0 - - wxFILTER_NONE - wxDefaultValidator - + -1 5 - wxALL - 0 - + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 1 + 1 1 1 @@ -5072,20 +4961,16 @@ 0 0 - 0 - 1 0 + 1 1 - - 0 0 - Dock 0 Left @@ -5093,14 +4978,10 @@ 1 1 - 0 0 wxID_ANY - Cancel - - 0 0 @@ -5108,19 +4989,17 @@ 0 1 - wxID_CANCEL + m_listGroups 1 protected 1 - - Resizable 1 - + wxLB_EXTENDED|wxLB_SORT ; ; forward_declare 0 @@ -5133,66 +5012,20 @@ - - - - - - 0 - wxAUI_MGR_DEFAULT - - wxBOTH - - 1 - 0 - 1 - impl_virtual - - - - 0 - wxID_ANY - - - CMovDescDialog - - - wxDEFAULT_DIALOG_STYLE - ; ; forward_declare - Enter Move Description - - 0 - - - - - - bSizer23 - wxVERTICAL - none - - 5 - wxEXPAND - 1 - - - bSizer24 - wxHORIZONTAL - none 5 wxEXPAND - 1 + 0 - bSizer25 - wxVERTICAL + bSizer20 + wxHORIZONTAL none 5 wxALL 0 - + 1 1 1 @@ -5201,15 +5034,20 @@ 0 0 + 0 + 1 0 1 1 + + 0 0 + Dock 0 Left @@ -5217,11 +5055,13 @@ 1 1 + 0 0 wxID_ANY - Enter a description for this recorded set of moves. The title is presented in the move history list. + Select All + 0 0 @@ -5230,13 +5070,15 @@ 0 1 - m_staticText18 + OnBnClickedSelectAll 1 protected 1 + + Resizable 1 @@ -5244,10 +5086,13 @@ ; ; forward_declare 0 + + wxFILTER_NONE + wxDefaultValidator + - -1 @@ -5260,153 +5105,6 @@ 0 - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Title: - 0 - - 0 - - - 0 - - 1 - m_staticText19 - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - - - 5 - - 0 - - - bSizer26 - wxVERTICAL - none - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - 0 - - - - - 1 - 0 - 1 - - 1 - - 1 - 0 - - Dock - 0 - Left - 0 - 1 - - 1 - - - 0 - 0 - wxID_ANY - OK - - 0 - - 0 - - - 0 - - 1 - wxID_OK - 1 - - - protected - 1 - - - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - 5 wxALL @@ -5446,7 +5144,7 @@ 0 0 wxID_ANY - Cancel + Clear All 0 @@ -5456,7 +5154,7 @@ 0 1 - wxID_CANCEL + OnBnClickedClearAll 1 @@ -5487,245 +5185,18 @@ 5 - wxALL|wxEXPAND + 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 + - 1 - m_editTitle - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Description: - 0 - - 0 - - - 0 - - 1 - m_staticText20 - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_editDesc - 1 - - - protected - 1 - - Resizable - 1 - - wxTE_MULTILINE - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - 0 - wxAUI_MGR_DEFAULT - - wxBOTH - - 1 - 0 - 1 - impl_virtual - - - - 0 - wxID_ANY - - - CMultiplayerGameDialog - - - wxDEFAULT_DIALOG_STYLE - ; ; forward_declare - Creating Multiplayer Game - - 0 - - - - - - bSizer27 - wxHORIZONTAL - none - - 5 - wxEXPAND - 1 - - - bSizer28 + bSizer19 wxVERTICAL none 5 wxALL 0 - + 1 1 1 @@ -5734,15 +5205,20 @@ 0 0 + 0 + 1 0 1 1 + + 1 0 + Dock 0 Left @@ -5750,11 +5226,13 @@ 1 1 + 0 0 wxID_ANY - This scenario is for a multi-player game. You will be prompted for a base file name that will be used to create a unique game file for each player. The generated files should be distributed to the appropriate players after which you may begin play. + OK + 0 0 @@ -5763,75 +5241,15 @@ 0 1 - m_static1 - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Create a Referee game file. It has unlimited player access. - - 0 - - - 0 - - 1 - m_chkCreateReferee + wxID_OK 1 protected 1 + + Resizable 1 @@ -5852,7 +5270,7 @@ 5 wxALL 0 - + 1 1 1 @@ -5861,15 +5279,20 @@ 0 0 + 0 + 1 0 1 1 + + 0 0 + Dock 0 Left @@ -5877,11 +5300,13 @@ 1 1 + 0 0 wxID_ANY - The names below are the default player names. You may change them now before creating the games. Press OK when you are done. + Cancel + 0 0 @@ -5890,13 +5315,15 @@ 0 1 - m_static2 + wxID_CANCEL 1 protected 1 + + Resizable 1 @@ -5904,81 +5331,193 @@ ; ; forward_declare 0 - - - - -1 - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_listPlayers - 1 - - - protected - 1 - - Resizable - 1 - - wxLB_SINGLE - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - + + wxFILTER_NONE + wxDefaultValidator + + + + + + + 0 + wxAUI_MGR_DEFAULT + + wxBOTH + + 1 + 0 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + CMarkerCountDialog + + + wxDEFAULT_DIALOG_STYLE + ; ; forward_declare + Enter Marker Count + + 0 + + + + + + bSizer21 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Enter the number of markers to be created: + 0 + + 0 + + + 0 + + 1 + m_staticText17 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_editMarkerCount + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer22 + wxVERTICAL + none 5 - wxALL|wxEXPAND + wxALL 0 - + 1 1 1 @@ -5987,15 +5526,20 @@ 0 0 + 0 + 1 0 1 1 + + 1 0 + Dock 0 Left @@ -6003,25 +5547,30 @@ 1 1 + 0 0 wxID_ANY + OK + + 0 0 - 0 0 1 - m_editPlayer + wxID_OK 1 protected 1 + + Resizable 1 @@ -6033,7 +5582,6 @@ wxFILTER_NONE wxDefaultValidator - @@ -6041,7 +5589,7 @@ 5 - wxALL|wxALIGN_CENTER_HORIZONTAL + wxALL 0 1 @@ -6078,7 +5626,7 @@ 0 0 wxID_ANY - Update Name + Cancel 0 @@ -6088,166 +5636,7 @@ 0 1 - OnBtnPressUpdateName - 1 - - - protected - 1 - - - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - 5 - - 0 - - - bSizer29 - wxVERTICAL - none - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - 0 - - - - - 1 - 0 - 1 - - 1 - - 1 - 0 - - Dock - 0 - Left - 0 - 1 - - 1 - - - 0 - 0 - wxID_ANY - OK - - 0 - - 0 - - - 0 - - 1 - wxID_OK - 1 - - - protected - 1 - - - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - 0 - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 0 - 1 - - 1 - - - 0 - 0 - wxID_ANY - Cancel - - 0 - - 0 - - - 0 - - 1 - wxID_CANCEL + wxID_CANCEL 1 @@ -6293,12 +5682,12 @@ wxID_ANY - CPasswordDialog + CMovDescDialog wxDEFAULT_DIALOG_STYLE ; ; forward_declare - Enter Password + Enter Move Description 0 @@ -6306,8 +5695,8 @@ - bSizer41 - wxHORIZONTAL + bSizer23 + wxVERTICAL none 5 @@ -6315,353 +5704,21 @@ 1 - bSizer42 - wxVERTICAL + bSizer24 + wxHORIZONTAL none 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Enter the password: - 0 - - 0 - - - 0 + wxEXPAND + 1 + - 1 - m_staticText27 - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_editPassword - 1 - - - protected - 1 - - Resizable - 1 - - wxTE_PASSWORD - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - 5 - - 0 - - - bSizer43 - wxVERTICAL - none - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - 0 - - - - - 1 - 0 - 1 - - 1 - - 1 - 0 - - Dock - 0 - Left - 0 - 1 - - 1 - - - 0 - 0 - wxID_ANY - OK - - 0 - - 0 - - - 0 - - 1 - wxID_OK - 1 - - - protected - 1 - - - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - 0 - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 0 - 1 - - 1 - - - 0 - 0 - wxID_ANY - Cancel - - 0 - - 0 - - - 0 - - 1 - wxID_CANCEL - 1 - - - protected - 1 - - - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - 0 - wxAUI_MGR_DEFAULT - - wxBOTH - - 1 - 0 - 1 - impl_virtual - - - - 0 - wxID_ANY - - - CPBrdPropDialog - - - wxDEFAULT_DIALOG_STYLE - ; ; forward_declare - Board Properties - - 0 - - - - - - bSizer44 - wxVERTICAL - none - - 5 - wxEXPAND - 0 - - - bSizer45 - wxHORIZONTAL - none - - 5 - wxEXPAND - 1 - - - bSizer46 + bSizer25 wxVERTICAL none 5 - wxTOP|wxRIGHT|wxLEFT + wxALL 0 1 @@ -6692,7 +5749,7 @@ 0 0 wxID_ANY - Board Name: + Enter a description for this recorded set of moves. The title is presented in the move history list. 0 0 @@ -6701,7 +5758,7 @@ 0 1 - m_staticText28 + m_staticText18 1 @@ -6723,67 +5780,12 @@ 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_editBoardName - 1 - - + wxEXPAND + 1 + + 0 protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - + 0 @@ -6819,7 +5821,7 @@ 0 0 wxID_ANY - Board's owner: + Title: 0 0 @@ -6828,7 +5830,7 @@ 0 1 - m_staticOwnerLabel + m_staticText19 1 @@ -6856,7 +5858,7 @@ 0 - bSizer47 + bSizer26 wxVERTICAL none @@ -7015,72 +6017,7 @@ 5 wxALL|wxEXPAND 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_comboOwners - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - + 1 1 1 @@ -7094,7 +6031,6 @@ 1 0 - 0 1 1 @@ -7110,15 +6046,15 @@ 0 0 wxID_ANY - Allow non-owners to access pieces on this board. 0 + 0 0 1 - m_chkAllowAccess + m_editTitle 1 @@ -7136,6 +6072,7 @@ wxFILTER_NONE wxDefaultValidator + @@ -7145,7 +6082,7 @@ 5 wxTOP|wxRIGHT|wxLEFT 0 - + 1 1 1 @@ -7159,7 +6096,6 @@ 1 0 - 0 1 1 @@ -7175,7 +6111,8 @@ 0 0 wxID_ANY - This board is private (restricted to owner). + Description: + 0 0 @@ -7183,7 +6120,7 @@ 0 1 - m_chkPrivate + m_staticText20 1 @@ -7197,20 +6134,17 @@ ; ; forward_declare 0 - - wxFILTER_NONE - wxDefaultValidator - + -1 5 - wxTOP|wxRIGHT|wxLEFT + wxALL|wxEXPAND 0 - + 1 1 1 @@ -7224,7 +6158,6 @@ 1 0 - 0 1 1 @@ -7240,15 +6173,15 @@ 0 0 wxID_ANY - Automatically Show Board on Open 0 + 0 0 1 - m_chkOpenBoardOnLoad + m_editDesc 1 @@ -7258,7 +6191,7 @@ Resizable 1 - + wxTE_MULTILINE ; ; forward_declare 0 @@ -7266,296 +6199,1891 @@ wxFILTER_NONE wxDefaultValidator + + + + + 0 + wxAUI_MGR_DEFAULT + + wxBOTH + + 1 + 0 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + CMultiplayerGameDialog + + + wxDEFAULT_DIALOG_STYLE + ; ; forward_declare + Creating Multiplayer Game + + 0 + + + + + + bSizer27 + wxHORIZONTAL + none 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Show select list and tiny board view. (Reopen window) - - 0 - - - 0 + wxEXPAND + 1 + - 1 - m_chkShowSelListAndTinyMap - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Draw locked objects below non-locked objects. - - 0 - - - 0 - - 1 - m_chkDrawLockedBeneath - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxALL - 0 - - wxID_ANY - Snap Grid - - sbSizer2 + bSizer28 wxVERTICAL - 1 none 5 - wxEXPAND - 1 - - 4 - wxBOTH - - - 0 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + This scenario is for a multi-player game. You will be prompted for a base file name that will be used to create a unique game file for each player. The generated files should be distributed to the appropriate players after which you may begin play. + 0 + + 0 + + + 0 - fgSizer3 - wxFLEX_GROWMODE_SPECIFIED - none - 2 - 0 - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - X Pixels: - 0 - - 0 - - - 0 - - 1 - m_staticText30 - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_editXGridSnap - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - + 1 + m_static1 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Create a Referee game file. It has unlimited player access. + + 0 + + + 0 + + 1 + m_chkCreateReferee + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + The names below are the default player names. You may change them now before creating the games. Press OK when you are done. + 0 + + 0 + + + 0 + + 1 + m_static2 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_listPlayers + 1 + + + protected + 1 + + Resizable + 1 + + wxLB_SINGLE + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_editPlayer + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Update Name + + 0 + + 0 + + + 0 + + 1 + OnBtnPressUpdateName + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + 5 + + 0 + + + bSizer29 + wxVERTICAL + none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 1 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + OK + + 0 + + 0 + + + 0 + + 1 + wxID_OK + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Cancel + + 0 + + 0 + + + 0 + + 1 + wxID_CANCEL + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + 0 + wxAUI_MGR_DEFAULT + + wxBOTH + + 1 + 0 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + CPasswordDialog + + + wxDEFAULT_DIALOG_STYLE + ; ; forward_declare + Enter Password + + 0 + + + + + + bSizer41 + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + bSizer42 + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Enter the password: + 0 + + 0 + + + 0 + + 1 + m_staticText27 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_editPassword + 1 + + + protected + 1 + + Resizable + 1 + + wxTE_PASSWORD + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + 5 + + 0 + + + bSizer43 + wxVERTICAL + none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 1 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + OK + + 0 + + 0 + + + 0 + + 1 + wxID_OK + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Cancel + + 0 + + 0 + + + 0 + + 1 + wxID_CANCEL + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + 0 + wxAUI_MGR_DEFAULT + + wxBOTH + + 1 + 0 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + CPBrdPropDialog + + + wxDEFAULT_DIALOG_STYLE + ; ; forward_declare + Board Properties + + 0 + + + + + + bSizer44 + wxVERTICAL + none + + 5 + wxEXPAND + 0 + + + bSizer45 + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + bSizer46 + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Board Name: + 0 + + 0 + + + 0 + + 1 + m_staticText28 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_editBoardName + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Board's owner: + 0 + + 0 + + + 0 + + 1 + m_staticOwnerLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + + + 5 + + 0 + + + bSizer47 + wxVERTICAL + none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 1 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + OK + + 0 + + 0 + + + 0 + + 1 + wxID_OK + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Cancel + + 0 + + 0 + + + 0 + + 1 + wxID_CANCEL + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_comboOwners + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Allow non-owners to access pieces on this board. + + 0 + + + 0 + + 1 + m_chkAllowAccess + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + This board is private (restricted to owner). + + 0 + + + 0 + + 1 + m_chkPrivate + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Automatically Show Board on Open + + 0 + + + 0 + + 1 + m_chkOpenBoardOnLoad + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Show select list and tiny board view. (Reopen window) + + 0 + + + 0 + + 1 + m_chkShowSelListAndTinyMap + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Draw locked objects below non-locked objects. + + 0 + + + 0 + + 1 + m_chkDrawLockedBeneath + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALL + 0 + + wxID_ANY + Snap Grid + + sbSizer2 + wxVERTICAL + 1 + none + + 5 + wxEXPAND + 1 + + 4 + wxBOTH + + + 0 + + fgSizer3 + wxFLEX_GROWMODE_SPECIFIED + none + 2 + 0 + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + X Pixels: + 0 + + 0 + + + 0 + + 1 + m_staticText30 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_editXGridSnap + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + 5 wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT @@ -9005,12 +9533,1484 @@ wxID_ANY - CRotatePieceDialog + CRotatePieceDialog + + + wxDEFAULT_DIALOG_STYLE + ; ; forward_declare + Rotate Object + + 0 + + + + + + bSizer48 + wxHORIZONTAL + none + + 5 + wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT + 1 + + 2 + 0 + + gSizer1 + none + 4 + 0 + + 5 + wxLEFT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + -1° + + 0 + + 0 + + + 0 + + 1 + OnRotatePieceCCW1 + 1 + + + protected + 1 + + + + Resizable + 1 + + wxBU_EXACTFIT + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxLEFT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + +1° + + 0 + + 0 + + + 0 + + 1 + OnRotatePieceCW1 + 1 + + + protected + 1 + + + + Resizable + 1 + + wxBU_EXACTFIT + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxLEFT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + -5° + + 0 + + 0 + + + 0 + + 1 + OnRotatePieceCCW5 + 1 + + + protected + 1 + + + + Resizable + 1 + + wxBU_EXACTFIT + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxLEFT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + +5° + + 0 + + 0 + + + 0 + + 1 + OnRotatePieceCW5 + 1 + + + protected + 1 + + + + Resizable + 1 + + wxBU_EXACTFIT + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxLEFT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + -10° + + 0 + + 0 + + + 0 + + 1 + OnRotatePieceCCW10 + 1 + + + protected + 1 + + + + Resizable + 1 + + wxBU_EXACTFIT + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxLEFT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + +10° + + 0 + + 0 + + + 0 + + 1 + OnRotatePieceCW10 + 1 + + + protected + 1 + + + + Resizable + 1 + + wxBU_EXACTFIT + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxLEFT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + -50° + + 0 + + 0 + + + 0 + + 1 + OnRotatePieceCCW50 + 1 + + + protected + 1 + + + + Resizable + 1 + + wxBU_EXACTFIT + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxLEFT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + +50° + + 0 + + 0 + + + 0 + + 1 + OnRotatePieceCW50 + 1 + + + protected + 1 + + + + Resizable + 1 + + wxBU_EXACTFIT + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + 5 + wxEXPAND|wxLEFT + 0 + + + bSizer49 + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 1 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + OK + + 0 + + 0 + + + 0 + + 1 + wxID_OK + 1 + + + protected + 1 + + + + Resizable + 1 + + wxBU_EXACTFIT + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Cancel + + 0 + + 0 + + + 0 + + 1 + wxID_CANCEL + 1 + + + protected + 1 + + + + Resizable + 1 + + wxBU_EXACTFIT + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_editCurVal + 1 + + + protected + 1 + + Resizable + 1 + + wxTE_CENTER|wxTE_READONLY + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + 0 + wxAUI_MGR_DEFAULT + + wxBOTH + + 1 + 0 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + CScnPropDialog + + + wxDEFAULT_DIALOG_STYLE + ; ; forward_declare + Scenario Properties + + 0 + + + + + + bSizer50 + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + + bSizer51 + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + bSizer52 + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Author: + 0 + + 0 + + + 0 + + 1 + m_staticText39 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_editAuthor + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Title: + 0 + + 0 + + + 0 + + 1 + m_staticText40 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + + + 5 + + 0 + + + bSizer53 + wxVERTICAL + none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 1 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + OK + + 0 + + 0 + + + 0 + + 1 + wxID_OK + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Cancel + + 0 + + 0 + + + 0 + + 1 + wxID_CANCEL + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_editTitle + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + MMMMMMMMMMMMMMMMMMMMMMMMMMMMM + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Description: + 0 + + 0 + + + 0 + + 1 + m_staticText41 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_editDescr + 1 + + + protected + 1 + + Resizable + 1 + + wxTE_MULTILINE + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 1 2 3 4 5 6 + + + + + + + + + 0 + wxAUI_MGR_DEFAULT + + wxBOTH + + 1 + 0 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + CSelectBoardsDialog wxDEFAULT_DIALOG_STYLE ; ; forward_declare - Rotate Object + Select Boards 0 @@ -9018,26 +11018,85 @@ - bSizer48 + bSizer57 wxHORIZONTAL none 5 - wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT + wxEXPAND 1 - - 2 - 0 + - gSizer1 + bSizer58 + wxVERTICAL none - 4 - 0 5 - wxLEFT|wxEXPAND - 0 - + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Select boards used in the scenario: + 0 + + 0 + + + 0 + + 1 + m_staticText44 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL|wxEXPAND + 1 + 1 1 1 @@ -9046,20 +11105,16 @@ 0 0 - 0 - 1 0 + "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" 1 1 - - 0 0 - Dock 0 Left @@ -9067,14 +11122,10 @@ 1 1 - 0 0 wxID_ANY - -1° - - 0 0 @@ -9082,19 +11133,17 @@ 0 1 - OnRotatePieceCCW1 + m_listBoards 1 protected 1 - - Resizable 1 - wxBU_EXACTFIT + wxLB_EXTENDED|wxLB_SORT ; ; forward_declare 0 @@ -9109,7 +11158,187 @@ 5 - wxLEFT|wxEXPAND + wxEXPAND + 0 + + + bSizer60 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Select All + + 0 + + 0 + + + 0 + + 1 + OnBtnClickedSelectAll + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Clear All + + 0 + + 0 + + + 0 + + 1 + OnBtnClickedClearAll + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + 5 + + 0 + + + bSizer59 + wxVERTICAL + none + + 5 + wxALL 0 1 @@ -9131,7 +11360,7 @@ 1 - 0 + 1 0 Dock @@ -9146,7 +11375,7 @@ 0 0 wxID_ANY - +1° + OK 0 @@ -9156,7 +11385,7 @@ 0 1 - OnRotatePieceCW1 + wxID_OK 1 @@ -9168,7 +11397,7 @@ Resizable 1 - wxBU_EXACTFIT + ; ; forward_declare 0 @@ -9183,7 +11412,7 @@ 5 - wxLEFT|wxEXPAND + wxALL 0 1 @@ -9220,7 +11449,7 @@ 0 0 wxID_ANY - -5° + Cancel 0 @@ -9230,7 +11459,7 @@ 0 1 - OnRotatePieceCCW5 + wxID_CANCEL 1 @@ -9242,7 +11471,7 @@ Resizable 1 - wxBU_EXACTFIT + ; ; forward_declare 0 @@ -9255,11 +11484,57 @@ + + + + + + 0 + wxAUI_MGR_DEFAULT + + wxBOTH + + 1 + 0 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + CSelectNewOwnerDialog + + + wxDEFAULT_DIALOG_STYLE + ; ; forward_declare + Select New Owner + + 0 + + + + + + bSizer54 + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + bSizer55 + wxVERTICAL + none 5 - wxLEFT|wxEXPAND + wxTOP|wxRIGHT|wxLEFT 0 - + 1 1 1 @@ -9268,20 +11543,15 @@ 0 0 - 0 - 1 0 1 1 - - 0 0 - Dock 0 Left @@ -9289,13 +11559,11 @@ 1 1 - 0 0 wxID_ANY - +5° - + Select a new owner for the piece(s): 0 0 @@ -9304,36 +11572,31 @@ 0 1 - OnRotatePieceCW5 + m_staticText43 1 protected 1 - - Resizable 1 - wxBU_EXACTFIT + ; ; forward_declare 0 - - wxFILTER_NONE - wxDefaultValidator - + -1 5 - wxLEFT|wxEXPAND - 0 - + wxALL|wxEXPAND + 1 + 1 1 1 @@ -9342,20 +11605,16 @@ 0 0 - 0 - 1 0 + "1" "2" "3" "4" "5" "6" 1 1 - - 0 0 - Dock 0 Left @@ -9363,14 +11622,10 @@ 1 1 - 0 0 wxID_ANY - -10° - - 0 0 @@ -9378,19 +11633,17 @@ 0 1 - OnRotatePieceCCW10 + m_listPlayers 1 protected 1 - - Resizable 1 - wxBU_EXACTFIT + wxLB_SINGLE ; ; forward_declare 0 @@ -9403,9 +11656,20 @@ + + + + 5 + + 0 + + + bSizer56 + wxVERTICAL + none 5 - wxLEFT|wxEXPAND + wxALL 0 1 @@ -9427,7 +11691,7 @@ 1 - 0 + 1 0 Dock @@ -9442,7 +11706,7 @@ 0 0 wxID_ANY - +10° + OK 0 @@ -9452,7 +11716,7 @@ 0 1 - OnRotatePieceCW10 + wxID_OK 1 @@ -9464,7 +11728,7 @@ Resizable 1 - wxBU_EXACTFIT + ; ; forward_declare 0 @@ -9479,7 +11743,7 @@ 5 - wxLEFT|wxEXPAND + wxALL 0 1 @@ -9516,7 +11780,7 @@ 0 0 wxID_ANY - -50° + Cancel 0 @@ -9526,7 +11790,7 @@ 0 1 - OnRotatePieceCCW50 + wxID_CANCEL 1 @@ -9538,7 +11802,7 @@ Resizable 1 - wxBU_EXACTFIT + ; ; forward_declare 0 @@ -9551,11 +11815,57 @@ + + + + + + 0 + wxAUI_MGR_DEFAULT + + wxBOTH + + 1 + 0 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + CSelectStateDialog + + + wxDEFAULT_DIALOG_STYLE + ; ; forward_declare + Select Game State + + 0 + + + + + + bSizer67 + wxVERTICAL + none + + 5 + wxEXPAND + 0 + + + bSizer68 + wxHORIZONTAL + none 5 - wxLEFT|wxEXPAND - 0 - + wxALL + 1 + 1 1 1 @@ -9564,20 +11874,15 @@ 0 0 - 0 - 1 0 1 1 - - 0 0 - Dock 0 Left @@ -9585,13 +11890,11 @@ 1 1 - 0 0 wxID_ANY - +50° - + The move file's game state (positions, etc..) doesn't match the current game's state. Choose one of the following corrective measures: 0 0 @@ -9600,45 +11903,556 @@ 0 1 - OnRotatePieceCW50 + m_staticDesc 1 protected 1 - - Resizable 1 - wxBU_EXACTFIT + ; ; forward_declare 0 - - wxFILTER_NONE - wxDefaultValidator - + -1 + + + + 5 + + 0 + + + bSizer69 + wxVERTICAL + none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 1 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + OK + + 0 + + 0 + + + 0 + + 1 + wxID_OK + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Cancel + + 0 + + 0 + + + 0 + + 1 + wxID_CANCEL + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + 5 - wxEXPAND|wxLEFT + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Use the state information in the move file as the starting point. + + 0 + + + 0 + + 1 + m_radioMove + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Use the current game state as the starting point. + + 0 + + + 0 + + 1 + m_radioBtn2 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Choose Cancel if you don't know what's going on. + 0 + + 0 + + + 0 + + 1 + m_staticText49 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + + + 0 + wxAUI_MGR_DEFAULT + + wxBOTH + + 1 + 0 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + CSendMsgDialog + + + wxCAPTION + ; ; forward_declare + Send Message + + 0 + + + + + + bSizer61 + wxVERTICAL + none + + 5 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT + 2 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_editMsg + 1 + + + protected + 1 + + Resizable + 1 + + wxTE_MULTILINE|wxTE_PROCESS_ENTER + CEditNoChevron; forward_declare; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_editMsg2 + 1 + + + protected + 1 + + Resizable + 1 + + wxTE_MULTILINE|wxTE_PROCESS_ENTER + CEditNoChevron; forward_declare; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 1 2 3 4 5 + + + + + + + 5 + wxEXPAND 0 - bSizer49 - wxVERTICAL + bSizer62 + wxHORIZONTAL none 5 - wxALL|wxEXPAND + wxTOP|wxBOTTOM|wxLEFT 0 1 @@ -9675,7 +12489,7 @@ 0 0 wxID_ANY - OK + Send && Close 0 @@ -9697,7 +12511,7 @@ Resizable 1 - wxBU_EXACTFIT + ; ; forward_declare 0 @@ -9712,7 +12526,7 @@ 5 - wxALL|wxEXPAND + wxTOP|wxBOTTOM 0 1 @@ -9749,103 +12563,29 @@ 0 0 wxID_ANY - Cancel - - 0 - - 0 - - - 0 - - 1 - wxID_CANCEL - 1 - - - protected - 1 - - - - Resizable - 1 - - wxBU_EXACTFIT - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY + Send + + 0 0 - 0 0 1 - m_editCurVal + OnSendMsgSend 1 protected 1 + + Resizable 1 - wxTE_CENTER|wxTE_READONLY + ; ; forward_declare 0 @@ -9853,609 +12593,243 @@ wxFILTER_NONE wxDefaultValidator - - - - - - - 0 - wxAUI_MGR_DEFAULT - - wxBOTH - - 1 - 0 - 1 - impl_virtual - - - - 0 - wxID_ANY - - - CScnPropDialog - - - wxDEFAULT_DIALOG_STYLE - ; ; forward_declare - Scenario Properties - - 0 - - - - - - bSizer50 - wxVERTICAL - none - - 5 - wxEXPAND - 1 - - - bSizer51 - wxHORIZONTAL - none 5 - wxEXPAND - 1 - - - bSizer52 - wxVERTICAL - none - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Author: - 0 - - 0 - - - 0 - - 1 - m_staticText39 - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_editAuthor - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Title: - 0 - - 0 - - - 0 - - 1 - m_staticText40 - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - + wxTOP|wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Roll Dice... + + 0 + + 0 + + + 0 + + 1 + OnRollDice + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + 5 - + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxTOP|wxBOTTOM|wxLEFT 0 - - - bSizer53 - wxVERTICAL - none - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - 0 - - - - - 1 - 0 - 1 - - 1 - - 1 - 0 - - Dock - 0 - Left - 0 - 1 - - 1 - - - 0 - 0 - wxID_ANY - OK - - 0 - - 0 - - - 0 - - 1 - wxID_OK - 1 - - - protected - 1 - - - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - 0 - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 0 - 1 - - 1 - - - 0 - 0 - wxID_ANY - Cancel - - 0 - - 0 - - - 0 - - 1 - wxID_CANCEL - 1 - - - protected - 1 - - - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Defer + + 0 + + 0 + + + 0 + + 1 + m_btnDefer + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxTOP|wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Discard + + 0 + + 0 + + + 0 + + 1 + wxID_CANCEL + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_editTitle - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - MMMMMMMMMMMMMMMMMMMMMMMMMMMMM - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Description: - 0 - - 0 - - - 0 - - 1 - m_staticText41 - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_editDescr - 1 - - - protected - 1 - - Resizable - 1 - - wxTE_MULTILINE - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - 1 2 3 4 5 6 - - - @@ -10476,21 +12850,21 @@ 0 wxID_ANY - - CSelectBoardsDialog + -1,-1 + CSetPiecesDialog - + -1,-1 wxDEFAULT_DIALOG_STYLE ; ; forward_declare - Select Boards + Setup Pieces 0 - - bSizer57 + 500,375 + bSizer63 wxHORIZONTAL none @@ -10499,7 +12873,7 @@ 1 - bSizer58 + bSizer64 wxVERTICAL none @@ -10535,8 +12909,195 @@ 0 0 wxID_ANY - Select boards used in the scenario: - 0 + Piece Group: + 0 + + 0 + + + 0 + + 1 + m_staticText44 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_comboPGrp + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Pieces: + 0 + + 0 + + + 0 + + 1 + m_staticText45 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY 0 @@ -10544,7 +13105,7 @@ 0 1 - m_staticText44 + m_listPiece 1 @@ -10554,21 +13115,41 @@ Resizable 1 - - ; ; forward_declare + wxLB_MULTIPLE + CPieceListBoxWx; forward_declare 0 - -1 + + + + + + 5 + wxEXPAND + 0 + + + bSizer65 + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + 0 + protected + 0 5 wxALL|wxEXPAND - 1 - + 0 + 1 1 1 @@ -10577,16 +13158,20 @@ 0 0 + 0 + 1 0 - "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" 1 1 + + 1 0 + Dock 0 Left @@ -10594,10 +13179,14 @@ 1 1 + 0 0 wxID_ANY + Close + + 0 0 @@ -10605,17 +13194,19 @@ 0 1 - m_listBoards + wxID_OK 1 protected 1 + + Resizable 1 - wxLB_EXTENDED|wxLB_SORT + ; ; forward_declare 0 @@ -10631,186 +13222,90 @@ 5 wxEXPAND + 2 + + 0 + protected + 0 + + + + 5 + wxALL|wxEXPAND 0 - - - bSizer60 - wxHORIZONTAL - none - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - 0 - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 0 - 1 - - 1 - - - 0 - 0 - wxID_ANY - Select All - - 0 - - 0 - - - 0 - - 1 - OnBtnClickedSelectAll - 1 - - - protected - 1 - - - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - 0 - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 0 - 1 - - 1 - - - 0 - 0 - wxID_ANY - Clear All - - 0 - - 0 - - - 0 - - 1 - OnBtnClickedClearAll - 1 - - - protected - 1 - - - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Copy >> + + 0 + + 0 + + + 0 + + 1 + OnCopySelections + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + - - - - 5 - - 0 - - - bSizer59 - wxVERTICAL - none 5 - wxALL + wxALL|wxEXPAND 0 1 @@ -10832,7 +13327,7 @@ 1 - 1 + 0 0 Dock @@ -10847,7 +13342,7 @@ 0 0 wxID_ANY - OK + Copy All >> 0 @@ -10857,7 +13352,7 @@ 0 1 - wxID_OK + OnCopyAll 1 @@ -10884,7 +13379,17 @@ 5 - wxALL + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxALL|wxEXPAND 0 1 @@ -10921,7 +13426,7 @@ 0 0 wxID_ANY - Cancel + Remove << 0 @@ -10931,7 +13436,81 @@ 0 1 - wxID_CANCEL + OnRemoveSelections + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Remove All << + + 0 + + 0 + + + 0 + + 1 + OnRemoveAll 1 @@ -10956,50 +13535,25 @@ + + 5 + wxEXPAND + 3 + + 0 + protected + 0 + + - - - - 0 - wxAUI_MGR_DEFAULT - - wxBOTH - - 1 - 0 - 1 - impl_virtual - - - - 0 - wxID_ANY - - - CSelectNewOwnerDialog - - - wxDEFAULT_DIALOG_STYLE - ; ; forward_declare - Select New Owner - - 0 - - - - - - bSizer54 - wxHORIZONTAL - none 5 wxEXPAND 1 - bSizer55 + bSizer66 wxVERTICAL none @@ -11035,7 +13589,7 @@ 0 0 wxID_ANY - Select a new owner for the piece(s): + Tray Name: 0 0 @@ -11044,7 +13598,7 @@ 0 1 - m_staticText43 + m_staticText46 1 @@ -11067,8 +13621,8 @@ 5 wxALL|wxEXPAND - 1 - + 0 + 1 1 1 @@ -11082,7 +13636,7 @@ 1 0 - "1" "2" "3" "4" "5" "6" + 1 1 @@ -11105,7 +13659,7 @@ 0 1 - m_listPlayers + m_comboYGrp 1 @@ -11113,9 +13667,10 @@ 1 Resizable + 0 1 - wxLB_SINGLE + ; ; forward_declare 0 @@ -11128,22 +13683,11 @@ - - - - 5 - - 0 - - - bSizer56 - wxVERTICAL - none 5 - wxALL + wxTOP|wxRIGHT|wxLEFT 0 - + 1 1 1 @@ -11152,20 +13696,15 @@ 0 0 - 0 - 1 0 1 1 - - 1 0 - Dock 0 Left @@ -11173,13 +13712,11 @@ 1 1 - 0 0 wxID_ANY - OK - + Tray Contents: 0 0 @@ -11188,15 +13725,13 @@ 0 1 - wxID_OK + m_staticText47 1 protected 1 - - Resizable 1 @@ -11204,20 +13739,17 @@ ; ; forward_declare 0 - - wxFILTER_NONE - wxDefaultValidator - + -1 5 - wxALL - 0 - + wxALL|wxEXPAND + 1 + 1 1 1 @@ -11226,20 +13758,15 @@ 0 0 - 0 - 1 0 1 1 - - 0 0 - Dock 0 Left @@ -11247,14 +13774,10 @@ 1 1 - 0 - 0 - wxID_ANY - Cancel - - 0 + 0 + wxID_ANY 0 @@ -11262,26 +13785,20 @@ 0 1 - wxID_CANCEL + m_listTray 1 protected 1 - - Resizable 1 - - ; ; forward_declare + wxLB_MULTIPLE + CTrayListBoxWx; forward_declare 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -11308,12 +13825,12 @@ wxID_ANY - CSendMsgDialog + CTrayNewDialog - wxCAPTION + wxDEFAULT_DIALOG_STYLE ; ; forward_declare - Send Message + Create Tray 0 @@ -11321,153 +13838,23 @@ - bSizer61 - wxVERTICAL + bSizer73 + wxHORIZONTAL none - - 5 - wxEXPAND|wxTOP|wxRIGHT|wxLEFT - 2 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_editMsg - 1 - - - protected - 1 - - Resizable - 1 - - wxTE_MULTILINE|wxTE_PROCESS_ENTER - CEditNoChevron; forward_declare; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 1 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_editMsg2 - 1 - - - protected - 1 - - Resizable - 1 - - wxTE_MULTILINE|wxTE_PROCESS_ENTER - CEditNoChevron; forward_declare; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - 1 2 3 4 5 - - - - - 5 wxEXPAND - 0 + 1 - bSizer62 - wxHORIZONTAL + bSizer74 + wxVERTICAL none 5 - wxTOP|wxBOTTOM|wxLEFT + wxTOP|wxRIGHT|wxLEFT 0 - + 1 1 1 @@ -11476,20 +13863,15 @@ 0 0 - 0 - 1 0 1 1 - - 1 0 - Dock 0 Left @@ -11497,13 +13879,11 @@ 1 1 - 0 0 wxID_ANY - Send && Close - + Enter name of new Playing Piece Tray: 0 0 @@ -11512,15 +13892,74 @@ 0 1 - wxID_OK + m_staticText51 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_editName 1 protected 1 - - Resizable 1 @@ -11532,6 +13971,7 @@ wxFILTER_NONE wxDefaultValidator + @@ -11539,9 +13979,9 @@ 5 - wxTOP|wxBOTTOM + wxALL 0 - + 1 1 1 @@ -11550,20 +13990,15 @@ 0 0 - 0 - 1 0 1 1 - - 0 0 - Dock 0 Left @@ -11571,13 +14006,11 @@ 1 1 - 0 0 wxID_ANY - Send - + See the Tray Properties dialog to set Tray options. 0 0 @@ -11586,15 +14019,13 @@ 0 1 - OnSendMsgSend + m_staticText52 1 protected 1 - - Resizable 1 @@ -11602,18 +14033,26 @@ ; ; forward_declare 0 - - wxFILTER_NONE - wxDefaultValidator - + -1 + + + + 5 + + 0 + + + bSizer75 + wxVERTICAL + none 5 - wxTOP|wxBOTTOM|wxRIGHT + wxALL 0 1 @@ -11635,7 +14074,7 @@ 1 - 0 + 1 0 Dock @@ -11650,7 +14089,7 @@ 0 0 wxID_ANY - Roll Dice... + OK 0 @@ -11660,7 +14099,7 @@ 0 1 - OnRollDice + wxID_OK 1 @@ -11687,17 +14126,7 @@ 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 - wxTOP|wxBOTTOM|wxLEFT + wxALL 0 1 @@ -11734,7 +14163,7 @@ 0 0 wxID_ANY - Defer + Cancel 0 @@ -11744,7 +14173,7 @@ 0 1 - m_btnDefer + wxID_CANCEL 1 @@ -11769,193 +14198,690 @@ + + + + + + 0 + wxAUI_MGR_DEFAULT + + wxBOTH + + 1 + 0 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + CTrayPropDialog + + + wxDEFAULT_DIALOG_STYLE + ; ; forward_declare + Tray Properties + + 0 + + + + + + bSizer76 + wxVERTICAL + none + + 5 + wxEXPAND + 0 + + + bSizer77 + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + bSizer78 + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Name for Playing Piece Tray: + 0 + + 0 + + + 0 + + 1 + m_staticText53 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_editName + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Tray's owner: + 0 + + 0 + + + 0 + + 1 + m_staticOwnerLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_comboOwners + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Allow non-owners to access this owned tray. + + 0 + + + 0 + + 1 + m_chkAllowAccess + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Drag delivers random pieces for selections + + 0 + + + 0 + + 1 + m_checkRandomSel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Drag delivers random sides for selections + + 0 + + + 0 + + 1 + m_checkRandomSide + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 - wxTOP|wxBOTTOM|wxRIGHT + 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - 0 - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 0 - 1 - - 1 - - - 0 - 0 - wxID_ANY - Discard - - 0 - - 0 - - - 0 + - 1 - wxID_CANCEL - 1 - - - protected - 1 - - - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - 0 - wxAUI_MGR_DEFAULT - - wxBOTH - - 1 - 0 - 1 - impl_virtual - - - - 0 - wxID_ANY - - -1,-1 - CSetPiecesDialog - - -1,-1 - wxDEFAULT_DIALOG_STYLE - ; ; forward_declare - Setup Pieces - - 0 - - - - - 500,375 - bSizer63 - wxHORIZONTAL - none + bSizer79 + wxVERTICAL + none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 1 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + OK + + 0 + + 0 + + + 0 + + 1 + wxID_OK + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Cancel + + 0 + + 0 + + + 0 + + 1 + wxID_CANCEL + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + 5 - wxEXPAND - 1 - + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + wxID_ANY + Tray content visibility - bSizer64 + sbSizer5 wxVERTICAL + 1 none 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Piece Group: - 0 - - 0 - - - 0 - - 1 - m_staticText44 - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxALL|wxEXPAND + wxALL 0 - + 1 1 1 @@ -11969,7 +14895,7 @@ 1 0 - + 0 1 1 @@ -11985,6 +14911,7 @@ 0 0 wxID_ANY + Visibility rule also applies to the tray's owner. 0 @@ -11992,7 +14919,7 @@ 0 1 - m_comboPGrp + m_chkVizOwnerToo 1 @@ -12000,7 +14927,6 @@ 1 Resizable - 0 1 @@ -12020,149 +14946,7 @@ 5 wxTOP|wxRIGHT|wxLEFT 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Pieces: - 0 - - 0 - - - 0 - - 1 - m_staticText45 - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxALL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_listPiece - 1 - - - protected - 1 - - Resizable - 1 - - wxLB_MULTIPLE - CPieceListBoxWx; forward_declare - 0 - - - - - - - - - - 5 - wxEXPAND - 0 - - - bSizer65 - wxVERTICAL - none - - 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 - wxALL|wxEXPAND - 0 - + 1 1 1 @@ -12171,20 +14955,15 @@ 0 0 - 0 - 1 0 1 1 - - 1 0 - Dock 0 Left @@ -12192,14 +14971,11 @@ 1 1 - 0 0 wxID_ANY - Close - - 0 + All sides of pieces are fully visible 0 @@ -12207,46 +14983,35 @@ 0 1 - wxID_OK + m_radioVizOpts 1 protected 1 - - Resizable 1 - + wxRB_GROUP ; ; forward_declare 0 wxFILTER_NONE wxDefaultValidator - - - - - - - - 5 - wxEXPAND - 2 - - 0 - protected - 0 + + 0 + + + 5 - wxALL|wxEXPAND + wxTOP|wxRIGHT|wxLEFT 0 - + 1 1 1 @@ -12255,20 +15020,15 @@ 0 0 - 0 - 1 0 1 1 - - 0 0 - Dock 0 Left @@ -12276,14 +15036,11 @@ 1 1 - 0 0 wxID_ANY - Copy >> - - 0 + Only the top side of pieces are visible 0 @@ -12291,15 +15048,13 @@ 0 1 - OnCopySelections + m_radioBtn6 1 protected 1 - - Resizable 1 @@ -12311,6 +15066,7 @@ wxFILTER_NONE wxDefaultValidator + 0 @@ -12318,9 +15074,9 @@ 5 - wxALL|wxEXPAND + wxTOP|wxRIGHT|wxLEFT 0 - + 1 1 1 @@ -12329,20 +15085,15 @@ 0 0 - 0 - 1 0 1 1 - - 0 0 - Dock 0 Left @@ -12350,14 +15101,11 @@ 1 1 - 0 0 wxID_ANY - Copy All >> - - 0 + Each piece image is hidden. (shows "HIDDEN") 0 @@ -12365,15 +15113,13 @@ 0 1 - OnCopyAll + m_radioBtn7 1 protected 1 - - Resizable 1 @@ -12385,6 +15131,7 @@ wxFILTER_NONE wxDefaultValidator + 0 @@ -12392,19 +15139,9 @@ 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 - wxALL|wxEXPAND + wxTOP|wxRIGHT|wxLEFT 0 - + 1 1 1 @@ -12413,20 +15150,15 @@ 0 0 - 0 - 1 0 1 1 - - 0 0 - Dock 0 Left @@ -12434,14 +15166,11 @@ 1 1 - 0 0 wxID_ANY - Remove << - - 0 + All piece items hidden. (shows the text "ALL HIDDEN") 0 @@ -12449,15 +15178,13 @@ 0 1 - OnRemoveSelections + m_radioBtn8 1 protected 1 - - Resizable 1 @@ -12469,16 +15196,63 @@ wxFILTER_NONE wxDefaultValidator + 0 + + + + + + 0 + wxAUI_MGR_DEFAULT + + wxBOTH + + 1 + 0 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + CTruncatePlaybackDlg + + + wxDEFAULT_DIALOG_STYLE + ; ; forward_declare + Truncate Playback? + + 0 + + + + + + bSizer70 + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + bSizer71 + wxVERTICAL + none 5 - wxALL|wxEXPAND + wxALL 0 - + 1 1 1 @@ -12487,20 +15261,15 @@ 0 0 - 0 - 1 0 1 1 - - 0 0 - Dock 0 Left @@ -12508,13 +15277,11 @@ 1 1 - 0 0 wxID_ANY - Remove All << - + You are not at the end of the move playback. You have the option of discarding all moves that occur after this point. The preceding moves will be stored in the Game History database. Truncating moves is useful in order to recover from a hopelessly flawed set of moves. You resume play at the state of the game where the playback was truncated. 0 0 @@ -12523,15 +15290,13 @@ 0 1 - OnRemoveAll + m_staticDesc 1 protected 1 - - Resizable 1 @@ -12539,41 +15304,17 @@ ; ; forward_declare 0 - - wxFILTER_NONE - wxDefaultValidator - + -1 - - 5 - wxEXPAND - 3 - - 0 - protected - 0 - - - - - - 5 - wxEXPAND - 1 - - - bSizer66 - wxVERTICAL - none 5 wxTOP|wxRIGHT|wxLEFT 0 - + 1 1 1 @@ -12602,8 +15343,7 @@ 0 0 wxID_ANY - Tray Name: - 0 + NO! Do NOT...I repeat DO NOT truncate the playback. 0 @@ -12611,7 +15351,7 @@ 0 1 - m_staticText46 + m_radioTruncateSel 1 @@ -12625,17 +15365,21 @@ ; ; forward_declare 0 + + wxFILTER_NONE + wxDefaultValidator + + 0 - -1 5 - wxALL|wxEXPAND + wxALL 0 - + 1 1 1 @@ -12649,7 +15393,6 @@ 1 0 - 1 1 @@ -12665,6 +15408,7 @@ 0 0 wxID_ANY + Yes. Truncate the playback and retain that state of the game. 0 @@ -12672,7 +15416,7 @@ 0 1 - m_comboYGrp + m_radioBtn3 1 @@ -12680,7 +15424,6 @@ 1 Resizable - 0 1 @@ -12691,16 +15434,28 @@ wxFILTER_NONE wxDefaultValidator + 0 + + + + 5 + + 0 + + + bSizer72 + wxVERTICAL + none 5 - wxTOP|wxRIGHT|wxLEFT + wxALL 0 - + 1 1 1 @@ -12709,15 +15464,20 @@ 0 0 + 0 + 1 0 1 1 + + 1 0 + Dock 0 Left @@ -12725,11 +15485,13 @@ 1 1 + 0 0 wxID_ANY - Tray Contents: + OK + 0 0 @@ -12738,13 +15500,15 @@ 0 1 - m_staticText47 + wxID_OK 1 protected 1 + + Resizable 1 @@ -12752,17 +15516,20 @@ ; ; forward_declare 0 + + wxFILTER_NONE + wxDefaultValidator + - -1 5 - wxALL|wxEXPAND - 1 - + wxALL + 0 + 1 1 1 @@ -12771,15 +15538,20 @@ 0 0 + 0 + 1 0 1 1 + + 0 0 + Dock 0 Left @@ -12787,10 +15559,14 @@ 1 1 + 0 0 wxID_ANY + Cancel + + 0 0 @@ -12798,20 +15574,26 @@ 0 1 - m_listTray + wxID_CANCEL 1 protected 1 + + Resizable 1 - wxLB_MULTIPLE - CTrayListBoxWx; forward_declare + + ; ; forward_declare 0 + + wxFILTER_NONE + wxDefaultValidator + @@ -12821,5 +15603,193 @@ + + + + 1 + 0 + 1 + + + 0 + wxID_ANY + MyMenuBar + + + IDR_MENU_PLAYER_POPUPS + + + + ; ; forward_declare + + + + + + 0=PV_MOVEMODE + MENU_PV_MOVEMODE + protected + + + 1=PV_PLAYMODE + MENU_PV_PLAYMODE + protected + + + 2=PV_SCNMODE + MENU_PV_SCNMODE + protected + + + 3=PJ_GSN_DEFAULT + MENU_PJ_GSN_DEFAULT + protected + + + 0 + 1 + Create a new tray which are used to hold playing pieces + wxID_ANY + wxITEM_NORMAL + Create Playing Piece Tray... + ID_EDIT_CREATETRAY + none + + + + + + 0 + 1 + Create geomorphic board. Create Geomorphic Board + wxID_ANY + wxITEM_NORMAL + Create Geomorphic Board... + ID_EDIT_CREATE_GEOMORPHIC + none + + + + + m_separator1 + none + + + + 0 + 1 + Select the game boards that are used in this scenario + wxID_ANY + wxITEM_NORMAL + Select Game Boards... + ID_EDIT_SELECTBOARDS + none + + + + + + 0 + 1 + Select the game pieces that are used in this scenario + wxID_ANY + wxITEM_NORMAL + Select Game Pieces... + ID_EDIT_SELECTGAMEPIECES + none + + + + + m_separator2 + none + + + + 0 + 1 + View selected item. + wxID_ANY + wxITEM_NORMAL + View + ID_PPROJITEM_VIEW + none + + + + + m_separator3 + none + + + + 0 + 1 + Edit selected item. + wxID_ANY + wxITEM_NORMAL + Edit... + ID_PPROJITEM_EDIT + none + + + + + + 0 + 1 + Delete or Remove selected item. + wxID_ANY + wxITEM_NORMAL + Delete + ID_PPROJITEM_DELETE + none + + + + + m_separator4 + none + + + + 0 + 1 + Examine item properties. + wxID_ANY + wxITEM_NORMAL + Properties... + ID_PPROJITEM_PROPERTIES + none + + + + + + 4=PJ_GAM_DEFAULT + MENU_PJ_GAM_DEFAULT + protected + + + 5=PV_PIECE_TRAY + MENU_PV_PIECE_TRAY + protected + + + 6=MV_RICHEDIT + MENU_MV_RICHEDIT + protected + + + 7=ACT_TURNOVER + MENU_ACT_TURNOVER + protected + + + 8=PV_SELCT_BOX + MENU_PV_SELCT_BOX + protected + + diff --git a/GP/CBPlay.xrc b/GP/CBPlay.xrc index 0664ab8..40590c7 100644 --- a/GP/CBPlay.xrc +++ b/GP/CBPlay.xrc @@ -815,6 +815,103 @@ + + + + wxHORIZONTAL + + wxEXPAND + 5 + + + wxVERTICAL + + wxEXPAND|wxTOP|wxRIGHT|wxLEFT + 5 + + + + + wxEXPAND + 5 + + + wxHORIZONTAL + + wxTOP|wxBOTTOM|wxLEFT + 5 + + + + 0 + 0 + 0 + + + + + wxTOP|wxBOTTOM + 5 + + + + 0 + 0 + 0 + + + + + wxTOP|wxBOTTOM|wxRIGHT + 5 + + + + 0 + 0 + 0 + + + + + + + + + wxEXPAND + 5 + + + + + + + wxEXPAND + 5 + + + wxVERTICAL + + wxALL|wxEXPAND + 5 + + + + + wxALL|wxEXPAND + 5 + + + + 1 + + 0 + + + + + + Import Piece Groups @@ -2163,6 +2260,90 @@ + + + Select Game State + 1 + + wxVERTICAL + + wxEXPAND + 5 + + + wxHORIZONTAL + + wxALL + 5 + + + + -1 + + + + + 5 + + + wxVERTICAL + + wxALL + 5 + + + + 1 + 0 + 0 + + + + + wxALL + 5 + + + + 0 + 0 + 0 + + + + + + + + + wxTOP|wxRIGHT|wxLEFT + 5 + + + + 0 + + + + wxALL + 5 + + + + 0 + + + + wxALL + 5 + + + + -1 + + + + Send Message @@ -2452,4 +2633,401 @@ + + + Create Tray + 1 + + wxHORIZONTAL + + wxEXPAND + 5 + + + wxVERTICAL + + wxTOP|wxRIGHT|wxLEFT + 5 + + + + -1 + + + + wxALL|wxEXPAND + 5 + + + + 0 + + + + wxALL + 5 + + + + -1 + + + + + + + 5 + + + wxVERTICAL + + wxALL + 5 + + + + 1 + 0 + 0 + + + + + wxALL + 5 + + + + 0 + 0 + 0 + + + + + + + + + + Tray Properties + 1 + + wxVERTICAL + + wxEXPAND + 5 + + + wxHORIZONTAL + + wxEXPAND + 5 + + + wxVERTICAL + + wxTOP|wxRIGHT|wxLEFT + 5 + + + + -1 + + + + wxALL|wxEXPAND + 5 + + + + 0 + + + + wxTOP|wxRIGHT|wxLEFT + 5 + + + + -1 + + + + wxALL|wxEXPAND + 5 + + + 0 + + + + + wxALL + 5 + + + + 0 + + + + wxALL + 5 + + + + 0 + + + + wxALL + 5 + + + + 0 + + + + + + + 5 + + + wxVERTICAL + + wxALL + 5 + + + + 1 + 0 + 0 + + + + + wxALL + 5 + + + + 0 + 0 + 0 + + + + + + + + + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 5 + + + wxVERTICAL + + + wxALL + 5 + + + + 0 + + + + wxTOP|wxRIGHT|wxLEFT + 5 + + + + + 0 + + + + wxTOP|wxRIGHT|wxLEFT + 5 + + + + 0 + + + + wxTOP|wxRIGHT|wxLEFT + 5 + + + + 0 + + + + wxTOP|wxRIGHT|wxLEFT + 5 + + + + 0 + + + + + + + + + Truncate Playback? + 1 + + wxHORIZONTAL + + wxEXPAND + 5 + + + wxVERTICAL + + wxALL + 5 + + + + -1 + + + + wxTOP|wxRIGHT|wxLEFT + 5 + + + + 0 + + + + wxALL + 5 + + + + 0 + + + + + + + 5 + + + wxVERTICAL + + wxALL + 5 + + + + 1 + 0 + 0 + + + + + wxALL + 5 + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + + + + Create a new tray which are used to hold playing pieces + + + + + Create geomorphic board.\nCreate Geomorphic Board + + + + + + Select the game boards that are used in this scenario + + + + + Select the game pieces that are used in this scenario + + + + + + View selected item. + + + + + + Edit selected item. + + + + + Delete or Remove selected item. + + + + + + Examine item properties. + + + + + + + + + + + + + + + + + + diff --git a/GP/DlgState.cpp b/GP/DlgState.cpp index 541cf4a..c4e270f 100644 --- a/GP/DlgState.cpp +++ b/GP/DlgState.cpp @@ -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 @@ -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 @@ -77,4 +85,5 @@ void CSelectStateDialog::OnContextMenu(CWnd* pWnd, CPoint point) { GetApp()->DoHelpWhatIsHelp(pWnd, adwHelpMap); } +#endif diff --git a/GP/DlgState.h b/GP/DlgState.h index b93b554..b8a7915 100644 --- a/GP/DlgState.h +++ b/GP/DlgState.h @@ -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 @@ -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 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(); }; diff --git a/GP/DlgTrunc.cpp b/GP/DlgTrunc.cpp index 4ce85df..f241cb9 100644 --- a/GP/DlgTrunc.cpp +++ b/GP/DlgTrunc.cpp @@ -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 @@ -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 @@ -78,6 +85,7 @@ void CTruncatePlaybackDlg::OnContextMenu(CWnd* pWnd, CPoint point) { GetApp()->DoHelpWhatIsHelp(pWnd, adwHelpMap); } +#endif ///////////////////////////////////////////////////////////////////////////// // CTruncatePlaybackDlg message handlers diff --git a/GP/DlgTrunc.h b/GP/DlgTrunc.h index 239277f..81b98af 100644 --- a/GP/DlgTrunc.h +++ b/GP/DlgTrunc.h @@ -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 @@ -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 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 diff --git a/GP/DlgYnew.cpp b/GP/DlgYnew.cpp index 587ed0e..6e78b43 100644 --- a/GP/DlgYnew.cpp +++ b/GP/DlgYnew.cpp @@ -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 @@ -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) { - 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; } diff --git a/GP/DlgYnew.h b/GP/DlgYnew.h index 1482af3..7ddfcc9 100644 --- a/GP/DlgYnew.h +++ b/GP/DlgYnew.h @@ -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 @@ -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 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; }; diff --git a/GP/DlgYprop.cpp b/GP/DlgYprop.cpp index c9e74d9..a0ea46d 100644 --- a/GP/DlgYprop.cpp +++ b/GP/DlgYprop.cpp @@ -36,48 +36,41 @@ static char THIS_FILE[] = __FILE__; ///////////////////////////////////////////////////////////////////////////// // CTrayPropDialog dialog -CTrayPropDialog::CTrayPropDialog(CWnd* pParent /*=NULL*/) - : CDialog(CTrayPropDialog::IDD, pParent) +CTrayPropDialog::CTrayPropDialog(const CTrayManager& yMgr, + const CPlayerManager* playerMgr, + wxWindow* pParent /*= &CB::GetMainWndWx()*/) : + CB_XRC_BEGIN_CTRLS_DEFN(pParent, CTrayPropDialog) + CB_XRC_CTRL(m_chkVizOwnerToo) + CB_XRC_CTRL(m_chkAllowAccess) + CB_XRC_CTRL(m_staticOwnerLabel) + CB_XRC_CTRL(m_comboOwners) + CB_XRC_CTRL_VAL(m_editName, m_strName, wxFILTER_EMPTY, 32) + CB_XRC_CTRL_VAL(m_radioVizOpts, m_nVizOpts) + CB_XRC_CTRL_VAL(m_checkRandomSel, m_bRandomSel) + CB_XRC_CTRL_VAL(m_checkRandomSide, m_bRandomSide) + CB_XRC_END_CTRLS_DEFN(), + m_pYMgr(yMgr), + m_pPlayerMgr(playerMgr) { - //{{AFX_DATA_INIT(CTrayPropDialog) m_strName = ""; m_nVizOpts = -1; m_bRandomSel = FALSE; m_bRandomSide = false; - //}}AFX_DATA_INIT m_nYSel = Invalid_v; m_nOwnerSel = INVALID_PLAYER; m_bNonOwnerAccess = FALSE; - m_pPlayerMgr = NULL; - m_pYMgr = NULL; m_bEnforceVizForOwnerToo = FALSE; } -void CTrayPropDialog::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CTrayPropDialog) - DDX_Control(pDX, IDC_D_YPRP_OWNER_TOO, m_chkVizOwnerToo); - DDX_Control(pDX, IDC_D_YPRP_NONOWNER_ACCESS, m_chkAllowAccess); - DDX_Control(pDX, IDC_D_YPRP_OWNER_LABEL, m_staticOwnerLabel); - DDX_Control(pDX, IDC_D_YPRP_OWNER_LIST, m_comboOwners); - DDX_Control(pDX, IDC_D_YPRP_NAME, m_editName); - DDX_Text(pDX, IDC_D_YPRP_NAME, m_strName); - DDV_MaxChars(pDX, m_strName, 32); - DDX_Radio(pDX, IDC_D_YPRP_VIZFULL, m_nVizOpts); - DDX_Check(pDX, IDC_D_YPRP_RANDSEL, m_bRandomSel); - DDX_Check(pDX, IDC_D_YPRP_RANDSIDE, m_bRandomSide); - //}}AFX_DATA_MAP -} - -BEGIN_MESSAGE_MAP(CTrayPropDialog, CDialog) - //{{AFX_MSG_MAP(CTrayPropDialog) - ON_CBN_SELCHANGE(IDC_D_YPRP_OWNER_LIST, OnSelChangeOwnerList) +wxBEGIN_EVENT_TABLE(CTrayPropDialog, wxDialog) + EVT_CHOICE(XRCID("m_comboOwners"), OnSelChangeOwnerList) +#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 @@ -106,48 +99,49 @@ void CTrayPropDialog::OnContextMenu(CWnd* pWnd, CPoint point) { GetApp()->DoHelpWhatIsHelp(pWnd, adwHelpMap); } +#endif ///////////////////////////////////////////////////////////////////////////// // CTrayPropDialog message handlers -void CTrayPropDialog::OnSelChangeOwnerList() +void CTrayPropDialog::OnSelChangeOwnerList(wxCommandEvent& /*event*/) { - if (m_comboOwners.GetCurSel() <= 0) + if (m_comboOwners->GetSelection() <= 0) { - m_chkAllowAccess.SetCheck(0); - m_chkVizOwnerToo.SetCheck(0); - m_chkAllowAccess.EnableWindow(FALSE); - m_chkVizOwnerToo.EnableWindow(FALSE); + m_chkAllowAccess->SetValue(false); + m_chkVizOwnerToo->SetValue(false); + m_chkAllowAccess->Enable(FALSE); + m_chkVizOwnerToo->Enable(FALSE); } else { - m_chkAllowAccess.EnableWindow(TRUE); - m_chkVizOwnerToo.EnableWindow(TRUE); + m_chkAllowAccess->Enable(TRUE); + m_chkVizOwnerToo->Enable(TRUE); } } -void CTrayPropDialog::OnOK() +bool CTrayPropDialog::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 && nSel != m_nYSel) { - 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; } if (m_pPlayerMgr != NULL) { - m_nOwnerSel = PlayerId(m_comboOwners.GetCurSel() - 1); - m_bNonOwnerAccess = m_chkAllowAccess.GetCheck() != 0; - m_bEnforceVizForOwnerToo = m_chkVizOwnerToo.GetCheck() != 0; + m_nOwnerSel = PlayerId(m_comboOwners->GetSelection() - 1); + m_bNonOwnerAccess = m_chkAllowAccess->GetValue(); + m_bEnforceVizForOwnerToo = m_chkVizOwnerToo->GetValue(); if (m_nOwnerSel == INVALID_PLAYER) { m_bNonOwnerAccess = FALSE; @@ -155,47 +149,49 @@ void CTrayPropDialog::OnOK() } } - CDialog::OnOK(); + return true; } -BOOL CTrayPropDialog::OnInitDialog() +bool CTrayPropDialog::TransferDataToWindow() { - CDialog::OnInitDialog(); - ASSERT(m_pYMgr); - ASSERT(m_nYSel != Invalid_v); + if (!wxDialog::TransferDataToWindow()) + { + return false; + } + wxASSERT(m_nYSel != Invalid_v); - m_editName.SetWindowText(m_pYMgr->GetTraySet(m_nYSel).GetName()); + m_editName->SetValue(m_pYMgr.GetTraySet(m_nYSel).GetName()); if (m_pPlayerMgr == NULL) { - m_comboOwners.EnableWindow(FALSE); - m_staticOwnerLabel.EnableWindow(FALSE); - m_chkAllowAccess.SetCheck(0); - m_chkAllowAccess.EnableWindow(FALSE); + m_comboOwners->Enable(FALSE); + m_staticOwnerLabel->Enable(FALSE); + m_chkAllowAccess->SetValue(false); + m_chkAllowAccess->Enable(FALSE); } else { CB::string str = CB::string::LoadString(IDS_LBL_NO_OWNER); - m_comboOwners.AddString(str); + m_comboOwners->Append(str); for (const Player& player : *m_pPlayerMgr) { - m_comboOwners.AddString(player.m_strName); + m_comboOwners->Append(player.m_strName); } - m_comboOwners.SetCurSel(static_cast(m_nOwnerSel) + 1); - if (m_comboOwners.GetCurSel() <= 0) + m_comboOwners->SetSelection(static_cast(m_nOwnerSel) + 1); + if (m_comboOwners->GetSelection() <= 0) { - m_chkAllowAccess.SetCheck(0); - m_chkAllowAccess.EnableWindow(FALSE); - m_chkVizOwnerToo.SetCheck(0); - m_chkVizOwnerToo.EnableWindow(FALSE); + m_chkAllowAccess->SetValue(false); + m_chkAllowAccess->Enable(FALSE); + m_chkVizOwnerToo->SetValue(false); + m_chkVizOwnerToo->Enable(FALSE); } else { - m_chkAllowAccess.EnableWindow(TRUE); - m_chkVizOwnerToo.EnableWindow(TRUE); - m_chkAllowAccess.SetCheck(m_bNonOwnerAccess ? 1 : 0); - m_chkVizOwnerToo.SetCheck(m_bEnforceVizForOwnerToo ? 1 : 0); + m_chkAllowAccess->Enable(TRUE); + m_chkVizOwnerToo->Enable(TRUE); + m_chkAllowAccess->SetValue(m_bNonOwnerAccess); + m_chkVizOwnerToo->SetValue(m_bEnforceVizForOwnerToo); } } - return TRUE; // return TRUE unless you set the focus to a control + return TRUE; } diff --git a/GP/DlgYprop.h b/GP/DlgYprop.h index ff2fc9c..189e91d 100644 --- a/GP/DlgYprop.h +++ b/GP/DlgYprop.h @@ -1,6 +1,6 @@ // DlgYprop.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 @@ -30,48 +30,52 @@ class CPlayerManager; ///////////////////////////////////////////////////////////////////////////// // CTrayPropDialog dialog -class CTrayPropDialog : public CDialog +class CTrayPropDialog : public wxDialog { // Construction public: - CTrayPropDialog(CWnd* pParent = NULL); // standard constructor + CTrayPropDialog(const CTrayManager& yMgr, + const CPlayerManager* playerMgr, + wxWindow* parent = &CB::GetMainWndWx()); // standard constructor -// Dialog Data - //{{AFX_DATA(CTrayPropDialog) - enum { IDD = IDD_TRAYPRP }; - CButton m_chkVizOwnerToo; - CButton m_chkAllowAccess; - CStatic m_staticOwnerLabel; - CComboBox m_comboOwners; - CEdit m_editName; - CB::string m_strName; + wxString m_strName; +private: int m_nVizOpts; - BOOL m_bRandomSel; - BOOL m_bRandomSide; - //}}AFX_DATA +public: + bool m_bRandomSel; + bool m_bRandomSide; size_t m_nYSel; PlayerId m_nOwnerSel; // -1 = no owner, 0 = first player, .... - BOOL m_bNonOwnerAccess; - BOOL m_bEnforceVizForOwnerToo; + bool m_bNonOwnerAccess; + bool m_bEnforceVizForOwnerToo; +private: + CB_XRC_BEGIN_CTRLS_DECL() + RefPtr m_chkVizOwnerToo; + RefPtr m_chkAllowAccess; + RefPtr m_staticOwnerLabel; + RefPtr m_comboOwners; + RefPtr m_editName; + RefPtr m_radioVizOpts; + RefPtr m_checkRandomSel; + RefPtr m_checkRandomSide; + CB_XRC_END_CTRLS_DECL() - CTrayManager* m_pYMgr; - CPlayerManager* m_pPlayerMgr; + const CTrayManager& m_pYMgr; + const CPlayerManager* const m_pPlayerMgr; +public: void SetTrayViz(TrayViz eTrayViz) { m_nVizOpts = (int)eTrayViz; } TrayViz GetTrayViz() { return (TrayViz)m_nVizOpts; } // Implementation protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - - // Generated message map functions - //{{AFX_MSG(CTrayPropDialog) - virtual void OnOK(); - virtual BOOL OnInitDialog(); - afx_msg void OnSelChangeOwnerList(); + bool TransferDataFromWindow() override; + bool TransferDataToWindow() override; + void OnSelChangeOwnerList(wxCommandEvent& event); +#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(); }; diff --git a/GP/FrmProj.cpp b/GP/FrmProj.cpp index b85a8e6..e10eda9 100644 --- a/GP/FrmProj.cpp +++ b/GP/FrmProj.cpp @@ -89,7 +89,7 @@ void CProjFrame::OnSysCommand(UINT nID, LPARAM lParam) CView *pView = GetActiveView(); if (pView) { - if (pView->IsKindOf(RUNTIME_CLASS(CGsnProjView)) || + if (pView->IsKindOf(RUNTIME_CLASS(CGsnProjViewContainer)) || pView->IsKindOf(RUNTIME_CLASS(CGamProjView))) { CB::ToCGamDoc(GetActiveDocument())->OnFileClose(); diff --git a/GP/GamDoc.cpp b/GP/GamDoc.cpp index b6fd74d..626b187 100644 --- a/GP/GamDoc.cpp +++ b/GP/GamDoc.cpp @@ -1571,11 +1571,10 @@ void CGamDoc::OnUpdateFileDiscardRecordedMoves(CCmdUI* pCmdUI) void CGamDoc::OnEditCreateTray() { ASSERT(IsScenario()); - CTrayNewDialog dlg; - dlg.m_pYMgr = &GetTrayManager(); - if (dlg.DoModal() == IDOK) + CTrayNewDialog dlg(GetTrayManager()); + if (dlg.ShowModal() == wxID_OK) { - dlg.m_pYMgr->CreateTraySet(dlg.m_strName); + GetTrayManager().CreateTraySet(dlg.m_strName); CGamDocHint hint; hint.GetArgs().m_pTray = NULL; diff --git a/GP/GamDoc2.cpp b/GP/GamDoc2.cpp index 382879b..20d93ca 100644 --- a/GP/GamDoc2.cpp +++ b/GP/GamDoc2.cpp @@ -539,7 +539,7 @@ void CGamDoc::DoAcceptPlayback() // (exposed for project window access) if (m_nCurMove != Invalid_v) { CTruncatePlaybackDlg dlg; - if (dlg.DoModal() != IDOK) + if (dlg.ShowModal() != wxID_OK) return; bTruncateRemainingMoves = dlg.m_nTruncateSel == 1; } diff --git a/GP/GamDoc4.cpp b/GP/GamDoc4.cpp index 157363c..cb8a0a1 100644 --- a/GP/GamDoc4.cpp +++ b/GP/GamDoc4.cpp @@ -128,7 +128,7 @@ void CGamDoc::LoadAndActivateMoveFile(const CB::string& pszPathName) // File's positions don't match current games' positions. CSelectStateDialog dlg; dlg.m_nState = 0; // Select first button (file state) - if (dlg.DoModal() != IDOK) + if (dlg.ShowModal() != wxID_OK) AfxThrowUserException(); if (dlg.m_nState == 0) { diff --git a/GP/Gp.cpp b/GP/Gp.cpp index faf8cf5..eab940e 100644 --- a/GP/Gp.cpp +++ b/GP/Gp.cpp @@ -48,6 +48,9 @@ static char THIS_FILE[] = __FILE__; #define new DEBUG_NEW #endif +wxDEFINE_EVENT(WM_SHOWPLAYINGBOARD_WX, ShowPlayingBoardEvent); +wxDEFINE_EVENT(WM_WINSTATE_RESTORE_WX, WinStateRestoreEvent); + ///////////////////////////////////////////////////////////////////////////// // Registry keys... @@ -255,7 +258,7 @@ BOOL CGpApp::InitInstance() IDR_GSCNTYPE, RUNTIME_CLASS(CGamDoc), RUNTIME_CLASS(CProjFrame), - RUNTIME_CLASS(CGsnProjView)); + RUNTIME_CLASS(CGsnProjViewContainer)); AddDocTemplate(m_pScnDocTemplate); m_pBrdViewTmpl = new CMultiDocTemplate( diff --git a/GP/Gp.h b/GP/Gp.h index fb659be..7f07452 100644 --- a/GP/Gp.h +++ b/GP/Gp.h @@ -48,8 +48,49 @@ #define WM_ROTATEPIECE_DELTA (WM_USER + 210) // WPARAM = (int)relative rotation delta #define WM_CENTERBOARDONPOINT (WM_USER + 211) // WPARAM = POINT* in board coords + #define WM_SHOWPLAYINGBOARD (WM_USER + 212) // WPARAM = size_t Playing Board Index +class ShowPlayingBoardEvent : public wxEvent +{ +public: + ShowPlayingBoardEvent(size_t playBrdIndex); + + size_t GetPlayingBoardIndex() const { return playBrdIndex; } + + wxEvent* Clone() const override { return new ShowPlayingBoardEvent(*this); } + +private: + const size_t playBrdIndex; +}; +wxDECLARE_EVENT(WM_SHOWPLAYINGBOARD_WX, ShowPlayingBoardEvent); +inline ShowPlayingBoardEvent::ShowPlayingBoardEvent(size_t pbi) : + wxEvent(wxID_ANY, WM_SHOWPLAYINGBOARD_WX), + playBrdIndex(pbi) +{ +} +typedef void (wxEvtHandler::* ShowPlayingBoardEventFunction)(ShowPlayingBoardEvent&); +#define ShowPlayingBoardEventHandler(func) wxEVENT_HANDLER_CAST(ShowPlayingBoardEventFunction, func) +#define EVT_SHOWPLAYINGBOARD(func) \ + wx__DECLARE_EVT0(WM_SHOWPLAYINGBOARD_WX, ShowPlayingBoardEventHandler(func)) + #define WM_WINSTATE_RESTORE (WM_USER + 213) // No Args. Posted to project window +class WinStateRestoreEvent : public wxEvent +{ +public: + WinStateRestoreEvent(); + + wxEvent* Clone() const override { return new WinStateRestoreEvent(*this); } +}; +wxDECLARE_EVENT(WM_WINSTATE_RESTORE_WX, WinStateRestoreEvent); +inline WinStateRestoreEvent::WinStateRestoreEvent() : + wxEvent(wxID_ANY, WM_WINSTATE_RESTORE_WX) +{ +} +typedef void (wxEvtHandler::* WinStateRestoreEventFunction)(WinStateRestoreEvent&); +#define WinStateRestoreEventHandler(func) wxEVENT_HANDLER_CAST(WinStateRestoreEventFunction, func) +#define EVT_WINSTATE_RESTORE(func) \ + wx__DECLARE_EVT0(WM_WINSTATE_RESTORE_WX, WinStateRestoreEventHandler(func)) + #define WM_SELECT_BOARD_OBJLIST (WM_USER + 214) // WPARAM = CPlayBoard*, LPARAM = const std::vector>* #define WM_MESSAGEBOX (WM_USER + 215) // WPARAM = Opts. LPARAM = Msg ID or Ptr diff --git a/GP/VwPrjgs1.cpp b/GP/VwPrjgs1.cpp index d6b7292..5edadb3 100644 --- a/GP/VwPrjgs1.cpp +++ b/GP/VwPrjgs1.cpp @@ -53,20 +53,20 @@ static char THIS_FILE[] = __FILE__; void CGsnProjView::DoGsnProperty() { - GetDocument()->DoScenarioProperties(); + GetDocument().DoScenarioProperties(); } void CGsnProjView::DoUpdateGsnInfo() { - CGamDoc* pDoc = GetDocument(); + CGamDoc& pDoc = GetDocument(); CB::string str; - if (!pDoc->m_strScnTitle.empty()) - str += "TITLE: " + pDoc->m_strScnTitle + "\r\n\r\n"; - if (!pDoc->m_strScnAuthor.empty()) - str += "AUTHOR: " + pDoc->m_strScnAuthor + "\r\n\r\n"; - if (!pDoc->m_strScnDescr.empty()) - str += "DESCRIPTION:\r\n\r\n" + pDoc->m_strScnDescr; - m_editInfo.SetWindowText(str); + if (!pDoc.m_strScnTitle.empty()) + str += "TITLE: " + pDoc.m_strScnTitle + "\r\n\r\n"; + if (!pDoc.m_strScnAuthor.empty()) + str += "AUTHOR: " + pDoc.m_strScnAuthor + "\r\n\r\n"; + if (!pDoc.m_strScnDescr.empty()) + str += "DESCRIPTION:\r\n\r\n" + pDoc.m_strScnDescr; + m_editInfo->SetValue(str); } ///////////////////////////////////////////////////////////////////////////// @@ -74,65 +74,65 @@ void CGsnProjView::DoUpdateGsnInfo() void CGsnProjView::DoBoardSelection() { - GetDocument()->DoSelectBoards(); + GetDocument().DoSelectBoards(); } void CGsnProjView::DoBoardProperty() { - CGamDoc* pDoc = GetDocument(); - int nSel = m_listProj.GetCurSel(); - ASSERT(nSel >= 0); - ASSERT(m_listProj.GetItemGroupCode(nSel) == grpBrd); - size_t nBrd = m_listProj.GetItemSourceCode(nSel); - pDoc->DoBoardProperties(nBrd); + CGamDoc& pDoc = GetDocument(); + int nSel = m_listProj->GetSelection(); + wxASSERT(nSel != wxNOT_FOUND); + wxASSERT(m_listProj->GetItemGroupCode(value_preserving_cast(nSel)) == grpBrd); + size_t nBrd = m_listProj->GetItemSourceCode(value_preserving_cast(nSel)); + pDoc.DoBoardProperties(nBrd); } void CGsnProjView::DoBoardView() { - CGamDoc* pDoc = GetDocument(); - int nSel = m_listProj.GetCurSel(); - ASSERT(nSel >= 0); - ASSERT(m_listProj.GetItemGroupCode(nSel) == grpBrd); - size_t nBrd = m_listProj.GetItemSourceCode(nSel); - - CPlayBoard& pPBoard = pDoc->GetPBoardManager().GetPBoard(nBrd); - CView* pView = pDoc->FindPBoardView(pPBoard); + CGamDoc& pDoc = GetDocument(); + int nSel = m_listProj->GetSelection(); + wxASSERT(nSel != wxNOT_FOUND); + wxASSERT(m_listProj->GetItemGroupCode(value_preserving_cast(nSel)) == grpBrd); + size_t nBrd = m_listProj->GetItemSourceCode(value_preserving_cast(nSel)); + + CPlayBoard& pPBoard = pDoc.GetPBoardManager().GetPBoard(nBrd); + CView* pView = pDoc.FindPBoardView(pPBoard); if (pView != NULL) { // This board already has an editor. Activate that view. CFrameWnd* pFrm = pView->GetParentFrame(); - ASSERT(pFrm); + wxASSERT(pFrm); pFrm->ActivateFrame(); } else { - CB::string strTitle = m_listProj.GetItemText(nSel); - pDoc->CreateNewFrame(GetApp()->m_pBrdViewTmpl, strTitle, &pPBoard); + CB::string strTitle = m_listProj->GetItemText(value_preserving_cast(nSel)); + pDoc.CreateNewFrame(GetApp()->m_pBrdViewTmpl, strTitle, &pPBoard); } } void CGsnProjView::DoBoardRemove() { - CGamDoc* pDoc = GetDocument(); + CGamDoc& pDoc = GetDocument(); - int nSel = m_listProj.GetCurSel(); - ASSERT(nSel >= 0); - ASSERT(m_listProj.GetItemGroupCode(nSel) == grpBrd); - size_t nBrd = m_listProj.GetItemSourceCode(nSel); + int nSel = m_listProj->GetSelection(); + wxASSERT(nSel != wxNOT_FOUND); + wxASSERT(m_listProj->GetItemGroupCode(value_preserving_cast(nSel)) == grpBrd); + size_t nBrd = m_listProj->GetItemSourceCode(value_preserving_cast(nSel)); - pDoc->GetPBoardManager().DeletePBoard(nBrd); - pDoc->SetModifiedFlag(TRUE); - pDoc->UpdateAllViews(NULL, HINT_BOARDCHANGE); + pDoc.GetPBoardManager().DeletePBoard(nBrd); + pDoc.SetModifiedFlag(TRUE); + pDoc.UpdateAllViews(NULL, HINT_BOARDCHANGE); } void CGsnProjView::DoUpdateBoardHelpInfo() { - m_editInfo.SetWindowText(""_cbstring); + m_editInfo->Clear(); } void CGsnProjView::DoUpdateBoardInfo() { - m_editInfo.SetWindowText(""_cbstring); + m_editInfo->Clear(); } ///////////////////////////////////////////////////////////////////////////// @@ -140,24 +140,22 @@ void CGsnProjView::DoUpdateBoardInfo() void CGsnProjView::DoTrayCreate() { - GetDocument()->DoCreateTray(); + GetDocument().DoCreateTray(); } void CGsnProjView::DoTrayProperty() { - CGamDoc* pDoc = GetDocument(); - int nSel = m_listProj.GetCurSel(); - ASSERT(nSel >= 0); - ASSERT(m_listProj.GetItemGroupCode(nSel) == grpTray); - size_t nGrp = m_listProj.GetItemSourceCode(nSel); + CGamDoc& pDoc = GetDocument(); + int nSel = m_listProj->GetSelection(); + wxASSERT(nSel != wxNOT_FOUND); + wxASSERT(m_listProj->GetItemGroupCode(value_preserving_cast(nSel)) == grpTray); + size_t nGrp = m_listProj->GetItemSourceCode(value_preserving_cast(nSel)); - CTrayPropDialog dlg; + CTrayPropDialog dlg(pDoc.GetTrayManager(), pDoc.GetPlayerManager()); dlg.m_nYSel = nGrp; - dlg.m_pYMgr = &pDoc->GetTrayManager(); - dlg.m_pPlayerMgr = pDoc->GetPlayerManager(); - CTraySet& pYGrp = pDoc->GetTrayManager().GetTraySet(nGrp); + CTraySet& pYGrp = pDoc.GetTrayManager().GetTraySet(nGrp); dlg.m_bRandomSel = pYGrp.IsRandomPiecePull(); dlg.m_bRandomSide = pYGrp.IsRandomSidePull(); dlg.SetTrayViz(pYGrp.GetTrayContentVisibility()); @@ -165,62 +163,62 @@ void CGsnProjView::DoTrayProperty() dlg.m_bNonOwnerAccess = pYGrp.IsNonOwnerAccessAllowed(); dlg.m_bEnforceVizForOwnerToo = pYGrp.IsEnforcingVisibilityForOwnerToo(); - if (dlg.DoModal() == IDOK) + if (dlg.ShowModal() == wxID_OK) { pYGrp.SetName(dlg.m_strName); pYGrp.SetRandPiecePull(dlg.m_bRandomSel); pYGrp.SetRandSidePull(dlg.m_bRandomSide); pYGrp.SetTrayContentVisibility(dlg.GetTrayViz()); - if (dlg.m_pPlayerMgr != NULL) + if (pDoc.GetPlayerManager() != NULL) { pYGrp.SetOwnerMask(CPlayerManager::GetMaskFromPlayerNum(dlg.m_nOwnerSel)); - pYGrp.PropagateOwnerMaskToAllPieces(pDoc); + pYGrp.PropagateOwnerMaskToAllPieces(&pDoc); pYGrp.SetNonOwnerAccess(dlg.m_bNonOwnerAccess); pYGrp.SetEnforceVisibilityForOwnerToo(dlg.m_bEnforceVizForOwnerToo); } CGamDocHint hint; hint.GetArgs().m_pTray = NULL; - pDoc->UpdateAllViews(NULL, HINT_TRAYCHANGE, &hint); - pDoc->SetModifiedFlag(); + pDoc.UpdateAllViews(NULL, HINT_TRAYCHANGE, &hint); + pDoc.SetModifiedFlag(); } } void CGsnProjView::DoTrayEdit() { - CGamDoc* pDoc = GetDocument(); - int nSel = m_listProj.GetCurSel(); - wxASSERT(nSel >= 0); - wxASSERT(m_listProj.GetItemGroupCode(nSel) == grpTray); - size_t nGrp = m_listProj.GetItemSourceCode(nSel); - CTrayManager& pYMgr = pDoc->GetTrayManager(); - - CSetPiecesDialog dlg(*pDoc); + CGamDoc& pDoc = GetDocument(); + int nSel = m_listProj->GetSelection(); + wxASSERT(nSel != wxNOT_FOUND); + wxASSERT(m_listProj->GetItemGroupCode(value_preserving_cast(nSel)) == grpTray); + size_t nGrp = m_listProj->GetItemSourceCode(value_preserving_cast(nSel)); + CTrayManager& pYMgr = pDoc.GetTrayManager(); + + CSetPiecesDialog dlg(pDoc); dlg.m_nYSel = value_preserving_cast(nGrp); m_listTrays->SetItemMap(NULL); // Clear this since repaint may fail... - pDoc->CloseTrayPalettes(); // ...Ditto that for tray palettes + pDoc.CloseTrayPalettes(); // ...Ditto that for tray palettes dlg.ShowModal(); // Notify all visible trays CGamDocHint hint; hint.GetArgs().m_pTray = NULL; - pDoc->UpdateAllViews(NULL, HINT_TRAYCHANGE, &hint); - pDoc->SetModifiedFlag(); + pDoc.UpdateAllViews(NULL, HINT_TRAYCHANGE, &hint); + pDoc.SetModifiedFlag(); } void CGsnProjView::DoTrayDelete() { - CGamDoc* pDoc = GetDocument(); - CTrayManager& pYMgr = pDoc->GetTrayManager(); - CPieceTable& pPTbl = pDoc->GetPieceTable(); + CGamDoc& pDoc = GetDocument(); + CTrayManager& pYMgr = pDoc.GetTrayManager(); + CPieceTable& pPTbl = pDoc.GetPieceTable(); - int nSel = m_listProj.GetCurSel(); - ASSERT(nSel >= 0); - ASSERT(m_listProj.GetItemGroupCode(nSel) == grpTray); - size_t nGrp = m_listProj.GetItemSourceCode(nSel); + int nSel = m_listProj->GetSelection(); + wxASSERT(nSel != wxNOT_FOUND); + wxASSERT(m_listProj->GetItemGroupCode(value_preserving_cast(nSel)) == grpTray); + size_t nGrp = m_listProj->GetItemSourceCode(value_preserving_cast(nSel)); if (!pYMgr.GetTraySet(nGrp).IsEmpty()) { @@ -234,25 +232,25 @@ void CGsnProjView::DoTrayDelete() pYMgr.DeleteTraySet(nGrp); CGamDocHint hint; hint.GetArgs().m_pTray = NULL; - pDoc->UpdateAllViews(NULL, HINT_TRAYCHANGE, &hint); - pDoc->SetModifiedFlag(); + pDoc.UpdateAllViews(NULL, HINT_TRAYCHANGE, &hint); + pDoc.SetModifiedFlag(); } void CGsnProjView::DoUpdateTrayHelpInfo() { - m_editInfo.SetWindowText(""_cbstring); + m_editInfo->Clear(); } void CGsnProjView::DoUpdateTrayList() { - CGamDoc* pDoc = GetDocument(); + CGamDoc& pDoc = GetDocument(); - int nSel = m_listProj.GetCurSel(); - ASSERT(nSel >= 0); - ASSERT(m_listProj.GetItemGroupCode(nSel) == grpTray); - size_t nGrp = m_listProj.GetItemSourceCode(nSel); + int nSel = m_listProj->GetSelection(); + wxASSERT(nSel != wxNOT_FOUND); + wxASSERT(m_listProj->GetItemGroupCode(value_preserving_cast(nSel)) == grpTray); + size_t nGrp = m_listProj->GetItemSourceCode(value_preserving_cast(nSel)); - CTraySet& pYGrp = pDoc->GetTrayManager().GetTraySet(nGrp); + CTraySet& pYGrp = pDoc.GetTrayManager().GetTraySet(nGrp); const std::vector& pLstMap = pYGrp.GetPieceIDTable(); m_listTrays->SetItemMap(&pLstMap); } diff --git a/GP/VwPrjgsn.cpp b/GP/VwPrjgsn.cpp index 70430f7..6e8f279 100644 --- a/GP/VwPrjgsn.cpp +++ b/GP/VwPrjgsn.cpp @@ -38,12 +38,14 @@ static char THIS_FILE[] = __FILE__; #endif -IMPLEMENT_DYNCREATE(CGsnProjView, CView) +wxIMPLEMENT_DYNAMIC_CLASS(CProjListBoxGsn, CProjListBoxBaseWx) +IMPLEMENT_DYNCREATE(CGsnProjViewContainer, CView) #ifdef _DEBUG #define new DEBUG_NEW #endif +#if 0 ///////////////////////////////////////////////////////////////////////////// const int XBORDER = 5; @@ -56,6 +58,7 @@ const int BTN_PROJ_WD = 14 * 4; const int BTN_PROJ_HT = 12; const int PROJ_LIST_WIDTH = 250; +#endif ///////////////////////////////////////////////////////////////////////////// // Button content tables - selected based on current type of item selected @@ -82,45 +85,65 @@ static UINT * btnGroupTbl[nNumGroups + 1] = ///////////////////////////////////////////////////////////////////////////// -BEGIN_MESSAGE_MAP(CGsnProjView, CView) - //{{AFX_MSG_MAP(CGsnProjView) +wxBEGIN_EVENT_TABLE(CGsnProjView, wxPanel) +#if 0 ON_WM_SIZE() ON_WM_CREATE() - ON_LBN_SELCHANGE(IDC_V_GSN_PROJLIST, OnSelChangeProjList) - ON_LBN_DBLCLK(IDC_V_GSN_PROJLIST, OnDblClkProjList) - ON_BN_CLICKED(IDC_V_GSN_BTN_PRJA, OnClickedProjBtnA) - ON_BN_CLICKED(IDC_V_GSN_BTN_PRJB, OnClickedProjBtnB) - ON_BN_CLICKED(IDC_V_GSN_BTN_PRJC, OnClickedProjBtnC) +#endif + EVT_LISTBOX(XRCID("m_listProj"), OnSelChangeProjList) + EVT_LISTBOX_DCLICK(XRCID("m_listProj"), OnDblClkProjList) + EVT_BUTTON(XRCID("m_btnPrjA"), OnClickedProjBtnA) + EVT_BUTTON(XRCID("m_btnPrjB"), OnClickedProjBtnB) + EVT_BUTTON(XRCID("m_btnPrjC"), OnClickedProjBtnC) +#if 0 ON_WM_ERASEBKGND() - ON_COMMAND(ID_EDIT_BRDPROP, OnEditBoardProperties) - ON_UPDATE_COMMAND_UI(ID_EDIT_BRDPROP, OnUpdateEditBoardProperties) - ON_WM_CONTEXTMENU() - ON_COMMAND(ID_PPROJITEM_EDIT, OnProjItemEdit) - ON_UPDATE_COMMAND_UI(ID_PPROJITEM_EDIT, OnUpdateProjItemEdit) - ON_COMMAND(ID_PPROJITEM_DELETE, OnProjItemDelete) - ON_UPDATE_COMMAND_UI(ID_PPROJITEM_DELETE, OnUpdateProjItemDelete) - ON_COMMAND(ID_PPROJITEM_PROPERTIES, OnProjItemProperties) - ON_UPDATE_COMMAND_UI(ID_PPROJITEM_PROPERTIES, OnUpdateProjItemProperties) - ON_COMMAND(ID_PPROJITEM_VIEW, OnProjItemView) - ON_UPDATE_COMMAND_UI(ID_PPROJITEM_VIEW, OnUpdateProjItemView) - //}}AFX_MSG_MAP - ON_MESSAGE(WM_SHOWPLAYINGBOARD, OnMessageShowPlayingBoard) - ON_MESSAGE(WM_WINSTATE_RESTORE, OnMessageRestoreWinState) +#endif + EVT_MENU(XRCID("ID_EDIT_BRDPROP"), OnEditBoardProperties) + EVT_UPDATE_UI(XRCID("ID_EDIT_BRDPROP"), OnUpdateEditBoardProperties) + EVT_CONTEXT_MENU(OnContextMenu) + EVT_MENU(XRCID("ID_PPROJITEM_EDIT"), OnProjItemEdit) + EVT_UPDATE_UI(XRCID("ID_PPROJITEM_EDIT"), OnUpdateProjItemEdit) + EVT_MENU(XRCID("ID_PPROJITEM_DELETE"), OnProjItemDelete) + EVT_UPDATE_UI(XRCID("ID_PPROJITEM_DELETE"), OnUpdateProjItemDelete) + EVT_MENU(XRCID("ID_PPROJITEM_PROPERTIES"), OnProjItemProperties) + EVT_UPDATE_UI(XRCID("ID_PPROJITEM_PROPERTIES"), OnUpdateProjItemProperties) + EVT_MENU(XRCID("ID_PPROJITEM_VIEW"), OnProjItemView) + EVT_UPDATE_UI(XRCID("ID_PPROJITEM_VIEW"), OnUpdateProjItemView) + EVT_SHOWPLAYINGBOARD(OnMessageShowPlayingBoard) + EVT_WINSTATE_RESTORE(OnMessageRestoreWinState) +wxEND_EVENT_TABLE() + +BEGIN_MESSAGE_MAP(CGsnProjViewContainer, CView) + ON_WM_CREATE() END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CGsnProjView -CGsnProjView::CGsnProjView() +CGsnProjView::CGsnProjView(CGsnProjViewContainer& p) : + CB_XRC_BEGIN_CTRLS_DEFN(static_cast(p), CGsnProjView) + CB_XRC_CTRL(m_listProj) + CB_XRC_CTRL(m_editInfo) + CB_XRC_CTRL(m_listTrays) + CB_XRC_CTRL(m_btnPrjA) + CB_XRC_CTRL(m_btnPrjB) + CB_XRC_CTRL(m_btnPrjC) + CB_XRC_END_CTRLS_DEFN(), + parent(&p), + document(dynamic_cast(parent->GetDocument())) { m_nLastSel = -1; m_nLastGrp = -1; + + m_listTrays->Init(GetDocument()); + m_listTrays->SetTrayContentVisibility(trayVizAllSides); } CGsnProjView::~CGsnProjView() { } +#if 0 int CGsnProjView::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CView::OnCreate(lpCreateStruct) == -1) @@ -156,7 +179,7 @@ int CGsnProjView::OnCreate(LPCREATESTRUCT lpCreateStruct) rctList.left = rctList.right + BTN_GROUP_XGAP; rctList.right = rctClient.right - XBORDER; - m_listTrays = MakeOwner(CheckedDeref(GetDocument())); + m_listTrays = MakeOwner(GetDocument()); if (!CreateListbox(IDC_V_GSN_TRAYLIST, *m_listTrays, WS_HSCROLL | LBS_HASSTRINGS, rctList)) return -1; m_listTrays->SetTrayContentVisibility(trayVizAllSides); @@ -165,18 +188,18 @@ int CGsnProjView::OnCreate(LPCREATESTRUCT lpCreateStruct) return 0; } +#endif ///////////////////////////////////////////////////////////////////////////// void CGsnProjView::OnInitialUpdate() { - GetDocument()->DoInitialUpdate(); // Since UpdateAllViews isn't virtual - CView::OnInitialUpdate(); - CGamDoc* pDoc = GetDocument(); - CPBoardManager& pPBMgr = pDoc->GetPBoardManager(); + GetDocument().DoInitialUpdate(); // Since UpdateAllViews isn't virtual + CGamDoc& pDoc = GetDocument(); + CPBoardManager& pPBMgr = pDoc.GetPBoardManager(); // Only honor the open-on-load flags if the save window state // is disabled. - if (!pDoc->m_bSaveWindowPositions) + if (!pDoc.m_bSaveWindowPositions) { for (size_t i = size_t(0); i < pPBMgr.GetNumPBoards(); i++) { @@ -185,12 +208,16 @@ void CGsnProjView::OnInitialUpdate() { // Defer opening the view until our view init // in done. - PostMessage(WM_SHOWPLAYINGBOARD, value_preserving_cast(i)); + ShowPlayingBoardEvent event(i); + AddPendingEvent(event); } } } else - PostMessage(WM_WINSTATE_RESTORE); + { + WinStateRestoreEvent event; + AddPendingEvent(event); + } } void CGsnProjView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint) @@ -205,10 +232,11 @@ void CGsnProjView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint) void CGsnProjView::OnDraw(CDC* pDC) { - CDocument* pDoc = GetDocument(); + CDocument& pDoc = GetDocument(); // TODO: add draw code here } +#if 0 BOOL CGsnProjView::OnEraseBkgnd(CDC* pDC) { CBrush brFill(GetSysColor(COLOR_BTNFACE)); @@ -344,6 +372,7 @@ BOOL CGsnProjView::CreateEditbox(UINT nCtrlID, CEdit& ebox, CRect& rct) ebox.SetFont(CFont::FromHandle(g_res.h8ss)); return bOk; } +#endif ///////////////////////////////////////////////////////////////////////////// // Updates buttons for specified group @@ -352,21 +381,21 @@ void CGsnProjView::UpdateButtons(int nGrp) { nGrp++; // -1 means no selection so bump to zero UINT* pTbl = btnGroupTbl[nGrp]; - SetButtonState(m_btnPrjA, pTbl[0]); - SetButtonState(m_btnPrjB, pTbl[1]); - SetButtonState(m_btnPrjC, pTbl[2]); + SetButtonState(*m_btnPrjA, pTbl[0]); + SetButtonState(*m_btnPrjB, pTbl[1]); + SetButtonState(*m_btnPrjC, pTbl[2]); } -void CGsnProjView::SetButtonState(CButton& btn, UINT nStringID) +void CGsnProjView::SetButtonState(wxButton& btn, UINT nStringID) { if (nStringID == 0) - btn.SetWindowText(""_cbstring); + btn.SetLabel(""_cbstring); else { CB::string str = CB::string::LoadString(nStringID); - btn.SetWindowText(str); + btn.SetLabel(str); } - btn.EnableWindow(nStringID != 0); + btn.Enable(nStringID != 0); } ///////////////////////////////////////////////////////////////////////////// @@ -374,22 +403,20 @@ void CGsnProjView::SetButtonState(CButton& btn, UINT nStringID) void CGsnProjView::UpdateItemControls(int nGrp) { - HDWP hDwp = BeginDeferWindowPos(4); - #define EzDefer(h, c, flg) \ - DeferWindowPos(h, (c).m_hWnd, NULL, 0, 0, 0, 0, \ - SWP_NOZORDER | SWP_NOSIZE | SWP_NOMOVE | flg) + wxWindowUpdateLocker freezer(this); + ChildrenRepositioningGuard crg(this); + m_listTrays->Hide(); + m_editInfo->Hide(); if (nGrp == grpTray) // Trays { - hDwp = EzDefer(hDwp, *m_listTrays, SWP_SHOWWINDOW); - hDwp = EzDefer(hDwp, m_editInfo, SWP_HIDEWINDOW); + m_listTrays->Show(); } else // Board, headings and no selection { - hDwp = EzDefer(hDwp, m_editInfo, SWP_SHOWWINDOW); - hDwp = EzDefer(hDwp, *m_listTrays, SWP_HIDEWINDOW); + m_editInfo->Show(); } - EndDeferWindowPos(hDwp); + Layout(); } ///////////////////////////////////////////////////////////////////////////// @@ -401,26 +428,26 @@ void CGsnProjView::DoUpdateProjectList(BOOL bUpdateItem /* = TRUE */) { bDisplayIDs = GetApp()->GetProfileInt("Settings"_cbstring, "DisplayIDs"_cbstring, 0); } - CGamDoc* pDoc = GetDocument(); - ASSERT(pDoc); - - m_listProj.SetRedraw(FALSE); + CGamDoc& pDoc = GetDocument(); // Preserve the current selection - int nTopIdx = m_listProj.GetTopIndex(); - int nCurSel = m_listProj.GetCurSel(); + size_t nTopIdx = m_listProj->GetVisibleRowsBegin(); + int nCurSel = m_listProj->GetSelection(); + + { + wxWindowUpdateLocker freezer(&*m_listProj); - m_listProj.ResetContent(); + m_listProj->Clear(); // Document type.... CB::string str = CB::string::LoadString(IDS_PHEAD_GSN_DOCTYPE); - m_listProj.AddItem(grpDoc, str); + m_listProj->AddItem(grpDoc, str); // Boards.... str = CB::string::LoadString(IDS_PHEAD_GSN_BOARDS); - m_listProj.AddItem(grpBrdHdr, str); + m_listProj->AddItem(grpBrdHdr, str); - CPBoardManager& pPBMgr = pDoc->GetPBoardManager(); + CPBoardManager& pPBMgr = pDoc.GetPBoardManager(); for (size_t i = size_t(0); i < pPBMgr.GetNumPBoards(); i++) { CPlayBoard& pPBoard = pPBMgr.GetPBoard(i); @@ -433,19 +460,19 @@ void CGsnProjView::DoUpdateProjectList(BOOL bUpdateItem /* = TRUE */) } if (pPBoard.IsOwned()) { - CB::string strOwner = pDoc->GetPlayerManager()->GetPlayerUsingMask( + CB::string strOwner = pDoc.GetPlayerManager()->GetPlayerUsingMask( pPBoard.GetOwnerMask()).m_strName; CB::string strOwnedBy = CB::string::Format(IDS_TIP_OWNED_BY_PROJ, strOwner); str += strOwnedBy; } - m_listProj.AddItem(grpBrd, str, i); + m_listProj->AddItem(grpBrd, str, i); } // Trays.... str = CB::string::LoadString(IDS_PHEAD_GSN_TRAYS); - m_listProj.AddItem(grpTrayHdr, str); + m_listProj->AddItem(grpTrayHdr, str); - CTrayManager& pYMgr = pDoc->GetTrayManager(); + CTrayManager& pYMgr = pDoc.GetTrayManager(); for (size_t i = size_t(0); i < pYMgr.GetNumTraySets(); i++) { CTraySet& pYSet = pYMgr.GetTraySet(i); @@ -457,27 +484,27 @@ void CGsnProjView::DoUpdateProjectList(BOOL bUpdateItem /* = TRUE */) } if (pYSet.IsOwned()) { - CB::string strOwner = pDoc->GetPlayerManager()->GetPlayerUsingMask( + CB::string strOwner = pDoc.GetPlayerManager()->GetPlayerUsingMask( pYSet.GetOwnerMask()).m_strName; CB::string strOwnedBy = CB::string::Format(IDS_TIP_OWNED_BY_PROJ, strOwner); str += strOwnedBy; } - m_listProj.AddItem(grpTray, str, i); + m_listProj->AddItem(grpTray, str, i); } // OK...Show the updates - m_listProj.SetRedraw(TRUE); - m_listProj.Invalidate(); + } + m_listProj->Refresh(); - m_listProj.SetTopIndex(nTopIdx); - if (nCurSel >= 0) + m_listProj->ScrollToRow(nTopIdx); + if (nCurSel != wxNOT_FOUND) { - if (nCurSel >= m_listProj.GetCount()) - nCurSel = m_listProj.GetCount() - 1; - m_listProj.SetCurSel(nCurSel); + if (nCurSel >= m_listProj->GetItemCount()) + nCurSel = value_preserving_cast(m_listProj->GetItemCount() - size_t(1)); + m_listProj->SetSelection(nCurSel); } else - m_listProj.SetCurSel(0); + m_listProj->SetSelection(0); if (bUpdateItem) { @@ -490,14 +517,14 @@ void CGsnProjView::DoUpdateProjectList(BOOL bUpdateItem /* = TRUE */) ///////////////////////////////////////////////////////////////////////////// // List box notifications -void CGsnProjView::OnSelChangeProjList() +void CGsnProjView::OnSelChangeProjList(wxCommandEvent& /*event*/) { - int nSel = m_listProj.GetCurSel(); + int nSel = m_listProj->GetSelection(); if (m_nLastSel == nSel) return; - int nGrp = m_listProj.GetItemGroupCode(nSel); - ASSERT(nGrp >= 0); + decltype(grpDoc) nGrp = m_listProj->GetItemGroupCode(value_preserving_cast(nSel)); + wxASSERT(nGrp >= 0); switch (nGrp) { case grpDoc: DoUpdateGsnInfo(); break; @@ -514,13 +541,13 @@ void CGsnProjView::OnSelChangeProjList() } } -void CGsnProjView::OnDblClkProjList() +void CGsnProjView::OnDblClkProjList(wxCommandEvent& event) { - int nSel = m_listProj.GetCurSel(); - if (nSel < 0) + int nSel = m_listProj->GetSelection(); + if (nSel == wxNOT_FOUND) return; - int nGrp = m_listProj.GetItemGroupCode(nSel); - ASSERT(nGrp >= 0); + decltype(grpDoc) nGrp = m_listProj->GetItemGroupCode(value_preserving_cast(nSel)); + wxASSERT(nGrp >= 0); switch (nGrp) { case grpDoc: DoGsnProperty(); break; @@ -534,12 +561,12 @@ void CGsnProjView::OnDblClkProjList() ///////////////////////////////////////////////////////////////////////////// // Button notifications -void CGsnProjView::OnClickedProjBtnA() +void CGsnProjView::OnClickedProjBtnA(wxCommandEvent& event) { - int nSel = m_listProj.GetCurSel(); - if (nSel < 0) return; - int nGrp = m_listProj.GetItemGroupCode(nSel); - ASSERT(nGrp >= 0); + int nSel = m_listProj->GetSelection(); + if (nSel == wxNOT_FOUND) return; + decltype(grpDoc) nGrp = m_listProj->GetItemGroupCode(value_preserving_cast(nSel)); + wxASSERT(nGrp >= 0); switch (nGrp) { case grpDoc: DoGsnProperty(); break; @@ -550,12 +577,12 @@ void CGsnProjView::OnClickedProjBtnA() } } -void CGsnProjView::OnClickedProjBtnB() +void CGsnProjView::OnClickedProjBtnB(wxCommandEvent& event) { - int nSel = m_listProj.GetCurSel(); - if (nSel < 0) return; - int nGrp = m_listProj.GetItemGroupCode(nSel); - ASSERT(nGrp >= 0); + int nSel = m_listProj->GetSelection(); + if (nSel == wxNOT_FOUND) return; + decltype(grpDoc) nGrp = m_listProj->GetItemGroupCode(value_preserving_cast(nSel)); + wxASSERT(nGrp >= 0); switch (nGrp) { case grpBrd: DoBoardProperty(); break; @@ -563,12 +590,12 @@ void CGsnProjView::OnClickedProjBtnB() } } -void CGsnProjView::OnClickedProjBtnC() +void CGsnProjView::OnClickedProjBtnC(wxCommandEvent& event) { - int nSel = m_listProj.GetCurSel(); - if (nSel < 0) return; - int nGrp = m_listProj.GetItemGroupCode(nSel); - ASSERT(nGrp >= 0); + int nSel = m_listProj->GetSelection(); + if (nSel == wxNOT_FOUND) return; + decltype(grpDoc) nGrp = m_listProj->GetItemGroupCode(value_preserving_cast(nSel)); + wxASSERT(nGrp >= 0); switch (nGrp) { case grpBrd: DoBoardRemove(); break; @@ -576,80 +603,79 @@ void CGsnProjView::OnClickedProjBtnC() } } -void CGsnProjView::OnEditBoardProperties() +void CGsnProjView::OnEditBoardProperties(wxCommandEvent& event) { DoBoardProperty(); } -void CGsnProjView::OnUpdateEditBoardProperties(CCmdUI* pCmdUI) +void CGsnProjView::OnUpdateEditBoardProperties(wxUpdateUIEvent& pCmdUI) { - int nSel = m_listProj.GetCurSel(); - pCmdUI->Enable(nSel >= 0 && - m_listProj.GetItemGroupCode(nSel) == grpBrd); + int nSel = m_listProj->GetSelection(); + pCmdUI.Enable(nSel != wxNOT_FOUND && + m_listProj->GetItemGroupCode(value_preserving_cast(nSel)) == grpBrd); } -void CGsnProjView::OnContextMenu(CWnd* pWnd, CPoint point) +void CGsnProjView::OnContextMenu(wxContextMenuEvent& event) { - // Make sure window is active. - GetParentFrame()->ActivateFrame(); - UINT nID = (UINT)-1; + const char* nID = nullptr; - if (pWnd->GetDlgCtrlID() == IDC_V_GSN_PROJLIST) - nID = MENU_PJ_GSN_DEFAULT; + if (event.GetEventObject() == &*m_listProj) + nID = "3=PJ_GSN_DEFAULT"; - if ((int)nID < 0) + if (!nID) return; - CMenu bar; - if (bar.LoadMenuW(IDR_MENU_PLAYER_POPUPS)) + std::unique_ptr bar(wxXmlResource::Get()->LoadMenuBar("IDR_MENU_PLAYER_POPUPS")); + if (bar) { - CMenu& popup = *bar.GetSubMenu(nID); - ASSERT(popup.m_hMenu != NULL); + int index = bar->FindMenu(nID); + wxASSERT(index != wxNOT_FOUND); + std::unique_ptr popup(bar->Remove(value_preserving_cast(index))); // Make sure we clean up even if exception is tossed. - TRY + try + { + PopupMenu(&*popup); + } + catch (...) { - popup.TrackPopupMenu(TPM_RIGHTBUTTON, point.x, point.y, - AfxGetMainWnd()); // Route commands through main window - // Make sure command is dispatched BEFORE we clear m_bInRightMouse. - GetApp()->DispatchMessages(); + wxASSERT(!"exception"); } - END_TRY } } -void CGsnProjView::OnProjItemEdit() +void CGsnProjView::OnProjItemEdit(wxCommandEvent& event) { - int nSel = m_listProj.GetCurSel(); - if (nSel < 0) + int nSel = m_listProj->GetSelection(); + if (nSel == wxNOT_FOUND) return; - int nGrp = m_listProj.GetItemGroupCode(nSel); - ASSERT(nGrp >= 0); + decltype(grpTray) nGrp = m_listProj->GetItemGroupCode(value_preserving_cast(nSel)); + wxASSERT(nGrp >= 0); if (nGrp == grpTray) DoTrayEdit(); } -void CGsnProjView::OnUpdateProjItemEdit(CCmdUI* pCmdUI) +void CGsnProjView::OnUpdateProjItemEdit(wxUpdateUIEvent& pCmdUI) { BOOL bEnable = FALSE; - int nSel = m_listProj.GetCurSel(); - if (nSel >= 0) + int nSel = m_listProj->GetSelection(); + if (nSel != wxNOT_FOUND) { - int nGrp = m_listProj.GetItemGroupCode(nSel); - ASSERT(nGrp >= 0); + decltype(grpTray) nGrp = m_listProj->GetItemGroupCode(value_preserving_cast(nSel)); + wxASSERT(nGrp >= 0); if (nGrp == grpTray) bEnable = TRUE; } - pCmdUI->Enable(bEnable); + pCmdUI.Enable(bEnable); } -void CGsnProjView::OnProjItemDelete() +void CGsnProjView::OnProjItemDelete(wxCommandEvent& event) { - int nSel = m_listProj.GetCurSel(); - if (nSel < 0) + int nSel = m_listProj->GetSelection(); + if (nSel == wxNOT_FOUND) return; - int nGrp = m_listProj.GetItemGroupCode(nSel); - ASSERT(nGrp >= 0); + decltype(grpBrd) nGrp = m_listProj->GetItemGroupCode(value_preserving_cast(nSel)); + wxASSERT(nGrp >= 0); switch (nGrp) { case grpBrd: DoBoardRemove(); break; @@ -657,14 +683,14 @@ void CGsnProjView::OnProjItemDelete() } } -void CGsnProjView::OnUpdateProjItemDelete(CCmdUI* pCmdUI) +void CGsnProjView::OnUpdateProjItemDelete(wxUpdateUIEvent& pCmdUI) { BOOL bEnable = FALSE; - int nSel = m_listProj.GetCurSel(); - if (nSel >= 0) + int nSel = m_listProj->GetSelection(); + if (nSel != wxNOT_FOUND) { - int nGrp = m_listProj.GetItemGroupCode(nSel); - ASSERT(nGrp >= 0); + decltype(grpBrd) nGrp = m_listProj->GetItemGroupCode(value_preserving_cast(nSel)); + wxASSERT(nGrp >= 0); switch (nGrp) { case grpBrd: @@ -674,16 +700,16 @@ void CGsnProjView::OnUpdateProjItemDelete(CCmdUI* pCmdUI) default: ; } } - pCmdUI->Enable(bEnable); + pCmdUI.Enable(bEnable); } -void CGsnProjView::OnProjItemProperties() +void CGsnProjView::OnProjItemProperties(wxCommandEvent& event) { - int nSel = m_listProj.GetCurSel(); - if (nSel < 0) + int nSel = m_listProj->GetSelection(); + if (nSel == wxNOT_FOUND) return; - int nGrp = m_listProj.GetItemGroupCode(nSel); - ASSERT(nGrp >= 0); + decltype(grpDoc) nGrp = m_listProj->GetItemGroupCode(value_preserving_cast(nSel)); + wxASSERT(nGrp >= 0); switch (nGrp) { case grpDoc: DoGsnProperty(); break; @@ -692,14 +718,14 @@ void CGsnProjView::OnProjItemProperties() } } -void CGsnProjView::OnUpdateProjItemProperties(CCmdUI* pCmdUI) +void CGsnProjView::OnUpdateProjItemProperties(wxUpdateUIEvent& pCmdUI) { BOOL bEnable = FALSE; - int nSel = m_listProj.GetCurSel(); - if (nSel >= 0) + int nSel = m_listProj->GetSelection(); + if (nSel != wxNOT_FOUND) { - int nGrp = m_listProj.GetItemGroupCode(nSel); - ASSERT(nGrp >= 0); + decltype(grpDoc) nGrp = m_listProj->GetItemGroupCode(value_preserving_cast(nSel)); + wxASSERT(nGrp >= 0); switch (nGrp) { case grpDoc: @@ -710,31 +736,31 @@ void CGsnProjView::OnUpdateProjItemProperties(CCmdUI* pCmdUI) default: ; } } - pCmdUI->Enable(bEnable); + pCmdUI.Enable(bEnable); } -void CGsnProjView::OnProjItemView() +void CGsnProjView::OnProjItemView(wxCommandEvent& event) { - int nSel = m_listProj.GetCurSel(); - if (nSel < 0) return; - int nGrp = m_listProj.GetItemGroupCode(nSel); - ASSERT(nGrp >= 0); + int nSel = m_listProj->GetSelection(); + if (nSel == wxNOT_FOUND) return; + decltype(grpBrd) nGrp = m_listProj->GetItemGroupCode(value_preserving_cast(nSel)); + wxASSERT(nGrp >= 0); if (nGrp == grpBrd) DoBoardView(); } -void CGsnProjView::OnUpdateProjItemView(CCmdUI* pCmdUI) +void CGsnProjView::OnUpdateProjItemView(wxUpdateUIEvent& pCmdUI) { BOOL bEnable = FALSE; - int nSel = m_listProj.GetCurSel(); - if (nSel >= 0) + int nSel = m_listProj->GetSelection(); + if (nSel != wxNOT_FOUND) { - int nGrp = m_listProj.GetItemGroupCode(nSel); - ASSERT(nGrp >= 0); + decltype(grpBrd) nGrp = m_listProj->GetItemGroupCode(value_preserving_cast(nSel)); + wxASSERT(nGrp >= 0); if (nGrp == grpBrd) bEnable = TRUE; } - pCmdUI->Enable(bEnable); + pCmdUI.Enable(bEnable); } /////////////////////////////////////////////////////////////////////// @@ -742,14 +768,13 @@ void CGsnProjView::OnUpdateProjItemView(CCmdUI* pCmdUI) // message is posted during view initial update if the playing // board m_bOpenBoardOnLoad option is set. (wParam = the board index) -LRESULT CGsnProjView::OnMessageShowPlayingBoard(WPARAM wParam, LPARAM) +void CGsnProjView::OnMessageShowPlayingBoard(ShowPlayingBoardEvent& event) { - CGamDoc* pDoc = GetDocument(); - CPlayBoard& pPBoard = pDoc->GetPBoardManager().GetPBoard(value_preserving_cast(wParam)); - ASSERT(pPBoard.m_bOpenBoardOnLoad); - pDoc->CreateNewFrame(GetApp()->m_pBrdViewTmpl, + CGamDoc& pDoc = GetDocument(); + CPlayBoard& pPBoard = pDoc.GetPBoardManager().GetPBoard(event.GetPlayingBoardIndex()); + wxASSERT(pPBoard.m_bOpenBoardOnLoad); + pDoc.CreateNewFrame(GetApp()->m_pBrdViewTmpl, pPBoard.GetBoard()->GetName(), &pPBoard); - return (LRESULT)0; } /////////////////////////////////////////////////////////////////////// @@ -757,8 +782,43 @@ LRESULT CGsnProjView::OnMessageShowPlayingBoard(WPARAM wParam, LPARAM) // message is posted during view initial update if the state of // the windows should be restored. -LRESULT CGsnProjView::OnMessageRestoreWinState(WPARAM, LPARAM) +void CGsnProjView::OnMessageRestoreWinState(WinStateRestoreEvent& event) { - GetDocument()->RestoreWindowState(); - return (LRESULT)0; + GetDocument().RestoreWindowState(); +} + +void CGsnProjViewContainer::OnDraw(CDC* pDC) +{ + // do nothing because child covers entire client rect +} + +void CGsnProjViewContainer::OnInitialUpdate() +{ + child->OnInitialUpdate(); + + BASE::OnInitialUpdate(); +} + +void CGsnProjViewContainer::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint) +{ + child->OnUpdate(pSender, lHint, pHint); + + BASE::OnUpdate(pSender, lHint, pHint); +} + +CGsnProjViewContainer::CGsnProjViewContainer() : + CB::wxNativeContainerWindowMixin(static_cast(*this)) +{ +} + +int CGsnProjViewContainer::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CView::OnCreate(lpCreateStruct) == -1) + { + return -1; + } + + child = new CGsnProjView(*this); + + return 0; } diff --git a/GP/VwPrjgsn.h b/GP/VwPrjgsn.h index 44f7ff5..943d653 100644 --- a/GP/VwPrjgsn.h +++ b/GP/VwPrjgsn.h @@ -1,6 +1,6 @@ // VwPrjgsn.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 @@ -59,25 +59,33 @@ namespace CB { namespace Impl }; }} -class CGsnProjView : public CView, private CB::Impl::CGsnProjViewBase +class CGsnProjViewContainer; + +class CProjListBoxGsn : public CProjListBoxWx { - DECLARE_DYNCREATE(CGsnProjView) -protected: - CGsnProjView(); // protected constructor used by dynamic creation + wxDECLARE_DYNAMIC_CLASS(CProjListBoxGsn); +}; -// Attributes +class CGsnProjView : public CB::ProcessEventOverride, private CB::Impl::CGsnProjViewBase +{ public: - CGamDoc* GetDocument() { return CB::ToCGamDoc(m_pDocument); } + CGsnProjView(CGsnProjViewContainer& p); + +// Attributes +private: + CGamDoc& GetDocument() { return *document; } // Various controls... - CProjListBox m_listProj; // Main project box + CB_XRC_BEGIN_CTRLS_DECL() + RefPtr m_listProj; // Main project box - CEdit m_editInfo; // Used for various project info/help - OwnerOrNullPtr m_listTrays; // For viewing tray contents + RefPtr m_editInfo; // Used for various project info/help + RefPtr m_listTrays; // For viewing tray contents - CButton m_btnPrjA; // Project button group - CButton m_btnPrjB; - CButton m_btnPrjC; + RefPtr m_btnPrjA; // Project button group + RefPtr m_btnPrjB; + RefPtr m_btnPrjC; + CB_XRC_END_CTRLS_DECL() // Operations public: @@ -89,11 +97,13 @@ class CGsnProjView : public CView, private CB::Impl::CGsnProjViewBase // Implementation protected: +#if 0 int CreateButton(UINT nCtrlID, CButton& btn, CPoint llpos, CSize relsize); BOOL CreateListbox(UINT nCtrlID, CListBox& lbox, DWORD dwStyle, CRect& rct); BOOL CreateEditbox(UINT nCtrlID, CEdit& ebox, CRect& rct); +#endif - void SetButtonState(CButton& btn, UINT nStringID); + void SetButtonState(wxButton& btn, UINT nStringID); void UpdateButtons(int nGrp = -1); void UpdateItemControls(int nGrp = -1); @@ -132,32 +142,82 @@ class CGsnProjView : public CView, private CB::Impl::CGsnProjViewBase // Generated message map functions protected: //{{AFX_MSG(CGsnProjView) +#if 0 afx_msg void OnSize(UINT nType, int cx, int cy); afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); - afx_msg void OnSelChangeProjList(); - afx_msg void OnDblClkProjList(); - afx_msg void OnClickedProjBtnA(); - afx_msg void OnClickedProjBtnB(); - afx_msg void OnClickedProjBtnC(); +#endif + void OnSelChangeProjList(wxCommandEvent& event); + void OnSelChangeProjList() + { + wxCommandEvent dummy; + OnSelChangeProjList(dummy); + } + void OnDblClkProjList(wxCommandEvent& event); + void OnClickedProjBtnA(wxCommandEvent& event); + void OnClickedProjBtnB(wxCommandEvent& event); + void OnClickedProjBtnC(wxCommandEvent& event); +#if 0 afx_msg BOOL OnEraseBkgnd(CDC* pDC); - afx_msg void OnEditBoardProperties(); - afx_msg void OnUpdateEditBoardProperties(CCmdUI* pCmdUI); - afx_msg void OnContextMenu(CWnd* pWnd, CPoint point); - afx_msg void OnProjItemEdit(); - afx_msg void OnUpdateProjItemEdit(CCmdUI* pCmdUI); - afx_msg void OnProjItemDelete(); - afx_msg void OnUpdateProjItemDelete(CCmdUI* pCmdUI); - afx_msg void OnProjItemProperties(); - afx_msg void OnUpdateProjItemProperties(CCmdUI* pCmdUI); - afx_msg void OnProjItemView(); - afx_msg void OnUpdateProjItemView(CCmdUI* pCmdUI); - //}}AFX_MSG - afx_msg LRESULT OnMessageShowPlayingBoard(WPARAM wParam, LPARAM lParam); - afx_msg LRESULT OnMessageRestoreWinState(WPARAM, LPARAM); +#endif + void OnEditBoardProperties(wxCommandEvent& event); + void OnUpdateEditBoardProperties(wxUpdateUIEvent& pCmdUI); + void OnContextMenu(wxContextMenuEvent& event); + void OnProjItemEdit(wxCommandEvent& event); + void OnUpdateProjItemEdit(wxUpdateUIEvent& pCmdUI); + void OnProjItemDelete(wxCommandEvent& event); + void OnUpdateProjItemDelete(wxUpdateUIEvent& pCmdUI); + void OnProjItemProperties(wxCommandEvent& event); + void OnUpdateProjItemProperties(wxUpdateUIEvent& pCmdUI); + void OnProjItemView(wxCommandEvent& event); + void OnUpdateProjItemView(wxUpdateUIEvent& pCmdUI); + void OnMessageShowPlayingBoard(ShowPlayingBoardEvent& event); + void OnMessageRestoreWinState(WinStateRestoreEvent& event); + + wxDECLARE_EVENT_TABLE(); + +private: + // IGetCmdTarget + CCmdTarget& Get() override; + + RefPtr parent; + RefPtr document; + + friend class CGsnProjViewContainer; +}; +class CGsnProjViewContainer : public CB::OnCmdMsgOverride, + public CB::wxNativeContainerWindowMixin +{ +public: + void OnDraw(CDC* pDC) override; + + void OnInitialUpdate() override; + void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint) override; + +private: + CGsnProjViewContainer(); // used by dynamic creation + DECLARE_DYNCREATE(CGsnProjViewContainer) + + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); DECLARE_MESSAGE_MAP() + + // IGetEvtHandler + wxEvtHandler& Get() override + { + return CheckedDeref(CheckedDeref(child).GetEventHandler()); + } + + // owned by wx + CB::propagate_const child = nullptr; + + typedef CB::OnCmdMsgOverride BASE; }; +inline CCmdTarget& CGsnProjView::Get() +{ + return *parent; +} + ///////////////////////////////////////////////////////////////////////////// #endif diff --git a/GShr/CyberBoard.h b/GShr/CyberBoard.h index 5bbf03d..83bcf53 100644 --- a/GShr/CyberBoard.h +++ b/GShr/CyberBoard.h @@ -346,7 +346,7 @@ struct std::formatter : private std::formatter FormatContext::iterator format(const wxRect& r, FormatContext& ctx) const { - std::format_to(ctx.out(), "[("); + std::format_to(ctx.out(), "(("); BASE::format(r.GetLeft(), ctx); std::format_to(ctx.out(), ","); BASE::format(r.GetTop(), ctx); @@ -1969,19 +1969,16 @@ namespace CB // emulate CWnd::SendMessageToDescendants() void SendEventToDescendants(wxWindow& wnd, wxEvent& event, bool deep = true); -#if 0 const CWnd* ToCWnd(const wxWindow& w); inline CWnd* ToCWnd(wxWindow& w) { return const_cast(ToCWnd(std::as_const(w))); } // MFC if possible, wx otherwise const std::type_info& GetPublicTypeid(const wxWindow& w); -#endif } // helpers for providing wx/docview namespace CB { -#if 0 // satisfy wxDocChildFrameAny<> requirements template class PseudoFrame : public BASE @@ -2029,7 +2026,6 @@ namespace CB private: RefPtr window; }; -#endif /* wxView must be separate from wxWindow (see https://groups.google.com/g/wx-dev/c/xMK4zYT3FFQ/m/kR9JmczbBAAJ) */ @@ -2333,7 +2329,6 @@ namespace CB void InflateAndNormalize(wxRect& rect, int dx, int dy); } -#if 0 // use these to translate and relay MFC messages to a wx target namespace CB { @@ -2415,7 +2410,6 @@ namespace CB } }; } -#endif namespace CB { diff --git a/GShr/LibMfc.cpp b/GShr/LibMfc.cpp index 5686afc..55975a4 100644 --- a/GShr/LibMfc.cpp +++ b/GShr/LibMfc.cpp @@ -882,7 +882,6 @@ void CB::SendEventToDescendants(wxWindow& wnd, wxEvent& event, bool deep /*= tru } } -#if 0 const CWnd* CB::ToCWnd(const wxWindow& w) { const wxNativeContainerWindow* ncw = dynamic_cast(&w); @@ -902,7 +901,6 @@ const std::type_info& CB::GetPublicTypeid(const wxWindow& w) const CWnd* mfcWnd = ToCWnd(w); return mfcWnd ? typeid(*mfcWnd) : typeid(w); } -#endif void CB::wxView::OnDraw(wxDC * dc) { @@ -1291,7 +1289,6 @@ void CB::InflateAndNormalize(wxRect& rect, int dx, int dy) rect.Inflate(dx, dy); } -#if 0 namespace CB { int ToWxID(int id) @@ -1308,9 +1305,23 @@ namespace CB return wxID_UNDO; default: #if defined(GPLAY) - // TODO: - return wxID_NONE; + switch (id) + { + case ID_EDIT_BRDPROP: + return XRCID("ID_EDIT_BRDPROP"); + case ID_PPROJITEM_DELETE: + return XRCID("ID_PPROJITEM_DELETE"); + case ID_PPROJITEM_EDIT: + return XRCID("ID_PPROJITEM_EDIT"); + case ID_PPROJITEM_PROPERTIES: + return XRCID("ID_PPROJITEM_PROPERTIES"); + case ID_PPROJITEM_VIEW: + return XRCID("ID_PPROJITEM_VIEW"); + default: + return wxID_NONE; + } #else + wxASSERT(!"dead code"); switch (id) { case ID_BUGFIX_DUMPBADTILES: @@ -1511,7 +1522,6 @@ BOOL CB::RelayOnCmdMsg(wxEvtHandler& dest, return false; } } -#endif namespace CB { @@ -1527,6 +1537,14 @@ namespace CB { XRCID("ID_TOOLS_ROT180"), ID_TOOLS_ROT180 }, { XRCID("ID_TOOLS_ROT270"), ID_TOOLS_ROT270 }, #else + { XRCID("ID_EDIT_CREATE_GEOMORPHIC"), ID_EDIT_CREATE_GEOMORPHIC }, + { XRCID("ID_EDIT_CREATETRAY"), ID_EDIT_CREATETRAY }, + { XRCID("ID_EDIT_SELECTBOARDS"), ID_EDIT_SELECTBOARDS }, + { XRCID("ID_EDIT_SELECTGAMEPIECES"), ID_EDIT_SELECTGAMEPIECES }, + { XRCID("ID_PPROJITEM_DELETE"), ID_PPROJITEM_DELETE }, + { XRCID("ID_PPROJITEM_EDIT"), ID_PPROJITEM_EDIT }, + { XRCID("ID_PPROJITEM_PROPERTIES"), ID_PPROJITEM_PROPERTIES }, + { XRCID("ID_PPROJITEM_VIEW"), ID_PPROJITEM_VIEW }, #endif }; auto it = ids.find(wxId); @@ -1541,7 +1559,6 @@ namespace CB } } -#if 0 bool CB::RelayProcessEvent(CCmdTarget& dest, wxEvent& event) { @@ -1605,7 +1622,6 @@ bool CB::RelayProcessEvent(CCmdTarget& dest, return false; } -#endif int CB::GetMouseButtons(const wxMouseState& event) {