- (BOOL)canUndo
- (BOOL)canRedo
- (void)undo
- (void)redo
- (NSString *)undoActionName
- (NSString *)redoActionName
- (void)undo
{
SOKFile *file = [self file];
SOKUndoList& undo_list = file->GetUndoList();
undo_list.UndoCommand();
}
This blog is a personal diary of a project to port Cello, an MFC based application, to OSX and Cocoa.
- (BOOL)canUndo
- (BOOL)canRedo
- (void)undo
- (void)redo
- (NSString *)undoActionName
- (NSString *)redoActionName
- (void)undo
{
SOKFile *file = [self file];
SOKUndoList& undo_list = file->GetUndoList();
undo_list.UndoCommand();
}
The arrow is harder. There's a window with an arrow on Matt Gemmell's site http://mattgemmell.com/ but that uses an NSColor with a pattern image to fill the window background and that seems mess up with core animation, which can't cache the drawn window prior to animation.
[_editLabelView setHorizontallyResizable:YES];
[_editLabelView setMinSize:NSMakeSize(400.0f, kLabelViewHeight)];
[_editLabelView setFieldEditor:YES];
[_editLabelView setTextContainerInset:NSMakeSize(0, 0)];
NSTextContainer *container = [_editLabelView textContainer];
[container setLineFragmentPadding:0];
[_editLabelView setDelegate:self];
[_editLabelView setString:label];
[_editLabelView setRichText:NO];
[_editLabelView setSelectedRange:NSMakeRange(0, [label length])];
[_editLabelView setDrawsBackground:NO];
_editLabelView = [[NSTextView alloc] initWithFrame:bounds];
NSTextContainer *container = [_editLabelView textContainer];
[container setLineFragmentPadding:0];