FS2_Open
Open source remastering of the Freespace 2 engine
mainfrm.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) Volition, Inc. 1999. All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell
5  * or otherwise commercially exploit the source or things you created based on the
6  * source.
7  *
8 */
9 
10 
11 
12 #include "stdafx.h"
13 #include "FRED.h"
14 
15 #include "MainFrm.h"
16 
17 #include "FREDDoc.h"
18 #include "FREDView.h"
19 
20 #include "MessageEditorDlg.h"
21 #include "ShipClassEditorDlg.h"
22 #include "MissionNotesDlg.h"
23 #include "Grid.h"
24 #include "dialog1.h"
26 #include "iff_defs/iff_defs.h"
27 
28 #ifdef _DEBUG
29 #undef THIS_FILE
30 static char THIS_FILE[] = __FILE__;
31 #endif
32 
34 // CMainFrame
35 
36 IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
37 
38 BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
39  ON_MESSAGE(WM_MENU_POPUP_EDIT, OnMenuPopupTest)
40  ON_CBN_SELCHANGE(ID_NEW_SHIP_TYPE, OnNewShipTypeChange)
41 
42  //{{AFX_MSG_MAP(CMainFrame)
43  ON_WM_CREATE()
44  ON_COMMAND(ID_EDITORS_AI_CLASSES, OnEditorsAiClasses)
45  ON_COMMAND(ID_EDITORS_GOALS, OnEditorsGoals)
46  ON_COMMAND(ID_EDITORS_ART, OnEditorsArt)
47  ON_COMMAND(ID_EDITORS_MUSIC, OnEditorsMusic)
48  ON_COMMAND(ID_EDITORS_SHIP_CLASSES, OnEditorsShipClasses)
49  ON_COMMAND(ID_EDITORS_SOUND, OnEditorsSound)
50  ON_COMMAND(ID_EDITORS_TERRAIN, OnEditorsTerrain)
51  ON_COMMAND(ID_FILE_MISSIONNOTES, OnFileMissionnotes)
52  ON_WM_LBUTTONUP()
53  ON_WM_DESTROY()
54  ON_COMMAND(ID_VIEW_STATUS_BAR, OnViewStatusBar)
55  ON_UPDATE_COMMAND_UI(ID_VIEW_STATUS_BAR, OnUpdateViewStatusBar)
56  ON_UPDATE_COMMAND_UI(ID_INDICATOR_LEFT, OnUpdateLeft)
57  ON_UPDATE_COMMAND_UI(ID_INDICATOR_RIGHT, OnUpdateRight)
58  ON_COMMAND(ID_MIKE_GRIDCONTROL, OnMikeGridcontrol)
59  ON_COMMAND(IDR_MENU_POPUP_TOGGLE1, OnMenuPopupToggle1)
60  ON_UPDATE_COMMAND_UI(IDR_MENU_POPUP_TOGGLE1, OnUpdateMenuPopupToggle1)
61  ON_WM_RBUTTONDOWN()
62  ON_COMMAND(ID_HELP_INPUT_INTERFACE, OnHelpInputInterface)
63  ON_WM_CLOSE()
64  ON_WM_INITMENU()
65  ON_COMMAND(ID_HELP_FINDER, OnFredHelp)
66  ON_COMMAND(ID_HELP, OnFredHelp)
67  //ON_COMMAND(ID_CONTEXT_HELP, OnFredHelp)
68  //ON_COMMAND(ID_DEFAULT_HELP, OnFredHelp)
69  //}}AFX_MSG_MAP
70  // Global help commands
71 END_MESSAGE_MAP()
72 
73 #define FRED_HELP_URL "\\data\\freddocs\\index.html"
74 
75 static UINT indicators[] =
76 {
77  ID_SEPARATOR, // status line indicator
78  ID_SEPARATOR,
79  ID_SEPARATOR,
81  ID_SEPARATOR,
82 // ID_INDICATOR_LEFT,
83 // ID_INDICATOR_RIGHT,
84 // ID_INDICATOR_CAPS,
85 // ID_INDICATOR_NUM,
86 // ID_INDICATOR_SCRL,
87 };
88 
89 CMainFrame *Fred_main_wnd;
91 
93 // CMainFrame construction/destruction
94 
96 {
97 }
98 
100 {
101 }
102 
103 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
104 {
105  int z;
106  CRect rect;
107 
108  if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
109  return -1;
110 
111  if (!m_wndToolBar.Create(this) ||
112  !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
113  {
114  TRACE0("Failed to create toolbar\n");
115  return -1; // fail to create
116  }
117 
118  // Create the combo box
119  z = m_wndToolBar.CommandToIndex(ID_NEW_SHIP_TYPE);
120  Assert(z != -1);
121  m_wndToolBar.SetButtonInfo(z, ID_NEW_SHIP_TYPE, TBBS_SEPARATOR, 230);
122 
123  // Design guide advises 12 pixel gap between combos and buttons
124 // m_wndToolBar.SetButtonInfo(1, ID_SEPARATOR, TBBS_SEPARATOR, 12);
125  m_wndToolBar.GetItemRect(z, &rect);
126  rect.top = 3;
127  rect.bottom = rect.top + 550;
128  if (!m_new_ship_type_combo_box.Create(CBS_DROPDOWNLIST | WS_VISIBLE | WS_VSCROLL | CBS_HASSTRINGS | LBS_OWNERDRAWFIXED,
129  rect, &m_wndToolBar, ID_NEW_SHIP_TYPE))
130  {
131  TRACE0("Failed to create new ship type combo-box\n");
132  return FALSE;
133  }
134 
135 /* if (!m_wndStatusBar.Create(this) ||
136  !m_wndStatusBar.SetIndicators(indicators,
137  sizeof(indicators)/sizeof(UINT)))
138  {
139  TRACE0("Failed to create status bar\n");
140  return -1; // fail to create
141  }
142 */
143 
144 /* if (!m_wndStatusBar.Create(this,
145  WS_CHILD | WS_VISIBLE | CBRS_BOTTOM, ID_MY_STATUS_BAR) ||
146  !m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT)))*/
147 
148  if (!m_wndStatusBar.Create(this) ||
149  !m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT)))
150  {
151  TRACE0("Failed to create status bar\n");
152  return -1;
153 
154  } else {
155  m_wndStatusBar.SetPaneInfo(0, 0, SBPS_STRETCH, 0);
156  m_wndStatusBar.SetPaneInfo(1, 0, SBPS_NORMAL, 80);
157  m_wndStatusBar.SetPaneInfo(2, 0, SBPS_NORMAL, 180);
158 // m_wndStatusBar.SetPaneInfo(3, 0, SBPS_NORMAL, 100);
159  m_wndStatusBar.SetPaneInfo(4, 0, SBPS_NORMAL, 130);
160  }
161 
162  // TODO: Remove this if you don't want tool tips or a resizeable toolbar
163  m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |
164  CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
165 
166  // TODO: Delete these three lines if you don't want the toolbar to
167  // be dockable
168  m_wndToolBar.EnableDocking(CBRS_ALIGN_TOP | CBRS_ALIGN_BOTTOM);
169  EnableDocking(CBRS_ALIGN_ANY);
170  DockControlBar(&m_wndToolBar);
171 
172  Fred_main_wnd = this;
176  init_tools();
177  LoadBarState("Tools state");
178  return 0;
179 }
180 
182 {
183  // TODO: Modify the Window class or styles here by modifying
184  // the CREATESTRUCT cs
185 
186  return CFrameWnd::PreCreateWindow(cs);
187 }
188 
190 // CMainFrame diagnostics
191 
192 #ifdef _DEBUG
193 void CMainFrame::AssertValid() const
194 {
195  CFrameWnd::AssertValid();
196 }
197 
198 void CMainFrame::Dump(CDumpContext& dc) const
199 {
200  CFrameWnd::Dump(dc);
201 }
202 
203 #endif //_DEBUG
204 
205 //void CMainFrame::OnEditorsShips()
206 //{
207 // CShipEditorDlg dlg;
208 //
209 // dlg.DoModal();
210 //
211 //}
212 
214 {
215 }
216 
218 {
219 }
220 
222 {
223 }
224 
226 {
227 }
228 
230 {
231 }
232 
234 {
235 }
236 
238 {
239 }
240 
242 {
243  CMissionNotesDlg dlg;
244 
245  dlg.DoModal();
246 }
247 
248 // I have been unable to get this message event to occur.
249 void CMainFrame::OnLButtonUp(UINT nFlags, CPoint point)
250 {
251  CFrameWnd::OnLButtonUp(nFlags, point);
252 }
253 
254 // This event is invoked when you click on the black X in the upper right corner
255 // or when you do File/Exit.
257 {
258  Fred_main_wnd = NULL;
259  CFrameWnd::OnDestroy();
260 }
261 
263 {
264  m_wndStatusBar.ShowWindow((m_wndStatusBar.GetStyle() & WS_VISIBLE) == 0);
265  RecalcLayout();
266 }
267 
269 {
270  pCmdUI->SetCheck((m_wndStatusBar.GetStyle() & WS_VISIBLE) != 0);
271 }
272 
273 void CMainFrame::OnUpdateLeft(CCmdUI* pCmdUI)
274 {
275  pCmdUI->Enable(::GetKeyState(VK_LBUTTON) < 0);
276 }
277 
278 void CMainFrame::OnUpdateRight(CCmdUI* pCmdUI)
279 {
280  pCmdUI->Enable(::GetKeyState(VK_RBUTTON) < 0);
281 }
282 
284 {
285  CGrid dlg;
286 
287  dlg.DoModal();
288 }
289 
290 int Toggle1_var = 0;
291 
293 {
294  if (Toggle1_var == 0)
295  Toggle1_var = 1;
296  else
297  Toggle1_var = 0;
298 
299 }
300 
302 {
303  pCmdUI->SetCheck(Toggle1_var);
304 }
305 
307 {
308  CMenu menu;
309  CPoint point;
310 
311  point = * ((CPoint*) lParam);
312 
313  ClientToScreen(&point);
314 
315  menu.LoadMenu(IDR_MENU1);
316  menu.GetSubMenu(0)->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, this);
317 
318  return 0L;
319 }
320 
322 
323 void CMainFrame::OnRButtonDown(UINT nFlags, CPoint point)
324 {
325  Global_point2 = point;
326 
327  PostMessage(WM_MENU_POPUP_TEST, nFlags, (int) &Global_point2);
328  CFrameWnd::OnRButtonDown(nFlags, point);
329 }
330 
332 {
333  dialog1 dlg;
334 
335  dlg.DoModal();
336 }
337 
339 {
341  SaveBarState("Tools state");
342  CFrameWnd::OnClose();
343 }
344 
346 {
347  //int highest_terran_index;
348  //char ship_name[256];
349  //int ship_index;
350 
351  // some bizarre Volition check:
352  static int count = 0;
353  count++;
354  if (count == 1) {
355  return;
356  } else if (count >= 3) {
357  Warning(LOCATION, "CMainFrame::init_tools was called more than twice! Trace out and fix.");
358  return;
359  }
360 
361  for (auto it = Ship_info.cbegin(); it != Ship_info.cend(); ++it){
362  // don't add the pirate ship
363  if(it->flags & SIF_NO_FRED){
364  m_new_ship_type_combo_box.AddString("");
365  continue;
366  }
367 
368  m_new_ship_type_combo_box.AddString(it->name);
369  }
370 
371 // m_new_ship_type_combo_box.AddString("Player Start");
372  m_new_ship_type_combo_box.AddString("Jump Node");
373  m_new_ship_type_combo_box.AddString("Waypoint");
374 
375  /*
376  // now we want to sort special ships (mission disk) ----------------------
377  highest_terran_index = 0;
378  memset(ship_name, 0, 256);
379  while(m_new_ship_type_combo_box.GetLBText(highest_terran_index, ship_name) != CB_ERR){
380  ship_index = ship_info_lookup(ship_name);
381  if((ship_index < 0) || (ship_index >= Num_ship_classes) || (Ship_info[ship_index].species != 0)){
382  break;
383  }
384  highest_terran_index++;
385  }
386  */
387  m_new_ship_type_combo_box.SetCurSel(0);
388 }
389 
391 {
392  if (Fred_view_wnd)
393  Fred_view_wnd->SetFocus();
394 }
395 
396 void color_combo_box::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
397 {
398  int m_cyText = 24, z;
399  CString strText;
400  char ship_name[256];
401 
402  // You must override DrawItem and MeasureItem for LBS_OWNERDRAWVARIABLE
403  ASSERT((GetStyle() & (LBS_OWNERDRAWFIXED | CBS_HASSTRINGS)) ==
404  (LBS_OWNERDRAWFIXED | CBS_HASSTRINGS));
405 
406  CDC* pDC = CDC::FromHandle(lpDrawItemStruct->hDC);
407 
408  // I think we need to do a lookup by ship name here
409  if(lpDrawItemStruct->itemID >= Ship_info.size()){
410  z = lpDrawItemStruct->itemID;
411  } else {
412  memset(ship_name, 0, 256);
413  GetLBText(lpDrawItemStruct->itemID, ship_name);
414  z = ship_info_lookup(ship_name);
415  }
416 
417  if ((z >= 0) && (lpDrawItemStruct->itemAction & (ODA_DRAWENTIRE | ODA_SELECT)))
418  {
419  int cyItem = GetItemHeight(z);
420  BOOL fDisabled = !IsWindowEnabled();
421 
422  COLORREF newTextColor = RGB(0x80, 0x80, 0x80); // light gray
423  if (!fDisabled)
424  {
425  if (z >= static_cast<int>(Ship_info.size()))
426  newTextColor = RGB(0, 0, 0);
427  else
428  {
429  species_info *sinfo = &Species_info[Ship_info[z].species];
430  newTextColor = RGB(sinfo->fred_color.rgb.r, sinfo->fred_color.rgb.g, sinfo->fred_color.rgb.b);
431  }
432  }
433 
434  COLORREF oldTextColor = pDC->SetTextColor(newTextColor);
435  COLORREF newBkColor = GetSysColor(COLOR_WINDOW);
436  COLORREF oldBkColor = pDC->SetBkColor(newBkColor);
437 
438  if (newTextColor == newBkColor)
439  newTextColor = RGB(0xC0, 0xC0, 0xC0); // dark gray
440 
441  if (!fDisabled && ((lpDrawItemStruct->itemState & ODS_SELECTED) != 0))
442  {
443  pDC->SetTextColor(GetSysColor(COLOR_HIGHLIGHTTEXT));
444  pDC->SetBkColor(GetSysColor(COLOR_HIGHLIGHT));
445  }
446 
447  if (m_cyText == 0)
448  VERIFY(cyItem >= CalcMinimumItemHeight());
449 
451  strText = _T("Jump Node");
452  else if (z == Id_select_type_start)
453  strText = _T("Player Start");
454  else if (z == Id_select_type_waypoint)
455  strText = _T("Waypoint");
456  else
457  strText = _T(Ship_info[z].name);
458 // GetLBText(lpDrawItemStruct->itemID, strText);
459 
460  pDC->ExtTextOut(lpDrawItemStruct->rcItem.left,
461  lpDrawItemStruct->rcItem.top + max(0, (cyItem - m_cyText) / 2),
462  ETO_OPAQUE, &(lpDrawItemStruct->rcItem), strText, strText.GetLength(), NULL);
463 
464  pDC->SetTextColor(oldTextColor);
465  pDC->SetBkColor(oldBkColor);
466  }
467 
468  if ((lpDrawItemStruct->itemAction & ODA_FOCUS) != 0)
469  pDC->DrawFocusRect(&(lpDrawItemStruct->rcItem));
470 }
471 
472 int color_combo_box::CalcMinimumItemHeight()
473 {
474  int nResult = 1;
475 
476  if ((GetStyle() & (LBS_HASSTRINGS | LBS_OWNERDRAWFIXED)) ==
477  (LBS_HASSTRINGS | LBS_OWNERDRAWFIXED))
478  {
479  CClientDC dc(this);
480  CFont* pOldFont = dc.SelectObject(GetFont());
481  TEXTMETRIC tm;
482  VERIFY (dc.GetTextMetrics ( &tm ));
483  dc.SelectObject(pOldFont);
484 
485  nResult = tm.tmHeight;
486  }
487 
488  return nResult;
489 }
490 
491 void color_combo_box::MeasureItem(LPMEASUREITEMSTRUCT)
492 {
493  // You must override DrawItem and MeasureItem for LBS_OWNERDRAWVARIABLE
494  ASSERT((GetStyle() & (LBS_OWNERDRAWFIXED | CBS_HASSTRINGS)) ==
495  (LBS_OWNERDRAWFIXED | CBS_HASSTRINGS));
496 }
497 
498 int color_combo_box::SetCurSelNEW(int model_index)
499 {
500  if((model_index < 0) || (model_index >= static_cast<int>(Ship_info.size()))){
501  return SetCurSel(model_index);
502  }
503 
504  // lookup the ship name
505  return FindString(0, Ship_info[model_index].name);
506 }
507 
509 {
510  int cur_sel;
511  int ship_info;
512  char ship_name[256];
513  char *hmmm = ship_name;
514 
515  // see if we have a special item (>= Ship_info.size())
516  cur_sel = GetCurSel();
517  if(cur_sel >= static_cast<int>(Ship_info.size())){
518  return cur_sel;
519  }
520 
521  // otherwise lookup the ship by name
522  memset(ship_name, 0, 256);
523  if(GetLBText(cur_sel, hmmm) == CB_ERR){
524  return CB_ERR;
525  }
526  ship_info = ship_info_lookup(ship_name);
527  if((ship_info < 0) || (ship_info >= static_cast<int>(Ship_info.size()))){
528  return CB_ERR;
529  }
530  return ship_info;
531 }
532 
533 void CMainFrame::OnInitMenu(CMenu* pMenu)
534 {
535  int i;
536  CString str;
537  extern int ID_SHOW_IFF[MAX_IFFS];
538 
539  if (Undo_available && !FREDDoc_ptr->undo_desc[1].IsEmpty())
540  str = "Undo " + FREDDoc_ptr->undo_desc[1] + "\tCtrl+Z";
541  else
542  str = "Undo\tCtrl+Z";
543 
544  if (pMenu->GetMenuState(ID_EDIT_UNDO, MF_BYCOMMAND) != -1)
545  pMenu->ModifyMenu(ID_EDIT_UNDO, MF_BYCOMMAND, ID_EDIT_UNDO, str);
546 
547  // Goober5000 - do the IFF menu options
548  for (i = 0; i < MAX_IFFS; i++)
549  {
550  if (i < Num_iffs)
551  {
552  char text[NAME_LENGTH + 7];
553  sprintf(text, "Show %s", Iff_info[i].iff_name);
554 
555  pMenu->ModifyMenu(ID_SHOW_IFF[i], MF_BYCOMMAND | MF_STRING, ID_SHOW_IFF[i], text);
556  }
557  else
558  {
559  pMenu->DeleteMenu(ID_SHOW_IFF[i], MF_BYCOMMAND);
560  }
561  }
562 
563  CFrameWnd::OnInitMenu(pMenu);
564 }
565 
566 
567 void url_launch(char *url)
568 {
569  int r;
570 
571  r = (int) ShellExecute(NULL, "open", url, NULL, NULL, SW_SHOW);
572  if (r < 32) {
573  const char *txt = NULL;
574 
575  switch (r) {
576  case 0: txt = XSTR("The operating system is out of memory or resources.", 1107); break;
577  case ERROR_BAD_FORMAT: txt = XSTR("The .EXE file is invalid (non-Win32 .EXE or error in .EXE image).", 1108); break;
578  case SE_ERR_ACCESSDENIED: txt = XSTR("The operating system denied access to the specified file. ", 1109); break;
579  case SE_ERR_ASSOCINCOMPLETE: txt = XSTR("The filename association is incomplete or invalid.\r\n(You need to have a default Internet browser installed)", 1110); break;
580  case SE_ERR_DDEBUSY: txt = XSTR("The DDE transaction could not be completed because other DDE transactions were being processed.", 1111); break;
581  case SE_ERR_DDEFAIL: txt = XSTR("The DDE transaction failed.", 1112); break;
582  case SE_ERR_DDETIMEOUT: txt = XSTR("The DDE transaction could not be completed because the request timed out.", 1113); break;
583  case SE_ERR_DLLNOTFOUND: txt = XSTR("The specified dynamic-link library was not found.", 1114); break;
584  case SE_ERR_OOM: txt = XSTR("There was not enough memory to complete the operation.", 1115); break;
585  case SE_ERR_SHARE: txt = XSTR("A sharing violation occurred.", 1116); break;
586 
587  // No browser installed message
588  case SE_ERR_NOASSOC:
589  case ERROR_FILE_NOT_FOUND:
590  case ERROR_PATH_NOT_FOUND: txt = XSTR("\r\nUnable to locate Fred Help file: \\data\\freddocs\\index.html\r\n", 1479); break;
591 
592  default: txt = XSTR("Unknown error occurred.", 1118); break;
593  }
594  AfxMessageBox(txt, MB_OK | MB_ICONERROR);
595  }
596 }
597 
598 
600 {
601  char buffer[_MAX_PATH];
602 
603  // get exe path
604  strcpy_s(buffer, Fred_exe_dir);
605 
606  // strip exe name
607  char *last_slash = strrchr(buffer, '\\');
608  if ( last_slash == NULL) {
609  return;
610  } else {
611  *last_slash = 0;
612  }
613 
614  // add rest of path
615  strcat_s(buffer, FRED_HELP_URL);
616 
617  // shell_open url
618  url_launch(buffer);
619 }
620 
afx_msg void OnFileMissionnotes()
Definition: mainfrm.cpp:241
#define ID_EDITORS_ART
Definition: resource.h:1204
int ship_info_lookup(const char *token)
Definition: ship.cpp:12772
int i
Definition: multi_pxo.cpp:466
CFREDApp theApp
Definition: fred.cpp:115
color_combo_box m_new_ship_type_combo_box
Definition: mainfrm.cpp:90
afx_msg void OnEditorsMusic()
Definition: mainfrm.cpp:225
int Id_select_type_waypoint
Definition: fredview.cpp:112
#define IDR_MENU_POPUP_TOGGLE1
Definition: resource.h:1226
int Toggle1_var
Definition: mainfrm.cpp:290
CShipEditorDlg Ship_editor_dialog
Definition: fred.cpp:55
#define ID_NEW_SHIP_TYPE
Definition: resource.h:1364
#define ID_EDITORS_TERRAIN
Definition: resource.h:1212
afx_msg void OnViewStatusBar()
Definition: mainfrm.cpp:262
afx_msg void OnEditorsGoals()
Definition: mainfrm.cpp:217
#define FRED_HELP_URL
Definition: mainfrm.cpp:73
void _cdecl void void _cdecl void _cdecl Warning(char *filename, int line, SCP_FORMAT_STRING const char *format,...) SCP_FORMAT_STRING_ARGS(3
Assert(pm!=NULL)
int Id_select_type_jump_node
Definition: fredview.cpp:110
CString undo_desc[BACKUP_DEPTH+1]
Definition: freddoc.h:49
#define WM_MENU_POPUP_TEST
Definition: mainfrm.h:14
union species_info::@265 fred_color
#define _MAX_PATH
Definition: config.h:221
void write_ini_file(int degree=0)
Definition: fred.cpp:552
#define WM_MENU_POPUP_EDIT
Definition: fredview.h:17
afx_msg void OnUpdateViewStatusBar(CCmdUI *pCmdUI)
Definition: mainfrm.cpp:268
UINT WPARAM wParam
Definition: msacm.h:1064
afx_msg void OnUpdateMenuPopupToggle1(CCmdUI *pCmdUI)
Definition: mainfrm.cpp:301
CMainFrame * Fred_main_wnd
Definition: mainfrm.cpp:89
void init_tools()
Definition: mainfrm.cpp:345
UINT WPARAM LPARAM lParam
Definition: msacm.h:1064
virtual ~CMainFrame()
Definition: mainfrm.cpp:99
unsigned int UINT
Definition: config.h:82
#define ID_EDITORS_SOUND
Definition: resource.h:1211
#define ID_INDICATOR_MODIFIED
Definition: resource.h:1467
iff_info Iff_info[MAX_IFFS]
Definition: iff_defs.cpp:20
afx_msg void OnMenuPopupToggle1()
Definition: mainfrm.cpp:292
CMainFrame()
Definition: mainfrm.cpp:95
typedef int(SCP_EXT_CALLCONV *SCPDLL_PFVERSION)(SCPDLL_Version *)
int Undo_available
Definition: freddoc.cpp:92
GLdouble GLdouble GLdouble r
Definition: Glext.h:5337
int GetCurSelNEW()
Definition: mainfrm.cpp:508
afx_msg void OnUpdateRight(CCmdUI *pCmdUI)
Definition: mainfrm.cpp:278
afx_msg void OnLButtonUp(UINT nFlags, CPoint point)
Definition: mainfrm.cpp:249
afx_msg void OnClose()
Definition: mainfrm.cpp:338
sprintf(buf,"(%f,%f,%f)", v3->xyz.x, v3->xyz.y, v3->xyz.z)
GLdouble GLdouble z
Definition: Glext.h:5451
int ID_SHOW_IFF[MAX_IFFS]
Definition: fredview.cpp:129
#define ID_MIKE_GRIDCONTROL
Definition: resource.h:1217
CToolBar m_wndToolBar
Definition: mainfrm.h:50
GLuint buffer
Definition: Glext.h:5492
#define MB_OK
Definition: config.h:179
#define IDR_MENU1
Definition: resource.h:46
CStatusBar m_wndStatusBar
Definition: mainfrm.h:51
#define ID_INDICATOR_RIGHT
Definition: resource.h:1466
CFREDDoc * FREDDoc_ptr
Definition: freddoc.cpp:90
afx_msg void OnEditorsShipClasses()
Definition: mainfrm.cpp:229
void url_launch(char *url)
Definition: mainfrm.cpp:567
int SetCurSelNEW(int model_index)
Definition: mainfrm.cpp:498
CPoint Global_point2
Definition: mainfrm.cpp:321
#define MB_ICONERROR
Definition: config.h:190
#define IDR_MAINFRAME
Definition: resource.h:13
#define ID_EDITORS_SHIP_CLASSES
Definition: resource.h:1207
CFREDView * Fred_view_wnd
Definition: fredview.cpp:138
afx_msg void OnHelpInputInterface()
Definition: mainfrm.cpp:331
afx_msg void OnUpdateLeft(CCmdUI *pCmdUI)
Definition: mainfrm.cpp:273
const char * XSTR(const char *str, int index)
Definition: localize.cpp:851
#define ID_FILE_MISSIONNOTES
Definition: resource.h:1184
long LONG
Definition: config.h:95
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct)
Definition: mainfrm.cpp:103
wing_editor Wing_editor_dialog
Definition: fred.cpp:56
GLuint const GLchar * name
Definition: Glext.h:5608
#define ID_EDITORS_AI_CLASSES
Definition: resource.h:1203
afx_msg void OnDestroy()
Definition: mainfrm.cpp:256
#define ID_HELP_INPUT_INTERFACE
Definition: resource.h:1258
int BOOL
Definition: config.h:80
LONG OnMenuPopupTest(UINT wParam, LONG lParam)
Definition: mainfrm.cpp:306
if(aifft_max_checks<=0)
Definition: aiturret.cpp:1581
afx_msg void OnEditorsAiClasses()
Definition: mainfrm.cpp:213
#define strcat_s(...)
Definition: safe_strings.h:68
afx_msg void OnInitMenu(CMenu *pMenu)
Definition: mainfrm.cpp:533
#define NAME_LENGTH
Definition: globals.h:15
#define ID_INDICATOR_LEFT
Definition: resource.h:1465
int Id_select_type_start
Definition: fredview.cpp:111
afx_msg void OnEditorsSound()
Definition: mainfrm.cpp:233
#define ID_EDITORS_GOALS
Definition: resource.h:1209
afx_msg void OnEditorsTerrain()
Definition: mainfrm.cpp:237
waypoint_path_dlg Waypoint_editor_dialog
Definition: fred.cpp:57
SCP_vector< ship_info > Ship_info
Definition: ship.cpp:164
#define LOCATION
Definition: pstypes.h:245
SCP_vector< species_info > Species_info
afx_msg void OnEditorsArt()
Definition: mainfrm.cpp:221
Definition: grid.h:15
GLint GLsizei count
Definition: Gl.h:1491
afx_msg void OnNewShipTypeChange()
Definition: mainfrm.cpp:390
#define MAX_IFFS
Definition: globals.h:34
int Num_iffs
Definition: iff_defs.cpp:19
afx_msg void OnRButtonDown(UINT nFlags, CPoint point)
Definition: mainfrm.cpp:323
struct species_info::@265::@266 rgb
virtual BOOL PreCreateWindow(CREATESTRUCT &cs)
Definition: mainfrm.cpp:181
#define ID_EDITORS_MUSIC
Definition: resource.h:1206
#define FALSE
Definition: pstypes.h:400
char Fred_exe_dir[512]
Definition: management.cpp:90
afx_msg void OnMikeGridcontrol()
Definition: mainfrm.cpp:283
#define SIF_NO_FRED
Definition: ship.h:914
afx_msg void OnFredHelp()
Definition: mainfrm.cpp:599
#define strcpy_s(...)
Definition: safe_strings.h:67