8bf66f8974
* Rewrite titleBarStyle impls with WindowButtonsView * Remove fullscreenWindowTitle option * Make buttons show correctly under RTL * Fix docs about traffic lights position * Fix test on fullscreen resizable * Fix button states with closabe/minimizable/fullscreenable * Fix typo * Deprecate the fullscreenWindowTitle option
31 lines
907 B
Objective-C
31 lines
907 B
Objective-C
// Copyright (c) 2021 Microsoft, Inc.
|
|
// Use of this source code is governed by the MIT license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef SHELL_BROWSER_UI_COCOA_WINDOW_BUTTONS_VIEW_H_
|
|
#define SHELL_BROWSER_UI_COCOA_WINDOW_BUTTONS_VIEW_H_
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
#include "base/mac/scoped_nsobject.h"
|
|
#include "base/optional.h"
|
|
#include "ui/gfx/geometry/point.h"
|
|
|
|
// Custom Quit, Minimize and Full Screen button container for frameless
|
|
// windows.
|
|
@interface WindowButtonsView : NSView {
|
|
@private
|
|
BOOL mouse_inside_;
|
|
BOOL show_on_hover_;
|
|
BOOL is_rtl_;
|
|
gfx::Point margin_;
|
|
base::scoped_nsobject<NSTrackingArea> tracking_area_;
|
|
}
|
|
|
|
- (id)initWithMargin:(const base::Optional<gfx::Point>&)margin;
|
|
- (void)setMargin:(const base::Optional<gfx::Point>&)margin;
|
|
- (void)setShowOnHover:(BOOL)yes;
|
|
- (void)setNeedsDisplayForButtons;
|
|
@end
|
|
|
|
#endif // SHELL_BROWSER_UI_COCOA_WINDOW_BUTTONS_VIEW_H_
|