summaryrefslogtreecommitdiffstats
path: root/ui/views/examples/textfield_example.cc
Commit message (Collapse)AuthorAgeFilesLines
* Views Textfield fixes and cleanup.msw@chromium.org2014-01-161-3/+4
| | | | | | | | | | | | | | | | | | | | | | Using STYLE_OBSCURED in the ctor broke with r244436. Remove 'styles', that ctor, and IsObscured/SetObscured. Use TextInputType for password textfield configuration. (rename textfield 'obscured' identifiers to 'password') Inline STYLE_LOWERCASE to the EditSearchEngineDialog. Remove GetTextForDisplay and its related handling. Inline set_controller; remove GetController. Cleanup users and unit tests. BUG=131660,334252 TEST=Password textfields work (show '*'s, reveal last typed char, toggle in wifi/wimax dialogs, etc.) as expected. The EditSearchEngineDialog's keyword textfield holds lowercase text as expected. R=sky@chromium.org TBR=pfeldman@chromium.org Review URL: https://codereview.chromium.org/138363004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245243 0039d316-1c4b-4281-b951-d872f2087c98
* Remove UTF string conversion functions from the global namespace.avi@chromium.org2013-12-261-0/+1
| | | | | | | | | | BUG=330556 TEST=no change TBR=ben@chromium.org Review URL: https://codereview.chromium.org/102993018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242519 0039d316-1c4b-4281-b951-d872f2087c98
* Update uses of UTF conversions in ui/ to use the base:: namespace.avi@chromium.org2013-12-251-0/+2
| | | | | | | | | | BUG=330556 TEST=no change TBR=ben@chromium.org Review URL: https://codereview.chromium.org/106383004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242504 0039d316-1c4b-4281-b951-d872f2087c98
* Prefix string16 with base:: in ui/.dbeam@chromium.org2013-12-181-2/+2
| | | | | | | | | R=sky@chromium.org, tsepez@chromium.org BUG=329295 Review URL: https://codereview.chromium.org/117983002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241625 0039d316-1c4b-4281-b951-d872f2087c98
* Moves ui/base/events to ui/eventssky@chromium.org2013-09-181-1/+1
| | | | | | | | | | | BUG=none TEST=none R=ben@chromium.org TBR=brettw@chromium.org, scherkus@chromium.org, ananta@chromium.org, Review URL: https://codereview.chromium.org/23851041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223906 0039d316-1c4b-4281-b951-d872f2087c98
* Move Range code to gfx.ben@chromium.org2013-09-061-3/+3
| | | | | | | | | | | Part of a set of changes to fix the circular dependency between ui/base and ui/gfx, with the aim of making gfx its own component. R=jam@chromium.org, jschuh@chromium.org, rsesek@chromium.org BUG=285385,103304 Review URL: https://codereview.chromium.org/24012002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221762 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of utf_string_conversions.h in ui/.avi@chromium.org2013-06-071-1/+1
| | | | | | | | | | BUG=none TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/16175008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204885 0039d316-1c4b-4281-b951-d872f2087c98
* Refine Views textfield state interaction, testing, and examples.msw@chromium.org2013-05-241-1/+23
| | | | | | | | | | | | | | | | | | | | | | | Ignore Views textfield CTRL+<key> shortcuts with Alt pressed. Matches Win and fixes ctrl+alt+[a/z/etc.] AltGr input for Polish, etc. (alternate grapheme input was triggering undo/select-all/etc.) Enforce and test read-only and obscured states more rigorously. (prevent cut/copy/paste as needed, this was not always checked before) Do not change the focusable state of textfields when changing read-only. (this matches windows native behavior better) Expand and refine a bunch of unit tests and the Views Example for textfields. BUG=238105,131660 TEST=Read-only and obscured Textfields work as intended. Polish input (right-Alt)+a, (right-Alt)+z, etc. work as expected. Ctrl+Alt+a, Ctrl+Alt+z, etc. are no-op on views textfields. R=oshima@chromium.org TBR=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/15684004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201961 0039d316-1c4b-4281-b951-d872f2087c98
* ui/views/examples: Migrate buttons from TextButton to LabelButton.tfarina@chromium.org2013-03-271-5/+6
| | | | | | | | | | BUG=155363 R=msw@chromium.org TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/12481026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190927 0039d316-1c4b-4281-b951-d872f2087c98
* Replace StyleRange with BreakList; update RenderText, etc.msw@chromium.org2013-02-011-14/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a functional rewrite with no observable behavior/appearance changes. (it helps by merging adjacent equivalent styles, reducing artificial run breaks) (it helps disambiguate font/adornment styles for application in layout/drawing) Remove gfx::StyleRange and its use within gfx::RenderText[Win|Linux|Mac]. Add new BreakList class for managing [ranged] colors and styles; add/update tests. Add gfx::TextStyle enum for bold, italic, underline, strike, and diagonal strike. Split ApplyStyleRange into [Set|Apply]Color and [Set|Apply]Style. Split ApplyDefaultStyle and |default_style_| into the first colors_ and styles_. Split up SkiaTextRenderer::DrawDecorations for Underline/Strike/DiagonalStrike. Update ApplyCompositionAndSelectionStyles, add UndoCompositionAndSelectionStyles. Add temporary StyleIterator convenience class for RenderText subclass style iteration. Update RenderText[Win|Linux|Mac], Textfield classes, and other users. Simplify OmniboxResultView (nix bold font, and ClassificationData). Rename gfx::Font::FontStyle::UNDERLINE (was UNDERLINED); TODO(followup): Only break runs for bold/italic, color/adorn while drawing. TODO(followup): Support more custom/ranged colors; merge TextStyle/FontStyle? BUG=90426,164047,131660 TEST=No observable appearance/performance/behavior changes. R=asvitkine@chromium.org,pkasting@chromium.org,sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/11535014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180067 0039d316-1c4b-4281-b951-d872f2087c98
* Wires TextfieldController::HandleMouseEvent up forsky@chromium.org2013-01-181-0/+6
| | | | | | | | | | | | | | | NativeTextfieldWin. As part of this I needed to make sure we pass in the right event time to MouseEvent. Without this triple clicks aren't picked up correctly. BUG=164966 TEST=none R=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/11926019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177758 0039d316-1c4b-4281-b951-d872f2087c98
* events: Move some files into ui/base/events/sadrul@chromium.org2012-09-041-1/+1
| | | | | | | | | BUG=none TBR=jam@chromium.org Review URL: https://chromiumcodereview.appspot.com/10917075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154817 0039d316-1c4b-4281-b951-d872f2087c98
* Replace views::Event with ui::Event.beng@google.com2012-08-101-2/+1
| | | | | | | | | http://crbug.com/125937 TBR=sky@chromium.org,jochen@chromium.org,sadrul@chromium.org Review URL: https://chromiumcodereview.appspot.com/10827271 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151105 0039d316-1c4b-4281-b951-d872f2087c98
* Remove views::KeyEvent, replacing uses of it with ui::KeyEvent.ben@chromium.org2012-08-091-1/+2
| | | | | | | | | http://crbug.com/125937 TEST=existing TBR=jochen@chromium.org Review URL: https://chromiumcodereview.appspot.com/10825254 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150895 0039d316-1c4b-4281-b951-d872f2087c98
* Support placeholder text in NativeTextfieldViews.xiyuan@chromium.org2012-05-161-1/+1
| | | | | | | | | | | | - Rename text_to_display_when_empty -> placehodler_text; - Draw placeholder text when there is no user text; BUG=none. TEST=none. Review URL: https://chromiumcodereview.appspot.com/10310131 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137529 0039d316-1c4b-4281-b951-d872f2087c98
* views/examples: Do not use WideToUTF16 when not necessary.tfarina@chromium.org2012-03-231-2/+2
| | | | | | | | | BUG=117092 R=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/9836027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128513 0039d316-1c4b-4281-b951-d872f2087c98
* Rename visual style "password" to "obscured"benrg@chromium.org2012-01-241-2/+2
| | | | | | | | | | | | | | | This change renames some identifiers to distinguish the visual style of being drawn **** **** from the logical property of being a password. It is split off from issue 8748001 and issue 8747001. See http://codereview.chromium.org/8748001/#msg12 and http://codereview.chromium.org/8748001/#msg14 for discussion of the name. TEXT_INPUT_TYPE_PASSWORD is unchanged; it should perhaps be renamed, but not to OBSCURED since it affects input, not display. BUG=none TEST=It compiles. Ship it. Review URL: http://codereview.chromium.org/9117012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118796 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move view.h to ui/views/.tfarina@chromium.org2011-11-301-1/+1
| | | | | | | | | | BUG=104039 R=ben@chromium.org TBR=stevenjb@chromium.org Review URL: http://codereview.chromium.org/8742030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112333 0039d316-1c4b-4281-b951-d872f2087c98
* jGet the examples to run in aura_shell.ben@chromium.org2011-11-291-23/+24
| | | | | | | | | | | | | | . Reorganizes views_examples target into two: views_examples_lib (a component) and views_examples_exe (a runner in views, which builds in Aura but does not run without crashing due to lack of desktop environment). . Refactors ExamplesMain into ExamplesWindowContents, a contents view that hosts the examples UI. Makes a publicly exported function from views examples to show a window containing this view. . Moves the examples into the views namespace. . Adds a button to launch the ExamplesWindow inside aura_shell. . Adds a NativeTabbedPaneViews to host the examples content. This is not a production class and is mostly just intended to get something onto the screen. The code is copy-pasta from NativeTabbedPaneWin. I imagine we can get rid of all of this once we stop using TabbedPanes in Chrome. http://crbug.com/105622 TEST=none Review URL: http://codereview.chromium.org/8687013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111954 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move label and link files to ui/views/controls/.tfarina@chromium.org2011-11-291-1/+1
| | | | | | | | | | BUG=104039 R=ben@chromium.org TBR=stevenjb@chromium.org Review URL: http://codereview.chromium.org/8729013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111917 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move textfield directory to ui/views/controls/.tfarina@chromium.org2011-11-271-1/+1
| | | | | | | | | | BUG=104039 R=maruel@chromium.org TBR=ben@chromium.org Review URL: http://codereview.chromium.org/8713004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111660 0039d316-1c4b-4281-b951-d872f2087c98
* views: Delete bubble, events, focus, layout directories and its stubbed files.tfarina@chromium.org2011-11-181-1/+1
| | | | | | | | | BUG=104039 R=ben@chromium.org Review URL: http://codereview.chromium.org/8566052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110787 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move examples/ directory to ui/views/.tfarina@chromium.org2011-11-151-0/+113
BUG=104039 R=ben@chromium.org Review URL: http://codereview.chromium.org/8555013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110023 0039d316-1c4b-4281-b951-d872f2087c98