OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
NSButton(NSButton_Extended) Category Reference

Instance Methods

(NSColor *) - textColor [implementation]
(void) - setTextColor: [implementation]
(void) - setBezelStyle2: [implementation]
(NSFocusRingType) - focusRingType [implementation]

Class Methods

(void) + load [implementation]

Detailed Description

Method Documentation

◆ focusRingType

- (NSFocusRingType) focusRingType
implementation
273{
274 return NSFocusRingTypeNone;
275}

References focusRingType.

Referenced by focusRingType.

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

◆ load

+ (void) load
implementation
266{
267 Method setBezelStyle = class_getInstanceMethod([NSButton class], @selector(setBezelStyle:));
268 Method setBezelStyle2 = class_getInstanceMethod([NSButton class], @selector(setBezelStyle2:));
269 method_exchangeImplementations(setBezelStyle, setBezelStyle2);
270}
Method
Definition SeamContour.hpp:35

References load.

Referenced by load.

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

◆ setBezelStyle2:

- (void) setBezelStyle2: (NSBezelStyle) bezelStyle
implementation
258 :(NSBezelStyle)bezelStyle
259{
260 if (bezelStyle != NSBezelStyleShadowlessSquare)
261 [self setBordered: YES];
262 [self setBezelStyle2: bezelStyle];
263}

References setBezelStyle2:.

Referenced by setBezelStyle2:.

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

◆ setTextColor:

- (void) setTextColor: (NSColor *) textColor
implementation
246 :(NSColor *)textColor
247{
248 NSMutableAttributedString *attrTitle =
249 [[NSMutableAttributedString alloc] initWithAttributedString:[self attributedTitle]];
250 int len = [attrTitle length];
251 NSRange range = NSMakeRange(0, len);
252 [attrTitle addAttribute:NSForegroundColorAttributeName value:textColor range:range];
253 [attrTitle fixAttributesInRange:range];
254 [self setAttributedTitle:attrTitle];
255 [attrTitle release];
256}
NSColor * textColor()
Definition MacDarkMode.mm:231
auto range(Cont &&cont)
Definition libslic3r.h:405

◆ textColor

- (NSColor *) textColor
implementation
232{
233 NSAttributedString *attrTitle = [self attributedTitle];
234 int len = [attrTitle length];
235 NSRange range = NSMakeRange(0, MIN(len, 1)); // get the font attributes from the first character
236 NSDictionary *attrs = [attrTitle fontAttributesInRange:range];
237 NSColor *textColor = [NSColor controlTextColor];
238 if (attrs)
239 {
240 textColor = [attrs objectForKey:NSForegroundColorAttributeName];
241 }
242
243 return textColor;
244}
@ MIN
Definition NLoptOptimizer.hpp:53

References textColor.

Referenced by textColor.

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

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