Class CadPropertyRow
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
One row of the Properties panel: a label and a value, which may be read-only.
public sealed class CadPropertyRow
- Inheritance
-
CadPropertyRow
- Inherited Members
Constructors
- CadPropertyRow(string, string, bool)
Makes a row.
- CadPropertyRow(string, string, bool, IReadOnlyList<string>)
Makes a row whose value is one of a list, as the Justify row of an MTEXT offers Top left to Bottom right.
- CadPropertyRow(string, string, Func<string, string>, IReadOnlyList<string>)
Makes a row that an extension gives the Properties panel and that can be changed: typed into, or one of a list where
choicesare given. The panel callssetterwith the text typed or chosen, as it does for its own rows, when Enter is pressed, the box is left or a choice is made.
Fields
- NoText
The value of a check box that is not ticked.
- VariesText
The text of a value that differs among the selected entities.
- YesText
The value of a check box that is ticked.
Properties
- Choices
Gets the values the row offers, as the Text pos vert row of a dimension offers Centered, Above, Outside, JIS and Below; null for a row typed into.
- IsReadOnly
Gets whether the value cannot be edited.
- Kind
Gets what kind of value the row holds, which tells the window what to offer: Text for a row typed into, Choice where choices are given, Check for a check box made with Check(string, bool, Func<string, string>), and the others for the rows Number(string, double, Func<double, string>), Length(string, double, CadDocument, Func<double, string>), Angle(string, double, CadDocument, Func<double, string>), Point(string, GeoPoint3, CadDocument, Func<GeoPoint3, string>), Color(string, DxfColor, Func<DxfColor, string>), Layer(string, string, Func<string, string>), Linetype(string, string, Func<string, string>) and Lineweight(string, DxfLineWeight, Func<DxfLineWeight, string>) make. A read-only row from Check(string, bool, Func<string, string>) is Text.
- Label
Gets the label.
- Setter
Gets what changes the value of a row an extension gave, given the text typed or chosen (YesText or NoText for a check box): it returns null where the change was made, else the words of the refusal. Null for the rows the presenter makes, which it commits itself.
- Value
Gets the value as text.
- Varies
Gets whether the selected entities differ in this property.
Methods
- Angle(string, double, CadDocument, Func<double, string>)
Makes a row for an angle, written and read in the drawing's angle units, AUNITS and AUPREC: 90 degrees is "90" in decimal degrees to no places, and "90d0'0"" in degrees, minutes and seconds. The value is in radians from the X axis. Text that does not read is refused with "<label> is a number." and the setter is not called.
- Check(string, bool, Func<string, string>)
Makes a row that is a check box, ticked or not, that an extension gives the Properties panel: ticking it calls
setterwith YesText, and clearing it with NoText. Where the setter is null the row only shows the answer, as text.
- Color(string, DxfColor, Func<DxfColor, string>)
Makes a row for a colour, written as the palette writes one (ByLayer, ByBlock, Red to White, an index 1 to 255, or 255,128,0) and read the same way; the window offers its list of colours with Select Color. Text that does not read is refused with the palette's own words and the setter is not called.
- Layer(string, string, Func<string, string>)
Makes a row for a layer's name; the window offers the layers of the drawing. The name typed or chosen goes to the setter as it is, which refuses one the drawing has not.
- Length(string, double, CadDocument, Func<double, string>)
Makes a row for a length, written and read in the drawing's units, LUNITS and LUPREC: 12.5 is "12.5000" in decimal units to four places, and 14 inches typed as 1'2" is read in architectural units. Text that does not read is refused with "<label> is a number." and the setter is not called.
- Linetype(string, string, Func<string, string>)
Makes a row for a linetype's name; the window offers the linetypes of the drawing. The name typed or chosen goes to the setter as it is, which refuses one the drawing has not.
- Lineweight(string, DxfLineWeight, Func<DxfLineWeight, string>)
Makes a row for a lineweight, written as the palette writes one (ByLayer, ByBlock, Default, or 0.25 mm) and read the same way; the window offers AutoCAD's widths. Text that does not read is refused with the palette's own words and the setter is not called.
- Number(string, double, Func<double, string>)
Makes a row for a number typed as it is, in the invariant culture: 12.5, whatever the machine's separator. Typing "abc" is refused with "<label> is a number." and the setter is not called.
- Point(string, GeoPoint3, CadDocument, Func<GeoPoint3, string>)
Makes the three rows of a point, "<label> X", "<label> Y" and "<label> Z", each a Length(string, double, CadDocument, Func<double, string>); typing one gives the setter the point with that coordinate changed and the others as they were. With a setter, the row being edited shows a pick-point button: it asks "Pick a point in the drawing:" on the command line, with a rubber band from the point, and a point picked gives the setter the whole point, its X and Y the picked ones and its Z as it was, as one change.