• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Mail.app like SplitView Handle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Mail.app like SplitView Handle
      • From: Daniel Jalkut <email@hidden>
  • Prev by Date: NSArrayController & Select inserted objects
  • Next by Date: Re: Mail.app like SplitView Handle
  • Previous by thread: Re: NSArrayController & Select inserted objects
  • Next by thread: Re: Mail.app like SplitView Handle
  • Index(es):
    • Date
    • Thread