|
157 | 157 | [pimpl_->ns_window_ setMinSize:NSMakeSize(size.width, size.height)]; |
158 | 158 | } |
159 | 159 |
|
160 | | -Size Window::GetMinimumSize() { |
| 160 | +Size Window::GetMinimumSize() const { |
161 | 161 | NSSize size = [pimpl_->ns_window_ minSize]; |
162 | 162 | return Size{static_cast<double>(size.width), static_cast<double>(size.height)}; |
163 | 163 | } |
|
166 | 166 | [pimpl_->ns_window_ setMaxSize:NSMakeSize(size.width, size.height)]; |
167 | 167 | } |
168 | 168 |
|
169 | | -Size Window::GetMaximumSize() { |
| 169 | +Size Window::GetMaximumSize() const { |
170 | 170 | NSSize size = [pimpl_->ns_window_ maxSize]; |
171 | 171 | return Size{static_cast<double>(size.width), static_cast<double>(size.height)}; |
172 | 172 | } |
|
247 | 247 | [pimpl_->ns_window_ setLevel:is_always_on_top ? NSFloatingWindowLevel : NSNormalWindowLevel]; |
248 | 248 | } |
249 | 249 |
|
250 | | -bool Window::IsAlwaysOnTop() { |
| 250 | +bool Window::IsAlwaysOnTop() const { |
251 | 251 | return [pimpl_->ns_window_ level] == NSFloatingWindowLevel; |
252 | 252 | } |
253 | 253 |
|
|
259 | 259 | [pimpl_->ns_window_ setFrameOrigin:bottomLeft]; |
260 | 260 | } |
261 | 261 |
|
262 | | -Point Window::GetPosition() { |
| 262 | +Point Window::GetPosition() const { |
263 | 263 | NSRect frame = [pimpl_->ns_window_ frame]; |
264 | 264 | Point point = {static_cast<double>(frame.origin.x), static_cast<double>(frame.origin.y)}; |
265 | 265 | return point; |
|
269 | 269 | [pimpl_->ns_window_ setTitle:[NSString stringWithUTF8String:title.c_str()]]; |
270 | 270 | } |
271 | 271 |
|
272 | | -std::string Window::GetTitle() { |
| 272 | +std::string Window::GetTitle() const { |
273 | 273 | NSString* title = [pimpl_->ns_window_ title]; |
274 | 274 | return title ? std::string([title UTF8String]) : std::string(); |
275 | 275 | } |
|
0 commit comments