Slimelite BBS

E Probs

Back to SUPRA

From Cris Priestman · 1996-04-03 04:53 · #77734 in SUPRA

Hi Carl,

In a message of 02 Sep 92 Carl Ireland wrote to me:

 CI> Well, it should be fairly easy, the worst case scenario is if the size
 CI> of the window isn't a multiple of font's x and y size - i.e. if it's
 CI> possible to get half displayed characters. In that case you should
 CI> render you're bevel box and then install a clipping rectangle just
 CI> inside it. If you use PrintIText() then your text will be automagically

Hmmm...

 CI> clipped to the borders of the clipping rectangle without crashing due
 CI> to overwrites or trashing your bevel box. You can then use ClipBlit()
 CI> to scroll the text (use a minterm of $F0) very easily whilst
 CI> maintaining speed (using PrintIText() every time would be much slower
 CI> with a large list). You can also use ClipBlit() rather inventively to
 CI> get a highlight bar displayed like in WB3 listviews.

Yeah the highlight bars are what I was looking for as well.

 CI> I don't have any source for this but I could knock some together if you
 CI> have trouble with this - I've done all this before, just never all in
 CI> the same prog!

If you wouldnt mind that is.  I could do with examples of the source so I
can write something useful! :)

 CI> I've never done this but I think the only way is to use a custom gadget
 CI> - at least if you want it to display as depressed when you use the rmb
 CI> over it. You can do this using a gadtools GENERIC_KIND gadget or

Question is, how do I know if the mouse is over the gadget??  Will I have
to get to coords of the mouse when the mouse button is pressed then check
to see if is within the bounds of any of the gadgets??  And cycle through
all the gadgets using gadget.nextgadget (or whatever it is..) ??

 CI> alternatively you could use BOOPSI to make it call the routine to
 CI> render the "selected" image automatically. (You'd need to specify
 CI> IDCMP_MOUSEBUTTONS and check either the absoulte position of the mouse
 CI> when RMB used or the position relative to the gadget - using either
 CI> GadgetMouse() or a boopsi hook) As for combining menus with this, I'm

Ahh I've not dabbled with hooks yet, and from the C source I've seen that
uses hooks, it looks pretty complicated..

 CI> not sure, but I would suggest it might work if you use gadtools menus
 CI> and don't specify WA_RMBTRAP but rather use GetMsg() NOT Gt_GetIMsg()
 CI> to check for your special RMB events and then, if it's not one, pass it
 CI> to gadtools via Gt_FilterIMsg() and finally use Gt_PostFilterIMsg() to
 CI> correct the chaos you've caused!

If you have any source for the above then please send it along :)

Till next,
   Cris
[PGP Key Available]

... "Yours, too, knight," Caramon said holding out his hand.
--- Spot 1.3a Unregistered
 * Origin: Written in the Computer Room (2:2502/7.7)