Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
179 user(s) are online (172 user(s) are browsing Forums)

Members: 1
Guests: 178

kas1e, more...

Support us!

Headlines

 
  Register To Post  

listbrowser & fuelgauge?
Home away from home
Home away from home


See User information
Is it possible to use a fuelgauge inside a listbrowser using reaction?

X5000
Go to top
Re: listbrowser & fuelgauge?
Just popping in
Just popping in


See User information
I *think* a listbrowser can only contain either text or boopsi objects based on the image class (as set by LBN_Text and LBN_Image, respectively).
I guess fuelgauge doesn't extend image?

If you find a solution I'd be all ears, though.

Maintainer and developer for Jamiga2 - Java for Amiga
Go to top
Re: listbrowser & fuelgauge?
Just can't stay away
Just can't stay away


See User information
Use a rendering hook and draw the gauge "yourself".

uint32 RenderMyGaugeFunc(register struct Hook *hookregister struct Node *noderegister struct LBDrawMsg *msg)

{
 if (
msg->lbdm_MethodID!=LV_DRAW) return(LBCB_UNKNOWN);

 
IGraphics->SetAPen(msg->lbdm_RastPort,3);
 
IGraphics->RectFill(msg->lbdm_RastPort,msg->lbdm_Bounds.MinX,msg->lbdm_Bounds.MinY,msg->lbdm_Bounds.MaxX,msg->lbdm_Bounds.MaxY);

 return(
LVCB_OK);

}


IExec->AddTail(MyLBContent,IListBrowser->AllocListBrowserNode(1,
                                              
LBNA_Column,0,
                                              
LBNCA_RenderHook,MyGaugeHook,TAG_DONE);

struct Hook *MyGaugeHook=IExec->AllocSysObjectTags(ASOT_HOOK,ASOHOOK_Entry,RenderMyGaugeFunc,TAG_DONE);

Rock lobster bit me - so I'm here forever
X1000 + AmigaOS 4.1 FE
"Anyone can build a fast CPU. The trick is to build a fast system." - Seymour Cray
Go to top
Re: listbrowser & fuelgauge?
Amigans Defender
Amigans Defender


See User information
Quote:

jaokim wrote:
I *think* a listbrowser can only contain either text or boopsi objects based on the image class (as set by LBN_Text and LBN_Image, respectively).
I guess fuelgauge doesn't extend image?


the built-in gaugeiclass is an imageclass object.

Go to top
Re: listbrowser & fuelgauge?
Just can't stay away
Just can't stay away


See User information
@Chris
I couldn't find gauge.h from the SDK/images.

Rock lobster bit me - so I'm here forever
X1000 + AmigaOS 4.1 FE
"Anyone can build a fast CPU. The trick is to build a fast system." - Seymour Cray
Go to top
Re: listbrowser & fuelgauge?
Amigans Defender
Amigans Defender


See User information
@TSK

Correct. It's a built-in class. Ad-libbing a bit here, but something like this should work:

struct Image *gauge = (struct Image *)NewObject(NULL"gaugeiclass"IA_Label"Gauge label"GAUGEIA_Level50TAG_DONE);

blahblahblahwhatever your creation function iswith LBN_Imagegauge,


The available tags are documented in the gaugeiclass Autodoc.

Go to top
Re: listbrowser & fuelgauge?
Just can't stay away
Just can't stay away


See User information
@Chris

Thanks ! I was trying to use NewObject(NULL, "gauge.image", ... With "gaugeiclass" it works. I was wondering what "being built-in class" means.

Do you know how table.image works ?

Rock lobster bit me - so I'm here forever
X1000 + AmigaOS 4.1 FE
"Anyone can build a fast CPU. The trick is to build a fast system." - Seymour Cray
Go to top
Re: listbrowser & fuelgauge?
Amigans Defender
Amigans Defender


See User information
@TSK

Quote:
I was trying to use NewObject(NULL, "gauge.image"

It couldn't have worked because the public class ID is "gaugeiclass", not "gauge.image".

Quote:
I was wondering what "being built-in class" means

It means that the class is part of the Intuition module and does not reside in SYS:Classes/ just like most other BOOPSI classes.

The Rear Window blog

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
Go to top
Re: listbrowser & fuelgauge?
Amigans Defender
Amigans Defender


See User information
Quote:

TSK wrote:
Do you know how table.image works ?


No, because we haven't had an SDK update since it was released, so there's no documentation.

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project