Update of /cvsroot/libufo/ufo-0.5/include/ufo/ui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32035/include/ufo/ui
Modified Files:
ustyle.hpp
Log Message:
Added gripper element.
Index: ustyle.hpp
===================================================================
RCS file: /cvsroot/libufo/ufo-0.5/include/ufo/ui/ustyle.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** ustyle.hpp 21 Jun 2005 09:27:15 -0000 1.6
--- ustyle.hpp 24 Oct 2005 16:00:26 -0000 1.7
***************
*** 89,93 ****
PE_FrameStatusBar,
PE_FrameLineEdit,
! PE_FrameFocusRect
};
enum ComponentElement {
--- 89,94 ----
PE_FrameStatusBar,
PE_FrameLineEdit,
! PE_FrameFocusRect,
! PE_Gripper
};
enum ComponentElement {
***************
*** 168,172 ****
uint32_t widgetState) = 0;
! /** Paints a component of a widget resp. the whole widget. */
virtual void paintComponent(UGraphics * g,
ComponentElement elem,
--- 169,176 ----
uint32_t widgetState) = 0;
! /** Paints a component of a widget resp. the whole widget.
! * For most components, this is only a call to paintModelBackground and
! * paintModel.
! */
virtual void paintComponent(UGraphics * g,
ComponentElement elem,
***************
*** 252,259 ****
URectangle * iconRect) = 0;
! /** May be used to install style properties. */
virtual void install(UWidget * w) = 0;
- /** Uninstalls formerly installed properties. */
virtual void uninstall(UWidget * w) = 0;
};
--- 256,315 ----
URectangle * iconRect) = 0;
! /** Stub method. Configures a widget to be used with this style.
! * Not yet implementd.
! */
virtual void install(UWidget * w) = 0;
virtual void uninstall(UWidget * w) = 0;
+ #if 0
+ // API ideas
+ /** @return The preferred contents size for the given model.
+ */
+ virtual UDimension getPreferredSizeFromModel(
+ ComponentElement elem,
+ const UDimension & maxSize,
+ const UStyleHints * hints,
+ const UWidgetModel * model,
+ UWidget * w = NULL) = 0;
+
+ /** Paints the background for the given component element,
+ * eventually using the given model.
+ */
+ virtual void paintModelBackground(
+ ComponentElement elem,
+ const URectangle & rect,
+ const UStyleHints * hints,
+ const UWidgetModel * model,
+ UWidget * w = NULL) = 0;
+
+ /** Paints the contents of the given model.
+ * This may be a label and icon of buttons, text of text widgets etc.
+ */
+ virtual void paintModel(
+ ComponentElement elem,
+ const URectangle & rect,
+ const UStyleHints * hints,
+ const UWidgetModel * model,
+ UWidget * w = NULL) = 0;
+
+ /** Returns a two dimensional model index currently represented as UPoint.
+ *
+ */
+ virtual UPoint viewToModel(
+ ComponentElement elem,
+ const URectangle & rect,
+ const UStyleHints * hints,
+ const UWidgetModel * model,
+ const UPoint & pos,
+ UWidget * w = NULL) = 0;
+
+ /** @return The bounding rectangle of a model index.*/
+ virtual URectangle modelToView(
+ ComponentElement elem,
+ const URectangle & rect,
+ const UStyleHints * hints,
+ const UWidgetModel * model,
+ const UPoint & pos,
+ UWidget * w = NULL) = 0;
+ #endif
};
|