_justin_kelly9759578656 has joined #haiku-3rdparty
_justin_kelly9759578656 has quit []
_justin_kelly975957865 has quit [Ping timeout: 480 seconds]
_justin_kelly9759578656 has joined #haiku-3rdparty
yann64 has joined #haiku-3rdparty
yann64 has quit []
Mibi88 has joined #haiku-3rdparty
Mibi88 has quit []
Mibi88 has joined #haiku-3rdparty
<PulkoMandy>
Mibi88, in the code about SrawString you shared earlier, you were trying to use this function: void DrawString(const char* string, const BPoint* locations, int32 locationCount);
<PulkoMandy>
this one expects an array of BPoint, one for each character of the string, instead you want to use this one: void DrawString(const char* string, BPoint location, escapement_delta* delta = NULL); with a single point for the first character and then move the pen automatically for the next characters
<Mibi88>
Oh, I didn't noticed it. Thanks!
<PulkoMandy>
so that would be DrawString("Hello world", BPoint(10, 10)); for example (notice there is no "new" so it's not passed as a pointer in this case)
<Mibi88>
> void DrawString(const char* string, BPoint location, escapement_delta* delta = NULL); : Yes that's what I was trying to use IIRC I got errors when not passing the last parameter. But now I got everything working already :D
Mibi88 has quit [Read error: Connection reset by peer]
Mibi88 has joined #haiku-3rdparty
_justin_kelly9759578656 has quit []
_justin_kelly9759578656 has joined #haiku-3rdparty
<Mibi88>
Hello, I'm trying to get the opened file from a filepanel on MessageRecieved. When saving files, from the example code, I get the saved file path with message->FindRef("directory", &ref) and message->FindString("name", &name), but I'm unable to do that on B_REFS_RECEIVED messages (nothing happens). How can I get the opened file? When looking at the doc it seemed correct, because a B_REFS_RECEIVED should be sent when the file is
<Mibi88>
opened…
_justin_kelly9759578656 has quit []
_justin_kelly9759578656 has joined #haiku-3rdparty
<augiedoggie>
the B_REFS_RECEIVED_MESSAGE has "refs" fields in the message that you use instead
<Mibi88>
Thanks! I just found it out by reading a bit more.
<Mibi88>
When I create a BScrollView with my hexView BView as following BScrollView* scrollView = new BScrollView("scrollview", hexView, B_FOLLOW_LEFT_TOP, 0, false, true);, nothing gets shown in the view when I add it to the layout, it's content stays blank. I searched in the haiku book and in the be book but found nothing…
<Mibi88>
Ps: How do I let a widget in my BLayout fill the window? Currently it always takes up the half of it.
<Mibi88>
I meant BLayoutBuilder
<augiedoggie>
the view constructors without a resizing mode are generally used with the layout kit
<augiedoggie>
"Instantiates a new scroll view and connects it to the target view suitable for use in a BLayout"
<Mibi88>
Oh ok, I mixed BLayoutBuilder and BLayout
<augiedoggie>
LayoutBuilder is just a convenience wrapper to create a BLayout
<Mibi88>
Ok, I got it working, I thought that I was using the other prototype. Thanks!
<augiedoggie>
:)
<Mibi88>
And for my size issue, I set the width to FLT_MAX when calling Add, but is there a more elegant solution?
<waddlesplash>
you shouldn't need to set width
<augiedoggie>
i'm not sure what FLT_MAX is
<waddlesplash>
maximum value a floating point number can hold
<waddlesplash>
but you shouldn't need to call Add with a value at all here if you're using layouts
<augiedoggie>
yeah, but i mean, i thought the weights were 0 to 1
<augiedoggie>
i must be thinking of a different api :P
<waddlesplash>
ah, yeah. just 1 for a weight should work
<Mibi88>
Thanks! I'm sorry to be asking so often, but I'm unable to set the expected size of my BView for the BScrollView to display scrollbars accordingly. I tried using SetExplicitPreferredSize (I also tried SetExplicitMinSize), but it messes up the whole layout: I can't shrink the window back down without having the scollbars offscreen…
<waddlesplash>
there could are some oddities around BScrollView but I don't remember what they are off the top of my head
<waddlesplash>
you could look at some existing application that does custom drawing with BScrollView
<waddlesplash>
like DiskProbe, the hex viewer/editor
<waddlesplash>
... or does that just use scrollbars and not a full scrollview
<waddlesplash>
I know the Contacts window definitely uses BScrollView at least
<Mibi88>
Ok, I'll take a look at that.
<augiedoggie>
maybe the child BView is being created with the old non-layout constructor