31 virtual int GetNumberRows();
32 virtual int GetNumberCols();
33 virtual bool IsEmptyCell(
int row,
int col );
34 virtual wxString GetValue(
int row,
int col );
35 virtual void SetValue(
int row,
int col,
const wxString& value );
37 virtual wxString GetColLabelValue(
int col );
39 virtual wxString GetTypeName(
int row,
int col );
40 virtual bool CanGetValueAs(
int row,
int col,
const wxString& typeName );
41 virtual bool CanSetValueAs(
int row,
int col,
const wxString& typeName );
43 virtual long GetValueAsLong(
int row,
int col );
44 virtual bool GetValueAsBool(
int row,
int col );
45 virtual double GetValueAsDouble(
int row,
int col );
47 virtual void SetValueAsLong(
int row,
int col,
long value );
48 virtual void SetValueAsBool(
int row,
int col,
bool value );
49 virtual void SetValueAsDouble(
int row,
int col,
double value );
51 bool InsertRows(
size_t pos,
size_t numRows );
52 bool AppendRows(
size_t numRows );
53 bool DeleteRows(
size_t pos,
size_t numRows );
71 static const wxString PropertyTypeStrs[] =
79 static const wxChar* headers[Col_Max] =
90 wxString PropertyTable::GetTypeName(
int row,
int col )
95 return wxString::Format( _T(
"%s:80" ), wxGRID_VALUE_STRING );
98 return wxString::Format( _T(
"%s:string,integer,real,boolean" ), wxGRID_VALUE_CHOICE );
101 int rowtype = m_editProp->m_propdata [row].m_type;
104 case pt_string:
return wxGRID_VALUE_STRING;
105 case pt_integer:
return wxGRID_VALUE_NUMBER;
106 case pt_real:
return wxGRID_VALUE_FLOAT;
107 case pt_bool:
return wxGRID_VALUE_BOOL;
111 wxFAIL_MSG( _T(
"unknown column" ) );
113 return wxEmptyString;
116 int PropertyTable::GetNumberRows()
118 return m_editProp->m_propdata.size();
121 int PropertyTable::GetNumberCols()
126 bool PropertyTable::IsEmptyCell(
int WXUNUSED( row ),
int WXUNUSED( col ) )
131 wxString PropertyTable::GetValue(
int row,
int col )
141 return PropertyTypeStrs[gd.m_type];
146 case pt_string:
return gd.m_val_str;
147 case pt_integer:
return wxString::Format( _T(
"%d" ), gd.m_val_integer );
148 case pt_real:
return wxString::Format( _T(
"%f" ), gd.m_val_real );
149 case pt_bool:
return gd.m_val_boolean? _T(
"1" ) : _T(
"0" );
153 return wxEmptyString;
156 void PropertyTable::SetValue(
int row,
int col,
const wxString& value )
168 PropertyType typeNow = gd.m_type;
170 for ( n = 0; n < WXSIZEOF( PropertyTypeStrs ); n++ )
172 if ( PropertyTypeStrs[n] == value )
174 gd.m_type = ( PropertyType )n;
178 if ( typeNow != gd.m_type )
180 wxGrid* grid = m_editProp->m_grid;
184 grid->SetCellEditor( row, Col_Value,
new wxGridCellTextEditor() );
187 grid->SetCellEditor( row, Col_Value,
new wxGridCellNumberEditor( -1, 1 ) );
190 grid->SetCellEditor( row, Col_Value,
new wxGridCellFloatEditor( -1, 1 ) );
193 grid->SetCellEditor( row, Col_Value,
new wxGridCellBoolEditor() );
198 if ( n == WXSIZEOF( PropertyTypeStrs ) )
200 wxLogWarning( _T(
"Invalid type value '%s'." ),
202 gd.m_type = pt_string;
210 case pt_string: gd.m_val_str = value;
217 PropertyTable::CanGetValueAs(
int row,
219 const wxString& typeName )
221 int rowtype = m_editProp->m_propdata [row].m_type;
225 if ( typeName == wxGRID_VALUE_STRING )
230 if ( typeName == wxGRID_VALUE_NUMBER )
232 if ( typeName == wxGRID_VALUE_CHOICE )
239 case pt_string:
if ( typeName == wxGRID_VALUE_STRING )
242 case pt_integer:
if ( typeName == wxGRID_VALUE_NUMBER )
245 case pt_real:
if ( typeName == wxGRID_VALUE_FLOAT )
248 case pt_bool:
if ( typeName == wxGRID_VALUE_BOOL )
256 bool PropertyTable::CanSetValueAs(
int row,
int col,
const wxString& typeName )
258 return CanGetValueAs( row, col, typeName );
261 long PropertyTable::GetValueAsLong(
int row,
int col )
263 int rowtype = m_editProp->m_propdata [row].m_type;
269 case pt_integer:
return m_editProp->m_propdata [row].m_val_integer;
271 wxFAIL_MSG( _T(
"not a long in column value" ) );
276 wxFAIL_MSG( _T(
"unexpected column" ) );
280 bool PropertyTable::GetValueAsBool(
int row,
int col )
282 int rowtype = m_editProp->m_propdata [row].m_type;
288 case pt_bool:
return m_editProp->m_propdata [row].m_val_boolean;
290 wxFAIL_MSG( _T(
"not a bool in column value" ) );
295 wxFAIL_MSG( _T(
"unexpected column" ) );
299 double PropertyTable::GetValueAsDouble(
int row,
int col )
301 int rowtype = m_editProp->m_propdata [row].m_type;
307 case pt_real:
return m_editProp->m_propdata [row].m_val_real;
309 wxFAIL_MSG( _T(
"not a real in column value" ) );
313 wxFAIL_MSG( _T(
"unexpected column" ) );
317 void PropertyTable::SetValueAsLong(
int row,
int col,
long value )
319 int rowtype = m_editProp->m_propdata [row].m_type;
321 if ( col == Col_Value )
325 case pt_integer: m_editProp->m_propdata [row].m_val_integer = value;
328 wxFAIL_MSG( _T(
"unexpected column" ) );
332 wxFAIL_MSG( _T(
"unexpected column" ) );
335 void PropertyTable::SetValueAsBool(
int row,
int col,
bool value )
337 int rowtype = m_editProp->m_propdata [row].m_type;
339 if ( col == Col_Value )
343 case pt_bool: m_editProp->m_propdata [row].m_val_boolean = value;
346 wxFAIL_MSG( _T(
"not a boolean in column value" ) );
350 wxFAIL_MSG( _T(
"unexpected column" ) );
353 void PropertyTable::SetValueAsDouble(
int row,
int col,
double value )
355 int rowtype = m_editProp->m_propdata [row].m_type;
357 if ( col == Col_Value )
361 case pt_real: m_editProp->m_propdata [row].m_val_real = value;
364 wxFAIL_MSG( _T(
"not a real in column value" ) );
368 wxFAIL_MSG( _T(
"unexpected column" ) );
371 wxString PropertyTable::GetColLabelValue(
int col )
376 bool PropertyTable::InsertRows(
size_t pos,
size_t numRows )
378 wxGrid* grid = m_editProp->m_grid;
379 size_t curNumRows = m_editProp->m_propdata.size();
381 if ( pos >= curNumRows )
383 return AppendRows( numRows );
386 m_editProp->m_propdata.resize( curNumRows + numRows );
389 for ( row = curNumRows + numRows - 1; row > pos + 1; row-- )
391 m_editProp->m_propdata [row] = m_editProp->m_propdata [row - 1];
393 for ( row = pos + 1; row < pos + 1 + numRows; row++ )
395 m_editProp->m_propdata [row].m_name = wxT(
"" );
396 m_editProp->m_propdata [row].m_type = pt_string;
397 m_editProp->m_propdata [row].m_val_str = wxT(
"" );
398 m_editProp->m_propdata [row].m_val_integer = 0;
399 m_editProp->m_propdata [row].m_val_real = 0.0;
400 m_editProp->m_propdata [row].m_val_boolean =
true;
401 m_editProp->m_propdata [row].m_prop = NULL;
406 wxGridTableMessage msg(
this,
407 wxGRIDTABLE_NOTIFY_ROWS_INSERTED,
411 GetView()->ProcessTableMessage( msg );
413 for ( row = pos + 1; row < pos + 1 + numRows; row++ )
415 grid->SetCellEditor( row, Col_Value,
new wxGridCellTextEditor() );
416 if ( !m_editProp->m_propdata [row].m_prop )
417 grid->SetReadOnly( row, 1,
false );
423 bool PropertyTable::AppendRows(
size_t numRows )
425 wxGrid* grid = m_editProp->m_grid;
426 size_t curNumRows = m_editProp->m_propdata.size();
428 m_editProp->m_propdata.resize( curNumRows + numRows );
430 for ( row = curNumRows; row < curNumRows + numRows; row++ )
432 m_editProp->m_propdata [row].m_name = wxT(
"" );
433 m_editProp->m_propdata [row].m_type = pt_string;
434 m_editProp->m_propdata [row].m_val_str = wxT(
"" );
439 wxGridTableMessage msg(
this,
440 wxGRIDTABLE_NOTIFY_ROWS_APPENDED,
443 GetView()->ProcessTableMessage( msg );
445 grid->SetCellEditor( curNumRows + numRows - 1, Col_Value,
new wxGridCellTextEditor() );
450 bool PropertyTable::DeleteRows(
size_t pos,
size_t numRows )
452 size_t curNumRows = m_editProp->m_propdata.size();
454 if ( pos >= curNumRows )
456 wxFAIL_MSG( wxString::Format
458 wxT(
"Called PropertyTable::DeleteRows(pos=%lu, N=%lu)\nPos value is invalid for present table with %lu rows" ),
459 (
unsigned long )pos,
460 (
unsigned long )numRows,
461 (
unsigned long )curNumRows
467 if ( numRows > curNumRows - pos )
469 numRows = curNumRows - pos;
472 if ( numRows >= curNumRows )
475 for ( row = 0; row < curNumRows; row++ )
477 if ( m_editProp->m_propdata [row].m_prop )
478 m_editProp->m_propdata [row].m_prop->SetCheck(
true );
480 m_editProp->m_propdata .clear();
484 PropGridDataVec::iterator iterfirst = m_editProp->m_propdata.begin();
485 PropGridDataVec::iterator iterlast = m_editProp->m_propdata.begin();
487 for ( row = 0; row < pos; row++ )
489 iterlast = iterfirst;
490 for ( row = 0; row < numRows - 1; row++ )
494 for ( row = pos; row < pos + numRows; row++ )
496 if ( m_editProp->m_propdata [row].m_prop )
497 m_editProp->m_propdata [row].m_prop->SetCheck(
true );
499 m_editProp->m_propdata.erase( iterfirst, iterlast );
504 wxGridTableMessage msg(
this,
505 wxGRIDTABLE_NOTIFY_ROWS_DELETED,
509 GetView()->ProcessTableMessage( msg );
526 EVT_BUTTON( ID_ADD, a2dEditProperties::OnAddClick )
527 EVT_BUTTON( ID_CUT, a2dEditProperties::OnCutClick )\
528 EVT_BUTTON( ID_PASTE, a2dEditProperties::OnPasteClick )
529 EVT_BUTTON( ID_CANCEL, a2dEditProperties::OnCancelClick )\
530 EVT_BUTTON( ID_OKE, a2dEditProperties::OnOkeClick )
531 EVT_CLOSE( a2dEditProperties::OnCloseWindow )
532 EVT_SIZE( a2dEditProperties::OnSize )
535 a2dEditProperties::a2dEditProperties( )
541 wxWindowID
id,
const wxString& caption,
const wxPoint& pos,
const wxSize& size,
long style )
543 m_propobject = propobject;
544 m_propertylist = propertylist;
545 Create( parent,
id, caption, pos, size, style );
548 bool a2dEditProperties::Create( wxWindow* parent, wxWindowID
id,
const wxString& caption,
const wxPoint& pos,
const wxSize& size,
long style )
555 SetExtraStyle( GetExtraStyle() | wxWS_EX_BLOCK_EVENTS );
556 wxDialog::Create( parent,
id, caption, pos, size, style );
559 GetSizer()->Fit(
this );
560 GetSizer()->SetSizeHints(
this );
569 wxBoxSizer* itemBoxSizer2 =
new wxBoxSizer( wxVERTICAL );
570 itemDialog1->SetSizer( itemBoxSizer2 );
572 wxBoxSizer* itemBoxSizer3 =
new wxBoxSizer( wxHORIZONTAL );
573 itemBoxSizer2->Add( itemBoxSizer3, 1, wxALIGN_CENTER_HORIZONTAL | wxALL | wxEXPAND, 5 );
576 a2dNamedPropertyList::const_iterator iter;
577 for( iter = m_propertylist->begin(); iter != m_propertylist->end(); ++iter )
584 m_propdata.resize( row );
586 for( iter = m_propertylist->begin(); iter != m_propertylist->end(); ++iter )
591 m_propdata [row].m_prop = prop;
592 m_propdata [row].m_name = prop->
GetName();
595 m_propdata [row].m_type = pt_string;
596 m_propdata [row].m_val_str = prop->
GetString();
600 m_propdata [row].m_type = pt_integer;
601 m_propdata [row].m_val_integer = prop->
GetInt32();
605 m_propdata [row].m_type = pt_real;
606 m_propdata [row].m_val_real = prop->
GetDouble();
610 m_propdata [row].m_type = pt_bool;
611 m_propdata [row].m_val_boolean = prop->
GetBool();
617 m_grid =
new wxGrid( itemDialog1, ID_GRID, wxDefaultPosition, wxSize( 370, 150 ), wxSUNKEN_BORDER | wxHSCROLL | wxVSCROLL );
619 m_grid->SetDefaultColSize( 100 );
620 m_grid->SetDefaultRowSize( 25 );
621 m_grid->SetColLabelSize( 25 );
622 m_grid->SetRowLabelSize( 50 );
623 m_grid->SetTable( table,
true );
624 m_grid->SetColMinimalAcceptableWidth( 50 );
626 wxGridCellAttr* attrNameEditor =
new wxGridCellAttr,
627 *attrTypeEditor =
new wxGridCellAttr;
629 attrNameEditor->SetEditor(
new wxGridCellTextEditor() );
630 attrTypeEditor->SetEditor(
new wxGridCellChoiceEditor( WXSIZEOF( PropertyTypeStrs ),
631 PropertyTypeStrs ) );
632 m_grid->SetColAttr( Col_Name, attrNameEditor );
633 m_grid->SetColAttr( Col_Type, attrTypeEditor );
636 for ( j = 0; j < m_propdata.size(); j++ )
639 int rowtype = m_propdata [j].m_type;
643 m_grid->SetCellEditor( j, 2,
new wxGridCellTextEditor() );
646 m_grid->SetCellEditor( j, 2,
new wxGridCellNumberEditor( -1, 1 ) );
649 m_grid->SetCellEditor( j, 2,
new wxGridCellFloatEditor( -1, 1 ) );
652 m_grid->SetCellEditor( j, 2,
new wxGridCellBoolEditor() );
655 if ( m_propdata [j].m_prop )
656 m_grid->SetReadOnly( j, 1,
true );
659 itemBoxSizer3->Add( m_grid, 0, wxALIGN_CENTER_VERTICAL | wxALL | wxEXPAND, 5 );
661 wxBoxSizer* itemBoxSizer5 =
new wxBoxSizer( wxHORIZONTAL );
662 itemBoxSizer2->Add( itemBoxSizer5, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2 );
664 m_add =
new wxButton( itemDialog1, ID_ADD, _(
"Add" ), wxDefaultPosition, wxDefaultSize, 0 );
666 m_add->SetHelpText( _(
"Add a row for a new property" ) );
668 m_add->SetToolTip( _(
"Add a row for a new property" ) );
669 itemBoxSizer5->Add( m_add, 0, wxALIGN_CENTER_VERTICAL | wxALL , 2 );
671 m_cut =
new wxButton( itemDialog1, ID_CUT, _(
"Cut" ), wxDefaultPosition, wxDefaultSize, 0 );
672 m_cut->SetHelpText( _(
"Remove property at current row" ) );
674 m_cut->SetToolTip( _(
"Remove property at current row" ) );
675 itemBoxSizer5->Add( m_cut, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
677 wxButton* itemButton8 =
new wxButton( itemDialog1, ID_PASTE, _(
"Paste" ), wxDefaultPosition, wxDefaultSize, 0 );
678 itemButton8->SetHelpText( _(
"Paste last cut property" ) );
680 itemButton8->SetToolTip( _(
"Paste last cut property" ) );
681 itemBoxSizer5->Add( itemButton8, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
683 wxBoxSizer* itemBoxSizer9 =
new wxBoxSizer( wxHORIZONTAL );
684 itemBoxSizer2->Add( itemBoxSizer9, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2 );
686 m_cancel =
new wxButton( itemDialog1, ID_CANCEL, _(
"Cancel" ), wxDefaultPosition, wxDefaultSize, 0 );
687 m_cancel->SetHelpText( _(
"End edit without applying new values and properties" ) );
689 m_cancel->SetToolTip( _(
"End edit without applying new values and properties" ) );
690 itemBoxSizer9->Add( m_cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
692 m_oke =
new wxButton( itemDialog1, ID_OKE, _(
"Oke" ), wxDefaultPosition, wxDefaultSize, 0 );
693 m_oke->SetHelpText( _(
"End edit properties" ) );
695 m_oke->SetToolTip( _(
"End edit properties" ) );
696 itemBoxSizer9->Add( m_oke, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
704 void a2dEditProperties::OnAddClick( wxCommandEvent& event )
706 m_grid->InsertRows( m_grid->GetGridCursorRow(), 1 );
710 void a2dEditProperties::OnCutClick( wxCommandEvent& event )
712 m_grid->DeleteRows( m_grid->GetGridCursorRow(), 1 );
716 void a2dEditProperties::OnPasteClick( wxCommandEvent& event )
721 void a2dEditProperties::OnCancelClick( wxCommandEvent& event )
723 EndModal( wxID_CANCEL );
726 void a2dEditProperties::OnOkeClick( wxCommandEvent& event )
729 for ( j = 0; j < m_propdata.size(); j++ )
732 wxString name = m_propdata [j].m_name;
735 if ( m_propobject->HasPropertyId( prop->
GetId() ) )
738 int rowtype = m_propdata [j].m_type;
745 sprop->SetValue( m_propdata [j].m_val_str );
753 dprop->SetValue( m_propdata [j].m_val_integer );
761 dprop->SetValue( m_propdata [j].m_val_real );
769 boolprop->SetValue( m_propdata [j].m_val_boolean );
777 mes = wxT(
"property with name: " ) + name +
778 wxT(
"\nhas already bin created on this object with a different type.\n" ) +
779 wxT(
"use a different name which does not conflict, or set the type to " ) +
780 PropertyTypeStrs[ rowtype ];
781 wxMessageBox( mes, _(
"edit properties" ), wxICON_WARNING | wxOK );
791 wxMessageBox( _(
"object is missing a property ID" ), _(
"edit properties" ), wxICON_WARNING | wxOK );
797 int rowtype = m_propdata [j].m_type;
812 prop->SetValue( m_propdata [j].m_val_str );
823 prop->SetValue( m_propdata [j].m_val_integer );
834 prop->SetValue( m_propdata [j].m_val_real );
845 prop->SetValue( m_propdata [j].m_val_boolean );
853 mes = wxT(
"property with name: " ) + name +
854 wxT(
"\nhas already bin created on this object, but with a different type.\n" ) +
855 wxT(
"use a different name which does not conflict, or set the type to " ) +
856 PropertyTypeStrs[ rowtype ];
857 wxMessageBox( mes, _(
"edit properties" ), wxICON_WARNING | wxOK );
860 m_propertylist->push_back( propcreated );
872 m_propobject->AddPropertyId( propid );
880 m_propobject->AddPropertyId( propid );
883 prop->SetValue( m_propdata [j].m_val_integer );
889 m_propobject->AddPropertyId( propid );
892 prop->SetValue( m_propdata [j].m_val_real );
898 m_propobject->AddPropertyId( propid );
901 prop->SetValue( m_propdata [j].m_val_boolean );
905 m_propertylist->push_back( propcreated );
913 void a2dEditProperties::OnCloseWindow( wxCloseEvent& event )
915 EndModal( wxID_CANCEL );
918 void a2dEditProperties::OnSize( wxSizeEvent& event )
923 int clientw, clienth;
924 GetClientSize( &clientw, &clienth );
926 GetSizer()->SetSizeHints(
this );
927 GetSizer()->Fit(
this );
955 const int GROUP_BUTTON_OK = wxID_HIGHEST + 5401 ;
956 const int GROUP_BUTTON_CANCEL = wxID_HIGHEST + 5402 ;
957 const int GROUP_BUTTON_SHOW = wxID_HIGHEST + 5403 ;
966 wxDialog( parent, -1, _T( "Property editor" ), wxPoint( 0, 0 ), wxSize( 100, 500 ),
967 ( wxDEFAULT_DIALOG_STYLE | wxSTAY_ON_TOP | wxRESIZE_BORDER ), _T( "Property editor" ) )
969 m_listbox =
new wxListBox(
this, -1, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_NEEDED_SB | wxLB_SINGLE );
970 m_button1 =
new wxButton(
this, GROUP_BUTTON_OK, _T(
"Ok" ), wxDefaultPosition, wxSize( 55, 20 ) );
971 m_button2 =
new wxButton(
this, GROUP_BUTTON_CANCEL, _T(
"Cancel" ), wxDefaultPosition, wxSize( 55, 20 ) );
973 m_propertylist = NULL;
976 wxBoxSizer* item0 =
new wxBoxSizer( wxVERTICAL );
978 wxStaticText* title =
new wxStaticText(
this, -1, _T(
"properties" ) );
979 wxBoxSizer* item3 =
new wxBoxSizer( wxHORIZONTAL );
980 item3->Add( title, 1, wxALL, 2 );
981 item0->Add( item3, 0, wxEXPAND, 2 );
984 wxBoxSizer* item1 =
new wxBoxSizer( wxHORIZONTAL );
985 item1->Add( m_listbox, 1, wxEXPAND | wxALL, 2 );
986 item0->Add( item1, 1, wxEXPAND, 2 );
988 wxBoxSizer* item2 =
new wxBoxSizer( wxHORIZONTAL );
989 item2->Add( m_button1, 1, wxALL, 2 );
990 item2->Add( m_button2, 1, wxALL, 2 );
992 item0->Add( item2, 0, wxEXPAND, 2 );
994 SetAutoLayout(
true );
997 item0->SetSizeHints(
this );
1000 a2dNamedPropertyList::const_iterator iter;
1001 for( iter = propertylist->begin(); iter != propertylist->end(); ++iter )
1010 if ( !propertylist->empty() )
1011 m_listbox->SetSelection( 0,
true );
1020 EndModal( wxID_OK );
1025 EndModal( wxID_CANCEL );
1030 wxCommandEvent eventc;
virtual double GetDouble() const
when a2dDoubleProperty, return its value else assert
(In) Visible property that can be added to Docview Objects.
virtual wxString GetString() const
when a2dStringProperty, return its value else assert
#define wxDynamicCast(obj, className)
Define wxDynamicCast so that it will give a compiler error for unrelated types.
a2dEditProperties()
Constructors.
virtual wxInt32 GetInt32() const
when a2dInt32Property, return its value else assert
virtual wxString GetName() const
Get the ids print and serialization name.
a2dPropertyIdTyped< wxString, a2dStringProperty > a2dPropertyIdString
property of this type
void CmCancel(wxCommandEvent &)
Close window if CANCEL-button is pressed.
property to hold a double type variable to be associated with a a2dObject
a2dPropertyIdTyped< wxInt32, a2dInt32Property > a2dPropertyIdInt32
property of this type
property to hold a bool type variable to be associated with a a2dObject
void SetName(const wxString &name)
Set the ids print and serialization name.
a2dPropertyIdTyped< bool, a2dBoolProperty > a2dPropertyIdBool
property of this type
bool Create(wxWindow *parent, wxWindowID id=SYMBOL_A2DEDITPROPERTIES_IDNAME, const wxString &caption=SYMBOL_A2DEDITPROPERTIES_TITLE, const wxPoint &pos=SYMBOL_A2DEDITPROPERTIES_POSITION, const wxSize &size=SYMBOL_A2DEDITPROPERTIES_SIZE, long style=SYMBOL_A2DEDITPROPERTIES_STYLE)
Creation.
wxString GetName() const
Get the name of the a2dPropertyId object.
list of a2dNamedProperty objects
~a2dPropertyEditorDlg()
destructor.
void CmOk(wxCommandEvent &)
Close window if OK-button is pressed.
property to hold a 2 byte integer type variable to be associated with a a2dObject ...
static bool ShowToolTips()
Should we show tooltips?
bool IsUserDefined() const
true if this property is user defined
edit properties of a2dCanvasObject's
virtual bool GetBool() const
when a2dBoolProperty, return its value else assert
const a2dPropertyId * GetId() const
Get the a2dPropertyId object identifying this property.
property to hold a wxString type variable to be associated with a a2dObject
for edting properties in a a2dNamedPropertyList
void CreateControls()
Creates the controls and sizers.
This is the base class for all kinds of property id's for a2dObject.
bool IsEditable() const
true if this property is editable ( can be tested in a property editor ).
A property id defined by user.
void OnCloseWindow(wxCloseEvent &event)
Close window if EXIT -button is pressed.
virtual a2dNamedProperty * CreatePropertyFromString(const wxString &value) const
Create a new property object from a value string.
a2dPropertyIdTyped< double, a2dDoubleProperty > a2dPropertyIdDouble
property of this type