Exemplo n.º 1
0
void EditorExponentModule::fillPropertyGrid (wxPropertyGrid *pg)
{
	pg->Append( wxPropertyCategory(wxT("Source modules")) );
	appendSourceModuleProperty (pg, wxT("Source module"), mSourceModules[0]);
	pg->Append( wxPropertyCategory(wxT("Parameters")) );
	pg->Append( wxFloatProperty(wxT("Exponent"), wxPG_LABEL, mModule.getExponent()) );
}
Exemplo n.º 2
0
void EditorScalePointModule::fillPropertyGrid (wxPropertyGrid *pg)
{
	pg->Append( wxPropertyCategory(wxT("Source modules")) );
	appendSourceModuleProperty (pg, wxT("Source module"), mSourceModules[0]);
	pg->Append( wxPropertyCategory(wxT("Parameters")) );
	pg->Append( wxFloatProperty(wxT("Scale X"), wxPG_LABEL, mModule.getScaleX()) );
	pg->Append( wxFloatProperty(wxT("Scale Y"), wxPG_LABEL, mModule.getScaleY()) );
	pg->Append( wxFloatProperty(wxT("Scale Z"), wxPG_LABEL, mModule.getScaleZ()) );
}
Exemplo n.º 3
0
void EditorSelectModule::fillPropertyGrid (wxPropertyGrid *pg)
{
	pg->Append( wxPropertyCategory(wxT("Source modules")) );
	appendSourceModuleProperty (pg, wxT("Source module 1"), mSourceModules[0]);
	appendSourceModuleProperty (pg, wxT("Source module 2"), mSourceModules[1]);
	appendSourceModuleProperty (pg, wxT("Control module"), mSourceModules[2]);
	pg->Append( wxPropertyCategory(wxT("Parameters")) );
	pg->Append( wxFloatProperty(wxT("Lower bound"), wxPG_LABEL, mModule.getLowerBound()) );
	pg->Append( wxFloatProperty(wxT("Upper bound"), wxPG_LABEL, mModule.getUpperBound()) );
	pg->Append( wxFloatProperty(wxT("Edge falloff"), wxPG_LABEL, mModule.getEdgeFalloff()) );
}
void EditorTurbulenceModule::fillPropertyGrid (wxPropertyGrid *pg)
{
	pg->Append( wxPropertyCategory(wxT("Source modules")) );
	appendSourceModuleProperty (pg, wxT("Source module"), mSourceModules[0]);
	pg->Append( wxPropertyCategory(wxT("Parameters")) );
	pg->Append( wxFloatProperty(wxT("Power"), wxPG_LABEL, mModule.getPower()) );
	pg->Append( wxFloatProperty(wxT("Frequency"), wxPG_LABEL, mModule.getFrequency()) );
	pg->Append( wxIntProperty(wxT("Roughness"), wxPG_LABEL, mModule.getRoughness()) );
	pg->Append( wxIntProperty(wxT("Seed"), wxPG_LABEL, mModule.getSeed()) );
	appendQualityProperty (pg, mModule.getQuality());
}
Exemplo n.º 5
0
void EditorTerraceModule::fillPropertyGrid (wxPropertyGrid *pg)
{
	mControlPointIDs.clear ();
	pg->Append( wxPropertyCategory(wxT("Source modules")) );
	appendSourceModuleProperty (pg, wxT("Source module"), mSourceModules[0]);
	pg->Append( wxPropertyCategory(wxT("Parameters")) );
	pg->Append( wxIntProperty(wxT("Control points"), wxPG_LABEL, mPointCount) );
	pg->Append( wxBoolProperty(wxT("Invert"), wxPG_LABEL, mModule.isInverted()) );
	mPointCategoryID = pg->Append( wxPropertyCategory(wxT("Points")) );
	changeNumberOfControlPoints(pg);
}
void EditorBlendModule::fillPropertyGrid (wxPropertyGrid *pg)
{
	pg->Append( wxPropertyCategory(wxT("Source modules")) );
	appendSourceModuleProperty (pg, wxT("Source module 1"), mSourceModules[0]);
	appendSourceModuleProperty (pg, wxT("Source module 2"), mSourceModules[1]);
	appendSourceModuleProperty (pg, wxT("Control module"), mSourceModules[2]);
}
Exemplo n.º 7
0
void CStructEditView::InitPropGrid(const DDLReflect::STRUCT_INFO* info, const void* data)
{
	if(info->parent) InitPropGrid(info->parent, data);
	if(info->fcount==0) return;

	wxString name;
	name.Printf(wxT("{%s}"), wxString::FromUTF8(info->name));
	wxPGProperty* prop = ZION_NEW wxPropertyCategory(name);
	prop->ChangeFlag(wxPG_PROP_READONLY, true);
	wxPGProperty* prop_id = m_pPropGrid->Append(prop);

	for(_U32 i = 0; i < info->fcount; ++i)
	{
		const DDLReflect::FIELD_INFO* finfo = &info->finfos[i];
		if(info->finfos[i].type&DDLReflect::TYPE_ARRAY)
		{
			CreateArray(prop_id, wxString::FromUTF8(finfo->name),&info->finfos[i], (char*)data+finfo->offset);
		}
		else
		{
			CreateProperty(prop_id, wxString::FromUTF8(finfo->name), &info->finfos[i], (char*)data+finfo->offset);
		}
	}
}
void EditorConstantModule::fillPropertyGrid (wxPropertyGrid *pg)
{
	pg->Append( wxPropertyCategory(wxT("Parameters")) );
	pg->Append( wxFloatProperty(wxT("Value"), wxPG_LABEL, mModule.getValue()) );
}
void EditorAdditionModule::fillPropertyGrid (wxPropertyGrid *pg)
{
	pg->Append( wxPropertyCategory(wxT("Source modules")) );
	appendSourceModuleProperty (pg, wxT("Source module 1"), mSourceModules[0]);
	appendSourceModuleProperty (pg, wxT("Source module 2"), mSourceModules[1]);
}
Exemplo n.º 10
0
bool ConfigOptionsDialog::AddPropGridHeader(ConfigHeaderValue & headerValue, wxPGId parentHeaderID, bool isRootHeader, const string & parentNamePath)
{
  uint i;

  // If this header is expanded or not
  bool expandHeader = false;

  // Add all the data values
  for(i=0; i<headerValue.childSelectArray.size(); i++)
  {
    // Add a select value (pass the header name down)
    if(!AddPropGridSelectValue(headerValue.childSelectArray[i], parentHeaderID, parentNamePath))
    {
      return false;
    }

    // Determine if this header is to be expanded
    if(headerValue.childSelectArray[i].isValueDisplayed)
    {  
      expandHeader = true;
    }
  }

  // Add all the header values
  for(i=0; i<headerValue.childHeaderArray.size(); i++)
  {
    // Add a new header to the parent control
    wxPGId newPID;
    if(isRootHeader)
    {
      // Add a root header
      newPID = propGrid->Append(wxPropertyCategory(headerValue.childHeaderArray[i].headerName.c_str()));
    }
    else
    {
      // Add a sub-header
      newPID = propGrid->AppendIn(parentHeaderID, wxPropertyCategory(headerValue.childHeaderArray[i].headerName.c_str()));
    }

    // Calculate the child path
    string childNamePath = parentNamePath + string(".") + headerValue.childHeaderArray[i].headerName;

    // Recurse
    if(!AddPropGridHeader(headerValue.childHeaderArray[i], newPID, false, childNamePath))
    {
      return false;
    }

    // If the child is expanded, expand this header
    if(propGrid->IsPropertyExpanded(newPID))
    {
      expandHeader = true;
    }
  }

  // If this is the plugins header
  if(headerValue.headerName == CONFIG_PLUGINS_HEADER_NAME)
  {
    // Loop for each plugin
    for(i=0; i<pluginGridValues.size(); i++)
    {
      // Add the plugin header section
      wxPGId newPID = propGrid->AppendIn(parentHeaderID, wxPropertyCategory(pluginGridValues[i].headerName.c_str()));

      // Calculate the child path
      string childNamePath = parentNamePath + string(".") + pluginGridValues[i].headerName;

      // Add a section for each plugin
      if(!AddPropGridHeader(pluginGridValues[i], newPID, false, childNamePath))
      {
        return false;
      }

      // If the child is expanded, expand this header
      if(propGrid->IsPropertyExpanded(newPID))
      {
        expandHeader = true;
      }
    }    
  }

  // If this is not the root
  if(!isRootHeader)
  {
    // If the header is to be expanded or not
    if(expandHeader)
    {
      propGrid->Expand(parentHeaderID);
    }
    else
    {
      propGrid->Collapse(parentHeaderID);
    }
  }

  return true;
}
Exemplo n.º 11
0
void EditorAbsoluteModule::fillPropertyGrid (wxPropertyGrid *pg)
{
	pg->Append( wxPropertyCategory(wxT("Source modules")) );
	appendSourceModuleProperty (pg, wxT("Source module"), mSourceModules[0]);
}