Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Side by Side Diff: views/controls/native_control.h

Issue 151002: Fixing focus problems with the combobox (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/controls/combobox/native_combobox_wrapper.h ('k') | views/controls/native_control.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 VIEWS_CONTROLS_NATIVE_CONTROL_H_ 5 #ifndef VIEWS_CONTROLS_NATIVE_CONTROL_H_
6 #define VIEWS_CONTROLS_NATIVE_CONTROL_H_ 6 #define VIEWS_CONTROLS_NATIVE_CONTROL_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include "views/view.h" 10 #include "views/view.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 void NativeControlDestroyed(); 74 void NativeControlDestroyed();
75 75
76 // Overridden so that the control properly reflects parent's visibility. 76 // Overridden so that the control properly reflects parent's visibility.
77 virtual void VisibilityChanged(View* starting_from, bool is_visible); 77 virtual void VisibilityChanged(View* starting_from, bool is_visible);
78 78
79 // Controls that have fixed sizes should call these methods to specify the 79 // Controls that have fixed sizes should call these methods to specify the
80 // actual size and how they should be aligned within their parent. 80 // actual size and how they should be aligned within their parent.
81 void SetFixedWidth(int width, Alignment alignment); 81 void SetFixedWidth(int width, Alignment alignment);
82 void SetFixedHeight(int height, Alignment alignment); 82 void SetFixedHeight(int height, Alignment alignment);
83 83
84 // Derived classes interested in receiving key down notification should 84 // Invoked when a key is pressed on the control.
85 // override this method and return true. In which case OnKeyDown is called 85 // Should return true if the key message was processed, false otherwise.
86 // when a key down message is sent to the control.
87 // Note that this method is called at the time of the control creation: the
88 // behavior will not change if the returned value changes after the control
89 // has been created.
90 virtual bool NotifyOnKeyDown() const { return false; }
91
92 // Invoked when a key is pressed on the control (if NotifyOnKeyDown returns
93 // true). Should return true if the key message was processed, false
94 // otherwise.
95 virtual bool OnKeyDown(int virtual_key_code) { return false; } 86 virtual bool OnKeyDown(int virtual_key_code) { return false; }
96 87
97 // Returns additional extended style flags. When subclasses call 88 // Returns additional extended style flags. When subclasses call
98 // CreateWindowEx in order to create the underlying control, they must OR the 89 // CreateWindowEx in order to create the underlying control, they must OR the
99 // ExStyle parameter with the value returned by this function. 90 // ExStyle parameter with the value returned by this function.
100 // 91 //
101 // We currently use this method in order to add flags such as WS_EX_LAYOUTRTL 92 // We currently use this method in order to add flags such as WS_EX_LAYOUTRTL
102 // to the HWND for views with right-to-left UI layout. 93 // to the HWND for views with right-to-left UI layout.
103 DWORD GetAdditionalExStyle() const; 94 DWORD GetAdditionalExStyle() const;
104 95
(...skipping 22 matching lines...) Expand all
127 WPARAM w_param, LPARAM l_param); 118 WPARAM w_param, LPARAM l_param);
128 119
129 NativeControlContainer* container_; 120 NativeControlContainer* container_;
130 121
131 DISALLOW_COPY_AND_ASSIGN(NativeControl); 122 DISALLOW_COPY_AND_ASSIGN(NativeControl);
132 }; 123 };
133 124
134 } // namespace views 125 } // namespace views
135 126
136 #endif // VIEWS_CONTROLS_NATIVE_CONTROL_H_ 127 #endif // VIEWS_CONTROLS_NATIVE_CONTROL_H_
OLDNEW
« no previous file with comments | « views/controls/combobox/native_combobox_wrapper.h ('k') | views/controls/native_control.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698