#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/InstanceCheckMac.h>
◆ add_observer:
| - (void) add_observer: |
|
(NSString *) | version |
|
12 :(NSString *)version_hash
13{
14
15
16 NSString *nsver = [NSString stringWithFormat: @"%@%@", @"OtherOrcaSlicerInstanceMessage", version_hash];
17 [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(message_update:) name:nsver object:nil suspensionBehavior:NSNotificationSuspensionBehaviorDeliverImmediately];
18 NSString *nsver2 = [NSString stringWithFormat: @"%@%@", @"OtherOrcaSlicerInstanceClosing", version_hash];
19 [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(closing_update:) name:nsver2 object:nil suspensionBehavior:NSNotificationSuspensionBehaviorDeliverImmediately];
20}
◆ bring_forward
37{
38
39 for(NSWindow* win in [NSApp windows])
40 {
41 if([win isMiniaturized])
42 {
43 [win deminiaturize:self];
44 }
45 }
46
47 [[NSApplication sharedApplication] activateIgnoringOtherApps : YES];
48}
References bring_forward.
Referenced by bring_forward, and message_update:.
◆ closing_update:
| - (void) closing_update: |
|
(NSNotification *) | note |
|
29 :(NSNotification *)msg
30{
31
32
33 Slic3r::GUI::wxGetApp().other_instance_message_handler()->handle_message_other_closed();
34}
◆ init
8{
9 self = [super init];
10 return self;
11}
References init.
Referenced by init.
◆ message_update:
| - (void) message_update: |
|
(NSNotification *) | note |
|
22 :(NSNotification *)msg
23{
24 [self bring_forward];
25
26 Slic3r::GUI::wxGetApp().other_instance_message_handler()->handle_message(std::string([msg.userInfo[@"data"] UTF8String]));
27}
References bring_forward.
The documentation for this class was generated from the following files: