コード例 #1
0
ファイル: MOPGProperty.cpp プロジェクト: doomtech/slade
MOPGTextureProperty::MOPGTextureProperty(int textype, const wxString& label, const wxString& name)
: wxStringProperty(label, name), MOPGProperty(MOPGProperty::TYPE_TEXTURE) {
	// Init variables
	this->textype = textype;

	// Set to text+button editor
	SetEditor(wxPGEditor_TextCtrlAndButton);
}
コード例 #2
0
ファイル: MOPGProperty.cpp プロジェクト: doomtech/slade
MOPGSPACTriggerProperty::MOPGSPACTriggerProperty(const wxString& label, const wxString& name)
: wxEnumProperty(label, name), MOPGProperty(MOPGProperty::TYPE_SPAC) {
	// Set to combo box editor
	SetEditor(wxPGEditor_ComboBox);

	// Setup combo box choices
	wxArrayString labels = theGameConfiguration->allSpacTriggers();
	SetChoices(wxPGChoices(labels));
}
コード例 #3
0
ファイル: MOPGProperty.cpp プロジェクト: doomtech/slade
MOPGThingTypeProperty::MOPGThingTypeProperty(const wxString& label, const wxString& name)
: wxIntProperty(label, name, 0), MOPGProperty(MOPGProperty::TYPE_TTYPE) {
	// Init variables
	args[0] = NULL;
	args[1] = NULL;
	args[2] = NULL;
	args[3] = NULL;
	args[4] = NULL;

	// Set to text+button editor
	SetEditor(wxPGEditor_TextCtrlAndButton);
}
コード例 #4
0
ファイル: sheetatr.cpp プロジェクト: NalinG/gambit
bool wxSheetCellAttr::Copy(const wxSheetCellAttr& other) 
{ 
    wxCHECK_MSG(other.Ok(), false, wxT("Attr to copy from is not created"));
    
    if (!Create())
        return false;
    
    M_CELLATTRDATA->m_foreColour = ((wxSheetCellAttrRefData*)other.GetRefData())->m_foreColour;
    M_CELLATTRDATA->m_backColour = ((wxSheetCellAttrRefData*)other.GetRefData())->m_backColour;
    M_CELLATTRDATA->m_font       = ((wxSheetCellAttrRefData*)other.GetRefData())->m_font;
    M_CELLATTRDATA->m_attrTypes  = ((wxSheetCellAttrRefData*)other.GetRefData())->m_attrTypes;
    if (other.HasEditor())
        SetEditor(((wxSheetCellAttrRefData*)other.m_refData)->m_editor->Clone());
    if (other.HasRenderer())
        SetRenderer(((wxSheetCellAttrRefData*)other.m_refData)->m_renderer->Clone());
    
    SetDefaultAttr(other.GetDefaultAttr());
    return true;
}
コード例 #5
0
ファイル: MOPGProperty.cpp プロジェクト: Genghoidal/SLADE
/* MOPGStringProperty::setUDMFProp
 * Load a list of possible choices from the given UDMF prop, if any
 *******************************************************************/
void MOPGStringProperty::setUDMFProp(UDMFProperty* prop)
{
	MOPGProperty::setUDMFProp(prop);

	// If this is a soft enum (e.g. renderstyle can be "translucent" or "add",
	// but we don't want to enforce that strictly), use a combobox populated
	// with the possible values
	if (prop && prop->hasPossibleValues())
	{
		const vector<Property> values = prop->getPossibleValues();
		wxPGChoices choices = wxPGChoices();

		for (unsigned n = 0; n < values.size(); n++)
			choices.Add(values[n].getStringValue());

		SetChoices(choices);
		SetEditor(wxPGEditor_ComboBox);
	}
	//else
	//	SetEditor(wxPGEditor_TextCtrl);
}
コード例 #6
0
ファイル: sheetatr.cpp プロジェクト: NalinG/gambit
bool wxSheetCellAttr::MergeWith(const wxSheetCellAttr &other)
{
    wxCHECK_MSG(Ok() && other.Ok(), false, wxT("this or Attr to MergeWith from is not created"));
    
    if ( !HasForegoundColour() && other.HasForegoundColour() )
        SetForegroundColour(other.GetForegroundColour());
    if ( !HasBackgroundColour() && other.HasBackgroundColour() )
        SetBackgroundColour(other.GetBackgroundColour());
    if ( !HasFont() && other.HasFont() )
        SetFont(other.GetFont());
    if ( !HasAlignment() && other.HasAlignment() )
        SetAlignment(other.GetAlignment());
    if ( !HasOrientation() && other.HasOrientation() )
        SetOrientation(other.GetOrientation());
    if ( !HasLevel() && other.HasLevel() )
        SetLevel(other.GetLevel());
    if ( !HasReadWriteMode() && other.HasReadWriteMode() )
        SetReadOnly(other.GetReadOnly());
    if ( !HasOverflowMode() && other.HasOverflowMode() )
        SetOverflow(other.GetOverflow());
    if ( !HasOverflowMarkerMode() && other.HasOverflowMarkerMode() )
        SetOverflowMarker(other.GetOverflowMarker());
    if ( !HasShowEditorMode() && other.HasShowEditorMode() )
        SetShowEditor(other.GetShowEditor());
    
    // Directly access m_renderer/m_editor as GetRender/Editor may return different one

    // Maybe add support for merge of Render and Editor?
    if ( !HasRenderer() && other.HasRenderer() )
        SetRenderer(((wxSheetCellAttrRefData*)other.m_refData)->m_renderer->Clone());
    if ( !HasEditor() && other.HasEditor() )
        SetEditor(((wxSheetCellAttrRefData*)other.m_refData)->m_editor->Clone());

    if ( !HasDefaultAttr() && other.HasDefaultAttr() )
        SetDefaultAttr(other.GetDefaultAttr());
    
    return true;
}
コード例 #7
0
ファイル: MOPGProperty.cpp プロジェクト: doomtech/slade
MOPGSectorSpecialProperty::MOPGSectorSpecialProperty(const wxString& label, const wxString& name)
: wxIntProperty(label, name, 0), MOPGProperty(MOPGProperty::TYPE_SSPECIAL) {
	// Set to text+button editor
	SetEditor(wxPGEditor_TextCtrlAndButton);
}
コード例 #8
0
ファイル: MOPGProperty.cpp プロジェクト: Genghoidal/SLADE
/* MOPGIntWithArgsProperty::MOPGIntWithArgsProperty
 * MOPGIntWithArgsProperty class constructor
 *******************************************************************/
MOPGIntWithArgsProperty::MOPGIntWithArgsProperty(const wxString& label, const wxString& name)
	: MOPGIntProperty(label, name)
{
	// Set to text+button editor
	SetEditor(wxPGEditor_TextCtrlAndButton);
}
コード例 #9
0
nsHTMLEditorMouseListener::nsHTMLEditorMouseListener(nsHTMLEditor *aHTMLEditor)
  : mHTMLEditor(aHTMLEditor)
{
  SetEditor(mHTMLEditor); // Tell the base class about the editor.
}