FSLeftLabelView

 

Derived from: public FSView

Declared in: FSLeftLabelView.h

Library: none


Overview

FSView-derived class which provides facilities for aligning the divider to classes which have a label to the left of a main component.

FSLeftLabelViews without divider alignment:

FSLeftLabelViews with divider alignment:

The code to accomplish the above is as simple as:

FSLeftLabelView::Align(views,3);

 


Member Functions


Align()

 
      static void Align(FSLeftLabelView** labelled_views, int32 num_views, bool align_left = true,
            bool align_divider = true, bool align_right = true, bool space_vertically = true,
            float v_spacing = 5)
 
 

Aligns the FSLeftLabelViews specified in labelled_views. If align_left is true, the left edges are aligned. If align_divider is true, the dividers are aligned. If align_right is true, all views' right edges will be expanded to line up with the right edge of the view which extends the farthest to the right. If space_vertically is true, the position of labelled_views[0] is used as the starting point, and each subsequent view in the labelled_views array will be moved such that there are v_spacing empty pixels between its top and the bottom of the preceding view.


VisualDivider(), SetVisualDivider()

 
      virtual float VisualDivider() = 0
      virtual void SetVisualDivider(float divider) = 0
 
 

These pure virtual methods must be implemented by derived classes. Note that they are implemented by FSTextControl and FSMenuField, so if you are using one of those two classes, these methods need not be implemented. Coordinates are relative to VisualLeft().


By Brian Tietz

Copyright 2000

Bug reports (including documentation errors) and feature requests can be sent to briant@timelinevista.com.