Iconborder in FXText

View: New views
2 Messages — Rating Filter:   Alert me  

Iconborder in FXText

by woodchuck-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear all,
is it possible to create an icon border in a FXText widget, e.g. to show
bookmarks or other hints? Is there any example?
I have not found anything.

Kind regards
tom

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Foxgui-users mailing list
Foxgui-users@...
https://lists.sourceforge.net/lists/listinfo/foxgui-users

Re: Iconborder in FXText

by Jeroen van der Zijp :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Monday 22 June 2009, woodchuck wrote:
> Dear all,
> is it possible to create an icon border in a FXText widget, e.g. to show
> bookmarks or other hints? Is there any example?
> I have not found anything.

It is not trivial, but yes, this is somewhat supported in 1.7.  The scrollable
part of FXText is defined by:

  virtual FXint getVisibleX() const;
  virtual FXint getVisibleY() const;
  virtual FXint getVisibleWidth() const;
  virtual FXint getVisibleHeight() const;

These API's can, of course, be overloaded (they're defined in FXScrollArea) and
they in fact are overloaded in FXText to substract the number-bar off the
left-side of the scrollable area.

The basic idea is the visible area is the part of the FXScrollArea used to actually
display content.  In FXScrollArea, this means the area of the widget left over after
substracting the space taken up by the horizontal and vertical scrollbars.

Various subclasses of FXScrollArea may have a smaller viewport than this, and they
overload getVisibleXXXX() to define this area.

To make FXText do what you need, it will be necessary to subclass it and overload
the drawing routines, possibly enforce certain minimum margin or number-bar sizes,
and so on.






                - Jeroen



------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Foxgui-users mailing list
Foxgui-users@...
https://lists.sourceforge.net/lists/listinfo/foxgui-users