| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_VIEWS_NATIVE_CONTROL_H__ | 5 #ifndef CHROME_VIEWS_NATIVE_CONTROL_H__ |
| 6 #define CHROME_VIEWS_NATIVE_CONTROL_H__ | 6 #define CHROME_VIEWS_NATIVE_CONTROL_H__ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 #include "chrome/views/view.h" | 10 #include "chrome/views/view.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 virtual bool OnKeyDown(int virtual_key_code) { return false; } | 92 virtual bool OnKeyDown(int virtual_key_code) { return false; } |
| 93 | 93 |
| 94 // Returns additional extended style flags. When subclasses call | 94 // Returns additional extended style flags. When subclasses call |
| 95 // CreateWindowEx in order to create the underlying control, they must OR the | 95 // CreateWindowEx in order to create the underlying control, they must OR the |
| 96 // ExStyle parameter with the value returned by this function. | 96 // ExStyle parameter with the value returned by this function. |
| 97 // | 97 // |
| 98 // We currently use this method in order to add flags such as WS_EX_LAYOUTRTL | 98 // We currently use this method in order to add flags such as WS_EX_LAYOUTRTL |
| 99 // to the HWND for views with right-to-left UI layout. | 99 // to the HWND for views with right-to-left UI layout. |
| 100 DWORD GetAdditionalExStyle() const; | 100 DWORD GetAdditionalExStyle() const; |
| 101 | 101 |
| 102 // TODO(xji): we use the following temporary function as we transition the |
| 103 // various native controls to use the right set of RTL flags. This function |
| 104 // will go away (and be replaced by GetAdditionalExStyle()) once all the |
| 105 // controls are properly transitioned. |
| 106 DWORD GetAdditionalRTLStyle() const; |
| 107 |
| 102 // This variable is protected to provide subclassers direct access. However | 108 // This variable is protected to provide subclassers direct access. However |
| 103 // subclassers should always check for NULL since this variable is only | 109 // subclassers should always check for NULL since this variable is only |
| 104 // initialized in ValidateNativeControl(). | 110 // initialized in ValidateNativeControl(). |
| 105 HWNDView* hwnd_view_; | 111 HWNDView* hwnd_view_; |
| 106 | 112 |
| 107 // Fixed size information. -1 for a size means no fixed size. | 113 // Fixed size information. -1 for a size means no fixed size. |
| 108 int fixed_width_; | 114 int fixed_width_; |
| 109 Alignment horizontal_alignment_; | 115 Alignment horizontal_alignment_; |
| 110 int fixed_height_; | 116 int fixed_height_; |
| 111 Alignment vertical_alignment_; | 117 Alignment vertical_alignment_; |
| 112 | 118 |
| 113 private: | 119 private: |
| 114 | 120 |
| 115 void ValidateNativeControl(); | 121 void ValidateNativeControl(); |
| 116 | 122 |
| 117 static LRESULT CALLBACK NativeControlWndProc(HWND window, UINT message, | 123 static LRESULT CALLBACK NativeControlWndProc(HWND window, UINT message, |
| 118 WPARAM w_param, LPARAM l_param); | 124 WPARAM w_param, LPARAM l_param); |
| 119 | 125 |
| 120 NativeControlContainer* container_; | 126 NativeControlContainer* container_; |
| 121 | 127 |
| 122 DISALLOW_EVIL_CONSTRUCTORS(NativeControl); | 128 DISALLOW_EVIL_CONSTRUCTORS(NativeControl); |
| 123 }; | 129 }; |
| 124 | 130 |
| 125 } // namespace views | 131 } // namespace views |
| 126 | 132 |
| 127 #endif // CHROME_VIEWS_NATIVE_CONTROL_H__ | 133 #endif // CHROME_VIEWS_NATIVE_CONTROL_H__ |
| 128 | 134 |
| OLD | NEW |