-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathSplitPane.cpp
More file actions
726 lines (644 loc) · 22.4 KB
/
SplitPane.cpp
File metadata and controls
726 lines (644 loc) · 22.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
/*******************************************************
* SplitPane©
*
* SplitPane is a usefull UI component. It alows the
* use to ajust two view Horizontaly or Vertacly so
* that they are a desired size. This type of Pane
* shows up most comonly in Mail/News Readers.
*
* @author YNOP (ynop@acm.org)
* @version beta
* @date Dec. 10 1999
*******************************************************/
#include <AppKit.h>
#include <InterfaceKit.h>
#include <StorageKit.h>
#include <String.h>
#include <Path.h>
#include <TranslationKit.h>
#include <TranslationUtils.h>
//#include <stdio.h>
#include "SplitPane.h"
//#include "SplitPaneConfig.h"
/*******************************************************
* Setup the main view. Add in all the niffty components
* we have made and get things rolling
*******************************************************/
SplitPane::SplitPane(BRect frame, const char* name, BView *one, BView *two,uint32 Mode):BView(frame, name, Mode,B_WILL_DRAW|B_FRAME_EVENTS){
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); // This is default get from parent if exist
//SetViewColor(B_TRANSPARENT_32_BIT); // go tran so we have control over drawing
BRect b;
b = Bounds();
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
PaneOne = one;
PaneTwo = two;
align = B_VERTICAL; // Most people use it this way
pos = (int)b.Width()/2; // Center is a good start place
thickness = 10;
jump = 1; // 1 makes a smother slide
VOneDetachable = false;
VTwoDetachable = false;
pad = 1;
MinSizeOne = 0; // full left
MinSizeTwo = 0; // full right
poslocked = false; // free movement
alignlocked = false; // free alignment
Draggin = false;
attached = false;
WinOne = NULL;
WinTwo = NULL;
ConfigWindow = NULL;
AddChild(one);
AddChild(two);
}
/*******************************************************
* When ready grap the parents color and refreash.
*******************************************************/
void SplitPane::AttachedToWindow(){
//SetViewColor(Parent()->ViewColor());
attached = true;
Update();
}
/*******************************************************
* If we are being resized. Fix the stuff we need to fix
*******************************************************/
void SplitPane::FrameResized(float,float){
// if bar is on the left side follow left
// else if it is on the right side follow the right
// Need to implements smart follow still
Update();
Invalidate();
}
/*******************************************************
* The main draw stuff here. basicly just the slider
*******************************************************/
void SplitPane::Draw(BRect f){
SetHighColor(160,160,160);
if(align == B_VERTICAL){
SetHighColor(185,185,185);
// SetHighColor(145,145,145);
//FillRect(BRect(pos,Bounds().top+pad+1,pos,Bounds().bottom-pad-1)); // 145
FillRect(BRect(pos,Bounds().top+pad+1,pos,Bounds().bottom-pad-1)); // 145
SetHighColor(255,255,255);
FillRect(BRect(pos+1,Bounds().top+pad+1,pos+2,Bounds().bottom-pad-1)); // 255
//SetHighColor(216,216,216);
SetHighColor(Parent()->ViewColor());
FillRect(BRect(pos+2,Bounds().top+pad+1,pos+thickness-2,Bounds().bottom-pad-1));// 216
if(thickness>9)
{
float y = (Bounds().bottom - Bounds().top)/2;
float x = pos + (thickness/2);
SetPenSize(2);
SetHighColor(255,255,255);
StrokeLine(BPoint(x-3,y-11),BPoint(x+3,y-5));
StrokeLine(BPoint(x-3,y-7),BPoint(x+3,y-1));
StrokeLine(BPoint(x-3,y-3),BPoint(x+3,y+3));
StrokeLine(BPoint(x-3,y+1),BPoint(x+3,y+7));
StrokeLine(BPoint(x-3,y+5),BPoint(x+3,y+11));
SetPenSize(1);
SetHighColor(145,145,145);
StrokeLine(BPoint(x-3,y-10),BPoint(x+3,y-4));
StrokeLine(BPoint(x-3,y-6),BPoint(x+3,y+0));
StrokeLine(BPoint(x-3,y-2),BPoint(x+3,y+4));
StrokeLine(BPoint(x-3,y+2),BPoint(x+3,y+8));
StrokeLine(BPoint(x-3,y+6),BPoint(x+3,y+12));
}
SetHighColor(185,185,185);
// SetHighColor(145,145,145);
FillRect(BRect(pos+thickness-2,Bounds().top+pad+1,pos+thickness-2,Bounds().bottom-pad-1)) ;// 145
SetHighColor(145,145,145);
FillRect(BRect(pos+thickness-1,Bounds().top+pad+1,pos+thickness-1,Bounds().bottom-pad-1)); // 96
//FillRect(BRect(pos+thickness,Bounds().top+pad+1,pos+thickness,Bounds().bottom-pad-1));
}else{
SetHighColor(185,185,185);
// SetHighColor(145,145,145);
//FillRect(BRect(Bounds().left+pad+1,pos,Bounds().right-pad-1,pos)); // 145
FillRect(BRect(Bounds().left+pad+1,pos,Bounds().right-pad-1,pos)); // 145
SetHighColor(255,255,255);
FillRect(BRect(Bounds().left+pad+1,pos+1,Bounds().right-pad-1,pos+2)); // 255
//SetHighColor(216,216,216);
SetHighColor(Parent()->ViewColor());
FillRect(BRect(Bounds().left+pad+1,pos+2,Bounds().right-pad-1,pos+thickness-2));// 216
if(thickness>9)
{
SetHighColor(255,255,255);
float x = (Bounds().right - Bounds().left)/2;
float y = pos + (thickness/2);
SetPenSize(2);
StrokeLine(BPoint(x-11,y-3),BPoint(x-5,y+3));
StrokeLine(BPoint(x-7,y-3),BPoint(x-1,y+3));
StrokeLine(BPoint(x-3,y-3),BPoint(x+3,y+3));
StrokeLine(BPoint(x+1,y-3),BPoint(x+7,y+3));
StrokeLine(BPoint(x+5,y-3),BPoint(x+11,y+3));
SetPenSize(1);
SetHighColor(145,145,145);
StrokeLine(BPoint(x-10,y-3),BPoint(x-4,y+3));
StrokeLine(BPoint(x-6,y-3),BPoint(x+0,y+3));
StrokeLine(BPoint(x-2,y-3),BPoint(x+4,y+3));
StrokeLine(BPoint(x+2,y-3),BPoint(x+8,y+3));
StrokeLine(BPoint(x+6,y-3),BPoint(x+12,y+3));
}
SetHighColor(185,185,185);
// SetHighColor(145,145,145);
FillRect(BRect(Bounds().left+pad+1,pos+thickness-2,Bounds().right-pad-1,pos+thickness-2)) ;// 145
SetHighColor(145,145,145);
// SetHighColor(96,96,96);
FillRect(BRect(Bounds().left+pad+1,pos+thickness-1,Bounds().right-pad-1,pos+thickness-1)); // 96
//FillRect(BRect(Bounds().left+pad+1,pos+thickness,Bounds().right-pad-1,pos+thickness));
}
}
/*******************************************************
* Keeps Modes for both panles uptodate and acctually
* is the func that sets the location of the slider
*******************************************************/
void SplitPane::Update(){
Window()->Lock();
if(align == B_VERTICAL){
PaneOne->SetResizingMode(B_FOLLOW_LEFT|B_FOLLOW_TOP_BOTTOM);
PaneTwo->SetResizingMode(B_FOLLOW_LEFT_RIGHT|B_FOLLOW_TOP_BOTTOM);
if(pos > (Bounds().Width()-thickness-MinSizeTwo)){
if(!poslocked){
pos = (int)Bounds().Width()-thickness-MinSizeTwo;
}
}
if(pos < MinSizeOne){
if(!poslocked){
pos = MinSizeOne;
}
}
}else{
PaneOne->SetResizingMode(B_FOLLOW_LEFT_RIGHT|B_FOLLOW_TOP);
PaneTwo->SetResizingMode(B_FOLLOW_LEFT_RIGHT|B_FOLLOW_TOP_BOTTOM);
if(pos > (Bounds().Height()-thickness-MinSizeTwo)){
if(!poslocked){
pos = (int)Bounds().Height()-thickness-MinSizeTwo;
}
}
if(pos < MinSizeOne){
if(!poslocked){
pos = MinSizeOne;
}
}
}
// this block should go in FrameResized .. think about it
if(align == B_VERTICAL){
if(pos >= (Bounds().IntegerWidth()/2)){
//pos should follow the right side
// staying the same distans from it that
// it is right now
}
}else{
if(pos >= (Bounds().IntegerHeight()/2)){
//should follow bottom and stay the
// same distance that we are way from
// it now
}
}
if(PaneOne){
if(!WinOne){
if(align == B_VERTICAL){
PaneOne->MoveTo(pad,Bounds().top+pad);
PaneOne->ResizeTo(pos-pad, Bounds().Height()-pad-pad); // widht x height
}else{
PaneOne->MoveTo(pad,Bounds().top+pad);
PaneOne->ResizeTo(Bounds().Width()-pad-pad, pos-pad-pad); // widht x height
}
}
}
if(PaneTwo){
if(!WinTwo){
if(align == B_VERTICAL){
PaneTwo->MoveTo(pos+thickness,Bounds().top+pad);
PaneTwo->ResizeTo(Bounds().Width()-(pos+thickness)-pad, Bounds().Height()-pad-pad);
}else{
PaneTwo->MoveTo(Bounds().left+pad,pos+thickness);
PaneTwo->ResizeTo(Bounds().Width()-pad-pad, Bounds().Height()-pos-pad-thickness);
}
}
}
Window()->Unlock();
}
/*******************************************************
* Hook for when we click. This takes care of all the
* little stuff - Like where is the mouse and what is
* going on.
*******************************************************/
void SplitPane::MouseDown(BPoint where){
Window()->Lock();
BMessage *currentMsg = Window()->CurrentMessage();
if (currentMsg->what == B_MOUSE_DOWN) {
uint32 buttons = 0;
currentMsg->FindInt32("buttons", (int32 *)&buttons);
uint32 modifiers = 0;
currentMsg->FindInt32("modifiers", (int32 *)&modifiers);
uint32 clicks = 0;
currentMsg->FindInt32("clicks",(int32*)&clicks);
if (buttons & B_SECONDARY_MOUSE_BUTTON){
if(!alignlocked){
switch(align){
case B_VERTICAL:
align = B_HORIZONTAL;
break;
case B_HORIZONTAL:
align = B_VERTICAL;
break;
}
Update();
Invalidate();
}
/*if(VOneDetachable){
WinOne = new BWindow(ConvertToScreen(PaneOne->Bounds()),"PanelOne",B_TITLED_WINDOW,B_ASYNCHRONOUS_CONTROLS);
RemoveChild(PaneOne);
WinOne->AddChild(PaneOne);
PaneOne->SetResizingMode(B_FOLLOW_ALL_SIDES);
// PaneOne->SetTarget(this);
WinOne->Show();
}*/
}
// if((buttons & B_PRIMARY_MOUSE_BUTTON) && (clicks >= 2)){
//Config window for split pane
// (new BAlert(NULL,"This is - or will be - a configuration panel for SplitPane.","Ok"))->Go();
//ConfigWindow = new SplitPaneConfig(this);
//ConfigWindow->Show();
//}else
if((buttons & B_PRIMARY_MOUSE_BUTTON) && !Draggin){
if(!poslocked){
Draggin= true; // this is so we can drag
here = where;
}
SetMouseEventMask(B_POINTER_EVENTS,B_LOCK_WINDOW_FOCUS);
}
}
Window()->Unlock();
}
/*******************************************************
* If we unclick then stop dragging or whatever it is
* we are doing
*******************************************************/
void SplitPane::MouseUp(BPoint where){
Draggin = false; // stop following mouse
}
/*******************************************************
* If the mouse moves while we dragg. Then follow it
* Also Invalidate so we update the views
*******************************************************/
void SplitPane::MouseMoved(BPoint where,uint32 info,const BMessage *m){
if(Draggin){
switch(align){
case B_HORIZONTAL:
pos = (int)(where.y)-(thickness/2);//- here.x
break;
case B_VERTICAL:
pos = (int)(where.x)-(thickness/2);
break;
}
/*
// This code figures out which jump we are closest
// to and if needed we "snap" to that.
int c = Bounds().IntegerWidth() / pos
Jump * c ... hmmm this is not right at all
*/
if(pos < MinSizeOne){
pos = MinSizeOne;
}
if(align == B_VERTICAL){
if(pos > (Bounds().Width() - thickness - MinSizeTwo)){
pos = (int)(Bounds().Width() - thickness - MinSizeTwo + 1);
}
}else{
if(pos > (Bounds().Height() - thickness - MinSizeTwo)){
pos = (int)(Bounds().Height() - thickness - MinSizeTwo + 1);
}
}
Update();
Invalidate();
}
}
/*******************************************************
* If you already have a view One, but want to change
* if for some odd reason. This should work.
*******************************************************/
void SplitPane::AddChildOne(BView *v){
RemoveChild(PaneOne);
PaneOne = v;
AddChild(PaneOne);
}
/*void SplitPane::MakePaneTwoFocus()
{
if(PaneTwo)
PaneTwo->MakeFocus();
}
*/
/*******************************************************
* If you already have a view Two, and want to put
* another view there, this is what to use.
*******************************************************/
void SplitPane::AddChildTwo(BView* v,bool IsAdded,bool ShowAfterHide)
{
if(!v->IsHidden())
v->Hide();
PaneTwo = v;
//WinTwo = NULL;
PaneTwo = v;
if(IsAdded)
{
Update();
if(ShowAfterHide)
{
if(v->IsHidden())
v->Show();
}
}
if(!IsAdded)
{
AddChild(PaneTwo);
}
PaneTwo = v;
}
/*******************************************************
* Sets is we are horizontal or Vertical. We use the
* standard B_HORIZONTAL and B_VERTICAL flags for this
*******************************************************/
void SplitPane::SetAlignment(uint a){
align = a;
if(attached){
Update();
}
Invalidate();
}
/*******************************************************
* Returns wheather the slider is horizontal or vertical
*******************************************************/
uint SplitPane::GetAlignment(){
return align;
}
/*******************************************************
* Sets the location of the bar. (we do no bounds
* checking for you so if its off the window thats
* your problem)
*******************************************************/
void SplitPane::SetBarPosition(int i){
pos = i;
if(attached){
Update();
}
Invalidate();
}
/*******************************************************
* Returns about where the bar is ...
*******************************************************/
int SplitPane::GetBarPosition(){
return pos;
}
/*******************************************************
* Sets how thick the bar should be.
*******************************************************/
void SplitPane::SetBarThickness(int i){
thickness = i;
if(attached){
Update();
}
Invalidate();
}
/*******************************************************
* Retuns to us the thickness of the slider bar
*******************************************************/
int SplitPane::GetBarThickness(){
return thickness;
}
/*******************************************************
* Sets the amount of jump the bar has when it is
* moved. This can also be though of as snap. The bar
* will start at 0 and jump(snap) to everry J pixels.
*******************************************************/
void SplitPane::SetJump(int i){
jump = i;
if(attached){
Update();
}
}
/*******************************************************
* Lets you know what the jump is .. see SetJump
*******************************************************/
int SplitPane::GetJump(){
return jump;
}
/*******************************************************
* Do we have a View One or is it NULL
*******************************************************/
bool SplitPane::HasViewOne(){
if(PaneOne) return true;
return false;
}
/*******************************************************
* Do we have a View Two .. or is it NULL too
*******************************************************/
bool SplitPane::HasViewTwo(){
if(PaneTwo) return true;
return false;
}
/*******************************************************
* Sets wheather View one is detachable from the
* slider view and from the app. This will creat a
* window that is detached (floating) from the app.
*******************************************************/
void SplitPane::SetViewOneDetachable(bool b){
VOneDetachable = b;
}
/*******************************************************
* Sets view tow detachable or not
*******************************************************/
void SplitPane::SetViewTwoDetachable(bool b){
VTwoDetachable = b;
}
/*******************************************************
* Returns whether the view is detachable
*******************************************************/
bool SplitPane::IsViewOneDetachable(){
return VOneDetachable;
}
/*******************************************************
* Returns if this view is detachable
*******************************************************/
bool SplitPane::IsViewTwoDetachable(){
return VTwoDetachable;
}
/*******************************************************
* Tells the view if the user is alowed to open the
* configuration window for the slider.
*******************************************************/
void SplitPane::SetEditable(bool b){
//ADD CODE HERE YNOP
}
/*******************************************************
* Tells use if the split pane is user editable
*******************************************************/
bool SplitPane::IsEditable(){
return true; //ADD SOME MORE CODE HERE
}
/*******************************************************
* Sets the inset that the view has.
*******************************************************/
void SplitPane::SetViewInsetBy(int i){
pad = i;
if(attached){
Update();
} Invalidate();
}
/*******************************************************
* Returns to use the padding around the views
*******************************************************/
int SplitPane::GetViewInsetBy(){
return pad;
}
/*******************************************************
* This sets the minimum size that View one can be.
* if the user trys to go past this .. we just stop
* By default the minimum size is set to 0 (zero) so
* the user can put the slider anywhere.
*******************************************************/
void SplitPane::SetMinSizeOne(int i){
MinSizeOne = i;
}
/*******************************************************
* Gives us the minimum size that one can be.
*******************************************************/
int SplitPane::GetMinSizeOne(){
return MinSizeOne;
}
/*******************************************************
* This sets the Minimum size that the second view
* can be.
*******************************************************/
void SplitPane::SetMinSizeTwo(int i){
MinSizeTwo = i;
}
/*******************************************************
* Lets us know what that minimum size is.
*******************************************************/
int SplitPane::GetMinSizeTwo(){
return MinSizeTwo;
}
/*******************************************************
* Locks the bar from being moved by the User. The
* system can still move the bar (via SetBarPosition)
*******************************************************/
void SplitPane::SetBarLocked(bool b){
poslocked = b;
}
/*******************************************************
* Returns to use if the bar is in a locked state or
* not.
*******************************************************/
bool SplitPane::IsBarLocked(){
return poslocked;
}
/*******************************************************
* Locks the alignment of the bar. The user can no
* longer toggle between Horizontal and Vertical
* Slider bar. Again you can still progomaticly set
* the position how ever you want.
*******************************************************/
void SplitPane::SetBarAlignmentLocked(bool b){
alignlocked = b;
}
/*******************************************************
* Lets us know about the lock state of the bar
*******************************************************/
bool SplitPane::IsBarAlignmentLocked(){
return alignlocked;
}
/*******************************************************
* Gets the Total state of the bar, alignment, size,
* position and many other things that are required
* to fully capture the state of the SplitPane.
* We pack all of this into a cute little BMessage
* so that it is esally expandable and can be saved
* off easyaly too. The SplitPane System does not
* however save the state for you. Your program must
* grab the state and save it in its config file.
*******************************************************/
BMessage* SplitPane::GetState(){
BMessage *state;
state = new BMessage(SPLITPANE_STATE);
state->AddBool("onedetachable",VOneDetachable);
state->AddBool("twodetachable",VTwoDetachable);
state->AddInt32("align",align);
state->AddInt32("pos",pos);
state->AddInt32("thick",thickness);
state->AddInt32("jump",jump);
state->AddInt32("pad",pad);
state->AddInt32("minsizeone",MinSizeOne);
state->AddInt32("minsizetwo",MinSizeTwo);
state->AddBool("poslock",poslocked);
state->AddBool("alignlock",alignlocked);
return state;
// delete state;
}
/*******************************************************
* Sets the state of the SplitPane from a BMessage
* like the one recived from GetState().
* This is one of three ways the user can rebuild the
* state of the SplitPane. The second is to simply
* send the SplitPane the state message, it is the
* same as calling SetState but it ashyncronouse.
* The third way is to use all the Get/Set methouds
* for each element of the SplitPane, this way is
* long and boarding. I suggest you just send the
* View a message :)
*******************************************************/
void SplitPane::SetState(BMessage *state){
int32 Npos,Nthickness,Njump,Npad,NMSO,NMST;
int32 Nalign;//uint
if(state->FindBool("onedetachable",&VOneDetachable) != B_OK){
VOneDetachable = false;
}
if(state->FindBool("towdetachable",&VTwoDetachable) != B_OK){
VTwoDetachable = false;
}
if(state->FindInt32("align",&Nalign) == B_OK){
align = Nalign;
}
if(state->FindInt32("pos",&Npos) == B_OK){
pos = Npos;
}
if(state->FindInt32("thick",&Nthickness) == B_OK){
thickness = Nthickness;
}
if(state->FindInt32("jump",&Njump) == B_OK){
jump = Njump;
}
if(state->FindInt32("pad",&Npad) == B_OK){
pad = Npad;
}
if(state->FindInt32("minsizeonw",&NMSO) == B_OK){
MinSizeOne = NMSO;
}
if(state->FindInt32("minsizetwo",&NMST) == B_OK){
MinSizeTwo = NMST;
}
if(state->FindBool("poslock",&poslocked) != B_OK){
poslocked = false;
}
if(state->FindBool("alignlock",&alignlocked) != B_OK){
alignlocked = false;
}
Update();
Invalidate();
}
/*******************************************************
* Ok, hmm what does this do. NOT MUCH. if we get a
* STATE message then lets set the state. This is here
* to provide a asyncronuse way of seting the state and
* also to make life easyer.
*******************************************************/
void SplitPane::MessageReceived(BMessage *msg){
switch(msg->what){
case SPLITPANE_STATE:
SetState(msg);
break;
default:
BView::MessageReceived(msg);
break;
}
}