OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
MacDarkMode.mm File Reference
import "MacDarkMode.hpp"
#include "../GUI/Widgets/Label.hpp"
#include "wx/graphics.h"
#include "wx/osx/core/cfstring.h"
#include "wx/osx/private.h"
import <algorithm>
import <Cocoa/Cocoa.h>
import <Foundation/Foundation.h>
import <AppKit/NSScreen.h>
import <WebKit/WebKit.h>
#include <objc/runtime.h>
#include <wx/dataview.h>
#include <wx/osx/cocoa/dataview.h>
#include <wx/osx/dataview.h>
Include dependency graph for MacDarkMode.mm:

Go to the source code of this file.

Classes

class  MacDarkMode
class  wxNSCustomOpenGLView

Namespaces

namespace  Slic3r
 |/ Copyright (c) Prusa Research 2020 - 2023 Enrico Turri @enricoturri1966 |/ |/ PrusaSlicer is released under the terms of the AGPLv3 or higher |/
namespace  Slic3r::GUI

Functions

bool Slic3r::GUI::mac_dark_mode ()
double Slic3r::GUI::mac_max_scaling_factor ()
void Slic3r::GUI::set_miniaturizable (void *window)
void Slic3r::GUI::set_tag_when_enter_full_screen (bool isfullscreen)
void Slic3r::GUI::set_title_colour_after_set_title (void *window)
void Slic3r::GUI::WKWebView_evaluateJavaScript (void *web, wxString const &script, void(*callback)(wxString const &))
void Slic3r::GUI::WKWebView_setTransparentBackground (void *web)
void Slic3r::GUI::WKWebView_force_display (void *web)
void Slic3r::GUI::openFolderForFile (wxString const &file)
static wxEvtHandler * get_gesture_handler (NSView *view)
static bool is_scroll_pan_active (NSView *view)
static void set_scroll_pan_active (NSView *view, bool active)
void Slic3r::GUI::initGestures (void *view, wxEvtHandler *handler)
void StaticGroup_layoutBadge (void *group, void *badge)

Variables

NSTextField * Slic3r::GUI::mainframe_text_field = nil
bool Slic3r::GUI::is_in_full_screen_mode = false
bool addObserver = false
static char scroll_pan_active_key
static char gesture_handler_key

Function Documentation

◆ get_gesture_handler()

wxEvtHandler * get_gesture_handler ( NSView * view)
static
359{
360 return static_cast<wxEvtHandler*>([objc_getAssociatedObject(view, &gesture_handler_key) pointerValue]);
361}
static char gesture_handler_key
Definition MacDarkMode.mm:356

Referenced by wxNSCustomOpenGLView(Gesture)::postEvent:withGesture:, and wxNSCustomOpenGLView(Gesture)::scrollWheel2:.

Here is the caller graph for this function:

◆ is_scroll_pan_active()

bool is_scroll_pan_active ( NSView * view)
static
364{
365 return [objc_getAssociatedObject(view, &scroll_pan_active_key) boolValue];
366}
static char scroll_pan_active_key
Definition MacDarkMode.mm:355

Referenced by wxNSCustomOpenGLView(Gesture)::scrollWheel2:.

Here is the caller graph for this function:

◆ set_scroll_pan_active()

void set_scroll_pan_active ( NSView * view,
bool active )
static
369{
370 objc_setAssociatedObject(view, &scroll_pan_active_key, active ? @YES : nil, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
371}

References scroll_pan_active_key.

Referenced by wxNSCustomOpenGLView(Gesture)::initGesturesWithHandler:, and wxNSCustomOpenGLView(Gesture)::scrollWheel2:.

Here is the caller graph for this function:

◆ StaticGroup_layoutBadge()

void StaticGroup_layoutBadge ( void * group,
void * badge )
478{
479 NSView * vg = (NSView *)group;
480 NSView * vb = (NSView *)badge;
481 vb.translatesAutoresizingMaskIntoConstraints = NO;
482 [vg addConstraint: [NSLayoutConstraint constraintWithItem:vb attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:vg attribute:NSLayoutAttributeTop multiplier:1.0 constant:15]];
483 [vg addConstraint: [NSLayoutConstraint constraintWithItem:vb attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:vg attribute:NSLayoutAttributeRight multiplier:1.0 constant:-1]];
484}

Variable Documentation

◆ addObserver

◆ gesture_handler_key

char gesture_handler_key
static

◆ scroll_pan_active_key

char scroll_pan_active_key
static

Referenced by set_scroll_pan_active().