Mail.app like SplitView Handle
Mail.app like SplitView Handle
- Subject: Mail.app like SplitView Handle
- From: Julian Cain <email@hidden>
- Date: Sat, 4 Mar 2006 13:21:32 -0500
Hi,
I am trying to implement a SplitView handle like in mail, itunes,
iweb etc. I have written the following to get my cursor and detect
mouseDown and dragged, now I am kinda stuck on where I should go. Any
ideas?
- Header File -
//
// HeaderResizeWidget.h
// blah
//
// Created by Julian Cain on 3/4/06.
// Copyright 2006 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface HeaderResizeWidget : NSImageView {
NSPoint _dragStart;
float _initialLeftWidth;
}
@end
- File -
//
// HeaderResizeWidget.m
// blah
//
// Created by Julian Cain on 3/4/06.
// Copyright 2006 __MyCompanyName__. All rights reserved.
//
#import "HeaderResizeWidget.h"
@implementation HeaderResizeWidget
- (void)awakeFromNib {
_initialLeftWidth = 165.0;
}
- (void)viewWillMoveToWindow:(id)fp8 {
}
- (void)resetCursorRects {
[self addCursorRect:[self bounds] cursor:[NSCursor
resizeLeftRightCursor]];
}
- (void)mouseDown:(NSEvent *)theEvent {
_dragStart = [theEvent locationInWindow];
JCLog(@"mouseDown:");
}
- (void)mouseDragged:(NSEvent*)theEvent {
JCLog(@"mouseDragged:%.2f",_dragStart);
}
~Julian Cain
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden