Reaction/ClassAct

ReAction: Is it possible...

Say, I have a window containing some boxes (layouts with visible border) and in one of those boxes there is a getfile.gadget present.

Is it possible to traverse an entire layout (outer layer is a window) and retrieve all gadgets (and layouts and images etc.) one by one?

Is it possible to find out whether a given gadgetobject is a getfile.gadget by comparing some field in the object's underlaying struct with getfile.gadget's base as retrieved by IIntuition->OpenClass()?

Forums: 

Invoking a pop-up menu from within a class

I wonder if anyone could help me out with this, as I'm out of my wits now.

I have a class that features a selector button, upon the pressing of which I want to invoke a context menu. The selection of the button is verified in GM_HANDLEINPUT - this is the place where I need to invoke the pop-up menu.

Forums: 

Window pens question

I have a custom gadget that I add to a window (created by the Window Class). The gadget needs to erase its background before it gets GM_RENDERed. It appears to me (based on experimenting) that the window class uses FORESHINEPEN (rather than BACKGROUNDPEN) for the background.

Is it really the case? Can I rely on this pen being used across various themes? I mean, will FORESHINEPEN (whatever colour it represents in a particular theme) always be used for the background?

Forums: 

What's the best way to create a custom requester?

I need to create a simple login requester (username & password). What's the best way to create that?

I originally assumed that I should use the requester.class, but that seems to be for predefined requesters only. There's no provision for adding custom GUI elements. Unless I've missed something...

So, are we supposed to use a struct Requester to build a custom one? Or use the window.class?

EDIT: I could be lazy and have separate requesters for the username and password, but that would create an extra step for the user. I'd rather have it all on one page.

Forums: 

RAWKEY, no VANILLAKEY

I am trying to update an old piece of code that I have (way too large to post). It is not using WindowClass. It uses IDCMP_RAWKEY and IDCMP_VANILLAKEY and others.

I have updated the old window to the new WindowClass so I can use ReAction classes. Now I don't receive any VANILLAKEYs, neither WMHI_VANILLAKEY or IDCMP_VANILLAKEY. I only get WMHI_RAWKEY.

Do I have to use a WINDOW_IDCMPHook to catch the vanillakeys? I really don't want to since it would take some serious re-writing.

Forums: 

Linking to Reaction library

I'm using the latest SDK and gcc. There are sections of the program that use Reaction classes. It compiles okay. In the linking phase I get a lot of undefined reference messages like the one below.

o/gcc-amigaos4-latest/MainFrm.o: In function 'CMainFrame::Custom_win()':
MainFrm.cpp:(.text+0x6e): undefined reference to 'WindowClass'
.
.
.

There are 24 of these (some duplicated). They are all Reaction classes. This is probably because I'm not linking to the right library. Can anyone tell me the right library to link to?

Forums: 

OM_NOTIFY in a gadget class

I'm updating an existing BOOPSI gadget to support the OM_NOTIFY method on the GA_Selected attribute. The idea is that the gadget (a checkbox kind) can act as a "master" gadget that sets the value of its subordinate gadgets. Thus, when the master's GA_Selected is set to TRUE/FALSE, the subordinate gadgets will receive an OM_NOTIFY to set their value to that of the master. For this to work, the master checkbox adds the subordinate checkboxes to its broadcast list via OM_ADDMEMBER.

Forums: 

Hover over gadget

I have started a new gadget class. This one is just a button (not buttonclass) with text.

How do I know when the mouse is hovering over the gadget? I would like to know so I can alter the border and/or text. I don't seem to be getting any GM/OM_xxx signals. Or I am looking at the wrong one?

I would have thought GM_QUERY would be the place to check, but not having any luck. Check input event for timer, check coordinates, if good then render with hover state.

Forums: 

imageclass return type

A friend gave me his source code for an imageclass. It simply draws a box with some text in it. I have been then putting that image in a button class using BUTTON_RenderImage, or a label class using Label_Image. It displays fine in those.

What is the "format" of the imageclass object? Autodocs say its a BOOPSI image object.

Forums: 

Pages

Subscribe to RSS - Reaction/ClassAct