]> git.saurik.com Git - wxWidgets.git/commit - samples/dataview/mymodels.h
Use symbolic constants for list model columns in dataview sample.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 10 Nov 2009 17:40:25 +0000 (17:40 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 10 Nov 2009 17:40:25 +0000 (17:40 +0000)
commit2746bccf233379382f2017ef35d2dfcc114b70cb
treee7c16dab124fd4d4a2f9e71dbf44f125e03d22f2
parentf0368d28bf125cdc851e65e1ea215651f19453d2
Use symbolic constants for list model columns in dataview sample.

Using Col_EditableText, Col_IconText and Col_TextWithAttr instead of 0, 1 and
2 makes the sample code a bit easier to read.

Also use switch on the column value instead of nested ifs everywhere to give
compiler a chance to warn us if we forget to update some function when a new
column is added.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62587 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
samples/dataview/dataview.cpp
samples/dataview/mymodels.cpp
samples/dataview/mymodels.h