Who's Online
175 user(s) are online (
168 user(s) are browsing
Forums )
Members: 0
Guests: 175
more...
Topic options
View mode
Newest First
listbrowser & fuelgauge?
Posted on:
2012/8/17 19:29
#1
Home away from home
Joined: 2006/11/30 18:43Last Login
: 11/8 22:21
From Norway
Group:
Registered Users
Is it possible to use a fuelgauge inside a listbrowser using reaction?
X5000
Re: listbrowser & fuelgauge?
Posted on:
2012/8/17 20:49
#2
Just popping in
Joined: 2007/7/30 22:55Last Login
: 10/22 20:20
From Sweden
Group:
Registered Users
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.
Re: listbrowser & fuelgauge?
Posted on:
2012/8/17 21:07
#3
Just can't stay away
Joined: 2007/2/23 13:49Last Login
: 11/16 0:49
From Finland, the land of Santa, sauna, sisu and salmiakki
Group:
Registered Users
Use a rendering hook and draw the gauge "yourself".
uint32 RenderMyGaugeFunc ( register struct Hook * hook , register struct Node * node , register 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
Re: listbrowser & fuelgauge?
Posted on:
2012/8/17 21:38
#4
Amigans Defender
Joined: 2006/11/17 22:40Last Login
: Yesterday 23:24
From England
Group:
Registered Users Moderators
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.
Re: listbrowser & fuelgauge?
Posted on:
2012/8/18 14:10
#5
Just can't stay away
Joined: 2007/2/23 13:49Last Login
: 11/16 0:49
From Finland, the land of Santa, sauna, sisu and salmiakki
Group:
Registered Users
@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
Re: listbrowser & fuelgauge?
Posted on:
2012/8/18 15:22
#6
Amigans Defender
Joined: 2006/11/17 22:40Last Login
: Yesterday 23:24
From England
Group:
Registered Users Moderators
@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_Level , 50 , TAG_DONE );
blah , blah , blah , whatever your creation function is , with LBN_Image , gauge ,
The available tags are documented in the gaugeiclass Autodoc.
Re: listbrowser & fuelgauge?
Posted on:
2012/8/18 20:03
#7
Just can't stay away
Joined: 2007/2/23 13:49Last Login
: 11/16 0:49
From Finland, the land of Santa, sauna, sisu and salmiakki
Group:
Registered Users
@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
Re: listbrowser & fuelgauge?
Posted on:
2012/8/18 21:10
#8
Amigans Defender
Joined: 2009/5/1 18:57Last Login
: Today 7:32
From Czech Republic
Group:
Registered Users Staff members Moderators
@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
Re: listbrowser & fuelgauge?
Posted on:
2012/8/18 22:12
#9
Amigans Defender
Joined: 2006/11/17 22:40Last Login
: Yesterday 23:24
From England
Group:
Registered Users Moderators
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.
Currently Active Users Viewing This Thread:
1
(
0 members
and 1 Anonymous Users
)