void FoliageEffectFolFileEditGUI::ConfigureWidgets(void) { char TextStr[256]; sprintf(TextStr, "Foliage Effect Editor - %s", Active->GetName()); if (Active->GetRAHostRoot()->TemplateItem) strcat(TextStr, " (Templated)"); SetTitle(TextStr); WidgetSetModified(IDC_NAME, FALSE); WidgetSetText(IDC_NAME, Active->Name); ConfigureSR(NativeWin, IDC_RADIOBYPIXEL, IDC_RADIOBYPIXEL, &GlobalApp->AppEffects->EcosystemBase.DissolveByImageSize, SRFlag_Short, 0, NULL, NULL); ConfigureSR(NativeWin, IDC_RADIOBYPIXEL, IDC_RADIOBYIMAGEHT, &GlobalApp->AppEffects->EcosystemBase.DissolveByImageSize, SRFlag_Short, 1, NULL, NULL); ConfigureSC(NativeWin, IDC_CHECKENABLED, &Active->Enabled, SCFlag_Char, NULL, 0); ConfigureSC(NativeWin, IDC_CHECKPREVIEWENABLED, &Active->PreviewEnabled, SCFlag_Char, NULL, 0); ConfigureSC(NativeWin, IDC_CHECKDISSOLVEENABLED, &Active->Ecotp.DissolveEnabled, SCFlag_Char, NULL, 0); ConfigureSC(NativeWin, IDC_CHECKRENDEROCCLUDED, &Active->Ecotp.RenderOccluded, SCFlag_Char, NULL, 0); ConfigureFI(NativeWin, IDC_DISSOLVEHEIGHT, &Active->Ecotp.DissolvePixelHeight, .5, 0.0, 1000.0, FIOFlag_Double, NULL, 0); ConfigureFI(NativeWin, IDC_DISSOLVEREFHT, &GlobalApp->AppEffects->EcosystemBase.DissolveRefImageHt, 1.0, 1.0, 32767.0, FIOFlag_Short, NULL, 0); ConfigureDD(NativeWin, IDC_FOLIAGE_FILE, Active->FoliageFile.Path, WCS_PATHANDFILE_PATH_LEN_MINUSONE, Active->FoliageFile.Name, WCS_PATHANDFILE_NAME_LEN_MINUSONE, IDC_LABEL_CMAP); DisableWidgets(); } // FoliageEffectFolFileEditGUI::ConfigureWidgets()
long CmapEditGUI::HandleSCChange(NativeControl Handle, NativeGUIWin NW, int CtrlID) { NotifyTag Changes[2]; Changes[1] = 0; switch (CtrlID) { case IDC_CHECKRESPONSEENABLED: { FirstPick = 1; ConfigureMatchColors(); DisableWidgets(); break; } // case IDC_CHECKENABLED: { Changes[0] = MAKE_ID(Active->GetNotifyClass(), Active->GetNotifySubclass(), 0xff, WCS_NOTIFYCOMP_OBJECT_ENABLEDCHANGED); GlobalApp->AppEx->GenerateNotify(Changes, Active->GetRAHostRoot()); break; } // case IDC_CHECKMATCHRANGE: { if (ActiveEco && EffectsHost->IsEffectValid(ActiveEco, WCS_EFFECTSSUBCLASS_ECOSYSTEM, 0)) { Changes[0] = MAKE_ID(ActiveEco->GetNotifyClass(), ActiveEco->GetNotifySubclass(), 0xff, WCS_NOTIFYCOMP_OBJECT_VALUECHANGED); GlobalApp->AppEx->GenerateNotify(Changes, ActiveEco->GetRAHostRoot()); } // if break; } // default: break; } // switch CtrlID return(0); } // CmapEditGUI::HandleSCChange
void TerraffectorEditGUI::ConfigureWidgets(void) { char TextStr[256]; long ListPos, Ct, NumEntries; EcosystemEffect *TestObj; // query drop WidgetLWConfig(IDC_VECLINKAGE, Active, DBHost, EffectsHost, WM_WCSW_LW_NEWQUERY_FLAG_VECTOR | WM_WCSW_LW_NEWQUERY_FLAG_ENABLED | WM_WCSW_LW_NEWQUERY_FLAG_LINE | WM_WCSW_LW_NEWQUERY_FLAG_POINT); /*ConfigureFI(NativeWin, IDC_RESOLUTION, &EffectsHost->TerraffectorBase.Resolution, 1.0, 0.00001, 1000000.0, FIOFlag_Float, NULL, NULL);*/ ConfigureFI(NativeWin, IDC_PRIORITY, &Active->Priority, 1.0, -99.0, 99.0, FIOFlag_Short, NULL, 0); ConfigureFI(NativeWin, IDC_EVALORDER, &Active->EvalOrder, 1.0, 1.0, 10000.0, FIOFlag_Short, NULL, 0); sprintf(TextStr, "Terraffector Editor - %s", Active->GetName()); if (Active->GetRAHostRoot()->TemplateItem) strcat(TextStr, " (Templated)"); SetTitle(TextStr); WidgetSetModified(IDC_NAME, FALSE); WidgetSetText(IDC_NAME, Active->Name); ConfigureSC(NativeWin, IDC_CHECKENABLED, &Active->Enabled, SCFlag_Short, NULL, 0); //ConfigureSC(NativeWin, IDC_CHECKOVERLAP, &EffectsHost->TerraffectorBase.OverlapOK, SCFlag_Short, NULL, 0); //ConfigureSC(NativeWin, IDC_CHECKFLOATING, &EffectsHost->TerraffectorBase.Floating, SCFlag_Short, NULL, 0); ConfigureSC(NativeWin, IDC_CHECKSPLINE, &Active->Splined, SCFlag_Char, NULL, 0); ConfigureSR(NativeWin, IDC_RADIOABSOLUTE, IDC_RADIOABSOLUTE, &Active->Absolute, SCFlag_Short, 1, NULL, NULL); ConfigureSR(NativeWin, IDC_RADIOABSOLUTE, IDC_RADIORELATIVEGRND, &Active->Absolute, SCFlag_Short, 0, NULL, NULL); ConfigureSR(NativeWin, IDC_RADIOABSOLUTE, IDC_RADIORELATIVEJOE, &Active->Absolute, SCFlag_Short, 2, NULL, NULL); ConfigureSR(NativeWin, IDC_RADIOMODTERRAIN, IDC_RADIOMODTERRAIN, &Active->ApplyToOrigElev, SRFlag_Char, 0, NULL, NULL); ConfigureSR(NativeWin, IDC_RADIOMODTERRAIN, IDC_RADIOUNMODTERRAIN, &Active->ApplyToOrigElev, SRFlag_Char, 1, NULL, NULL); ConfigureSR(NativeWin, IDC_RADIOINCORDEC, IDC_RADIOINCORDEC, &Active->CompareType, SRFlag_Char, WCS_EFFECTS_RASTERTA_COMPARETYPE_INCDEC, NULL, NULL); ConfigureSR(NativeWin, IDC_RADIOINCORDEC, IDC_RADIOINCONLY, &Active->CompareType, SRFlag_Char, WCS_EFFECTS_RASTERTA_COMPARETYPE_INCREASE, NULL, NULL); ConfigureSR(NativeWin, IDC_RADIOINCORDEC, IDC_RADIODECONLY, &Active->CompareType, SRFlag_Char, WCS_EFFECTS_RASTERTA_COMPARETYPE_DECREASE, NULL, NULL); //WidgetSNConfig(IDC_SLOPEROUGH, &Active->AnimPar[WCS_EFFECTS_TERRAFFECTOR_ANIMPAR_SLOPEROUGHNESS]); //WidgetSNConfig(IDC_SLOPEECOMIX, &Active->AnimPar[WCS_EFFECTS_TERRAFFECTOR_ANIMPAR_SLOPEECOMIXING]); //WidgetSNConfig(IDC_MAXSLOPE, &Active->AnimPar[WCS_EFFECTS_TERRAFFECTOR_ANIMPAR_MAXSLOPE]); //WidgetSNConfig(IDC_MINSLOPE, &Active->AnimPar[WCS_EFFECTS_TERRAFFECTOR_ANIMPAR_MINSLOPE]); //WidgetSNConfig(IDC_INTENSITY, &Active->AnimPar[WCS_EFFECTS_TERRAFFECTOR_ANIMPAR_INTENSITY]); WidgetSNConfig(IDC_RADIUS, &Active->AnimPar[WCS_EFFECTS_TERRAFFECTOR_ANIMPAR_RADIUS]); WidgetSmartRAHConfig(IDC_SLOPEROUGH, &Active->AnimPar[WCS_EFFECTS_TERRAFFECTOR_ANIMPAR_SLOPEROUGHNESS], Active); WidgetSmartRAHConfig(IDC_SLOPEECOMIX, &Active->AnimPar[WCS_EFFECTS_TERRAFFECTOR_ANIMPAR_SLOPEECOMIXING], Active); WidgetSmartRAHConfig(IDC_MAXSLOPE, &Active->AnimPar[WCS_EFFECTS_TERRAFFECTOR_ANIMPAR_MAXSLOPE], Active); WidgetSmartRAHConfig(IDC_MINSLOPE, &Active->AnimPar[WCS_EFFECTS_TERRAFFECTOR_ANIMPAR_MINSLOPE], Active); WidgetSmartRAHConfig(IDC_INTENSITY, &Active->AnimPar[WCS_EFFECTS_TERRAFFECTOR_ANIMPAR_INTENSITY], Active); ConfigureFI(NativeWin, IDC_SLOPEPRIOR, &Active->SlopePriority, 1.0, -100.0, 100.0, FIOFlag_Short, NULL, 0); if (Active->SlopeEco) { ListPos = -1; NumEntries = WidgetCBGetCount(IDC_ECODROP); for (Ct = 0; Ct < NumEntries; Ct ++) { if ((TestObj = (EcosystemEffect *)WidgetCBGetItemData(IDC_ECODROP, Ct)) != (EcosystemEffect *)LB_ERR && TestObj == Active->SlopeEco) { ListPos = Ct; break; } // for } // for WidgetCBSetCurSel(IDC_ECODROP, ListPos); } // if else WidgetCBSetCurSel(IDC_ECODROP, -1); DisableWidgets(); } // TerraffectorEditGUI::ConfigureWidgets()
void TerraffectorEditGUI::HandleNotifyEvent(void) { NotifyTag *Changes, Changed, Interested[7]; long Pos, CurPos, Done = 0; GeneralEffect *MyEffect, *MatchEffect; if (! NativeWin) return; Changes = Activity->ChangeNotify->ChangeList; Interested[0] = MAKE_ID(Active->GetNotifyClass(), WCS_SUBCLASS_ANIMDOUBLETIME, 0xff, WCS_NOTIFYCOMP_ANIM_VALUECHANGED); Interested[1] = MAKE_ID(Active->GetNotifyClass(), WCS_SUBCLASS_ANIMDOUBLETIME, 0xff, WCS_NOTIFYCOMP_ANIM_NODEADDED); Interested[2] = MAKE_ID(Active->GetNotifyClass(), WCS_SUBCLASS_ANIMDOUBLETIME, 0xff, WCS_NOTIFYCOMP_ANIM_NODEREMOVED); Interested[3] = MAKE_ID(Active->GetNotifyClass(), 0xff, 0xff, WCS_NOTIFYCOMP_OBJECT_VALUECHANGED); Interested[4] = MAKE_ID(WCS_PROJECTCLASS_PREFS, WCS_SUBCLASS_PROJPREFS_UNITS, 0xff, 0xff); Interested[5] = NULL; if (GlobalApp->AppEx->MatchNotifyClass(Interested, Changes, 0)) { SyncWidgets(); Done = 1; } // if Interested[0] = MAKE_ID(WCS_EFFECTSSUBCLASS_ECOSYSTEM, 0xff, 0xff, WCS_NOTIFYCOMP_OBJECT_NAMECHANGED); Interested[1] = MAKE_ID(WCS_EFFECTSSUBCLASS_ECOSYSTEM, 0xff, 0xff, WCS_NOTIFYCOMP_OBJECT_COUNTCHANGED); Interested[2] = NULL; if (Changed = GlobalApp->AppEx->MatchNotifyClass(Interested, Changes, 0)) { CurPos = -1; MatchEffect = Active->SlopeEco; WidgetCBClear(IDC_ECODROP); WidgetCBInsert(IDC_ECODROP, -1, "New Ecosystem..."); for (MyEffect = EffectsHost->GetListPtr(WCS_EFFECTSSUBCLASS_ECOSYSTEM); MyEffect; MyEffect = MyEffect->Next) { Pos = WidgetCBInsert(IDC_ECODROP, -1, MyEffect->GetName()); WidgetCBSetItemData(IDC_ECODROP, Pos, MyEffect); if (MyEffect == MatchEffect) CurPos = Pos; } // for WidgetCBSetCurSel(IDC_ECODROP, CurPos); Done = 1; } // if eco name changed Interested[0] = MAKE_ID(Active->GetNotifyClass(), 0xff, 0xff, WCS_NOTIFYCOMP_OBJECT_VALUECHANGED); Interested[1] = NULL; if (GlobalApp->AppEx->MatchNotifyClass(Interested, Changes, 0)) { DisableWidgets(); Done = 1; } // if #ifdef WCS_BUILD_VNS // query drop Interested[0] = MAKE_ID(WCS_EFFECTSSUBCLASS_SEARCHQUERY, 0xff, 0xff, 0xff); Interested[1] = NULL; if (GlobalApp->AppEx->MatchNotifyClass(Interested, Changes, 0)) { WidgetLWSync(IDC_VECLINKAGE); Done = 1; } // if query changed #endif // WCS_BUILD_VNS if (! Done) ConfigureWidgets(); } // TerraffectorEditGUI::HandleNotifyEvent()
void DCAMFormatsPage::UpdateWidgets() { if ( m_pCamera == NULL || IsConnected() != true ) { DisableWidgets(); return; } EnableWidgets(); // Query the camera for the availability of video modes and // toggle visibility as needed Error error; std::map<Gtk::RadioButton*, VideoMode>::iterator iterVideoMode; std::map<Gtk::RadioButton*, FrameRate>::iterator iterFrameRate; if ( IsIIDC() ) { Camera* pCamera = dynamic_cast<Camera*>(m_pCamera); // Update the video mode radio buttons // Loop through all the video modes // For each video mode, loop through all the frame rates // If the camera supports this video mode at any frame rate, then // the radio button should be shown for ( iterVideoMode = m_mapVideoMode.begin(); iterVideoMode != m_mapVideoMode.end(); iterVideoMode++ ) { iterVideoMode->first->hide(); if ( iterVideoMode->second == VIDEOMODE_FORMAT7 ) { iterVideoMode->first->show(); continue; } for ( iterFrameRate = m_mapFrameRate.begin(); iterFrameRate != m_mapFrameRate.end(); iterFrameRate++ ) { bool supported = false; error = pCamera->GetVideoModeAndFrameRateInfo( iterVideoMode->second, iterFrameRate->second, &supported ); if ( error != PGRERROR_OK ) { // Error ShowErrorMessageDialog( "Error querying video mode and frame rate", error ); break; } if ( supported == true ) { // Enable this video mode button iterVideoMode->first->show(); // Move on to next video mode break; } } } } else if ( IsGEV() ) { for ( iterVideoMode = m_mapVideoMode.begin(); iterVideoMode != m_mapVideoMode.end(); iterVideoMode++ ) { iterVideoMode->first->hide(); if ( iterVideoMode->second == VIDEOMODE_FORMAT7 ) { iterVideoMode->first->show(); continue; } } } VideoMode currVideoMode; FrameRate currFrameRate; if ( IsIIDC() ) { Camera* pCamera = dynamic_cast<Camera*>(m_pCamera); error = pCamera->GetVideoModeAndFrameRate( &currVideoMode, &currFrameRate ); if ( error != PGRERROR_OK ) { // Error ShowErrorMessageDialog( "Error getting current video mode and frame rate", error ); } } else { currVideoMode = VIDEOMODE_FORMAT7; currFrameRate = FRAMERATE_FORMAT7; } // Set the right video mode button to be active for ( iterVideoMode = m_mapVideoMode.begin(); iterVideoMode != m_mapVideoMode.end(); iterVideoMode++ ) { if ( currVideoMode == iterVideoMode->second ) { iterVideoMode->first->set_active( true ); } } // Update the available frame rates for the current video mode UpdateFrameRatesForVideoMode( currVideoMode, currFrameRate ); }
void CmapEditGUI::ConfigureWidgets(void) { Raster *MyRast, *TestRast; long ListPos, Ct, NumEntries; char TextStr[256]; ConfigureFI(NativeWin, IDC_PRIORITY, &Active->Priority, 1.0, -99.0, 99.0, FIOFlag_Short, NULL, 0); sprintf(TextStr, "Color Map Editor - %s", Active->GetName()); if (Active->GetRAHostRoot()->TemplateItem) strcat(TextStr, " (Templated)"); SetTitle(TextStr); WidgetSetModified(IDC_NAME, FALSE); WidgetSetText(IDC_NAME, Active->Name); ConfigureSC(NativeWin, IDC_CHECKENABLED, &Active->Enabled, SCFlag_Short, NULL, 0); ConfigureSC(NativeWin, IDC_CHECKRESPONSEENABLED, &ResponseEnabled, SCFlag_Char, NULL, 0); ConfigureSR(NativeWin, IDC_RADIOCOLORBYPIXEL, IDC_RADIOCOLORBYPIXEL, &Active->EvalByPixel, SRFlag_Short, WCS_CMAP_EVAL_BYPIXEL, NULL, NULL); ConfigureSR(NativeWin, IDC_RADIOCOLORBYPIXEL, IDC_RADIOCOLORBYPOLY, &Active->EvalByPixel, SRFlag_Short, WCS_CMAP_EVAL_BYPOLYGON, NULL, NULL); ConfigureSR(NativeWin, IDC_RADIOPICKMINIMUM, IDC_RADIOPICKMINIMUM, &PickColorType, SRFlag_Char, 0, NULL, NULL); ConfigureSR(NativeWin, IDC_RADIOPICKMINIMUM, IDC_RADIOPICKMAXIMUM, &PickColorType, SRFlag_Char, 1, NULL, NULL); ConfigureSR(NativeWin, IDC_RADIOPICKMINIMUM, IDC_RADIOPICKRANGE, &PickColorType, SRFlag_Char, 2, NULL, NULL); ConfigureSC(NativeWin, IDC_CHECKRANDOMIZE, &Active->RandomizeEdges, SCFlag_Short, NULL, 0); ConfigureSC(NativeWin, IDC_CHECKLUMINOUS, &Active->LuminousColors, SCFlag_Short, NULL, 0); ConfigureTB(NativeWin, IDC_ADDECO, IDI_ADDSOMETHING, NULL); ConfigureTB(NativeWin, IDC_REMOVEECO, IDI_DELETE, NULL); ConfigureTB(NativeWin, IDC_MOVEECOUP, IDI_ARROWUP, NULL); ConfigureTB(NativeWin, IDC_MOVEECODOWN, IDI_ARROWDOWN, NULL); if (Active->Img && (MyRast = Active->Img->GetRaster())) { ListPos = -1; NumEntries = WidgetCBGetCount(IDC_IMAGEDROP); for (Ct = 0; Ct < NumEntries; Ct ++) { if ((TestRast = (Raster *)WidgetCBGetItemData(IDC_IMAGEDROP, Ct)) != (Raster *)LB_ERR && TestRast == MyRast) { ListPos = Ct; break; } // for } // for WidgetCBSetCurSel(IDC_IMAGEDROP, ListPos); ConfigureTB(NativeWin, IDC_TNAIL, NULL, NULL, MyRast); } // if else { WidgetCBSetCurSel(IDC_IMAGEDROP, -1); ConfigureTB(NativeWin, IDC_TNAIL, NULL, NULL, NULL); } // else BuildEcoList(); ConfigureMatchColors(); DisableWidgets(); // advanced DisplayAdvancedFeatures(); } // CmapEditGUI::ConfigureWidgets()
void CmapEditGUI::HandleNotifyEvent(void) { Raster *MyRast, *MatchRast; NotifyTag *Changes, Changed, Interested[7]; long Pos, CurPos, Done = 0; if (! NativeWin) return; Changes = Activity->ChangeNotify->ChangeList; Interested[0] = MAKE_ID(WCS_NOTIFYCLASS_DIAGNOSTICDATA, WCS_SUBCLASS_DIAGNOSTIC_DATA, 0xff, 0xff); Interested[1] = NULL; if (Changed = GlobalApp->AppEx->MatchNotifyClass(Interested, Changes, 0)) { if (ResponseEnabled) { if (((DiagnosticData *)Activity->ChangeNotify->NotifyData)->ValueValid[WCS_DIAGNOSTIC_RGB]) RespondColorNotify((DiagnosticData *)Activity->ChangeNotify->NotifyData); } // if Done = 1; } // if Interested[0] = MAKE_ID(Active->GetNotifyClass(), WCS_SUBCLASS_ANIMDOUBLETIME, 0xff, WCS_NOTIFYCOMP_ANIM_VALUECHANGED); Interested[1] = MAKE_ID(Active->GetNotifyClass(), WCS_SUBCLASS_ANIMDOUBLETIME, 0xff, WCS_NOTIFYCOMP_ANIM_NODEADDED); Interested[2] = MAKE_ID(Active->GetNotifyClass(), WCS_SUBCLASS_ANIMDOUBLETIME, 0xff, WCS_NOTIFYCOMP_ANIM_NODEREMOVED); Interested[3] = MAKE_ID(Active->GetNotifyClass(), 0xff, 0xff, WCS_NOTIFYCOMP_OBJECT_VALUECHANGED); Interested[4] = MAKE_ID(WCS_PROJECTCLASS_PREFS, WCS_SUBCLASS_PROJPREFS_UNITS, 0xff, 0xff); Interested[5] = NULL; if (GlobalApp->AppEx->MatchNotifyClass(Interested, Changes, 0)) { SyncWidgets(); Done = 1; } // if Interested[0] = MAKE_ID(Active->GetNotifyClass(), 0xff, 0xff, WCS_NOTIFYCOMP_OBJECT_VALUECHANGED); Interested[1] = NULL; if (GlobalApp->AppEx->MatchNotifyClass(Interested, Changes, 0)) { DisableWidgets(); // advanced DisplayAdvancedFeatures(); Done = 1; } // if Interested[0] = MAKE_ID(WCS_RAHOST_OBJTYPE_RASTER, 0xff, 0xff, WCS_NOTIFYCOMP_OBJECT_NAMECHANGED); Interested[1] = MAKE_ID(WCS_RAHOST_OBJTYPE_RASTER, 0xff, 0xff, WCS_NOTIFYCOMP_OBJECT_COUNTCHANGED); Interested[2] = NULL; if (Changed = GlobalApp->AppImages->MatchNotifyClass(Interested, Changes, 0)) { CurPos = -1; MatchRast = (Active->Img) ? Active->Img->GetRaster(): NULL; WidgetCBClear(IDC_IMAGEDROP); WidgetCBInsert(IDC_IMAGEDROP, -1, "New Image Object..."); for (MyRast = GlobalApp->AppImages->GetFirstRast(); MyRast; MyRast = GlobalApp->AppImages->GetNextRast(MyRast)) { Pos = WidgetCBInsert(IDC_IMAGEDROP, -1, MyRast->GetUserName()); WidgetCBSetItemData(IDC_IMAGEDROP, Pos, MyRast); if (MyRast == MatchRast) CurPos = Pos; } // for WidgetCBSetCurSel(IDC_IMAGEDROP, CurPos); Done = 1; } // if image name changed else { Interested[0] = MAKE_ID(WCS_RAHOST_OBJTYPE_RASTER, 0xff, 0xff, 0xff); Interested[1] = NULL; if (Changed = GlobalApp->AppImages->MatchNotifyClass(Interested, Changes, 0)) { MatchRast = (Active->Img) ? Active->Img->GetRaster(): NULL; ConfigureTB(NativeWin, IDC_TNAIL, NULL, NULL, MatchRast); } // else } // else Interested[0] = MAKE_ID(WCS_EFFECTSSUBCLASS_ECOSYSTEM, WCS_SUBCLASS_ANIMCOLORTIME, 0xff, WCS_NOTIFYCOMP_ANIM_VALUECHANGED); Interested[1] = NULL; if (GlobalApp->AppEx->MatchNotifyClass(Interested, Changes, 0)) { ConfigureMatchColors(); DisableWidgets(); Done = 1; } // if if (! Done) ConfigureWidgets(); } // CmapEditGUI::HandleNotifyEvent()
void GroundEditGUI::ConfigureWidgets(void) { char TextStr[256]; // query drop WidgetLWConfig(IDC_VECLINKAGE, Active, DBHost, EffectsHost, WM_WCSW_LW_NEWQUERY_FLAG_VECTOR | WM_WCSW_LW_NEWQUERY_FLAG_ENABLED | WM_WCSW_LW_NEWQUERY_FLAG_LINE); /* if (EffectsHost->GroundBase.AreThereEdges((GeneralEffect *)EffectsHost->Ground)) strcpy(TextStr, "Hi-res Edges Exist"); else strcpy(TextStr, "No Hi-res Edges"); WidgetSetText(IDC_EDGESEXIST, TextStr); if (EffectsHost->GroundBase.AreThereGradients((GeneralEffect *)EffectsHost->Ground)) strcpy(TextStr, "Profiles Exist"); else strcpy(TextStr, "No Profiles"); WidgetSetText(IDC_GRADIENTSEXIST, TextStr); */ /*ConfigureFI(NativeWin, IDC_RESOLUTION, &EffectsHost->GroundBase.Resolution, 1.0, 0.00001, 1000000.0, FIOFlag_Float, NULL, NULL);*/ ConfigureFI(NativeWin, IDC_PRIORITY, &Active->Priority, 1.0, -99.0, 99.0, FIOFlag_Short, NULL, 0); sprintf(TextStr, "Ground Editor - %s", Active->GetName()); if (Active->GetRAHostRoot()->TemplateItem) strcat(TextStr, " (Templated)"); SetTitle(TextStr); WidgetSetModified(IDC_NAME, FALSE); WidgetSetText(IDC_NAME, Active->Name); ConfigureSC(NativeWin, IDC_CHECKENABLED, &Active->Enabled, SCFlag_Short, NULL, 0); //ConfigureSC(NativeWin, IDC_CHECKHIRESEDGE, &Active->HiResEdge, SCFlag_Short, NULL, 0); ConfigureSC(NativeWin, IDC_CHECKGRADFILL, &Active->UseGradient, SCFlag_Short, NULL, 0); //ConfigureSC(NativeWin, IDC_CHECKOVERLAP, &EffectsHost->GroundBase.OverlapOK, SCFlag_Short, NULL, 0); //ConfigureSC(NativeWin, IDC_CHECKFLOATING, &EffectsHost->GroundBase.Floating, SCFlag_Short, NULL, 0); ConfigureSC(NativeWin, IDC_CHECKTRANSPARENT, &Active->Transparent, SCFlag_Short, NULL, 0); WidgetAGConfig(IDC_ANIMGRADIENT2, &Active->EcoMat); // Material GUI MatGUI->ConfigureWidgets(); ConfigureTB(NativeWin, IDC_LOADCOMPONENT, IDI_GALLERY, NULL); ConfigureTB(NativeWin, IDC_SAVECOMPONENT, IDI_FILESAVE, NULL); // material GUI ConfigureTB(NativeWin, IDC_POPDROP0, IDI_EXPAND, IDI_CONTRACT); ConfigureMaterial(); ConfigureColors(); DisableWidgets(); // advanced DisplayAdvancedFeatures(); } // GroundEditGUI::ConfigureWidgets()
void GroundEditGUI::HandleNotifyEvent(void) { NotifyTag *Changes, Interested[7]; long Done = 0; if (! NativeWin) return; Changes = Activity->ChangeNotify->ChangeList; Interested[0] = MAKE_ID(Active->GetNotifyClass(), WCS_SUBCLASS_ANIMDOUBLETIME, 0xff, WCS_NOTIFYCOMP_ANIM_VALUECHANGED); Interested[1] = MAKE_ID(Active->GetNotifyClass(), WCS_SUBCLASS_ANIMDOUBLETIME, 0xff, WCS_NOTIFYCOMP_ANIM_NODEADDED); Interested[2] = MAKE_ID(Active->GetNotifyClass(), WCS_SUBCLASS_ANIMDOUBLETIME, 0xff, WCS_NOTIFYCOMP_ANIM_NODEREMOVED); Interested[3] = MAKE_ID(Active->GetNotifyClass(), 0xff, 0xff, WCS_NOTIFYCOMP_OBJECT_VALUECHANGED); Interested[4] = MAKE_ID(WCS_PROJECTCLASS_PREFS, WCS_SUBCLASS_PROJPREFS_UNITS, 0xff, 0xff); Interested[5] = NULL; if (GlobalApp->AppEx->MatchNotifyClass(Interested, Changes, 0)) { SyncWidgets(); Done = 1; } // if Interested[0] = MAKE_ID(Active->GetNotifyClass(), WCS_SUBCLASS_ANIMDOUBLETIME, 0xff, WCS_NOTIFYCOMP_ANIM_VALUECHANGED); Interested[1] = MAKE_ID(Active->GetNotifyClass(), WCS_SUBCLASS_ANIMDOUBLETIME, 0xff, WCS_NOTIFYCOMP_ANIM_NODEREMOVED); Interested[2] = MAKE_ID(Active->GetNotifyClass(), WCS_SUBCLASS_ANIMCOLORTIME, 0xff, WCS_NOTIFYCOMP_ANIM_VALUECHANGED); Interested[3] = MAKE_ID(Active->GetNotifyClass(), WCS_SUBCLASS_ANIMCOLORTIME, 0xff, WCS_NOTIFYCOMP_ANIM_NODEREMOVED); Interested[4] = NULL; if (GlobalApp->AppEx->MatchNotifyClass(Interested, Changes, 0)) { SyncWidgets(); ConfigureColors(); Done = 1; } // if Interested[0] = MAKE_ID(Active->GetNotifyClass(), 0xff, 0xff, WCS_NOTIFYCOMP_OBJECT_VALUECHANGED); Interested[1] = NULL; if (GlobalApp->AppEx->MatchNotifyClass(Interested, Changes, 0)) { DisableWidgets(); // advanced DisplayAdvancedFeatures(); Done = 1; } // if Interested[0] = MAKE_ID(Active->GetNotifyClass(), Active->EcoMat.GetNotifySubclass(), 0xff, WCS_NOTIFYCOMP_ATTRIBUTE_CHANGED); Interested[1] = MAKE_ID(Active->GetNotifyClass(), Active->EcoMat.GetNotifySubclass(), 0xff, WCS_NOTIFYCOMP_ATTRIBUTE_COUNTCHANGED); Interested[2] = NULL; if (GlobalApp->AppEx->MatchNotifyClass(Interested, Changes, 0)) { ConfigureMaterial(); ConfigureColors(); DisableWidgets(); // advanced DisplayAdvancedFeatures(); Done = 1; } // if Interested[0] = MAKE_ID(WCS_EFFECTSSUBCLASS_THEMATICMAP, 0xff, 0xff, WCS_NOTIFYCOMP_OBJECT_ENABLEDCHANGED); Interested[1] = NULL; if (GlobalApp->AppEx->MatchNotifyClass(Interested, Changes, 0)) { SyncWidgets(); Done = 1; } // if #ifdef WCS_BUILD_VNS // query drop Interested[0] = MAKE_ID(WCS_EFFECTSSUBCLASS_SEARCHQUERY, 0xff, 0xff, 0xff); Interested[1] = NULL; if (GlobalApp->AppEx->MatchNotifyClass(Interested, Changes, 0)) { WidgetLWSync(IDC_VECLINKAGE); Done = 1; } // if query changed #endif // WCS_BUILD_VNS if (! Done) ConfigureWidgets(); } // GroundEditGUI::HandleNotifyEvent()
void EnvironmentEditGUI::ConfigureWidgets(void) { char TextStr[256]; // query drop WidgetLWConfig(IDC_VECLINKAGE, Active, DBHost, EffectsHost, WM_WCSW_LW_NEWQUERY_FLAG_VECTOR | WM_WCSW_LW_NEWQUERY_FLAG_ENABLED | WM_WCSW_LW_NEWQUERY_FLAG_LINE); /* if (EffectsHost->EnvironmentBase.AreThereEdges((GeneralEffect *)EffectsHost->Environment)) strcpy(TextStr, "Hi-res Edges Exist"); else strcpy(TextStr, "No Hi-res Edges"); WidgetSetText(IDC_EDGESEXIST, TextStr); if (EffectsHost->EnvironmentBase.AreThereGradients((GeneralEffect *)EffectsHost->Environment)) strcpy(TextStr, "Profiles Exist"); else strcpy(TextStr, "No Profiles"); WidgetSetText(IDC_GRADIENTSEXIST, TextStr); */ /*ConfigureFI(NativeWin, IDC_RESOLUTION, &EffectsHost->EnvironmentBase.Resolution, 1.0, 0.00001, 1000000.0, FIOFlag_Float, NULL, NULL);*/ ConfigureFI(NativeWin, IDC_PRIORITY, &Active->Priority, 1.0, -99.0, 99.0, FIOFlag_Short, NULL, 0); sprintf(TextStr, "Environment Editor - %s", Active->GetName()); if (Active->GetRAHostRoot()->TemplateItem) strcat(TextStr, " (Templated)"); SetTitle(TextStr); WidgetSetModified(IDC_NAME, FALSE); WidgetSetText(IDC_NAME, Active->Name); ConfigureSC(NativeWin, IDC_CHECKENABLED, &Active->Enabled, SCFlag_Short, NULL, 0); //ConfigureSC(NativeWin, IDC_CHECKHIRESEDGE, &Active->HiResEdge, SCFlag_Short, NULL, 0); ConfigureSC(NativeWin, IDC_CHECKGRADFILL, &Active->UseGradient, SCFlag_Short, NULL, 0); //ConfigureSC(NativeWin, IDC_CHECKOVERLAP, &EffectsHost->EnvironmentBase.OverlapOK, SCFlag_Short, NULL, 0); //ConfigureSC(NativeWin, IDC_CHECKFLOATING, &EffectsHost->EnvironmentBase.Floating, SCFlag_Short, NULL, 0); ConfigureSC(NativeWin, IDC_CHECKGRADENABLED, &Active->GlobalGradientsEnabled, SCFlag_Char, NULL, 0); WidgetSmartRAHConfig(IDC_FOLIAGEHTFACTOR, &Active->AnimPar[WCS_EFFECTS_ENVIRONMENT_ANIMPAR_FOLIAGEHTFACT], Active); WidgetSmartRAHConfig(IDC_ENVIRONMENT_ECOGRAD, &Active->AnimPar[WCS_EFFECTS_ENVIRONMENT_ANIMPAR_GLOBALECOGRAD], Active); WidgetSmartRAHConfig(IDC_ENVIRONMENT_REFLAT, &Active->AnimPar[WCS_EFFECTS_ENVIRONMENT_ANIMPAR_GLOBALREFLAT], Active); ConfigureFI(NativeWin, IDC_DISTFOLINTENS, &Active->FoliageMinSize, 1.0, 0.0, 1000.0, FIOFlag_Short, NULL, 0); ConfigureFI(NativeWin, IDC_FOLIAGEBLEND, &Active->FoliageBlending, .1, 0.0, 10.0, FIOFlag_Double, NULL, 0); ConfigureTB(NativeWin, IDC_ADDECO, IDI_ADDSOMETHING, NULL); ConfigureTB(NativeWin, IDC_REMOVEECO, IDI_DELETE, NULL); ConfigureTB(NativeWin, IDC_MOVEECOUP, IDI_ARROWUP, NULL); ConfigureTB(NativeWin, IDC_MOVEECODOWN, IDI_ARROWDOWN, NULL); BuildEcoList(); DisableWidgets(); // advanced DisplayAdvancedFeatures(); } // EnvironmentEditGUI::ConfigureWidgets()