OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
wxCocoaOutlineView(Edit) Category Reference

Instance Methods

(BOOL) - outlineView:shouldEditTableColumn:item: [implementation]
(void) - synchronizedViewContentBoundsDidChange: [implementation]

Detailed Description

Method Documentation

◆ outlineView:shouldEditTableColumn:item:

- (BOOL) outlineView: (NSOutlineView*) view
shouldEditTableColumn: (nullable NSTableColumn *) tableColumn
item: (nonnull id) item 
implementation
289 : (NSOutlineView*) view shouldEditTableColumn:(nullable NSTableColumn *)tableColumn item:(nonnull id)item
290{
291 NSClipView * clipView = [[self enclosingScrollView] contentView];
292 if (!addObserver) {
293 addObserver = true;
294 clipView.postsBoundsChangedNotifications = YES;
295 [[NSNotificationCenter defaultCenter] addObserver:self
296 selector:@selector(synchronizedViewContentBoundsDidChange:)
297 name:NSViewBoundsDidChangeNotification
298 object:clipView];
299 }
300
301 wxDataViewColumn* const col((wxDataViewColumn *)[tableColumn getColumnPointer]);
302 wxDataViewItem item2([static_cast<wxPointerObject *>(item) pointer]);
303
304 wxDataViewCtrl* const dvc = implementation->GetDataViewCtrl();
305 // Before doing anything we send an event asking if editing of this item is really wanted.
306 wxDataViewEvent event(wxEVT_DATAVIEW_ITEM_EDITING_STARTED, dvc, col, item2);
307 dvc->GetEventHandler()->ProcessEvent( event );
308 if( !event.IsAllowed() )
309 return NO;
310
311 return YES;
312}
bool addObserver
Definition MacDarkMode.mm:287

References addObserver.

◆ synchronizedViewContentBoundsDidChange:

- (void) synchronizedViewContentBoundsDidChange: (NSNotification *) notification
implementation
314 :(NSNotification *)notification
315{
316 wxDataViewCtrl* const dvc = implementation->GetDataViewCtrl();
317 wxDataViewCustomRenderer * r = dvc->GetCustomRendererPtr();
318 if (r)
319 r->FinishEditing();
320}

The documentation for this category was generated from the following file:
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/Utils/MacDarkMode.mm