OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "views/controls/tabbed_pane/native_tabbed_pane_win.h" | 5 #include "views/controls/tabbed_pane/native_tabbed_pane_win.h" |
6 | 6 |
7 #include <vssym32.h> | 7 #include <vssym32.h> |
8 | 8 |
9 #include "app/l10n_util_win.h" | 9 #include "app/l10n_util_win.h" |
10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 DWORD style = WS_CHILD | WS_CLIPSIBLINGS | WS_VISIBLE | WS_CLIPCHILDREN; | 277 DWORD style = WS_CHILD | WS_CLIPSIBLINGS | WS_VISIBLE | WS_CLIPCHILDREN; |
278 HWND tab_control = ::CreateWindowEx(0, | 278 HWND tab_control = ::CreateWindowEx(0, |
279 WC_TABCONTROL, | 279 WC_TABCONTROL, |
280 L"", | 280 L"", |
281 style, | 281 style, |
282 0, 0, width(), height(), | 282 0, 0, width(), height(), |
283 GetWidget()->GetNativeView(), NULL, NULL, | 283 GetWidget()->GetNativeView(), NULL, NULL, |
284 NULL); | 284 NULL); |
285 | 285 |
286 HFONT font = ResourceBundle::GetSharedInstance(). | 286 HFONT font = ResourceBundle::GetSharedInstance(). |
287 GetFont(ResourceBundle::BaseFont).hfont(); | 287 GetFont(ResourceBundle::BaseFont).GetNativeFont(); |
288 SendMessage(tab_control, WM_SETFONT, reinterpret_cast<WPARAM>(font), FALSE); | 288 SendMessage(tab_control, WM_SETFONT, reinterpret_cast<WPARAM>(font), FALSE); |
289 | 289 |
290 // Create the view container which is a child of the TabControl. | 290 // Create the view container which is a child of the TabControl. |
291 content_window_ = new WidgetWin(); | 291 content_window_ = new WidgetWin(); |
292 content_window_->Init(tab_control, gfx::Rect()); | 292 content_window_->Init(tab_control, gfx::Rect()); |
293 | 293 |
294 // Explicitly setting the WS_EX_LAYOUTRTL property for the HWND (see above | 294 // Explicitly setting the WS_EX_LAYOUTRTL property for the HWND (see above |
295 // for why we waited until |content_window_| is created before we set this | 295 // for why we waited until |content_window_| is created before we set this |
296 // property for the tabbed pane's HWND). | 296 // property for the tabbed pane's HWND). |
297 if (base::i18n::IsRTL()) | 297 if (base::i18n::IsRTL()) |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 //////////////////////////////////////////////////////////////////////////////// | 393 //////////////////////////////////////////////////////////////////////////////// |
394 // NativeTabbedPaneWrapper, public: | 394 // NativeTabbedPaneWrapper, public: |
395 | 395 |
396 // static | 396 // static |
397 NativeTabbedPaneWrapper* NativeTabbedPaneWrapper::CreateNativeWrapper( | 397 NativeTabbedPaneWrapper* NativeTabbedPaneWrapper::CreateNativeWrapper( |
398 TabbedPane* tabbed_pane) { | 398 TabbedPane* tabbed_pane) { |
399 return new NativeTabbedPaneWin(tabbed_pane); | 399 return new NativeTabbedPaneWin(tabbed_pane); |
400 } | 400 } |
401 | 401 |
402 } // namespace views | 402 } // namespace views |
OLD | NEW |