/ i @

Properties

<<<< ^^^^^ >>>>


Properties

These properties are designed to be set from calls in your applications code. None can be set using the standard property page.

This section is separated into standard properties, item properties, other properties.

This control's non-standard properties are:



Standard Properties

The standard properties supported by this control are Appearance, BackColor, BorderStyle, ForeColor and hWnd . Developers should note the use of the American spelling of these names.



Item Properties

This section discusses the various item properties, which allow an application detailed control on the appearance of a chemical drawn in the control.

All these properties require an item number, which can be one of the following:

These item numbers are currently defined as follows:

#define ITEM_ISOTOPE 1
#define ITEM_SYMBOL 2
#define ITEM_CHARGE 3
#define ITEM_MULTIPLIER 4
#define ITEM_STRUCTURE 5
#define ITEM_COMPOUND 6
#define ITEM_BOND 7
#define ITEM_CARBON 8
#define ITEM_HYDROGEN 9
#define ITEM_CHIRAL 10
#define ITEM_PLUS 11
#define ITEM_ARROW 12
#define ITEM_SUPERATOM 13
#define ITEM_BRACKET 14
#define ITEM_RTF 15
#define ITEM_LINE 16
#define ITEM_FORMULA 17
#define ITEM_WEIGHT 18
#define ITEM_TITLE 19
#define ITEM_SUBTITLE 20
#define ITEM_VERSION 21
#define ITEM_DESCRIPT 22
#define ITEM_COMMENT 23
#define ITEM_CREATOR 24
#define ITEM_CDATE 25
#define ITEM_MODIFIER 26
#define ITEM_MDATE 27
#define ITEM_COPYRIGHT 28
#define ITEM_CHEMSHOW 29
#define ITEM_FIELDNAME 30
#define ITEM_FIELDVALUE 31

A number of items are included purely for documentary purposes.



ItemColour

The ItemColour property specifies the colour used to draw the item.

OLE_COLOUR ItemColour (short nItem);

See item properties for details of the possible value of nItem.

See item properties, return to Properties, the Developer's Reference, or the top of this document.



ItemDrawn

The ItemDrawn property determines whether an item is drawn or not.

short Drawn (short nItem);

If this property is non-zero, the item is drawn. The ItemPosition property can also be used to prevent an item appearing.

The Chiral text is only drawn when both this property for the Chiral item and the Chiral property are set.

See the Chiral and ItemPosition properties, item properties, return to Properties, the Developer's Reference, or the top of this document.



ItemFont

The ItemFont property specifies the name of the font used to display a text item.

BSTR ItemFont (short nItem)

See item properties for details of the possible value of nItem. Text items include ITEM_CARBON ITEM_CHARGE, ITEM_CHIRAL, ITEM_COMPOUND, ITEM_HYDROGEN. ITEM_MULTIPLIER, ITEM_ISOTOPE, ITEM_STRUCTURE, ITEM_ARROW, ITEM_SYMBOL, ITEM_PLUS, ITEM_FORMULA and all subsequent properties. What happens when the font is not available on the user's system is undefined.

See the Minimum and Label properties, item properties, return to Properties, the Developer's Reference, or the top of this document.



ItemLabel

The ItemLabel property specifies the text, if any, associated with an item.

BSTR Label (short nItem);

Various items have text which cannot be drawn. Certain items have text which can be set by particular mechanisms:

See the Chiral, Font and Minimum properties, item properties, return to Properties, the Developer's Reference, or the top of this document.



ItemMinimum

The ItemMinimum property specifies the minimum font size used to display text, if any, associated with an item.

short Minimum (short nItem);

The default value of this property is always zero, indicating no minimum size.

See the ItemLabel and ItemFont properties, item properties, return to Properties, the Developer's Reference, or the top of this document.



ItemSize

The ItemSize property determines the relative size of an item.

double ItemSize (short nItem);

See item properties for details of the possible value of nItem. The relationship used to determine the size depends on the item, as follows:

All other properties are drawn relative to the control's client area, with a default value of 0.05.

See item properties, return to Properties, the Developer's Reference, or the top of this document.



ItemOffset

The ItemOffset property determines the relative offset of certain items.

double ItemOffset (short nItem);

See item properties for details of the possible value of nItem. The relationship used to determine the size depends on the item, as follows:

All properties from ITEM_FORMULA upwards are drawn relative to the margin - default 0.02.

See item properties, return to Properties, the Developer's Reference, or the top of this document.



ItemPosition

The ItemPosition property determines the relative position of certain items.

short ItemPosition (short nItem);

See item properties for details of the possible value of nItem. The relationship used to determine the size depends on the item.

For the text items ITEM_CHIRAL, ITEM_COMPOUND, ITEM_STRUCTURE, ITEM_FORMULA and properties above nItem has the following possible values:

For the items ITEM_SYMBOL, ITEM_CARBON and ITEM_HYDROGEN, nItem has the following possible values:

For ITEM_SUPERATOM, it controls the relative distance from the superatom to any containing brackets. The default is 8.

See the ItemDrawn property, item properties, return to Properties, the Developer's Reference, or the top of this document.



ItemThickness

The ItemThickness property determines the thickness of lines used to draw certain items.

short ItemThickness (short nItem);

See item properties for details of the possible value of nItem.

ITEM_ARROW, ITEM_BOND, ITEM_BRACKET and ITEM_LINE all use this property to control the thickness of lines drawn. A value of zero means the narrowest line possible. Be warned that on high density screens, small lines may not be visible.

See the ItemDrawn property, item properties, return to Properties, the Developer's Reference, or the top of this document.



Other Properties

This section discusses the remaining properties found in the control.



Chiral

The Chiral property specifies whether the chemical currently on display is marked as chiral.

BOOL Chiral;

Some appropriate text can be displayed according to Item Label property using ITEM_LABEL.

Note that this property only affects the way the chemical is displayed in the control; it does not affect the chiral flag.

Return to Properties, the Developer's Reference, or the top of this document.



DoubleDistance

The DoubleDistance property specifies the relative space between lines in double and triple bonds.

double DoubleDistance;

This value is calculated relative to the average bond length of bonds drawn in the compound. Thus a double distance of 1.0 implies the lines are separated by the average bond length, which is probably a little excessive. The default distance is 0.15.

See the BondThickness property, return to Properties, the Developer's Reference, or the top of this document.



Whitespace

The Whitespace property specifies the relative quantity of white space between the chemical being drawn and the edge of the control.

double Whitespace();

The value is a percentage, with 100 representing nothing but white space, and zero representing no margin. You should always ensure you have some margin when drawing a chemical, because coordinates of atoms are specify the centre of the atom. The default value of both margins is 80.0.

Return to Properties, the Developer's Reference, or the top of this document.



Zoom

The Zoom indicates by how much the displayed has been zoomed in.

double Zoom;

If Zoom is set to 1.0, no zooming is occuring. Numbers larger than 1.0 show the display is zoomed in. Numbers less than 1.0 are invalid.

Return to Properties, the Developer's Reference, or the top of this document.





Version 1.0.2, 8th May 2001

cyberspace services limited has ceased trading
this archive is hosted by arts & ego
© 1978-2024 dylan harris