the following behaviour:
\begin{itemize}\itemsep=0pt
-\item Double-clicking on the item toggles between TRUE and FALSE.
-\item Showing the value list enables the user to select TRUE or FALSE.
-\item The user may be able to type in the word TRUE or FALSE, or the edit control
+\item Double-clicking on the item toggles between true and false.
+\item Showing the value list enables the user to select true or false.
+\item The user may be able to type in the word true or false, or the edit control
may be read-only to disallow this since it is error-prone.
\end{itemize}
\item propform.h: wxPropertyListView and associated classes
\end{itemize}
-
-
-
-
-
-
-
-
\section{Topic overviews}\label{proplistoverviews}
This chapter contains a selection of topic overviews.
wxPropertySheet *sheet = new wxPropertySheet;
sheet->AddProperty(new wxProperty("fred", 1.0, "real"));
- sheet->AddProperty(new wxProperty("tough choice", (Bool)TRUE, "bool"));
+ sheet->AddProperty(new wxProperty("tough choice", (Bool)true, "bool"));
sheet->AddProperty(new wxProperty("ian", (long)45, "integer", new wxIntegerListValidator(-50, 50)));
sheet->AddProperty(new wxProperty("bill", 25.0, "real", new wxRealListValidator(0.0, 100.0)));
sheet->AddProperty(new wxProperty("julian", "one", "string"));
wxPropertyListFrame *propFrame = NULL;
if (useDialog)
{
- propDialog = new wxPropertyListDialog(view, NULL, "Property Sheet Test", TRUE, -1, -1, 400, 500);
+ propDialog = new wxPropertyListDialog(view, NULL, "Property Sheet Test", true, -1, -1, 400, 500);
}
else
{
{
view->ShowView(sheet, propDialog);
propDialog->Centre(wxBOTH);
- propDialog->Show(TRUE);
+ propDialog->Show(true);
}
else
{
propFrame->Initialize();
view->ShowView(sheet, propFrame->GetPropertyPanel());
propFrame->Centre(wxBOTH);
- propFrame->Show(TRUE);
+ propFrame->Show(true);
}
}
\end{verbatim}
wxPropertySheet *sheet = new wxPropertySheet;
sheet->AddProperty(new wxProperty("fred", 25.0, "real", new wxRealFormValidator(0.0, 100.0)));
- sheet->AddProperty(new wxProperty("tough choice", (Bool)TRUE, "bool"));
+ sheet->AddProperty(new wxProperty("tough choice", (Bool)true, "bool"));
sheet->AddProperty(new wxProperty("ian", (long)45, "integer", new wxIntegerFormValidator(-50, 50)));
sheet->AddProperty(new wxProperty("julian", "one", "string"));
wxStringList *strings = new wxStringList("one", "two", "three", NULL);
wxPropertyFormFrame *propFrame = NULL;
if (useDialog)
{
- propDialog = new wxPropertyFormDialog(view, NULL, "Property Form Test", TRUE, -1, -1, 400, 300);
+ propDialog = new wxPropertyFormDialog(view, NULL, "Property Form Test", true, -1, -1, 400, 300);
}
else
{
view->AssociateNames();
view->TransferToDialog();
propDialog->Centre(wxBOTH);
- propDialog->Show(TRUE);
+ propDialog->Show(true);
}
else
{
view->AssociateNames();
view->TransferToDialog();
propFrame->Centre(wxBOTH);
- propFrame->Show(TRUE);
+ propFrame->Show(true);
}
}
\end{verbatim}
may like to work out how the form view could be extended to provide some of the
functionality of the property list!
-Validator objects may be associated explictly with a wxProperty, or they may be
+Validator objects may be associated explicitly with a wxProperty, or they may be
indirectly associated by virtue of a property `kind' that matches validators having
that kind. In the latter case, such validators are stored in a validator registry
which is passed to the view before the dialog is shown. If the validator takes
`edit a button', or rather, edit the button's properties. One of the
properties you can edit is {\it width} - but there is no explicit
representation of width in a wxWindows button; instead, you call SetSize
-and GetSize members. To translate this into a consisent,
+and GetSize members. To translate this into a consistent,
property-oriented scheme, we could derive a new class
wxButtonWithProperties, which has two new functions: SetProperty and
GetProperty. SetProperty accepts a property name and a value, and calls
wxButtonWithProperties::SetProperty to transfer the wxProperty value back into the button
by way of an appropriate call, wxWindow::SetSize in the case of width and height properties.
-
-
\section{Classes by category}\label{proplistclassesbycat}
A classification of property sheet classes by category.
\item \helpref{wxPropertySheet}{wxpropertysheet}
\end{itemize}
-
\subsection{Validator classes}\label{proplistvalidatorclasses}
Validators check that the values the user has entered for a property are