OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
OtherInstanceMessageHandlerMac Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/InstanceCheckMac.h>

Inheritance diagram for OtherInstanceMessageHandlerMac:
Collaboration diagram for OtherInstanceMessageHandlerMac:

Instance Methods

(instancetype) - init
(void) - add_observer:
(void) - message_update:
(void) - closing_update:
(void) - bring_forward

Detailed Description

Method Documentation

◆ add_observer:

- (void) add_observer: (NSString *) version
12 :(NSString *)version_hash
13{
14 //NSLog(@"adding observer");
15 //NSString *nsver = @"OtherOrcaSlicerInstanceMessage" + version_hash;
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

- (void) bring_forward
37{
38 //demiaturize all windows
39 for(NSWindow* win in [NSApp windows])
40 {
41 if([win isMiniaturized])
42 {
43 [win deminiaturize:self];
44 }
45 }
46 //bring window to front
47 [[NSApplication sharedApplication] activateIgnoringOtherApps : YES];
48}

References bring_forward.

Referenced by bring_forward, and message_update:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ closing_update:

- (void) closing_update: (NSNotification *) note
29 :(NSNotification *)msg
30{
31 //[self bring_forward];
32 //pass message
33 Slic3r::GUI::wxGetApp().other_instance_message_handler()->handle_message_other_closed();
34}

◆ init

- (instancetype) init
8{
9 self = [super init];
10 return self;
11}

References init.

Referenced by init.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ message_update:

- (void) message_update: (NSNotification *) note
22 :(NSNotification *)msg
23{
24 [self bring_forward];
25 //pass message
26 Slic3r::GUI::wxGetApp().other_instance_message_handler()->handle_message(std::string([msg.userInfo[@"data"] UTF8String]));
27}

References bring_forward.

Here is the call graph for this function:

The documentation for this class was generated from the following files: