struct FrameSelectorImpl
{
FrameSelector& mrFrameSel; /// The control itself.
ScopedVclPtr<VirtualDevice> mpVirDev; /// For all buffered drawing operations.
std::vector<Image> maArrows; /// Arrows in current system colors.
Color maBackCol; /// Background color.
Color maArrowCol; /// Selection arrow color.
Color maMarkCol; /// Selection marker color.
Color maHCLineCol; /// High contrast line color.
Point maVirDevPos; /// Position of virtual device in the control.
FrameBorder maLeft; /// All data of left frame border.
FrameBorder maRight; /// All data of right frame border.
FrameBorder maTop; /// All data of top frame border.
FrameBorder maBottom; /// All data of bottom frame border.
FrameBorder maHor; /// All data of inner horizontal frame border.
FrameBorder maVer; /// All data of inner vertical frame border.
FrameBorder maTLBR; /// All data of top-left to bottom-right frame border.
FrameBorder maBLTR; /// All data of bottom-left to top-right frame border.
editeng::SvxBorderLine maCurrStyle; /// Current style and color for new borders.
frame::Array maArray; /// Frame link array to draw an array of frame borders.
FrameSelFlags mnFlags; /// Flags for enabled frame borders.
FrameBorderPtrVec maAllBorders; /// Pointers to all frame borders.
FrameBorderPtrVec maEnabBorders; /// Pointers to enables frame borders.
Link<LinkParamNone*,void> maSelectHdl; /// Selection handler.
tools::Long mnCtrlSize; /// Size of the control (always square).
tools::Long mnArrowSize; /// Size of an arrow image.
tools::Long mnLine1; /// Middle of left/top frame borders.
tools::Long mnLine2; /// Middle of inner frame borders.
tools::Long mnLine3; /// Middle of right/bottom frame borders.
tools::Long mnFocusOffs; /// Offset from frame border middle to draw focus.
bool mbHor; /// true = Inner horizontal frame border enabled. bool mbVer; /// true = Inner vertical frame border enabled. bool mbTLBR; /// true = Top-left to bottom-right frame border enabled. bool mbBLTR; /// true = Bottom-left to top-right frame border enabled. bool mbFullRepaint; /// Used for repainting (false = only copy virtual device). bool mbAutoSelect; /// true = Auto select a frame border, if focus reaches control. bool mbHCMode; /// true = High contrast mode.
std::vector<rtl::Reference<a11y::AccFrameSelectorChild>>
maChildVec; /// Pointers to accessibility objects for frame borders. explicit FrameSelectorImpl( FrameSelector& rFrameSel );
~FrameSelectorImpl();
// initialization /** Initializes the control, enables/disables frame borders according to flags. */ void Initialize( FrameSelFlags nFlags );
/** Fills all color members from current style settings. */ void InitColors(); /** Creates the image list with selection arrows regarding current style settings. */ void InitArrowImageList(); /** Initializes global coordinates. */ void InitGlobalGeometry(); /** Initializes coordinates of all frame borders. */ void InitBorderGeometry(); /** Draws the entire control into the internal virtual device. */ void InitVirtualDevice(); /** call this to recalculate based on parent size */ void sizeChanged();
// frame border access /** Returns the object representing the specified frame border. */ const FrameBorder& GetBorder( FrameBorderType eBorder ) const; /** Returns the object representing the specified frame border (write access). */
FrameBorder& GetBorderAccess( FrameBorderType eBorder );
// drawing /** Draws the background of the entire control (the gray areas between borders). */ void DrawBackground();
/** Draws selection arrows for the specified frame border. */ void DrawArrows( const FrameBorder& rBorder );
/** Returns the color that has to be used to draw a frame border. */
Color GetDrawLineColor( const Color& rColor ) const; /** Draws all frame borders. */ void DrawAllFrameBorders();
/** Draws all contents of the control. */ void DrawVirtualDevice(); /** Copies contents of the virtual device to the control. */ void CopyVirDevToControl(vcl::RenderContext& rRenderContext);
/** Draws tracking rectangles for all selected frame borders. */ void DrawAllTrackingRects(vcl::RenderContext& rRenderContext);
/** Converts a mouse position to the virtual device position. */
Point GetDevPosFromMousePos( const Point& rMousePos ) const;
// frame border state and style /** Sets the state of the specified frame border. */ void SetBorderState( FrameBorder& rBorder, FrameBorderState eState ); /** Sets the core style of the specified frame border, or hides the frame border, if pStyle is 0. */ void SetBorderCoreStyle( FrameBorder& rBorder, const editeng::SvxBorderLine* pStyle );
/** Changes the state of a frame border after a control event (mouse/keyboard). */ void ToggleBorderState( FrameBorder& rBorder );
// frame border selection /** Selects a frame border and schedules redraw. */ void SelectBorder( FrameBorder& rBorder, bool bSelect ); /** Grabs focus without auto-selection of a frame border, if no border selected. */ void SilentGrabFocus();
/** Returns true, if all selected frame borders are equal (or if nothing is selected). */ bool SelectedBordersEqual() const;
};
/** Dummy predicate for frame border iterators to use all borders in a container. */ struct FrameBorderDummy_Pred
{ booloperator()( const FrameBorder* ) const { returntrue; }
};
/** Predicate for frame border iterators to use only visible borders in a container. */ struct FrameBorderVisible_Pred
{ booloperator()( const FrameBorder* pBorder ) const { return pBorder->GetState() == FrameBorderState::Show; }
};
/** Predicate for frame border iterators to use only selected borders in a container. */ struct FrameBorderSelected_Pred
{ booloperator()( const FrameBorder* pBorder ) const { return pBorder->IsSelected(); }
};
/** Template class for all types of frame border iterators. */ template< typename Cont, typename Iter, typename Pred > class FrameBorderIterBase
{ public: typedef Cont container_type; typedef Iter iterator_type; typedeftypename Cont::value_type value_type; typedef FrameBorderIterBase<Cont, Iter, Pred> this_type;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.