long GroundEditGUI::HandlePageChange(NativeControl Handle, NativeGUIWin NW, int CtrlID, long NewPageID) { // Material GUI ShowMaterialPopDrop(false); switch (CtrlID) { case IDC_TAB1: { switch (NewPageID) { case 1: { ShowPanel(0, 1); break; } // 1 default: { ShowPanel(0, 0); NewPageID = 0; break; } // 0 } // switch ActivePage = NewPageID; break; } default: break; } // switch return(0); } // GroundEditGUI::HandlePageChange
long CmapEditGUI::HandlePageChange(NativeControl Handle, NativeGUIWin NW, int CtrlID, long NewPageID) { switch (CtrlID) { case IDC_TAB1: { switch (NewPageID) { case 1: { ShowPanel(0, 1); break; } // 1 default: { ShowPanel(0, 0); NewPageID = 0; break; } // 0 } // switch ActivePage = NewPageID; break; } default: break; } // switch return(0); } // CmapEditGUI::HandlePageChange
long ProjectPrefsGUI::HandlePageChange(NativeControl Handle, NativeGUIWin NW, int CtrlID, long NewPageID) { switch (CtrlID) { case IDC_TAB1: { switch (NewPageID) { case 1: { ShowPanel(0, 1); break; } // 1 case 2: { ShowPanel(0, 2); break; } // 2 case 3: { ShowPanel(0, 3); break; } // 3 case 4: { ShowPanel(0, 4); break; } // 4 case 5: { ShowPanel(0, 5); break; } // 5 case 6: { ShowPanel(0, 6); break; } // 6 case 7: { ShowPanel(0, 7); break; } // 7 default: { ShowPanel(0, 0); NewPageID = 0; break; } // 0 } // switch break; } } // switch ActivePage = NewPageID; return(0); } // ProjectPrefsGUI::HandlePageChange
NativeGUIWin CmapEditGUI::Construct(void) { int TabIndex, Pos; Raster *MyRast; if(!NativeWin) { NativeWin = CreateWinFromTemplate(WCS_FENETRE_GENERIC_EDIT_TEMPLATE, LocalWinSys()->RootWin); CreateSubWinFromTemplate(IDD_CMAP_GENERAL, 0, 0); CreateSubWinFromTemplate(IDD_CMAP_ECOSYSTEMS, 0, 1); if(NativeWin) { for (TabIndex = 0; TabIndex < WCS_CMAPGUI_NUMTABS; TabIndex ++) { WidgetTCInsertItem(IDC_TAB1, TabIndex, TabNames[TabIndex]); } // for WidgetTCSetCurSel(IDC_TAB1, ActivePage); WidgetCBInsert(IDC_IMAGEDROP, -1, "New Image Object..."); for (MyRast = GlobalApp->AppImages->GetFirstRast(); MyRast; MyRast = GlobalApp->AppImages->GetNextRast(MyRast)) { if(MyRast->MatchAttribute(WCS_RASTERSHELL_TYPE_GEOREF)) { Pos = WidgetCBInsert(IDC_IMAGEDROP, -1, MyRast->GetUserName()); WidgetCBSetItemData(IDC_IMAGEDROP, Pos, MyRast); } // if } // for ShowPanel(0, ActivePage); ConfigureWidgets(); } // if } // if return (NativeWin); } // CmapEditGUI::Construct
NativeGUIWin DEMEditGUI::Construct(void) { int TabIndex; if (!NativeWin) { NativeWin = CreateWinFromTemplate(WCS_FENETRE_GENERIC_EDIT_TEMPLATE, LocalWinSys()->RootWin); CreateSubWinFromTemplate(IDD_DEMEDIT_ELEV, 0, 0); #ifdef WCS_BUILD_VNS CreateSubWinFromTemplate(IDD_DEMEDIT_FILE_VNS, 0, 1); // this string is so long it bombs the Mac resource compiler, so we leave it blank until here and set it on the fly. WidgetSetText(IDC_STATIC_REGCOORD, "Registration Coordinates below are referenced to the Coordinate System selected above or in degrees if there is no selection. You can set the units and the way the values are displayed in the Preferences Editor (CTRL+=)."); #else // WCS_BUILD_VNS CreateSubWinFromTemplate(IDD_DEMEDIT_FILE, 0, 1); #endif // WCS_BUILD_VNS if (NativeWin) { for (TabIndex = 0; TabIndex < WCS_DEMGUI_NUMTABS; TabIndex ++) { WidgetTCInsertItem(IDC_TAB1, TabIndex, TabNames[TabIndex]); } // for WidgetTCSetCurSel(IDC_TAB1, ActivePage); ShowPanel(0, ActivePage); if (Active) NewDEMFile(); ConfigureWidgets(); } // if } // if return (NativeWin); } // DEMEditGUI::Construct
NativeGUIWin GroundEditGUI::Construct(void) { int TabIndex; if(!NativeWin) { NativeWin = CreateWinFromTemplate(WCS_FENETRE_GENERIC_EDIT_TEMPLATE, LocalWinSys()->RootWin); CreateSubWinFromTemplate(IDD_GROUND_GENERAL_VNS3, 0, 0); CreateSubWinFromTemplate(IDD_GROUND_MATERIAL_VNS3, 0, 1); if(NativeWin) { for (TabIndex = 0; TabIndex < WCS_GROUNDGUI_NUMTABS; TabIndex ++) { WidgetTCInsertItem(IDC_TAB1, TabIndex, TabNames[TabIndex]); } // for WidgetTCSetCurSel(IDC_TAB1, ActivePage); // material GUI MatGUI->Construct(WCS_GROUNDED_MATGRADSET, WCS_GROUNDED_MATGRADSET + 1); ShowPanel(0, ActivePage); ConfigureWidgets(); } // if } // if return (NativeWin); } // GroundEditGUI::Construct
NativeGUIWin EnvironmentEditGUI::Construct(void) { int TabIndex; if(!NativeWin) { NativeWin = CreateWinFromTemplate(WCS_FENETRE_GENERIC_EDIT_TEMPLATE, LocalWinSys()->RootWin); CreateSubWinFromTemplate(IDD_ENVIRONMENT_GENERAL_VNS, 0, 0); CreateSubWinFromTemplate(IDD_ENVIRONMENT_ECOSYSTEMS, 0, 1); CreateSubWinFromTemplate(IDD_ENVIRONMENT_BASIC, 0, 2); if(NativeWin) { for (TabIndex = 0; TabIndex < WCS_ENVIRONMENTGUI_NUMTABS; TabIndex ++) { WidgetTCInsertItem(IDC_TAB1, TabIndex, TabNames[TabIndex]); } // for WidgetTCSetCurSel(IDC_TAB1, ActivePage); ShowPanel(0, ActivePage); ConfigureWidgets(); } // if } // if return (NativeWin); } // EnvironmentEditGUI::Construct
void FoliageEffectFolFileEditGUI::SelectPanel(long PanelID) { switch(PanelID) { case 1: { ShowPanel(0, 1); break; } // 1 default: { ShowPanel(0, 0); break; } // None } // PanelID } // FoliageEffectFolFileEditGUI::SelectPanel
void MessagePanel ( panel_t *panel ) { panel->box.row_length = 0; /* force resizing */ panel->box.number_of_rows = 0; SetPanelSize ( panel ); ShowPanel ( panel ); }
TMIDICue::TMIDICue(int16 id, TCueChannel* parent, BRect bounds, uint32 startTime) : TCueView(id, parent, bounds, startTime, "MIDICue") { // Init member variables fEditor = NULL; fTrackList = new BList(); // Load MIDI file ShowPanel(); }
// -------------------------------------------------------------------------------- // void guAuiManagerPanel::OnPaneClose( wxAuiManagerEvent &event ) { wxAuiPaneInfo * PaneInfo = event.GetPane(); int PanelIndex = m_PanelNames.Index( PaneInfo->name ); if( PanelIndex != wxNOT_FOUND ) { guLogMessage( wxT( "OnPaneClose: %s %i" ), m_PanelNames[ PanelIndex ].c_str(), m_PanelCmdIds[ PanelIndex ] ); ShowPanel( m_PanelIds[ PanelIndex ], false ); } event.Veto(); }
status_t BJobSetupPanel::Go() { status_t status = ShowPanel(); if (status == B_OK) { // TODO: check if we did work on an real printer // TODO: set all selected values on printer object } if (Lock()) Quit(); return status; }
// -------------------------------------------------------------------------------- // void guAuiManagerPanel::LoadPerspective( const wxString &layoutstr, const unsigned int visiblepanels ) { int Index; int Count = m_PanelIds.Count(); for( Index = 0; Index < Count; Index++ ) { int PanelId = m_PanelIds[ Index ]; if( ( visiblepanels & PanelId ) != ( m_VisiblePanels & PanelId ) ) { ShowPanel( PanelId, ( visiblepanels & PanelId ) ); } } m_AuiManager.LoadPerspective( layoutstr, true ); }
void MessageBarPanel ( panel_t *panel ) { panel->box.row = Screen_rows - 1; panel->box.column = 0; panel->box.row_length = Screen_columns; panel->box.number_of_rows = 1; panel->control = 0; panel->control |= SHOW_ATTRIBUTES; panel->control |= SAVE_RESTORE; panel->control |= SHOW_TEXT; SetPanelSize ( panel ); ShowPanel ( panel ); ParkCursor(); }
// material GUI void GroundEditGUI::ShowMaterialPopDrop(bool ShowState) { if(ShowState) { // position and show ShowPanelAsPopDrop(IDC_POPDROP0, MatGUI->GetPanel(), 0, SubPanels[0][1]); WidgetShow(IDC_ANIMGRADIENT2, 0); // hide master gradient widget since it looks weird otherwise WidgetSetCheck(IDC_POPDROP0, true); } // if else { ShowPanel(MatGUI->GetPanel(), -1); // hide WidgetShow(IDC_ANIMGRADIENT2, QueryDisplayAdvancedUIVisibleState() ? true : false); // show master gradient widget WidgetSetCheck(IDC_POPDROP0, false); } // else } // GroundEditGUI::ShowMaterialPopDrop
TMovieCue::TMovieCue(entry_ref &theRef, int16 id, TCueChannel *parent, BRect bounds, uint32 startTime) : TVisualCue(id, parent, bounds, startTime, "PictureCue") { // Init member variables m_Editor = NULL; m_File = NULL; // // Attempt to load data file // BNode theNode(&theRef); if (theNode.InitCheck() != B_OK) return; BNodeInfo nodeInfo(&theNode); if (nodeInfo.InitCheck() != B_OK) return; // First, make sure we have a valid ref if ( IsVideo(nodeInfo) ) { // Create a BMessage that includes the entry_ref to send to our open routine BMessage *theMessage = new BMessage(B_REFS_RECEIVED); theMessage->AddRef("refs", &theRef); bool retVal = LoadMovieFile(theMessage); // We are succesful. Init the cue if (retVal) { Init(); } // If we have an error, ask the user to locate a new data file else { ShowPanel(); } } }
NativeGUIWin TerraffectorEditGUI::Construct(void) { int TabIndex; GeneralEffect *MyEffect; if(!NativeWin) { NativeWin = CreateWinFromTemplate(WCS_FENETRE_GENERIC_EDIT_TEMPLATE, LocalWinSys()->RootWin); #ifdef WCS_BUILD_VNS CreateSubWinFromTemplate(IDD_TERRAFFECTOR_GENERAL_VNS, 0, 0); #else // WCS_BUILD_VNS CreateSubWinFromTemplate(IDD_TERRAFFECTOR_GENERAL, 0, 0); #endif // WCS_BUILD_VNS CreateSubWinFromTemplate(IDD_TERRAFFECTOR_BASIC, 0, 1); CreateSubWinFromTemplate(IDD_TERRAFFECTOR_SLOPE, 0, 2); if(NativeWin) { for (TabIndex = 0; TabIndex < WCS_TERRAFFECTORGUI_NUMTABS; TabIndex ++) { WidgetTCInsertItem(IDC_TAB1, TabIndex, TabNames[TabIndex]); } // for WidgetTCSetCurSel(IDC_TAB1, ActivePage); WidgetCBInsert(IDC_ECODROP, -1, "New Ecosystem..."); for (MyEffect = EffectsHost->GetListPtr(WCS_EFFECTSSUBCLASS_ECOSYSTEM); MyEffect; MyEffect = MyEffect->Next) { TabIndex = WidgetCBInsert(IDC_ECODROP, -1, MyEffect->GetName()); WidgetCBSetItemData(IDC_ECODROP, TabIndex, MyEffect); } // for ShowPanel(0, ActivePage); ConfigureWidgets(); } // if } // if return (NativeWin); } // TerraffectorEditGUI::Construct
uint MenuPanel ( register panel_t *panel ) { int key = ESCAPE, choice; uint row = panel->box.row, column = panel->box.column, max_string_length; char **line = panel->text_line; bool finished = FALSE; ShowPanel ( panel ); if ( panel->box.number_of_text_rows == 0 ) { return key; /* early exit */ } max_string_length = panel->box.row_length; if ( panel->control & HAS_BORDER ) { ++row; ++column; max_string_length -= 2; } choice = ValidatePanelChoice ( panel, DOWN_CURSOR ); ReverseAttributes ( row + choice, column, max_string_length, 1 ); if ( line [choice][0] == NOT_SELECTABLE_CHAR ) { /* none selectable */ finished = TRUE; } while ( ! finished ) { key = GetKeystroke (); switch ( key ) { case UP_CURSOR: if ( choice > 0 ) { ReverseAttributes ( row + choice, column, max_string_length, 1 ); --panel->choice; choice = ValidatePanelChoice ( panel, UP_CURSOR ); ReverseAttributes ( row + choice, column, max_string_length, 1 ); } break; case DOWN_CURSOR: if ( line [choice + 1] ) { ReverseAttributes ( row + choice, column, max_string_length, 1 ); ++panel->choice; choice = ValidatePanelChoice ( panel, DOWN_CURSOR ); ReverseAttributes ( row + choice, column, max_string_length, 1 ); } break; case HELP: if ( panel->help.routine ) { panel->help.routine ( panel ); } break; default: finished = TRUE; } } panel->choice = choice; /* update it */ return key; }
uint ScrollingPanel ( panel_t *panel ) { int key = ESCAPE; uint row = panel->box.row, row_count, number_of_text_rows, save_control, column = panel->box.column; char **original_text_line = panel->text_line, **top_line = panel->text_line, **bottom_line; bool finished = FALSE; SetPanelSize ( panel ); number_of_text_rows = panel->box.number_of_text_rows; if ( number_of_text_rows == 0 ) { return key; /* early exit */ } save_control = panel->control; if ( panel->control & HAS_BORDER ) { ++row; ++column; } if ( panel->control & IS_SCROLLABLE ) { panel->control |= SHOW_SCROLL_BAR; } else { panel->control &= ~SHOW_SCROLL_BAR; } panel->text_line = top_line; bottom_line = top_line; for ( row_count = 1; row_count < number_of_text_rows; ++row_count ) { if ( *(bottom_line + 1) ) { ++bottom_line; } else { break; } } ShowPanel ( panel ); panel->control &= ~SHOW_NON_TEXT_ITEMS; /* just need to show text */ while ( ! finished ) { key = GetKeystroke (); switch ( key ) { case UP_CURSOR: if ( top_line > original_text_line ) { --top_line; --bottom_line; } break; case DOWN_CURSOR: if ( *(bottom_line + 1) ) { ++top_line; ++bottom_line; } break; case DOWNPAGE: row_count = 0; for ( ; *bottom_line; ++bottom_line, ++top_line ) { if ( ++row_count >= number_of_text_rows ) { break; /* last window line */ } if ( ! *(bottom_line + 1) ) { /* no more lines */ break; } } break; case UPPAGE: row_count = 0; while ( top_line > original_text_line ) { if ( ++row_count >= number_of_text_rows ) { break; /* 1 page of lines */ } --top_line; --bottom_line; } break; case TOP_OF_FILE: while ( top_line > original_text_line ) { --top_line; --bottom_line; } break; case END_OF_FILE: while ( *(bottom_line + 1) ) { ++top_line; ++bottom_line; } break; case ESCAPE: finished = TRUE; break; case HELP: if ( panel->help.routine ) { panel->help.routine ( panel ); } break; } panel->text_line = top_line; ShowPanel ( panel ); } panel->text_line = original_text_line; /* restore values */ panel->control = save_control; return key; }
TMovieCue::TMovieCue(int16 id, TCueChannel *parent, BRect bounds, uint32 startTime) : TVisualCue(id, parent, bounds, startTime, "MovieCue") { // Load picture file ShowPanel(); }
int ScrollingMenuPanel ( register panel_t *panel ) { int key = ESCAPE, direction; uint row, row_count, max_string_length, number_of_text_rows, save_control, save_border_attribute = panel->box.border_attribute, column; char **original_text_line = panel->text_line, **top_line, **current_line, **bottom_line; bool finished = FALSE; uint (* _System callback) (panel_t *panel) = panel->callback; if ( panel->control & INITIALIZE_PANEL ) { panel->control &= ~INITIALIZE_PANEL; top_line = original_text_line; while ( *top_line && **top_line == NOT_SELECTABLE_CHAR ) { if ( *++top_line == NULL ) { --top_line; break; } } panel->top_line = top_line; panel->current_line = top_line; } SetPanelSize ( panel ); number_of_text_rows = panel->box.number_of_text_rows; if ( number_of_text_rows == 0 ) { return key; /* early exit */ } if ( panel->control & HIGHLIGHT_BORDER_LINE ) { panel->box.border_attribute |= HIGHLIGHTED_FG; } save_control = panel->control; if ( panel->control & IS_SCROLLABLE ) { panel->control |= SHOW_SCROLL_BAR; } else { panel->control &= ~SHOW_SCROLL_BAR; } row = panel->box.row; column = panel->box.column; top_line = panel->top_line; current_line = panel->current_line; max_string_length = panel->box.row_length; if ( panel->control & HAS_BORDER ) { ++row; ++column; max_string_length -= 2; } panel->text_line = top_line; bottom_line = top_line; for ( row_count = 1; row_count < number_of_text_rows; ++row_count ) { if ( *(bottom_line + 1) ) { ++bottom_line; } else { break; } } ShowPanel ( panel ); panel->control &= ~SHOW_NON_TEXT_ITEMS; /* just need to show text */ if ( panel->control & HAS_NON_SELECTABLE_LINE ) { panel->control |= SHOW_ATTRIBUTES; } if ( callback ) { panel->text_line = original_text_line; /* restore value */ panel->choice = current_line - original_text_line; callback ( panel ); } row += current_line - top_line; ReverseAttributes ( row, column, max_string_length, 1 ); /* on */ while ( ! finished ) { key = GetKeystroke (); ReverseAttributes ( row, column, max_string_length, 1 ); /* off */ switch ( key ) { case UP_CURSOR: if ( current_line > original_text_line ) { if ( current_line == top_line ) { --top_line; --bottom_line; } else { --row; } --current_line; } direction = UP_CURSOR; break; case DOWN_CURSOR: if ( *(current_line + 1) ) { if ( current_line == bottom_line ) { ++top_line; ++bottom_line; } else { ++row; } ++current_line; } direction = DOWN_CURSOR; break; case DOWNPAGE: row_count = 1; for ( ; row_count < number_of_text_rows; ++row_count ) { if ( ! *(bottom_line + 1) ) { /* no more lines */ break; } ++top_line; ++bottom_line; ++current_line; } direction = DOWN_CURSOR; break; case UPPAGE: row_count = 0; while ( top_line > original_text_line ) { if ( ++row_count >= number_of_text_rows ) { break; /* 1 page of lines */ } --top_line; --bottom_line; --current_line; } direction = UP_CURSOR; break; case TOP_OF_FILE: while ( top_line > original_text_line ) { --top_line; --bottom_line; --current_line; } while ( current_line > top_line ) { --current_line; --row; } direction = UP_CURSOR; break; case END_OF_FILE: while ( *(bottom_line + 1) ) { ++top_line; ++bottom_line; ++current_line; } while ( current_line < bottom_line ) { ++current_line; ++row; } direction = DOWN_CURSOR; break; case HELP: if ( panel->help.routine ) { panel->help.routine ( panel ); } direction = 0; break; default: direction = 0; finished = TRUE; } switch ( direction ) { /* skip over non-selectable lines */ case UP_CURSOR: while ( **current_line == NOT_SELECTABLE_CHAR ) { if ( current_line > original_text_line ) { if ( current_line == top_line ) { --top_line; --bottom_line; } else { --row; } --current_line; } else { break; } } while ( **current_line == NOT_SELECTABLE_CHAR ) { if ( *(current_line + 1) ) { if ( current_line == bottom_line ) { ++top_line; ++bottom_line; } else { ++row; } ++current_line; } else { break; } } break; case DOWN_CURSOR: while ( **current_line == NOT_SELECTABLE_CHAR ) { if ( *(current_line + 1) ) { if ( current_line == bottom_line ) { ++top_line; ++bottom_line; } else { ++row; } ++current_line; } else { break; } } while ( **current_line == NOT_SELECTABLE_CHAR ) { if ( current_line > original_text_line ) { if ( current_line == top_line ) { --top_line; --bottom_line; } else { --row; } --current_line; } else { break; } } break; default: ; } if ( panel->top_line != top_line ) { panel->top_line = top_line; panel->text_line = top_line; ShowPanel ( panel ); } ReverseAttributes ( row, column, max_string_length, 1 ); /* on */ if ( ! finished ) { if ( callback ) { panel->text_line = original_text_line; /* restore values */ panel->top_line = top_line; /* update values */ panel->current_line = current_line; panel->choice = current_line - original_text_line; callback ( panel ); } } } panel->top_line = top_line; /* update values */ panel->current_line = current_line; panel->choice = current_line - original_text_line; panel->control = save_control; /* restore values */ panel->box.border_attribute = save_border_attribute; panel->text_line = original_text_line; if ( panel->control & TURN_OFF_LIGHT_BAR ) { ReverseAttributes ( row, column, max_string_length, 1 ); /* off */ } if ( panel->control & HIGHLIGHT_BORDER_LINE ) { ShowOutline ( &panel->box ); } return key; }
uint UserDefinedMenuPanel ( register panel_t *panel, uint count_menu_items, /* number of menu items */ uint *menu_item_action, /* pointer to array of menu item action */ char char_for_selection1, /* character to show selected menu item */ char char_for_selection2) /* character to show selected menu item */ { int key = 0, i; uint row = panel->box.row, column = panel->box.column, max_string_length; uint *action; char **line = panel->text_line; uint (* _System callback) (panel_t *panel) = panel->callback; bool finished = FALSE; uint grayed_attribute, normal_attribute; ShowPanel ( panel ); if ( panel->box.number_of_text_rows == 0 ) { return key; /* early exit */ } max_string_length = panel->box.row_length; if ( panel->control & HAS_BORDER ) { ++row; ++column; max_string_length -= 2; } if (callback == NULL) /* must have callback routine */ finished = TRUE; grayed_attribute = normal_attribute = panel->box.attribute; if ( grayed_attribute & HIGHLIGHTED_FG ) { grayed_attribute &= ~HIGHLIGHTED_FG; /* just dim it */ } else { grayed_attribute &= 0xF0; /* zero foreground */ grayed_attribute |= GRAY_FG; /* make it gray */ } while ( ! finished ) { switch ( key ) { case HELP: if ( panel->help.routine ) { panel->help.routine ( panel ); } break; /* case UP_CURSOR: */ /* case DOWN_CURSOR: */ /* case SPACE: */ default: /* call back */ if (key) { panel->choice = (uint)key; /* notify caller a key was pressed */ finished = (bool)callback(panel); /* callback routine must update "choice" */ } /* the caller must set the state for each of the menu items */ for (i=0, action=menu_item_action; i<count_menu_items; i++, action++) { if (*action & ACTION_NONE) continue; /* leave the menu item as is */ if (*action & ACTION_REDRAW) /* redraw this menu item */ DisplayString ( line[i], row+i, column, max_string_length ); if (*action & ACTION_DESELECT) { DisplayChars(' ', row+i, column, 1, 1); if (char_for_selection2) DisplayChars(' ', row+i, column + strlen(line[i])-1, 1, 1); } if (*action & ACTION_SELECT) { DisplayChars(char_for_selection1, row+i, column, 1, 1); if (char_for_selection2) DisplayChars(char_for_selection2, row+i, column + strlen(line[i])-1, 1, 1); } if (*action & ACTION_SET_NOT_SELECTABLE) DisplayAttributes (row+i, column, max_string_length, 1, grayed_attribute ); if (*action & ACTION_SET_SELECTABLE) DisplayAttributes (row+i, column, max_string_length, 1, normal_attribute ); if (*action & (ACTION_HIGHLIGHT | ACTION_UNHIGHLIGHT)) ReverseAttributes ( row+i, column, max_string_length, 1); } break; } if (! finished) key = GetKeystroke (); } return key; }
NativeGUIWin ProjectPrefsGUI::Construct(void) { int TabIndex; if (!NativeWin) { NativeWin = CreateWinFromTemplate(IDD_PREFS, LocalWinSys()->RootWin); CreateSubWinFromTemplate(IDD_PREFS_GENERAL, 0, 0); CreateSubWinFromTemplate(IDD_PREFS_VIEWPORTS, 0, 1); CreateSubWinFromTemplate(IDD_PREFS_PROJECT, 0, 2); CreateSubWinFromTemplate(IDD_PREFS_INTERACT, 0, 3); CreateSubWinFromTemplate(IDD_PREFS_UNITS, 0, 4); CreateSubWinFromTemplate(IDD_PREFS_PATHS, 0, 5); #ifdef WCS_BUILD_V2 CreateSubWinFromTemplate(IDD_PREFS_DEMDIRS_VNS, 0, 6); #else // !WCS_BUILD_V2 CreateSubWinFromTemplate(IDD_PREFS_DEMDIRS, 0, 6); #endif // !WCS_BUILD_V2 CreateSubWinFromTemplate(IDD_PREFS_CONFIG, 0, 7); if (NativeWin) { WidgetCBAddEnd(IDC_FRAMERATEDROP, "NTSC Video"); WidgetCBAddEnd(IDC_FRAMERATEDROP, "PAL Video"); WidgetCBAddEnd(IDC_FRAMERATEDROP, "Film"); WidgetCBAddEnd(IDC_FRAMERATEDROP, "Custom"); for(TabIndex = WCS_USEFUL_UNIT_MILLIMETER; TabIndex <= WCS_USEFUL_UNIT_FEET_US_SURVEY; TabIndex ++) { WidgetCBAddEnd(IDC_DISTANCEUNITSDROP, GetUnitName(TabIndex)); WidgetCBAddEnd(IDC_HEIGHTUNITSDROP, GetUnitName(TabIndex)); } // for WidgetCBAddEnd(IDC_ANGLEUNITSDROP, "Decimal Degrees"); WidgetCBAddEnd(IDC_ANGLEUNITSDROP, "Deg., Min., Sec."); WidgetCBAddEnd(IDC_TIMEUNITSDROP, "Seconds"); WidgetCBAddEnd(IDC_TIMEUNITSDROP, "Frames"); WidgetCBAddEnd(IDC_POSLONDROP, "West"); WidgetCBAddEnd(IDC_POSLONDROP, "East"); WidgetCBAddEnd(IDC_LATLONDISPLAY, "+/-"); WidgetCBAddEnd(IDC_LATLONDISPLAY, "N/S, W/E"); WidgetCBAddEnd(IDC_GEOPROJDISPLAY, "As Geographic"); WidgetCBAddEnd(IDC_GEOPROJDISPLAY, "As Projected"); for (TabIndex = 0; TabIndex < 8; TabIndex ++) { WidgetTCInsertItem(IDC_TAB1, TabIndex, TabNames[TabIndex]); } // for WidgetTCSetCurSel(IDC_TAB1, ActivePage); ShowPanel(0, ActivePage); ConfigureWidgets(); } // if } // if return(NativeWin); } // ProjectPrefsGUI::Construct