I would like to suggest there to be an additional component added for labels:
This label object should have the following properties removed from its structure that are not required for its implementation.
Current 'Static' labels are structured like this;
Code: Select all
structure TCLabel
dim OwnerScreenID as word
dim Order as byte
dim Left_ as word
dim Top as word
dim Width as word
dim Height as word
dim Caption as ^ const char
dim Fontname as ^ const byte
dim Font_Color as word
dim Visible as byte
dim Active as byte
dim OnUpPtr as ^TOnEventPtr
dim OnDownPtr as ^TOnEventPtr
dim OnClickPtr as ^TOnEventPtr
dim OnPressPtr as ^TOnEventPtr
end structure code
these property options for labels that never change, never need event actions or be anything but static 'dead' characters on the screen.
So here is my proposed new object structure:
Code: Select all
structure TCLabel
dim OwnerScreenID as word
dim Order as byte
dim Left_ as word
dim Top as word
dim Width as word
dim Height as word
dim Caption as ^ const char
dim Fontname as ^ const byte
dim Font_Color as word
dim Visible as byte ' ? is changeable in a "static" object ???
end structure code
changeable properties (stored entirely in ROM?).
If not state changeable from code, Visible property should also be removed and the non-static label used instead when users need
labels that are dynamic intended.
Changes to label draw routine(s) are required to accommodate or entirely different routine be used.
A non-static version with "Visible" property would satisfy needs for having a label toggle on/off displayed, but all other properties
not required to save memory usage.
How much object memory would be saved/recovered with this proposal? Enough to justify adding?
Thanks, Robert.