📄 control.cpp
字号:
*mac osx updates, some more fixes for dialog code and for command button peer functionality**Revision 1.2.2.7 2004/09/21 23:41:23 ddiego*made some big changes to how the base list, tree, text, table, and tab models are laid out. They are not just plain interfaces. The actual*concrete implementations of them now derive from BOTH Model and the specific*tree, table, etc model interface.*Also made some fixes to the way the text input is handled for a text control.*We now process on a character by character basis and modify the model one*character at a time. Previously we were just using brute force and setting*the whole models text. This is more efficent, though its also more complex.**Revision 1.2.2.6 2004/09/21 05:46:50 dougtinkham*modified adjustViewableBoundsAndOriginForScrollable for new scrolling**Revision 1.2.2.5 2004/09/12 22:34:21 ddiego*fixed bug in handling window cleanup when exception thrown from constructor.**Revision 1.2.2.4 2004/09/06 23:05:55 ddiego*fixed border in button class**Revision 1.2.2.3 2004/09/06 21:30:19 ddiego*added a separate paintBorder call to Control class**Revision 1.2.2.2 2004/08/21 21:06:52 ddiego*migrated over the Resource code to the FoudationKit.*Added support for a GraphicsResourceBundle that can get images.*Changed the AbstractApplication class to call the System::getResourceBundle.*Updated the various example code accordingly.**Revision 1.2.2.1 2004/08/19 03:22:53 ddiego*updates so new system tray code compiles**Revision 1.3 2004/08/19 02:24:54 ddiego*fixed bug [ 1007039 ] lightweight controls do not paint correctly.**Revision 1.2 2004/08/07 02:49:06 ddiego*merged in the devmain-0-6-5 branch to stable**Revision 1.1.2.8 2004/07/23 04:20:56 ddiego*more checkins**Revision 1.1.2.7 2004/07/22 04:18:58 ddiego*fixed bug 995642 delete LoalePeer in Locale, and added some miscellaneous changes to the QTPlayer. Also fixing (not finished yet) a bug that*prevents the TreePeer from being properly notified when the tree model's*item is deleted.**Revision 1.1.2.6 2004/07/17 17:56:24 ddiego*minor mods to the TableControl and the TabbedPages control*so that drawing updates get drawn better, and we don't have weird missing*artifacts.**Revision 1.1.2.5 2004/07/14 21:54:41 ddiego*attempts to fix problem with borders and drawing on common controls.*Sort of works on editor control. There is a subtle repaint problem in painting*damaged portions of the control.**Revision 1.1.2.4 2004/07/12 02:05:45 ddiego*fixed a subtle bug (that only showed up when using a lightweight*control) that happened with MouseClick events being handled twice.**Revision 1.1.2.3 2004/07/09 03:39:28 ddiego*merged in changes from the OSX branch for new theming API. Added*support for controlling the use of locale translated strings in components.**Revision 1.1.2.2.2.1 2004/07/06 03:27:12 ddiego*more osx updates that add proper support*for lightweight controls, some fixes to text layout, and some window painting issues. Also a fix*so that controls and windows paint either their default theme background or their background*color.**Revision 1.1.2.2 2004/04/29 03:43:13 marcelloptr*reformatting of source files: macros and csvlog and copyright sections**Revision 1.1.2.1 2004/04/28 00:28:15 ddiego*migration towards new directory structure**Revision 1.60.2.1 2004/04/09 06:08:21 ddiego*nybbles and bytes**Revision 1.60 2004/04/03 15:48:44 ddiego*Merged over code from the 0-6-3 branch.**Revision 1.59 2004/01/20 01:54:56 ddiego*merged some more changes from dev branch, primarily changes to*teh RTTI API so that we now process enum sets correctly (i.e. a long*that is a mask made of enum values).**Revision 1.57.2.8 2004/03/21 20:25:40 marcelloptr*Scrollable automatically calculates the scroll given the line where to go**Revision 1.57.2.7 2004/03/21 00:39:23 ddiego*merged vc7.1 changes into dev branch**Revision 1.57.2.6 2004/03/19 21:25:57 ddiego*just some minor noodlin**Revision 1.57.2.5 2004/03/17 03:22:27 ddiego*fixed a glitch in setting focus**Revision 1.57.2.4 2004/03/01 05:59:19 ddiego*and even MORE updates to the TableControl. Most of the core functionalityfrom Chris Maunder's CGridCtrl has been migrated over, and is functional.Item editing and item dragging is still not done. Had to make a minor changeto the AbstractScroallable class to allow it have vertical and/or horizontaldelegate's set in order to notify them of position changes. This was neededby the TableControl to properly update the top left non fixed cell calculation.The performance is kind of slow ( :) ) in debug mode, but quite snappy in release.*Revision 1.57.2.3 2004/01/18 04:52:46 ddiego*Added a new EnumSet class that handles manipulating unsigned longs*as a mask of bits. Adds support for reading in the enum value names and*ORing them together to form the complete mask value. Also made*mods to the VFFOutput and VFFInput stream classes so that that the []*property is correctly read and written**Revision 1.57.2.2 2004/01/16 04:30:46 ddiego*some more minor mods to menus and the Component class. Added some utility*methods for determining the state of a component, and added two new*delegates for firing events when the component is loaded and saved,*as well as value changes for the COmponentState enum so that some of*the values of the component state can be OR'd together.**Revision 1.57.2.1 2004/01/15 05:35:04 ddiego*making some minor changes so that nested menu components get handled*correctly and added from a VFF file**Revision 1.57.2.3 2004/01/18 04:52:46 ddiego*Added a new EnumSet class that handles manipulating unsigned longs*as a mask of bits. Adds support for reading in the enum value names and*ORing them together to form the complete mask value. Also made*mods to the VFFOutput and VFFInput stream classes so that that the []*property is correctly read and written**Revision 1.57.2.2 2004/01/16 04:30:46 ddiego*some more minor mods to menus and the Component class. Added some utility*methods for determining the state of a component, and added two new*delegates for firing events when the component is loaded and saved,*as well as value changes for the COmponentState enum so that some of*the values of the component state can be OR'd together.**Revision 1.57.2.1 2004/01/15 05:35:04 ddiego*making some minor changes so that nested menu components get handled*correctly and added from a VFF file**Revision 1.57 2003/12/18 05:16:00 ddiego*merge from devmain-0-6-2 branch into the stable branch**Revision 1.56.2.19 2003/12/02 05:50:05 ddiego*added preliminary support for teh Action class. This will make it easier*to hook up complimentary UI elements (such as a "copy" menu item, and a*"copy" toolbar item) and have tehm respond to update and actions via a*single source.*Got rid of the old toolbar button and separator class. Merged in Marcellos*new fixes for the Container and Splitter classes.*Some misc fixes to the Toolbar, groups and checks now work correctly.**Revision 1.56.2.18 2003/11/10 01:57:43 ddiego*add a fromString methods to StingUtils*added some minor fixes to list box control and added a SelectionChanged*Delegate to it*add some minor fixes ot ComboBoxControl*added an unknownColor() method to ColorNames class**Revision 1.56.2.17 2003/10/28 20:23:26 ddiego*minor header changes**Revision 1.56.2.16 2003/10/20 03:40:13 ddiego* made some minor changes fixed a bug in color where we forget to actually*assign hls/hsv values.**Revision 1.56.2.15 2003/10/14 21:32:49 ddiego*little change ?**Revision 1.56.2.14 2003/10/14 04:31:07 ddiego*some more adjustments to hack on getting the alignments to wrok better**Revision 1.56.2.13 2003/10/13 04:02:51 ddiego*fixed some issues with calculating the view bounds if scrollbar*are present as well as adding some functions to get teh bounds of*left/right and top/bottom spaces that can surround a scrollbar.**Revision 1.56.2.12 2003/10/12 06:34:13 ddiego*added some fixes to standard container layout algorithms - thisstill needs*to be tested, but it looks like it may fix some outstanding issues*with the layout logic**Revision 1.56.2.11 2003/09/12 00:09:18 ddiego*added better tabbing behaviour - fixed an earlier bug.*Code is easier to understand and it simplified the implementation*a bit as well*Moved around the RTTI definitions for various Appkit classes to a*single inline and stripped them from the various class headers**Revision 1.56.2.10 2003/09/06 19:45:15 ddiego*changes to ensure that the destroy() is properly called.*Destructors were moved back to pbulic scope in case that was causing a bug.*Moving them all(all teh component derived classes) to private scope causes*a complete failure in hte VC6 compiler. Alas...*So destructors are present, and modal dialogs can still be created on the*stack, but almost any other component should be created on the heap, and*gotten rid of via free() NOT using operator delete directly.*also moved the vcs info to the end of the file for some of the headers*This will be an ongoing process.**Revision 1.56.2.9 2003/09/05 21:03:21 ddiego*moved the various control destructor's to protected scope*migrated code into destroy() overridden methods*----------------------------------------------------------------------**Revision 1.56.2.8 2003/09/02 02:11:13 ddiego*fixed some glitches in drag drop. also cleaned up the drag drop event*classes. Began some fixes to the html browser implementation on Win32**Revision 1.56.2.7 2003/08/27 03:53:40 ddiego*view model bug fix and image file name extension bug fix**Revision 1.56.2.6 2003/08/26 03:16:49 ddiego*added a syntax fix cause VC6 is too stupid to compile code correctly.*Thanks to Marcello for pointing it out.**Revision 1.56.2.5 2003/08/22 01:19:11 ddiego*finally fixed the it so that lightweight controls can now host containers*and and act as a parent for heavyweight controls**Revision 1.56.2.4 2003/08/19 04:43:40 ddiego*further code to support lightweight container implementation. Not quite*finished**Revision 1.56.2.3 2003/08/18 19:52:37 ddiego*changed the Container from being a class you derive from to a separate*intance that is created and assigned dynamically to any Control.**Revision 1.56.2.2 2003/08/18 02:55:41 ddiego*added fix for bug [ 789902 ] EnumeratorContainer::prevElement() points to container_->end, also added an example**Revision 1.56.2.1 2003/08/12 02:52:55 ddiego*added properties getBottom/getRight/setBottom/setRight to Control**Revision 1.56 2003/08/09 02:56:45 ddiego*merge over from the devmain-0-6-1 branch*Changes*Features:*-Added additional implementation to better support the MVC architecture in*the VCF**-Added a Document/View architecure that is similar to MFC's or NextSteps's*Doc/View architectures**-Integrated the Anti Grain Graphics library into the GraphicsKit. There is*now basic support for it in terms of drawing vector shapes*(fills and strokes). Image support will come in the next release**-Added several documented graphics tutorials**Bugfixes:**[ 775744 ] wrong buttons on a dialog*[ 585239 ] Painting weirdness in a modal dialog ?*[ 585238 ] Modal dialog which makes a modal Dialog*[ 509004 ] Opening a modal Dialog causes flicker*[ 524878 ] onDropped not called for MLTcontrol**Plus an issue with some focus and getting the right popup window to activate*has also been fixed**Revision 1.55.2.9 2003/08/02 00:41:12 marcelloptr*fixes for vc6; improved dependencies**Revision 1.55.2.8 2003/08/01 00:49:26 ddiego*added a fix for popup windows that also fixed a problem with the*ComboBoxControl drop down list disapearing.**Revision 1.55.2.7 2003/07/24 04:10:43 ddiego*added fixes for the following tasks:*Task #82279 ApplicationKit: add static methods to singleton objects*Task #82277 FoundationKit: add static methods to singleton objects*this required a bunch of changes in terms of getting rid of older style code**Revision 1.55.2.6 2003/06/28 04:43:20 ddiego*cleaned up the vcf/include/events directory and got rid of files, moving*some of the various event handler template classes into the same header*that the event handler's event is associated with*also made some changes to properly take advantage of a Control's View, if it*is set.**Revision 1.55.2.5 2003/06/20 04:36:46 ddiego*further AGG integration*moved files over to renamed directories**Revision 1.55.2.4 2003/06/17 03:54:26 ddiego*further agg integration - took out the getImage/putImage from GraphicsContext -*this was too slow. now have an alternate solution that seems to work OK**Revision 1.55.2.3 2003/06/13 03:06:40 ddiego*bug fixes for*585238: Modal dialog which makes a modal Dialog*585239: Painting weirdness in a modal dialog*also some clean up of miscellaneous debug trace statements*and implemented task*79266 - change DebugInfo to be stack based**Revision 1.55.2.2 2003/06/13 00:03:19 ddiego*more xmake fixes for the new version*bug fixes for bugs*509004 Opening a modal Dialog causes flicker*also have tooltips working again**Revision 1.55.2.1 2003/05/27 04:45:39 ddiego*doing some code cleanup to fix some bugs in the way dialogs and popups*work in Win32 port. Cleaned up the ControlPeer and DialogPeer interfaces*a bit.**Revision 1.55 2003/05/17 20:37:47 ddiego*this is the checkin for the 0.6.1 release - represents the merge over from*the devmain-0-6-0 branch plus a few minor bug fixes**Revision 1.54.2.3 2003/04/17 04:29:52 ddiego*updated scintilla, added gtk support for the application kit, with stubs*for the basic peers.**Revision 1.54.2.2 2003/03/23 03:24:00 marcelloptr*3 empty lines at the end of the files**Revision 1.54.2.1 2003/03/12 03:13:04 ddiego*switched all member variable that used the "m_"<name> prefix to* <name>"_" suffix nameing standard.*Also changed all vcf builder files to accomadate this.*Changes were made to the Stream classes to NOT multiple inheritance and to*be a little more correct. Changes include breaking the FileStream into two*distinct classes, one for input and one for output.**Revision 1.54 2003/02/26 04:30:55 ddiego*merge of code in the devmain-0-5-9 branch into the current tree.*most additions are in the area of the current linux port, but the major*addition to this release is the addition of a Condition class (currently*still under development) and the change over to using the Delegate class*exclusively from the older event handler macros.**Revision 1.53.2.5 2003/02/24 05:42:19 ddiego*moved the code for the VariantData calss into it's own header*migrated to the new event style using Delegates instead of relying on*the ugly macros that we were using before - same functionality though*made sure everything still works and compiles, including neccessary*changes in the VCF Builder so that it creates code in the new style*This changes to teh new style of using Delegates completes task 58837**Revision 1.53.2.4 2003/01/08 00:19:59 marcelloptr*mispellings and newlines at the end of all source files**Revision 1.53.2.3 2002/12/27 23:04:59 marcelloptr*Improved macros for automatic import/export of libraries. - Warning fixes. - Other Minor Changes.**Revision 1.53.2.2 2002/12/25 22:06:34 ddiego*whole bunch of little changes to the header files used by the ApplicationKit*to get rid of no newline warnings by gcc.*fixes to various event handlers in the ApplicationKit to compile with gcc*since gcc does not like a member function pointer without the "&"*addressof operator.*Added initial file for the X11 UIToolkit implementation**Revision 1.53.2.1 2002/12/02 00:38:36 ddiego*more fixes to get the ApplicationKit to compile under mingw. Everything now*compiles OK at this point.**Revision 1.53 2002/11/18 00:46:09 ddiego*this is the merge over of all the bug fixes and features (mostly*VCF Builder stuff) from the devmain-0-5-8 branch**Revision 1.52.4.3 2002/10/07 05:02:56 ddiego*addeds some more gui work to teh TemplateNewClassDlg.**Revision 1.52.4.2 2002/10/01 20:34:59 ddiego*borders**Revision 1.52.4.1 2002/09/27 23:38:36 ddiego*added support for geting various layout information*added support for drawing various graphics UI primitives like scroll buttons*tabs, tab pages, etc, partially to have this support in place for use*in MacOSX.*Also added scrolling buttons to TabbedPages, this fixes task 56652 in the*ApplicationKit list**Revision 1.52 2002/09/12 03:26:06 ddiego*merged over the changes from the devmain-0-5-5b branch**Revision 1.51.6.4 2002/09/10 04:07:51 ddiego*misc fixes plus now posting the TableControl::finishEditing as a event**Revision 1.51.6.3 2002/09/06 05:24:52 ddiego*fixed bug in TableControl where it does not proeprly finished the ItemEditor*correctly on loss of focus for the editor's control**Revision 1.51.6.2 2002/07/14 05:40:02 ddiego**** empty log message *****Revision 1.51.6.1 2002/06/28 17:45:30 ddiego*migrated over lucki's changes (from his branch) for drag drop*compiles OK, made chages to control and UIToolkit as neccessary*still testing though.**Revision 1.51 2002/05/09 03:10:45 ddiego*merged over code from development branch devmain-0-5-1a into the main CVS trunk**Revision 1.50 2002/03/31 19:54:33 ddiego*fixed a release bug in the TreeListControl*made sure that saving the state of a Frame works correctly**Revision 1.49 2002/03/22 04:30:18 ddiego*bug fixes for weird resizing of win32 common controls (it figures) with the*new code I put in yesterday. Put back the old code and it seems to work OK.*Sigh...**Revision 1.48 2002/03/21 04:01:22 ddiego*fixed [ 532894 ] bug using the Frame::setClientBounds()**Revision 1.47 2002/03/21 01:36:36 ddiego*fix [ 532623 ] alignment problem & [ 525214 ] alignment loss after resize JEC 20-03-2002*there was an incorrect comparison being done in AbstractContainer::insertBefore() that*was resulting in controls being respositioned in the incorrect order. Should be cool now.**Revision 1.46.4.3 2002/05/01 00:28:42 ddiego*put back a mod made to the Control::setFocus() method were the previous focus control would get a*setFocus(false) call - this was causing an issue with sertain popup windows**Revision 1.46.4.2 2002/04/27 15:52:41 ddiego*Changed a bunch of files include and made it a bit faster and added better include*guards in the common headers**Revision 1.46.4.1 2002/04/08 20:55:31 zzack*changed include style**Revision 1.46 2002/03/05 04:44:14 ddiego*fixed 525664 TreeList enum bug*fixed popup menus not appearing right when scrolled to a position beyond 0,0*fixed multi select problems with double entries**Revision 1.45 2002/02/20 04:07:59 ddiego*consolidated event handling code a bit*introduced a virtual handleEvent() method to Component*clean up some of the event constants, so they are now localized in the*appropriate control classes.**Revision 1.44 2002/02/07 04:38:55 ddiego*fixes to Win32Edit, which include problems with setting text, and a bug that*caused it to crash in Win 98. All textControls now default to the "EDIT"*window class unles they are multiline, in which case an attempt is made to*load the richedit control, and if that fails then the EDIT class is used*Removed responding to WM_COMMAND messages*in the default parent in the Win32Toolkit, also to fix the Win32Edit crash in 9.x**Revision 1.43 2002/01/24 01:46:50 ddiego*added a cvs "log" comment to the top of all files in vcf/src and vcf/include*to facilitate change tracking**/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -