Skip to content
This repository has been archived by the owner on Oct 1, 2023. It is now read-only.

davidcann/DCPathControl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DCPathControl

Example

These classes display a series of buttons representing a file or URL path hierarchy. It's similar to the Cocoa NSPathControl, but not exactly the same. It works with Cappuccino.

Usage

Copy these files into your app:

  • DCPathControl.j
  • DCPathComponentCell.j
  • DCPathControlDivider.png

Import this:

@import "DCPathControl.j"

Apply a DCFileDropController to any CPView:

var pathControl = [[DCPathControl alloc] initWithFrame:CGRectMake(0, 0, 500, 36)];
[pathControl setDelegate:self];
[pathControl setURL:[CPURL URLWithString:"/Root/Path/To/Current/Location"]];
[contentView addSubview:pathControl];

You can detect when a segment is clicked with the delegate method:

- (void)didClickURL:(CPURL)theURL {
	CPLog("clicked url = "+ theURL);
}

License

MIT License

About

Hierarchical view of a path, similar to NSPathControl

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published