HOME, PRODUCTS, ARTICLESCONTACTGLOSS CONTOUR SUITE™ FOR .NET

DOWNLOAD OR BUY Gloss Contour Suite™GCSuite™ FEEDBACKGCSuite™ SUPPORT

GlossContourButton™

GlossContourButton™ drew our logo images.

ADVANCE Gloss Contour Suite™ for .NET DEVELOPMENT (ALL .NET DEVELOPMENT LANGUAGES)

Gloss Contour Button and Surface Suite™ delivers "to die for" visual appeal, tab and MouseOver capable focus, light footprints, and futuristic "ContourClient™" drawing behavior to .Net user interfaces.

When we first expanded to .Net from Win32, we were disturbed by the absence of a useful equivalent to the Delphi™/CPPB™ Speedbutton. TSpeedbutton eliminated the pronounced delineation and convolution of conventional buttons — making it indispensable to the cleanest, most uncluttered UIs. Gloss Contour Suite™ (GCS) allows developers to maintain this style of interface design, to readily build indispensable features such as wrapping toolbars and toggle controls, and to benefit from GCS's ground breaking surface conformation and group drawing technologies.

Gloss Contour Button and Surface Suite™ also allows you to do important things beyond the capacities of Visual Studio's ToolStrip and ToolStripContainer controls. GCS allows you to easily build toolbars or wrapping toolbars in which the contours of the toolbar exist either in the tool buttons themselves, or in the GCS surface they belong to. Freed of the spatial restrictions of ToolStrip implementations, your essential tools can make the best use of available space.

Multiple GlossContourButtons™ in ContourClient™ roles to a GlossContourSurface™. In its automated client role, each button does not have to compute its drawing surface data — it simply derives necessary subsets for every state from pre-computed server (GlossContourSurface™) data. Buttons are shown in various disabled, enabled, and toggle (normal/down) states — all derived from pre-computed server information.

GCS goes much farther than its TSpeedbutton predecessor — producing stunning .Net interfaces with tab and MouseOver capable focus, exceedingly light footprints, and futuristic stand-alone or "ContourClient™" drawing behavior. Automated ContourClient/Server roles produce ultra-fast group drawing by eliminating overlapping, redundant computation of surface drawing data. Drawing speed computation advantages for 20 client buttons approach 20:1 for instance, because client buttons simply draw themselves from data already computed by the server instance, as necessary to draw the server itself. Because client buttons automatically derive their surface drawing data from subsets of pre-computed server instance data, you can readily build exotic features such as wrapping toolbars in which each button will *automatically* draw itself with the contours of the server, wherever and whenever it is positioned on the server surface. You don't write a line of code to benefit from this valuable behavior. Yet you get drawing speed and behavior that no other component can touch.

  • Fully CLS compliant, safe code.
  • Broad application envelope.
    • Use GlossContourSurface™ instead of Panels.
    • Use GlossContourButton™ for potentially every button you deploy — flat or contoured.
  • Derived from System.Windows.Forms.Control for a minimal footprint.
  • Fast individual drawing.
  • MouseOver/hover capable focus behavior.
  • Supports two glyphs, wrapped captions.
  • Enabled, disabled, up, and down glyph states, as well as transparency, gloss, and glare, are automatically processed by the button.
  • Glyph-centering rectangles accommodate minimal images and simplify configuration.
  • Powerful, compact drawing capabilities eliminate manual graphics processing and reduce footprints to a fraction of bitbutton UI approaches.
  • Optional flat, top only, bottom only, or top and bottom contouring. Uncontoured regions are drawn flat.
  • Deploy AutoEliminateWhiteOut™ and Luminosity Averaging™ behaviors by simple property configuration.

    White-out engendered by user configuration (left), automatically adjusted out (right) by setting AutoEliminateWhiteOut™ to true.

  • Configurable gloss intensity, glyph glare, sharpen, and edge facet (beveling) intensity.
  • Configurable up, down, focused and disabled states, including focused and down border colors.

    ADVANCE GlossContourButton™.

    Focused up and focused down states, with focus indicated by Colors.BorderFocused == red.

    Colors.BorderDown set to blue.

  • R, G, and B offset properties allow you to distinguish button groups by tinting, and to retain luminosity adjustments applied to system colors.

    Button groups distinguished by subtle tinting of SystemColors.Control (top) — red, green blue.
    Derivatives survive product distribution and OnSystemColorsChanged( ).

  • Extremely fast group rendering:
    • Instances draw individually, or act as ContourClients™ or ContourServers™ — leveraging fast individual drawing capabilities by simply deriving client surfaces from data already computed by the server.
    • Compute-intensive group drawing overhead is far less than InstanceSpeed x NumberOfInstances. In terms of producing drawing data, GroupDrawingOverhead = ServerDrawingOverhead.

    Multiple GlossContourButtons™ in ContourClient™ roles.

  • Stunning, clean visual effects.

This page fully documents the 5 GCS classes for all .Net development environments except MONO (which is yet to be released). Source examples are provided in C#. Find all the information you need here, except for advanced installation instructions (which are linked from the download page and technical documentation directory below).

The free evaluation download is a MSI (Microsoft Installer) application. Technical installation documentation should only be necessary for advanced applications. Practically all users will have Microsoft Installer installed on their development systems. MSI is the preferred installation technology. If you prefer or require a conventional setup executable, please email the support or feedback addresses above, and we will gladly make these available to you.

OVERVIEW

A horizontally oriented, radiused graphic style has been adopted by ever growing numbers of Web pages and application UIs (user interfaces). You are seeing the contour and gloss effects drawn by our Gloss Contour Suite™ all over the Web now, because the effects are modern, and because they are a logical fit for computer implementations.

Traditionally, graphics shops have laboriously produced these effects by evolving, experimental processes. Now, GlossContour Suite™ instantaneously delivers sophisticated gloss, glare, and contour effects at minimal cost, from basic source images which to now have been just the initial step of trying and costly, manual graphics work.

Source image instantly processed by GlossContourButton™ into the several states of the button below.

Broad GCS configuration capabilities are capable of producing any practical effect. You have 2 choices for underlying painting technology:

  1. Fast individual drawing algorithms can paint your effects.
  2. Our underlying ContourClient™/ContourServer™ drawing technology can provide even faster per instance drawing.

    This technology allows client instances to simply borrow from once-computed, overlapping server drawing data.

Thus, you can deploy GlossContourButtons™ and GlossContourSurfaces™ in the simple, independent fashion of typical buttons and panels. Or you may take advantage of automated ContourClient™/ContourServer™ role capabilities to expedite group drawing speed and/or to benefit from drawing behavior which replicates parent server surface features in each child client.

Full automation of ContourClient™/ContourServer™ roles makes your job exceedingly simple. All you have to do to benefit from this behavior is assign the ContourServer™ instance to each ContourClient's™ ContourServer™ property.

The ContourServer™ may simply be another GlossContourButton™ which you would like a remainder of buttons to look like. Or the ContourServer™ can be a GlossContourSurface™ which parents however many ContourClient™ buttons. In the latter case, each button will *automatically* assume the contours of its position on the ContourServer™. Wherever you locate each button, it automatically replicates server contours so that it is drawn as an integral feature of the server surface. Complete automation means you do not have to write a line of code to benefit from this behavior:

  1. Groups of buttons therefore can borrow the configuration (as drawing data) of a given server button.

    In this case, each client button's surfaces replicate the server button's surfaces. Individual glyphs and captions are drawn according to the prescriptions of each client.

  2. Or buttons can borrow the surface data of a parent surface.

    In this case, without any supporting code, each button is automatically drawn as an integral part of the server surface — automatically replicating the contours of its position.

Drawing data is computed by the ContourServer™, which is obligated to compute this same data merely to paint itself. Clients automatically draw from appropriate server data subsets.

Automated ContourClient™ behavior therefore allows you to do some pretty fancy things you can't do with other controls. For instance, you can configure a GlossContourSurface™ with any style of radii, contouring, and/or gloss, populate it with GlossContourButtons™, configure the buttons to be clients of the surface, and with mere generic positioning code, create a wrapping toolbar in which the buttons automatically assume the contours of the underlying surface.

Developers do not have to write a line of code to produce this behavior: A typical toolbar implementation automatically inherits this behavior from GlossContour Suite™.

Top: A GlossContourButton™ configured to ContouredRegions.TopOnly. Bottom: A GlossContourSurface™ configured to ContouredRegions.BottomOnly acts as a ContourServer™ to 5 child GCButtons™.

When ContourClient™ 1 is moved to position 2, it automatically assumes the contours of its relative position by re-drawing itself from pre-computed server data. Down states (3) likewise derive concave contours from pre-computed data.

Multiple GlossContourButtons™ in ContourClient™ roles. Each button is automatically drawn from server data as an integral part of the parent GlossContourSurface™.

16x magnification details optional clipped corners, effects applied to glyph and edge facets, and sharpening applied to the margin between glossed and shadowed regions. AutoEliminateWhiteOut == false in this image.

WORKING WITH ADVANCE GlossContourButton™ AND GlossContourSurface™

Anyone with a basic understanding of color and luminosity can easily deliver stunning GCSuite™ effects by regulating contour, tint, gloss, sharpen, and glare. This topic explains the interaction of gloss and contour processes, and provides guidelines for quality work.

  1. Interaction of Gloss and Contour Processes:

    Gloss processes add the value of a LuminosityDifferentials.Gloss property to the upper radius of a convex region or lower radius of a concave ("Down") region. Countour effects add the value of a LuminosityDifferentials.PerPixelOfContour property to each row of this same glossed region. Thus if base colors are not sufficiently dark, the combined countour and gloss effects produce "unintended white-out" before reaching the region's terminus. This results in potentially substantial portions of the glossed region being white — making it impossible to render intended contour effects.

    Two properties automatically account for unintended white-out:

    1. AutoEliminateWhiteOut and AutoEliminateWhiteOut_MaxLeastRGB:

      AutoEliminateWhiteOut adjusts base color luminosity downward so that the least RGB color component of the glossed effect will be no greater than AutoEliminateWhiteOut_MaxLeastRGB. For example, if Colors.Fore.R == 200, Colors.Fore.G == 190, and Colors.Fore.B == 180 and AutoEliminateWhiteOut_MaxLeastRGB == 245, the maximum B of the glossed region will be no greater than 245.

       

      A drawing prescription which produces unintended white-out (left, AutoEliminateWhiteOut == false), automatically adjusted into range (right) by setting AutoEliminateWhiteOut™ = true and AutoEliminateWhiteOut_MaxLeastRGB = 0.

    2. Related Configuration Options:

      To bring results back into line with the intended base color, you can also reduce LuminosityDifferentials.Gloss, LuminosityDifferentials.EdgeBevels, and/or LuminosityDifferentials.PerPixelOfContour.

      LuminosityDifferentials.Gloss == 10 (left), 32 (right), with AutoEliminateWhiteOut™ set to true. Reducing LuminosityDifferentials.Gloss of the right configuration will bring the prescription back toward the base color (as on the left).

  2. General Guidelines:
    1. Additional factors of glossiness:
      1. Sharpen contributes to the impression of gloss, because finer finishes produce the most defined reflections.
      2. LuminosityDifferentials.GlyphGlare contributes to the effect of reflection and gloss by emphasizing reflection over a distinguishing feature.
    2. Tighter (lesser) RadiusYSpan values generally require greater LuminosityDifferentials.PerPixelOfContour values to distinguish contours, and lesser LuminosityDifferentials.Gloss values to emulate naturally reduced reflections of restricted radii.
    3. Conservative contours are preferred for legibility and style.
    4. Clean designs maximize impact by minimizing exceptional work in button or surface instances and regularly exercising SystemColors.Control as a base color.

TECHNICAL REFERENCE

NAMESPACE

ADVANCEIS

Controls_N

CLASS TREE

System.Windows.Forms.Control

GCServer_Base

GlossContourButton_UnInit (specialized — dynamic creation only)

GlossContourButton

GlossContourSurface_UnInit (specialized — dynamic creation only)

GlossContourSurface

GlossContourButton_UnInit and GlossContourSurface_UnInit deliver high performance dynamic creation speed by not triggering drawing from within their constructors. After creation, code can assign to drawing-intensive properties, finally calling ServerOrInstance.Paint_ResumeAll( ) to perform drawing once only, as in the following example.

UnInit EXAMPLE

Copy code to clipboard (JavaScript/IE).

EVENTS

public event OnRightClickHandler RightClick

public delegate void OnRightClickHandler( Object sender );

Declared in GlossContourButton_UnInit™.

Directly responds to right click without mouse handling code.

METHODS

Note that calling Paint_SuspendAll( ) or Paint_ResumeAll( ) on ContourServers™ invokes the method on all clients.

  1. Therefore, redundantly calling Paint_ResumeAll( ) on client instances imposes substantial unnecessary overhead because it invokes full re-draws which are (already) invoked whenever needed.
  2. Accordingly, manipulate client drawing through the server, calling Server.Paint_SuspendAll( ) and Server.Paint_ResumeAll( ) once each only, at the beginning and conclusion of whole assignment cycles.

abstract public Boolean DrawingIsSuspended_All( )

Declared in GCServer_Base™.

Detects if all aspects of drawing have been suspended (versus particular drawing of glyphs) by calling Paint_SuspendAll( ).

The ability to suspend all drawing expedites rendering by drawing only once, at the conclusion of multiple processes which otherwise would each engender separate, redundantly repeated re-draws of multiple features (surface states, Glyph1.GMap, and/or Glyph2.GMap). If only Glyphs are affected by a draw-engendering process, a complete re-draw is avoided by suspending and resuming the specific Glyph(s) instead.

The following example conditionally calls DrawingIsSuspended_All( ) to determine if it is necessary to suspend drawing before calling a hypothetical SurfaceAndOrGlyphDrawingIntensiveMethod( ).

C# EXAMPLE

Copy code to clipboard (JavaScript/IE).

public Boolean DrawingIsSuspended_Glyph1( )

Declared in GlossContourButton_UnInit.

Detects if Glyph1 drawing is suspended.

The ability to suspend the particular drawing of Glyph1 expedites rendering by drawing only once, at the conclusion of multiple processes which otherwise would each engender separate, redundantly repeated re-draws of Glyph1. When Glyph1 drawing is resumed by calling Paint_ResumeGlyph1( ), only Glyph1 and the present button state are redrawn (versus a complete re-draw of all states, as engendered by calling Paint_ResumeAll( ).

The following example conditionally calls DrawingIsSuspended_Glyph1( ) to determine if it is necessary to suspend drawing before calling a hypothetical Glyph1DrawingIntensiveMethod( ).

C# EXAMPLE

Copy code to clipboard (JavaScript/IE).

public Boolean DrawingIsSuspended_Glyph2( )

Declared in GlossContourButton_UnInit.

Detects if Glyph2 drawing is suspended.

The ability to suspend the particular drawing of Glyph2 expedites rendering by drawing only once, at the conclusion of multiple processes which otherwise would each engender separate, redundantly repeated re-draws of Glyph2. When Glyph2 drawing is resumed by calling Paint_ResumeGlyph2( ), only Glyph2 and the present button state are redrawn (versus a complete re-draw of all states, as engendered by calling Paint_ResumeAll( ).

The following example conditionally calls DrawingIsSuspended_Glyph2( ) to determine if it is necessary to suspend drawing before calling a hypothetical Glyph2DrawingIntensiveMethod( ).

C# EXAMPLE

Copy code to clipboard (JavaScript/IE).

abstract public void Paint_ResumeAll( )

Declared in GCServer_Base™.

Reverts all modes of drawing suspension, prepares all elements and states for drawing, and performs an immediate re-draw. Note that calling Paint_SuspendAll( ) or Paint_ResumeAll( ) on ContourServers™ invokes the method on all clients.

  1. Therefore, redundantly calling Paint_ResumeAll( ) on client instances imposes substantial unnecessary overhead because it invokes full re-draws which are (already) invoked whenever needed.
  2. Accordingly, manipulate client drawing through the server, calling Server.Paint_SuspendAll( ) and Server.Paint_ResumeAll( ) once each only, at the beginning and conclusion of whole assignment cycles.

C# EXAMPLE

Copy code to clipboard (JavaScript/IE).

Also see the UnInit EXAMPLE above.

public void Paint_ResumeGlyph1( )

Declared in GlossContourButton_UnInit™.

Draws Glyph1 after Paint_SuspendGlyph1( ) has been called.

C# EXAMPLE

Copy code to clipboard (JavaScript/IE).

public void Paint_ResumeGlyph2( )

Declared in GlossContourButton_UnInit™.

Draws Glyph2 after Paint_SuspendGlyph2( ) has been called.

C# EXAMPLE

Copy code to clipboard (JavaScript/IE).

public void Paint_SuspendAll( )

Declared in GCServer_Base™.

Suspends all drawing until Paint_ResumeAll() is called. Note that calling Paint_SuspendAll( ) or Paint_ResumeAll( ) on ContourServers™ invokes the method on all clients.

  1. Therefore, redundantly calling Paint_ResumeAll( ) on client instances imposes substantial unnecessary overhead because it invokes full re-draws which are (already) invoked whenever needed.
  2. Accordingly, manipulate client drawing through the server, calling Server.Paint_SuspendAll( ) and Server.Paint_ResumeAll( ) once each only, at the beginning and conclusion of whole assignment cycles.

C# EXAMPLE

Copy code to clipboard (JavaScript/IE).

Also see the UnInit EXAMPLE above.

public void Paint_SuspendGlyph1( )

Declared in GlossContourButton_UnInit™.

Suspends drawing of Glyph1 until Paint_ResumeGlyph1( ) or Paint_ResumeAll( ) are called.

C# EXAMPLE

Copy code to clipboard (JavaScript/IE).

public void Paint_SuspendGlyph2( )

Declared in GlossContourButton_UnInit™.

Suspends drawing of Glyph2 until Paint_ResumeGlyph2( ) or Paint_ResumeAll( ) are called.

C# EXAMPLE

Copy code to clipboard (JavaScript/IE).

PROPERTIES

GlossContourSurface™ maintains properties which are applicable only to GlossContourButton™ clients in GlossContourSurface's™ role as a ContourServer™.

public Boolean AutoEliminateWhiteOut

Default = false.
Initialized to true in GlossContourButton_UnInit™ (Default = true in GlossContourButton_UnInit™ descendants).

Declared in GCServer_Base™.

White-out engendered by user configuration (left).
Right, unintended white-out is automatically adjusted out by setting AutoEliminateWhiteOut™ to true.

AutoEliminateWhiteOut downwardly adjusts base color luminosity so that the least RGB component of color is no greater than AutoEliminateWhiteOut_MaxLeastRGB. See WORKING WITH ADVANCE GlossContourButton™ AND GlossContourSurface™ for related information.

public Int32 AutoEliminateWhiteOut_MaxLeastRGB

Default = 255 of 223...255 inclusive.

Declared in GCServer_Base™.

AutoEliminateWhiteOut == false (left).
AutoEliminateWhiteOut == true (center and right).
AutoEliminateWhiteOut_MaxLeastRGB == 10 (right).

AutoEliminateWhiteOut downwardly adjusts base color luminosity so that the least RGB component of color is no greater than AutoEliminateWhiteOut_MaxLeastRGB. For example, if Colors.Fore.R == 200, Colors.Fore.G == 190, and Colors.Fore.B == 180 and AutoEliminateWhiteOut_MaxLeastRGB == 245, the maximum B of the glossed region will be no greater than 245. See WORKING WITH ADVANCE GlossContourButton™ AND GlossContourSurface™ for related information.

public Color Caption.Color

Default = SystemColors.ControlText.

Declared in GlossContourButton_UnInit™.

Caption font color.

public Font Caption.Font

Default = new Font( "Verdana", 8, FontStyle.Regular ).

Declared in GlossContourButton_UnInit™.

Caption font.

public String Caption.Text

Default = null string.

Declared in GlossContourButton_UnInit™.

Caption text. Ampersands can be used to indicate hot keys.

public enumAlignHzl Caption.TextAlignHorizontal

public enum enumAlignHzl { Left, Center, Right }

Default = enumAlignHzl.Left.

Declared in GlossContourButton_UnInit™.

Horizontal text alignment within the Caption.TextRectangle.

public enumAlignVert Caption.TextAlignVertical

public enum enumAlignVert { Top, Center, Bottom }

Default = enumAlignVert.Center.

Declared in GlossContourButton_UnInit™.

Vertical text alignment within the Caption.TextRectangle.

public GCCaptionTextRectangle Caption.TextRectangle

GCCaptionTextRectangle ( Int32 )X, (Int32 )Y, ( Int32 )Width, ( Int32 )Height

Default = 3, 3, 50, 20.

Declared in GlossContourButton_UnInit™.

Caption.TextRectangles allow explicit positioning of text. A particular advantage of explicit TextRectangles is that as Text is drawn over glyphs, and glyphs are drawn over surface features, text can be displayed across the entire button region, or within a dedicated TextRectangle subregion. TextRectangles give you complete control of text position, which is critical to complete control of button design. Glyph.CenterRectangles provide similar support for explicit placement of glyphs.

public Boolean Caption.Visible

Default = true.

Declared in GlossContourButton_UnInit™.

Caption.Visible.

public Boolean Caption.Wrap

Default = true.

Declared in GlossContourButton_UnInit™.

Wraps Caption.

public Boolean ClipCorners

Default = false.

Declared in GCServer_Base™.

Clipped corner.

Draws corner pixels in the clipped corner color, resulting in a pseudo-rounded or tractor feed like effect. Also see Colors.ClippedCorners.

public Color Colors.BorderDown

Default = SystemColors.Control.

Declared in GCServer_Base™.
Applied only to independent or client GlossContourButton™.

Colors.BorderDown set to blue.

Border color for down/concave state.

  1. Set to Colors.Fore for a singular, homogeneous color.

public Color Colors.BorderFocused

Default = Color.Red.

Declared in GCServer_Base™.
Applied only to independent or client GlossContourButton™.

Colors.BorderFocused set to red (default).

Focused up and focused down states.

Focused state border color.

public Color Colors.ClippedCorners

Default = Color.Transparent.

Declared in GlossContourButton.

Clipped corner color. Also see ClipCorners.

public Color Colors.Fore

Default = SystemColors.Control.

Declared in GCServer_Base™.

Example Colors.Fore == Color.Black. Here, although shadows cannot be well represented in unglossed regions, the eye expects this, and the effect of shadow is still perhaps sufficiently evident in the shadow treatment applied to Glyph2 — sufficiently producing the 3D effect we are after.

Custom green Colors.Fore.

Base color.

public Int32 Colors.Offset.B

Default = 0 of -255...255 inclusive.

Declared in GCServer_Base™.

Colors.Offset.B offsets Colors.Fore.B, Color_Base_DN.B, Colors.BorderDown.B, and Colors.BorderFocused.B. See Colors.Offset.R for usage guidelines.

public Int32 Colors.Offset.G

Default = 0 of -255...255 inclusive.

Declared in GCServer_Base™.

Colors.Offset.G offsets Colors.Fore.G, Color_Base_DN.G, Colors.BorderDown.G, and Colors.BorderFocused.G. See Colors.Offset.R for usage guidelines.

public Int32 Colors.Offset.R

Default = 0 of -255...255 inclusive.

Declared in GCServer_Base™.

Button groups distinguished by tinting SystemColors.Control (top) — red, green blue.

OK button colored by tinting SystemColors.Control.

Colors.Offset.R offsets Colors.Fore.R, Color_Base_DN.R, Colors.BorderDown.R, and Colors.BorderFocused.R.

R/G/B "offsets" are generally used,

  1. To offset luminosity.
  2. To tint a given button or group of buttons.

    Colors.Offset.R == -10, Colors.Offset.G == 5, and Colors.Offset.B == 5 for instance will produce a blue green tint without altering luminosity.

Explicit Colors.Fore prescriptions avoid graying.

Where it is practical not to derive tinted colors from system constants, explicitly set Colors.Fore for gray free results.

public enumContouredRegions ContouredRegions

public enum enumContouredRegions { None = 0, TopAndBottom = 1, TopOnly = 2, BottomOnly = 3 }

Default = enumContouredRegions.TopAndBottom.

Declared in GCServer_Base™.

From left to right: enumContouredRegions.None, TopAndBottom, BottomOnly, and TopOnly.

Regions to which contour effects are applied.

public GCServer_Base ContourServer

Default = null.

Declared in GCServer_Base™.

Multiple GlossContourButtons™ in ContourClient™ roles.

Assigning a GCServer_Base descendant to a client ContourServer™ property causes the client to derive its drawing data from computations already performed by the ContourServer™. Subscription, detachment, and role behavior are fully automated as a consequence of assignments to this property. If the server is a GCSurface™, relative vertical position of the ContourClient™ within the vertical bounds of the ContourServer™ dictates the derived data and results in the client assuming the contours of the server at the relative vertical position. If the ContourServer™ is a GCButton™, client buttons assume the surfaces of the server. If the height of the server is not >= that of the client, or if the bounds of a child client do not fall within the bounds of the parent server, the client reverts to drawing itself.

For example, if a GlossContourButton™ is a child and ContourClient™ of a GlossContourSurface™ of Size( 200, 100 ) and the GlossContourButton™ occupies Bounds( 0, 74, 26, 26 ), the ContourClient™ assumes the contours of the GlossContourSurface™ Rectangle( 0, 74, 26, 26 ). Whenever and wherever within the ContourServer's™ vertical bounds the button is moved, its re-drawing is automated. If the client is moved out of the vertical span of the server, the client simply reverts to drawing itself.

Top: A GlossContourButton™ configured to ContouredRegions.TopOnly.
Bottom: A GlossContourSurface™ configured to ContouredRegions.BottomOnly acts as a ContourServer™ to 5 child GCButtons™.

When ContourClient™ 1 is moved to position 2, it automatically assumes the contours of its relative position by re-drawing itself from pre-computed server data.
Down states (3) likewise derive concave contours from pre-computed data.

  1. Bounds:
    1. ContourClient™ child controls must occupy bounds belonging to the vertical scope of the parent server's bounds: the Y bound of a ContourClient™ must be greater than or equal to 0; and the bottom bound of the client cannot exceed the bottom bound of the server.
    2. No error is raised if this out-of-drawing-data-bounds condition is violated. Instead, the client simply reverts to drawing its own contours.
  2. Drawing suspension and resumption:
    1. It is the application's responsibility to resume any suspended drawing of a client which is detached from a ContourServer™. ContourServers™ do not automatically unsuspend drawing when a ContourClient™ unsubscribes to its server functionality, because it may be the intention of the application to reconfigure the unsubscribing client before drawing.:

      Ordinarily, clients remain subscribed to servers for the life of application sessions, while drawing suspension and resumption are invoked automatically on clients by suspending and resuming the server instance only.

      If however you detach a client from its server at runtime, you must understand the ramifications for suspended drawing (if any).

      If GCButton1.ContourServer == GCSurface1, and GCSurface1.Paint_SuspendAll( ) has been called on the server, this results in broadcasting the SuspendAll condition to all clients. Thus this is equivalent in respect to GCButton1, of calling GCButton1.Paint_SuspendAll( ). Afterward then, if null is assigned to GCButton1.ContourServer, this will leave GCButton1 in a SuspendAll state — GCButton1 will not draw its own surfaces until GCButton1.Paint_ResumeAll( ) is called.

    2. Although only considerably specialized purposes will ever unsubscribe ContourClients™ from ContourServers™, it is important to understand that ContourServers™ broadcast their condition to clients as a necessary means of minimizing computation intensity. This useful behavior prescribes a style of working with the server, versus redundantly iterating clients.

public Boolean Down

Default = false.

Declared in GlossContourButton_UnInit™.

Various focused, up, down, and disabled states.

The very same buttons as ContourClients™ of their parent surface.

Draws the button in the down/concave state. Down states are rendered with inversed (concave) top and bottom contours regardless of the normal state configuration.

Down/concave states are particularly useful for delivering toggle group behavior, where given down button states indicate application states or conditions to which processing may be subject. Note that the purposed "Down" state is substantially more intuitive for indicating toggle states than button designs lacking such a feature. Using an Enabled property instead for instance is counter-intuitive, because users must analyze whether a button is disabled for purposes other than indicating a toggled state. Because disabled states instead encourage users to interpret that controls are not applicable to present processes, Down should always be preferred for representing toggled states.

See the article, HOW TO IMPLEMENT EFFICIENT TOGGLE GROUP BEHAVIOR, for related information.

public Rectangle Glyph1.CenterRectangle

public struct Rectangle( int x, int y, int width, int height )

Default = new Rectangle( 3, 3, 20, 20 ). X and Y must be greater than 0.

Declared in GlossContourButton_UnInit™.

CenterRectangles allow you to explicitly specify Glyph positions. Note that the initial positions of Glyph1.CenterRectangle and Glyph2.CenterRectangle are initialized to the same values as would be appropriate to alternating the glyphs. The glyphs however may be displayed in separate locations, and simultaneously.

  1. Glyphs are centered in the rectangle even if rectangle bounds are exceeded.

    Various-sized glyphs assume the same positions within different buttons with the same CenteringRectangle prescription.

  2. No clipping of bounds excess is performed.
  3. Intersection of the border region:

    If glyphs extend onto the top or bottom border perimeter, they are drawn over the border when the border is displayed. To ensure display of the entire border region, CenterRectangles must be defined to reside 1 pixel within the button bounds. In other words, CenterRectangle.Y must be >= 1; CenterRectangle.Height must be <= GCButton.Height - 2; CenterRectangle.Y must be >= 1; and CenterRectangle.Width must be <= GCButton.Width - 2.

Caption.TextRectangle provides similar control of Caption.Text.

public Bitmap Glyph1.GMap

Default = new Bitmap( 1, 1 ).

Declared in GlossContourButton_UnInit™.

Drop-down image assigned to Glyph1.GMap. Logo image assigned to Glyph2.GMap.

Source image.

  1. Must be single-framed, flat Bitmap.
  2. Glyphs are displayed in respective centering rectangles.
  3. The color sampled at pixel 0, 0 (top left) is transformed to transparent across the image.

    Be careful that source image opacity is 100% and that intended transparent regions are exactly the color of pixel 0, 0. The transparenting process is not approximate. If glyph glare or gloss results in orphaned regions which are not transparent, immediately inspect your source image for causative anomalies, looking explicitly for color and transparency/alpha non-conformation.

    To produce unopaque source images from multi-layered or opaque images, copy the merged layers and save as merged/flat.

  4. If configured as a ContourClient™, effects are applied by the server and according to the configuration of the server.

    Source image for Glyph2.

public Boolean Glyph1.Visible

Default = true.

Declared in GlossContourButton_UnInit™.

Glyph1.Visible.

public Rectangle Glyph2.CenterRectangle

public struct Rectangle( int x, int y, int width, int height )

Default = new Rectangle( 3, 3, 20, 20 ). X and Y must be greater than 0.

Declared in GlossContourButton_UnInit™.

CenterRectangles allow you to explicitly specify Glyph positions. Note that the initial positions of Glyph1.CenterRectangle and Glyph2.CenterRectangle are initialized to the same values as would be appropriate to alternating the glyphs. The glyphs however may be displayed in separate locations, and simultaneously.

  1. Glyphs are centered in the rectangle even if rectangle bounds are exceeded.

    Various-sized glyphs assume the same positions within different buttons with the same CenteringRectangle prescription.

  2. No clipping of bounds excess is performed.
  3. Intersection of the border region:

    If glyphs extend onto the top or bottom border perimeter, they are drawn over the border when the border is displayed. To ensure display of the entire border region, CenterRectangles must be defined to reside 1 pixel within the button bounds. In other words, CenterRectangle.Y must be >= 1; CenterRectangle.Height must be <= GCButton.Height - 2; CenterRectangle.Y must be >= 1; and CenterRectangle.Width must be <= GCButton.Width - 2.

Caption.TextRectangle provides similar control of Caption.Text.

public Bitmap Glyph2.GMap

Default = new Bitmap( 1, 1 ).

Declared in GlossContourButton_UnInit™.

Drop-down image assigned to Glyph1.GMap. Logo image assigned to Glyph2.GMap.

Source image.

  1. Must be single-framed, flat Bitmap.
  2. Glyphs are displayed in respective centering rectangles.
  3. The color sampled at pixel 0, 0 (top left) is transformed to transparent across the image.

    Be careful that source image opacity is 100% and that intended transparent regions are exactly the color of pixel 0, 0. The transparenting process is not approximate. If glyph glare or gloss results in orphaned regions which are not transparent, immediately inspect your source image for causative anomalies, looking explicitly for color and transparency/alpha non-conformation.

    To produce unopaque source images from multi-layered or opaque images, copy the merged layers and save as merged/flat.

  4. If configured as a ContourClient™, effects are applied by the server and according to the configuration of the server.

    Source image for Glyph2.

public Boolean Glyph2.Visible

Default = false.

Declared in GlossContourButton_UnInit™.

Glyph2.Visible.

  1. Because the default Glyph2.Visible value is false, Glyph2.Visible has to be set to true before Glyph2 assignments will be displayed.

public enumOpacityPercent GlyphAndCaptionOpacity_Disabled

public enum enumOpacityPercent { o100 = 1, o050 = 2, o033 = 3, o025 = 4, o020 = 5 }

Default = enumOpacityPercent.o020.

Declared in GCServer_Base™.
Applied only to independent or client GlossContourButton™.

GlyphAndCaptionOpacity_Disabled == o050.

The 3rd and 4th buttons from the left are shown in disabled states, illustrating effect of GlyphAndCaptionOpacity_Disabled.

GlyphAndCaptionOpacity_Disabled prescribes the Caption and Glyph opacity when the instance is not Enabled. Because disabled glyphs states are produced programmatically, single source images can be used for each glyph.

public Boolean Glyphs_ApplyEffects

Default = true.

Declared in GCServer_Base™.

Enables or disables application of contour, gloss, and glare effects to glyphs.

public Boolean KeyEnterFiresOnClick

Default = true.

Declared in GlossContourButton_UnInit™.

If KeyEnterFiresOnClick is true and the instance is focused, causes Enter or Return keypresses to fire OnClick().

public Int32 LuminosityDifferentials.Down

Default = -8 of -32...0 inclusive.

Declared in GCServer_Base™.
Applied only to independent or client GlossContourButton™.

Downwardly adjusts overall luminosity of the down state by LuminosityDifferentials.Down/256 to emulate the naturally reduced luminosity of concave surfaces.

public Int32 LuminosityDifferentials.EdgeBevels

Default = 5 of 0...64 inclusive.

Declared in GCServer_Base™.

LuminosityDifferentials.EdgeBevels.

Luminosity differential applied in drawing edge bevel facets.

  1. Set to 0 for no beveling.

public Int32 LuminosityDifferentials.Gloss

Default = 50 of 0...127 inclusive.
Initialized to 0 in GlossContourSurface_UnInit™.

Declared in GCServer_Base™.

LuminosityDifferentials.Gloss == 10 (left), 32 (right), with AutoEliminateWhiteOut™ set to true.

Prescribes the magnitude of the gloss effect.

  1. Glossed region luminosity == contour luminosity + LuminosityDifferentials.Gloss.
  2. Set to 0 for no gloss effect.

public Int32 LuminosityDifferentials.GlyphGlare

Default = 50 of 0...127 inclusive.

Declared in GCServer_Base™.

LuminosityDifferentials.GlyphGlare == 0 (left), 100 (right).

Additional luminosity applied to glossed regions of glyphs. LuminosityDifferentials.GlyphGlare increases the gloss effect by emulating glare over distinguishable glyph features.

  1. Luminosity of gloss regions of glyphs = GlyphLuminosity + LuminosityDifferentials.Gloss + LuminosityDifferentials.PerPixelOfContour + LuminosityDifferentials.GlyphGlare.
  2. Set to 0 for no glare effect.
  3. No effect is applied to subject glyphs if no region of the glyph resides in a glossed region of the control.

public Int32 LuminosityDifferentials.PerPixelOfContour

Default = 4 of 1...10 inclusive.
Initialized to 2 in GlossContourSurface_UnInit™.

Declared in GCServer_Base™.

LuminosityDifferentials.PerPixelOfContour == 4 (left), 8 (right).

Prescribes the luminosity differential per pixel of contour effect, or vertical rate of contour luminosity. Greater LuminosityDifferentials.PerPixelOfContour values result in more pronounced contours.

public Boolean MouseOverFocuses

Default = true.

Declared in GlossContourButton_UnInit™.

Causes MouseOver events to focus the button, allowing keyboard input so long as the button remains focused.

public Int32 RadiusYSpan

Default = 13 of 2...32 inclusive.

Declared in GCServer_Base™.

Minimal radii in various focused, down, and up states.

RadiusYSpan can be understood to mean "draw radiused contours over RadiusYSpan much of the Height."

  1. Regardless of the RadiusYSpan value, the maximum drawn radius will be no more than Height/2.
  2. Radii intersecting at the midsection are drawn as a continuous, homogeneous curve.
  3. A maximum limit must be imposed because excessive radii require exceeding the range of luminosity.

public enumSharpenMode Sharpen

public enum enumSharpenMode { s0x = 0, s1x = 1, s2x = 2 }

Default = s1x.

Declared in GCServer_Base™.

Left to right, effects of Sharpen s0x, s1x, and s2x at 700% magnification.

Increases contrast at the juncture of glossed and unglossed regions.

public string ToolTip

According to usual convention, a ToolTip property is exposed when a ToolTip instance has been added to your form.

RELATED TOPICS

© Copyright 1995-2007, by ADVANCE Information Systems, Inc. ALL RIGHTS RESERVED.Copyright 1995-2007, by ADVANCE Information Systems, Inc. ALL RIGHTS RESERVED.

Firefox™.Best viewed in Mozilla Firefox™.