Compare commits

..

1160 Commits

Author SHA1 Message Date
Bryan Petty
7f35e7719e This commit was manufactured by cvs2svn to create tag 'wxPy_2_2_2'.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/tags/wxPy_2_2_2@8649 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-26 20:08:47 +00:00
Robin Dunn
ec06bb93ba distrib changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-26 20:08:47 +00:00
Robin Dunn
b04973acaa wxPython doc updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8647 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-26 19:28:00 +00:00
Robin Dunn
4ac0d24da4 fixed a typo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8646 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-26 18:06:25 +00:00
Robin Dunn
5e60be2f7f A little tweak to the wxProcess demo to make it run more smoothly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-26 17:46:11 +00:00
Robert Roebling
470562a9af Always eat <RETURN> in wxListBox so that no
unselection/selection can be done wihtout
    wxGTK sending any event. Also prevent wxGTK
    from sending unselect events when a wxListBox
    with selected items in multiple mode gets
    destroyed.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-26 08:20:11 +00:00
Robin Dunn
e852f9033e Some Python 2.0 related fixes
Some little fixes and tweaks here and there
Some distrib stuff


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8643 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-26 07:53:33 +00:00
Robin Dunn
898e82a8c7 Some fixes for the new way things are built
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-26 07:43:25 +00:00
Robin Dunn
40f7b5f76b Hacks to try and make the AutoComplete listbox behave better on wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8641 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-26 07:35:32 +00:00
Vadim Zeitlin
8068015e65 backported InterlockedInc/Decrement fix from the main branch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-26 00:23:46 +00:00
Robin Dunn
f658d298bb Modified build to make only one extension module, including contribs,
which can each be turned on or off at compile time


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-25 21:17:52 +00:00
Julian Smart
285c885e12 Used gpointer for callback arg to prevent compile error
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-24 14:00:34 +00:00
Robert Roebling
b787791b21 Compile fix for RH 7.0 (I hope).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8627 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-24 10:08:00 +00:00
Robert Roebling
438b4b52f2 Make version.h report 2.2.3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8626 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-24 10:07:10 +00:00
Robert Roebling
17a2186215 Updates to changes.txt etc.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-24 10:06:03 +00:00
Robert Roebling
1c6e38f4df Bumped up version to 2.2.3.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8624 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-24 10:05:00 +00:00
Robert Roebling
02b1952cd9 Added support for wxListBox::SetFirstItem() directly
after creating the listbox. If you now call this
    and delete the listbox directly afterwards, you'll
    get problems since the code waits for idle time.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-23 11:32:30 +00:00
Robert Roebling
7e1199769b Added event.Skip() to wxSplitterWindow::OnIdle()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-23 11:30:43 +00:00
Robert Roebling
9d794a4e7b Added tests for wxListBox::SetFirstItem.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-23 11:29:25 +00:00
Robin Dunn
b669d817ea Fixed a small bug that was caused by changes in Python 2.0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8617 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-23 02:40:15 +00:00
Robin Dunn
24260d5ec5 Script to make a tar ball of hte wxPython demo.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8614 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-23 00:12:07 +00:00
Robin Dunn
1e081845e5 Some minor bugs fixed, some spit and polish, especially in the demo,
and some fixes in the build and distrib stuff.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8613 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-22 23:53:39 +00:00
Robin Dunn
52e72fde27 Some minor bugs fixed, some spit and polish, especially in the demo,
and some fixes in the build and distrib stuff.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8612 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-22 04:48:13 +00:00
Robin Dunn
be62e9322d Some tweaks to make the AutoComplete list box behave better, and a few
other little things


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8611 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-21 22:09:00 +00:00
Robin Dunn
f1c90907c3 fixed a CVS conflict
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8609 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-20 16:54:23 +00:00
Robin Dunn
b91be9807d a platform fix in the demo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8608 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-20 16:31:08 +00:00
Robin Dunn
b46c6fa3dd more tweaking of the build/distrib scripts
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8607 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-20 16:19:34 +00:00
Robert Roebling
c3728eafab Set wxLB_SINGLE style if no style is set.
Eat <Enter> presses so that no item gets unselected
    in single mode.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8601 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-20 15:04:37 +00:00
Vadim Zeitlin
1a184fd470 fixed off by 1 error in CharsetToEncoding() for CP encodings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-20 14:39:18 +00:00
Robert Roebling
e55ff14df0 Minor correction to listbox::SetFirstItem so that
it doesn't scroll beyond the legal range.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8599 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-20 14:38:07 +00:00
Vadim Zeitlin
57751708cb added crash-preventing check to Iconize
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8597 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-20 13:16:22 +00:00
Vadim Zeitlin
7034f0a799 mention OpenMotif
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8595 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-20 11:49:07 +00:00
Ron Lee
3923605351 replaced contributer I rudely kneecapped moments too soon
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8593 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-20 11:43:09 +00:00
Robert Roebling
2acd3b1ae2 Completely blind implementation of wxListBox::SetFirstItem().
Cannot be worse than nothing.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8587 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-19 20:39:04 +00:00
Vadim Zeitlin
5c3c8ede8a added swedish translations
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-19 19:00:44 +00:00
Vadim Zeitlin
c8d4a993c1 backported fix for Translate() from the main branch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-19 16:45:14 +00:00
Vadim Zeitlin
bcb16e4402 fixed GetItemRect() and GetItemPosition() for scrolled items (patch from Mike Oliver <oliver@math.ucla.edu>)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8584 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-19 16:34:23 +00:00
Ron Lee
88766d7767 updated translators info
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8583 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-19 16:14:55 +00:00
Julian Smart
4123879f82 Fixed memory bug
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8577 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-18 17:00:01 +00:00
Robin Dunn
2bac07b9d0 Updated README a bit. Should probably just be rewritten though.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8572 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-16 23:17:58 +00:00
Robin Dunn
d1640f9bd5 More tweaking. Demo shows python version in about box, build script
easier to use but lots smarter...


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-16 23:08:16 +00:00
Robin Dunn
39ec07c3b0 Minor tweaks and some typos corrected
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8570 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-16 20:19:13 +00:00
Julian Smart
f25ec3c10a Fixed memory leak
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-16 07:10:32 +00:00
Robin Dunn
96f0d9b535 new version of core sources for gtk
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8568 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-16 04:10:27 +00:00
Robin Dunn
b267ab6fd2 Removed the old python sizers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-16 02:24:01 +00:00
Robin Dunn
1f4952e59d Added wrappers for wxInputStream and the wxFileSystem family of
classes, contributed by Joerg Baumann

Added wxProcess, including ability to get streams for the child
process's stdio.

Updated the demo


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-16 02:16:54 +00:00
Ron Lee
ec76d0c268 updated .po files.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8562 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-15 18:50:16 +00:00
Vadim Zeitlin
3928193dd5 fixed false alert in wxRegKey::DeleteSelf (backported from the main branch)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8558 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-14 20:29:36 +00:00
Robin Dunn
e2b9df51a4 Removed old build files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8556 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-14 18:47:15 +00:00
Robin Dunn
be481aacfe A little cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-14 06:43:11 +00:00
Robin Dunn
76c42b8f41 Updated build instructions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-14 06:17:33 +00:00
Robin Dunn
1d6bef6dbe rerenerated source for the thread state bug fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8553 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-14 04:46:21 +00:00
Robin Dunn
58ac0a3b73 workaround for a refresh bug
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8552 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-14 04:45:22 +00:00
Robin Dunn
d1ce109158 Notes for new build instructions
build script


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8550 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-13 23:37:04 +00:00
Robin Dunn
913f5facbf fixed a thread state error
fixed an error freeing memory that was never allocated


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8549 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-13 23:11:40 +00:00
Robin Dunn
987b4db3a1 More tweaks to the Distutils setup script
A new set of build instructions for win32


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8545 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-13 03:19:51 +00:00
Robin Dunn
a2949715ec More fixes for the new STC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8544 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-13 03:14:35 +00:00
Vadim Zeitlin
17e5eeeea8 cosmetic font encoding names changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8542 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-12 23:39:05 +00:00
Vadim Zeitlin
0a5f6de6fc removed some unused debugging code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8541 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-12 23:38:42 +00:00
Vadim Zeitlin
2aad589775 partial fix for REG_EXPAND_SZ values
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8540 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-12 23:33:44 +00:00
Vadim Zeitlin
c05578d7c1 another GetInt/GetId bug fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8538 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-12 19:20:49 +00:00
Robin Dunn
35a652d600 more distutils work
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-12 18:50:57 +00:00
Robin Dunn
a2bc08c3de minor tweaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-12 18:39:50 +00:00
Robin Dunn
c4445de880 Updated some .cvsignore's
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8533 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-12 05:19:21 +00:00
Robin Dunn
058973c50c DistUtils setup and support scripts
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-12 05:17:23 +00:00
Vadim Zeitlin
20f07d3994 fix for assert when setting tooltip for a readonly combo (backported from the main branch)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-12 00:32:09 +00:00
Vadim Zeitlin
5a17ae7706 backported wxStrtok() fix from the main branch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8528 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-11 23:17:04 +00:00
Robin Dunn
f115125c20 Distribution stuff...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8520 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-10 22:53:41 +00:00
Robin Dunn
8c9b2984a8 upped version number in the DLL name
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-10 22:51:20 +00:00
Robin Dunn
cccb6b65cb Added ScrollToLine and ScrollToColumn which were forgotten in the
conversion to the new STC


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-10 22:46:29 +00:00
Robin Dunn
5dacdafd9c Changes needed to work with the new STC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-10 22:25:51 +00:00
Robin Dunn
0498ecf0d4 Minor tweaks and such to be saved prior to messing with the wxPython
build system...


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-09 21:43:38 +00:00
Robin Dunn
e1b27de63f Minor tweaks and such to be saved prior to messing with the wxPython
build system...


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-09 20:40:06 +00:00
Bryan Petty
2814e52084 This commit was manufactured by cvs2svn to create branch
'WX_2_2_BRANCH'.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8502 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-09 20:40:06 +00:00
Robin Dunn
9fcc7e1447 Minor tweaks and such to be saved prior to messing with the wxPython
build system...


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8501 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-09 20:30:44 +00:00
Robin Dunn
fb1c66b394 Added a WXDLLEXPORT
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8486 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-07 02:38:05 +00:00
Vadim Zeitlin
4a7a4df4a7 added missing std::string methods implementations
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-04 23:35:05 +00:00
Ron Lee
da3c8ac72c fixed maintainer address
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-03 23:31:59 +00:00
Robert Roebling
44134176ae Use wxNO_FULL_REPAINT_ON_RESIZE in drawing sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-03 10:07:00 +00:00
Robert Roebling
529df28444 Removed debug msgs.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8464 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-03 10:05:40 +00:00
Robert Roebling
8e4b3c4793 wxListCtrl scrolls more gracefully in report mode now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-03 10:04:42 +00:00
Robert Roebling
c84b4372d6 Reduce with of Permissions column
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8462 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-03 10:03:32 +00:00
Vadim Zeitlin
aebe7b130e updated wxFileConf test
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8460 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-02 18:56:23 +00:00
Robert Roebling
6c7a36cc1b Added support for the wxNO_FULL_PAINT_ON_REDRAW style,
Minor flicker reduction (when not using abovementioned flag).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-02 18:55:22 +00:00
Robert Roebling
012c2554ac Small bug in wxSizerItem::GetPosition()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-02 18:53:34 +00:00
Vadim Zeitlin
adc78fbb81 fix for group names containing ']'
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8457 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-02 18:20:54 +00:00
David Webster
394c9cd3eb fix to allow static lib build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8452 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-02 02:40:48 +00:00
David Webster
8953ebb64d OS/2 Statusbar support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-02 02:39:35 +00:00
David Webster
ced50b3323 Statusbar support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-10-02 02:35:58 +00:00
Vadim Zeitlin
66181ca50d replaced GetInt() with GetId() fixing the assertion failures in the sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-30 16:07:26 +00:00
Ron Lee
e88b97e6e0 updated for wxPython contrib
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8444 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-30 10:37:21 +00:00
Ron Lee
f234e7bd93 remove deb-wide config.cache in clean target
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-28 09:30:58 +00:00
Robin Dunn
cc2b7dde15 fixed indentation error
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-26 23:53:12 +00:00
Robin Dunn
4d21e7b0fb new and improved wxSTC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8417 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-26 05:15:39 +00:00
Ron Lee
915d094abb binary compatible fix for screen PPI (hardcoded 75 instead of 100)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8413 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-25 08:34:19 +00:00
Ron Lee
7f20d9c3ac removed unneccesary (and unwanted) asserts
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-24 15:14:38 +00:00
Ron Lee
1b826fd8cf create 'contrib' symlink relative to $WXDIR instead of $WXWIN.
(it's still broken, but slightly less so this way :)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-24 14:58:54 +00:00
Ron Lee
99aa2d72c7 added python-contrib package.
optimised use of configure cache.
determine python install dir automatically.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-24 14:52:31 +00:00
Robin Dunn
68f73e7b18 Fixed the python version of wxListEvent to derive from wxNotifyEvent
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-23 22:30:51 +00:00
Robin Dunn
ed7d26fec1 A bunch of little tweaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-19 01:37:16 +00:00
Robin Dunn
a927ed1665 A bunch of little tweaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8401 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-19 00:21:48 +00:00
Václav Slavík
2bd6903d18 backmerged fix in wxListCtrl::SetItem and InsertItem -- changing attributes more than once had no effect
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-18 20:10:34 +00:00
Václav Slavík
9c60ef71f1 backmerged bugfix in wxHtmlParser::DoParsing (text between two tags longer than 1024 characters was not parsed correctyl)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-18 20:00:19 +00:00
Vadim Zeitlin
cf0ecf5234 some minor changes mentioned
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-18 15:45:37 +00:00
Vadim Zeitlin
75bea72e72 give frame a reasonable default size if none specified
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-18 15:40:15 +00:00
Vadim Zeitlin
e5a314fa9b mention wxTreeItemId::IsOk
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8393 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-18 15:16:09 +00:00
Robert Roebling
b0bcf6799e Updated doc date.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8384 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-17 09:42:10 +00:00
Robert Roebling
9f9619d8a6 Replaced old with new ODBC classes in "Classes by Category"
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-17 09:41:41 +00:00
Vadim Zeitlin
19d900fd6a wxTreeCtrl docs additions/corrections, wxNotifyEvent::Allow() adocumented
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-16 17:34:57 +00:00
Vadim Zeitlin
2e7005d54f mention (incompatible) wxListCtrl::Find change
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8379 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-16 17:19:00 +00:00
Vadim Zeitlin
73215dd510 updated Find() docs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-16 17:15:13 +00:00
Robert Roebling
0cc42bb8a0 wxBase RPM version 2.2.2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8377 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-16 11:30:03 +00:00
Robert Roebling
e61d76a7da RPM version 2.2.2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8375 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-16 11:25:40 +00:00
Robert Roebling
9721958798 Updated changes.txt
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8374 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-16 11:08:28 +00:00
Robert Roebling
16ce088893 Bumped version to 2.2.2.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8373 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-16 11:07:34 +00:00
Robert Roebling
5e50c7aed0 Backported theme code to 2.2 branch.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-16 11:05:04 +00:00
Robert Roebling
ac2b4e619a Bumped version to 2.2.2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8371 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-16 11:02:09 +00:00
Robert Roebling
603ad17064 wxListCtrl::InsertItem() returned number of items,
not the new index.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-13 20:02:41 +00:00
Vadim Zeitlin
07e9e6a82e attempt to fix crash in tree ctrl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-12 16:27:41 +00:00
Vadim Zeitlin
95e98de61b fixed bug in mouse handling
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8336 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-12 08:29:02 +00:00
Robin Dunn
6c35149269 Enabled wxWindow_FindFocus for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8333 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-12 04:01:36 +00:00
Robin Dunn
e98408c5af Added explicit wrappers for wxSpinCtrl methods instead of relying on
inherited methods.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8331 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-11 19:24:59 +00:00
Vadim Zeitlin
b8e3e48747 wxComboBox sends TEXT_UPDATED event under MSW when selection changes now too
(no changes in other files)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-09 19:40:01 +00:00
Vadim Zeitlin
ed152d040a german translations marked as done
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-09 19:37:18 +00:00
Julian Smart
0668ed67d3 Fixed non-recognition of wxLIST_MASK_IMAGE flags.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-08 15:49:14 +00:00
David Webster
cd50efc412 fix to OWNER_DRAWN assert in listbox
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-06 19:18:35 +00:00
Robert Roebling
bc22fbf50d Applied PS patch.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8270 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-06 09:18:44 +00:00
Robert Roebling
0941825d49 Removed wxClientDC from wxEraseEvent.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-06 09:18:02 +00:00
Ron Lee
a03430838d package dependancy bugfix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-06 06:20:02 +00:00
Robin Dunn
11d4a2d65b Interface file defining functionality available in Scintilla. Will
possibly be used to automatically generate some of the wxWindows code
that wraps Scintilla.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8267 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-06 03:39:30 +00:00
Vadim Zeitlin
7cbc29972f oops, some of my testing code crept in
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-05 18:27:43 +00:00
Vadim Zeitlin
130641a308 toggle doesn't mean set
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-05 18:26:43 +00:00
Robin Dunn
fa711ca3ea Fixed some off-by-one errors that were visible on wxGTK but actually
affected wxMSW too.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-05 18:19:36 +00:00
Vadim Zeitlin
ef65dc1c96 added Dutch translation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8258 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-05 18:04:41 +00:00
David Webster
261df93f45 Updates to keep OS/2 Frame apps from crashing on exit. Fixes WM_QUIT processing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-05 14:46:24 +00:00
Robert Roebling
77bb48f9bb Applied DrawArc patch.
Some tests for ShowFullScreen() (doesn't work under GTK).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-05 09:12:43 +00:00
Julian Smart
009b6d2972 Corrected off-by-one bug in wxRect(const wxPoint&, const wxPoint&) ctor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8249 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-04 06:58:30 +00:00
Robin Dunn
982afb26d2 1. Setting the listctrl as the event object before sending the event
to any user event handlers.

2. InsertItem returns the actual index used when given one beyond the
end of the list.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8240 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-01 21:30:18 +00:00
Julian Smart
f6ea16541e Fixed ALT processing, fixed doc bug
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8236 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-01 16:49:23 +00:00
David Webster
26270ea4c9 Several updates for fixing the subclassing problems and accelerator processing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8231 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-01 13:45:46 +00:00
David Webster
d55a17e6c8 Fix for allowing proper sublassing of Frames
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-01 13:45:02 +00:00
David Webster
7af8ff97ce WXFARPROC properly defined for OS/2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8229 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-01 13:44:19 +00:00
Ron Lee
c636399301 minor packaging tweaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8221 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-30 15:08:21 +00:00
Robert Roebling
b65c371ca8 Added check for wxCheckBox::SetValue()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8217 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-30 07:53:13 +00:00
Vadim Zeitlin
8317194692 compilation fix (ooooops)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-29 18:55:57 +00:00
Robert Roebling
49849fadb8 Implemted wxImage::Paste() for transparent images.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8213 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-29 18:18:51 +00:00
Julian Smart
ed64fd2518 Small mods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-29 17:56:06 +00:00
Vadim Zeitlin
bcb751a9d5 added missing .c_str() here and there
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8211 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-29 17:33:59 +00:00
Julian Smart
d88eb514de Fixed CanCut
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8210 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-29 16:18:39 +00:00
Vadim Zeitlin
dd98264971 create a DC for wxEraseEvent
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8203 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-28 20:20:11 +00:00
Vadim Zeitlin
4a0a9b03d6 compilation fixes for mingw32 (still leaving disabled for now)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8195 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-27 12:16:02 +00:00
Julian Smart
9444f8dbc3 Fixed dialogs sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8186 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-25 15:51:50 +00:00
Robert Roebling
5101dc00ca Let's see where this commit will end up :-)
Corrected reported wxSizer bug (wrong minimal size
    when option flag > 1)
  Updated changes.txt and wxGTK spec.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8184 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-25 15:00:50 +00:00
Robin Dunn
3e223a8a1e new SWIG generated sources for compiling with Python 1.6
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8179 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-25 01:35:00 +00:00
Robin Dunn
06c193f271 new SWIG generated sources for compiling with Python 1.6
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8178 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-25 01:34:59 +00:00
Robin Dunn
e47abcc98a Some minor tweaks to SWIG templates to enable compiling with
Python 1.6 headers.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8177 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-25 01:21:13 +00:00
Vadim Zeitlin
d3b2361621 bug #105 (wxFileSelector misinterprets the def extension) fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8166 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-23 22:45:59 +00:00
Václav Slavík
1180177533 reverted my 2 previous checkins -- will merge back from 2.3 as soon as it proves stable
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8163 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-23 10:39:19 +00:00
Robin Dunn
4ab299e341 small bug fix in the wxSizer.Insert wrapper
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8162 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-22 23:03:09 +00:00
Václav Slavík
9c7013a23b fixed bug in wxListCtrl::SetItem (forgot to delete previous attribute from m_attrs)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-22 21:56:52 +00:00
Vadim Zeitlin
d57fe8787b typo fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8159 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-22 15:28:12 +00:00
Vadim Zeitlin
521d92a66d bug #101 (wxListCtrl::GetItemRect() returns rectangle with incorrect height) fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8157 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-22 10:12:26 +00:00
Vadim Zeitlin
e51b06d56f bug #103 (encodings not enumerated correctly) fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8156 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-22 10:06:37 +00:00
Julian Smart
07793870fb Small mods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8142 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-20 19:55:35 +00:00
Robin Dunn
cff4d2f859 a few bug fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8135 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-19 04:56:22 +00:00
Robin Dunn
b0b9777d40 a few bug fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-19 01:50:44 +00:00
David Webster
0f4e4da55c Minor fix to app
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8131 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-18 16:45:45 +00:00
Stefan Neis
c898f79a9f Fixed typo.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-18 16:27:32 +00:00
David Webster
e231753983 Reparied accel processing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8124 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-18 12:00:39 +00:00
David Webster
3ed3532bd7 Fixes for accelerators
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8120 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-18 00:02:41 +00:00
David Webster
39dd8deaa6 New frame class
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8119 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-17 20:49:41 +00:00
Julian Smart
b4927bb94a Increased bib buffer size
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8115 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-17 07:17:19 +00:00
Ron Lee
67c2cc3e74 fixed xlation which broke accels
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8113 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-16 17:05:08 +00:00
Václav Slavík
9926c07ad1 fixed wxListCtrl::SetItem -- changing attributes of item with attributes already set had no effect
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-15 21:44:04 +00:00
Julian Smart
61ef71d148 Fixes to allow filenames to have backslashes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-14 12:03:15 +00:00
Mark Johnson
ae90bcd749 De.po with 649 Messages
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8093 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-14 11:51:33 +00:00
Julian Smart
8397d5f719 Small doc mods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8082 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-13 20:20:13 +00:00
Julian Smart
9708091a2f Small doc mods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-13 19:25:56 +00:00
Julian Smart
9ca7ea0da6 Some wxDb fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8080 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-13 19:24:00 +00:00
Vadim Zeitlin
22d9baa993 fix for wxBase dist
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8079 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-13 15:13:02 +00:00
Vadim Zeitlin
55ee71e1bf mention the wx-translators list
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8078 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-13 15:08:32 +00:00
Vadim Zeitlin
676f03dba3 keep languages in the alphabetic order
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-13 15:00:46 +00:00
Vadim Zeitlin
5c2fa2063c updated
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-13 14:57:42 +00:00
George Tasker
46f20c3227 Removed the table.tex reference, as the wxTable class was renamed to wxDbTable in v2.2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8075 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-13 14:00:11 +00:00
George Tasker
5bdb26305f Lots more added for the wxDbTable class.
All missing tags and unresolved references have been cleaned up
Quick fix of spelling typos performed.
Still need to add all the memeber function Remarks/descriptions, but the member functions are at least all stubbed now.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-13 13:58:47 +00:00
Vadim Zeitlin
03f3fe6fb7 updated the PO files once again
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-13 13:31:35 +00:00
Vadim Zeitlin
cb3c5d853f accept windowsXXXX as well as windowsXXX in CharsetToEncoding
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8072 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-13 13:28:50 +00:00
Vadim Zeitlin
daf91c018c 1. Unicode fix for wxCmdLineParser
2. fixed toolbar buttons problem for W2K


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-13 11:07:46 +00:00
Julian Smart
aafdc5a46c Doc fixes, distribution list additions, makelib.g95 fixed so WXDIR can be passed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8070 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-13 09:58:37 +00:00
Julian Smart
7f7c1d269c Some corrections and stubs for missing links in db.tex; added back table.tex
to classes.tex since it was erroneously removed


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-13 08:29:42 +00:00
Vadim Zeitlin
d9131af011 no wxMapBitmap() any more
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-13 00:27:46 +00:00
Vadim Zeitlin
7ae8234630 unicode compilation fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8067 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-13 00:16:54 +00:00
Ron Lee
3d84f97e52 exclude the debug versions from being stripped.. duh
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-12 22:38:22 +00:00
Vadim Zeitlin
bfb9d722c0 and even more "final" corrections...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-12 21:06:22 +00:00
Vadim Zeitlin
9d84a7e5ef final correctiosn to wxBase project generation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-12 21:02:45 +00:00
Vadim Zeitlin
d63f569944 don't generate browse info
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-12 20:49:59 +00:00
Vadim Zeitlin
19f590b4da removed y.tab.c from wxBase projects, added the project files to wxBase dist
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8062 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-12 20:47:01 +00:00
Vadim Zeitlin
211bac8177 added more project build dirs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-12 20:45:10 +00:00
Vadim Zeitlin
45d27b94de 1. gsockmsw.c compiles in Unicode mode
2. wxBase project files updated/added
3. more fixes to tmake scripts: now work for any combination of
   lib/dll unicode/ansi settings


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-12 20:37:18 +00:00
Vadim Zeitlin
95fecb054a optimize for size, not for speed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8059 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-12 20:25:28 +00:00
Julian Smart
5647a063a5 TIFF makefile corrections
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8058 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-12 20:12:07 +00:00
Julian Smart
c83d183606 Updated some version numbers; added script to automate builds with difference
compilers


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-12 17:22:23 +00:00
Robert Roebling
e0f38535d6 Add wxBase.spec to distribution.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-12 16:49:13 +00:00
Robert Roebling
a2d51707f9 I hope dnd won't crash anymore and I didn't
break too much else.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-12 16:19:04 +00:00
George Tasker
3193682a45 table.tex removed from class list, as wxDbTable docs are now in db.tex
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-12 15:06:10 +00:00
Vadim Zeitlin
43908bd296 some compilation fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-12 14:32:25 +00:00
Vadim Zeitlin
6a26a72df2 wxBase dist fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-12 14:10:49 +00:00
Vadim Zeitlin
7c49c6b7fc removed obsolete file
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-12 14:06:58 +00:00
Vadim Zeitlin
5fb1f6406a mention that wxBase can be built from wxMSW/GTK sources as well
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-12 13:42:57 +00:00
Vadim Zeitlin
4324fb1968 wxBase installation/comoilation docs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-12 13:32:00 +00:00
Vadim Zeitlin
d19729d528 fix (with a test) for wxMenu::UpdateUI bug (the handler defined in the menu class was never used)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8046 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-12 13:30:47 +00:00
Mark Johnson
f21cb9a888 German Translations done
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8045 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-12 12:55:18 +00:00
Vadim Zeitlin
30f2a1119a fixed crash in wxStrtok
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-12 11:24:06 +00:00
Vadim Zeitlin
2abeae78b2 backported changes form the main branch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8042 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-12 11:22:14 +00:00
Vadim Zeitlin
46861a80df added another test radiobox to the controls sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8038 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-11 19:45:03 +00:00
Vadim Zeitlin
d42d40692b compilation fixes for Unicode build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8037 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-11 19:39:16 +00:00
Vadim Zeitlin
f7acd7dfc5 fixes for the project file generation for the DLL and Unicode builds
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-11 19:38:20 +00:00
Vadim Zeitlin
282d3ee19a ci test 1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-11 13:01:31 +00:00
Julian Smart
e159092cf0 Now show/hide status bar in ShowFullScreen, instead of deleting it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-11 12:27:40 +00:00
Vadim Zeitlin
6c06c16203 increased version number to 2.2.1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8019 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-10 16:00:33 +00:00
Vadim Zeitlin
2f476ae972 russian translations
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-10 15:06:00 +00:00
Vadim Zeitlin
6a40611b52 added russian translations and an additional cmd line parameter to set the
encoding to use


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-10 15:05:21 +00:00
Vadim Zeitlin
0fde4c5a66 typo fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8015 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-10 14:58:45 +00:00
Vadim Zeitlin
d212f35a39 fixed logging in Usage()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-10 14:41:49 +00:00
Vadim Zeitlin
a198ebda98 made error "locale couldn't be set" a verbose message instead, use WXDIR to
find wxstd.mo


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-10 14:40:06 +00:00
Vadim Zeitlin
f4824f1c2a 2 minor fixes to wxDB docs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-10 13:19:43 +00:00
Vadim Zeitlin
b4d77d6767 translations mostly updated
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8009 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-10 11:18:22 +00:00
Vadim Zeitlin
ff622b0add added a missing method for compatibility with MSW (preserving binary compatibility)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-10 10:55:41 +00:00
Vadim Zeitlin
6faafed2c0 updated Makefile to run msgfmt with --verbose option (finds more errors like
this), fixed the headers and added the Italian translation


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-10 10:26:22 +00:00
Vadim Zeitlin
517444edb1 added more tests for MDI frame size/position
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8003 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-10 08:42:34 +00:00
Julian Smart
0a78ba3df5 Changes for Watcom; updates to readme.txt and changes.txt
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-10 07:15:43 +00:00
Vadim Zeitlin
1e6237babe testing cvs access
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-09 15:36:28 +00:00
Vadim Zeitlin
5efb426fb0 testing cvs access
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-09 15:28:55 +00:00
Julian Smart
46bbeb6c59 Small changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-09 06:24:53 +00:00
Robin Dunn
3a084b48d0 more minor fixes, stabalizations, etc.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7980 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-08 19:53:58 +00:00
Robin Dunn
0d8ab7638d more minor fixes, stabalizations, etc.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7979 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-08 19:19:49 +00:00
Robin Dunn
f29dc62250 more minor fixes, stabalizations, etc.
Added example of wxTaskBarIcon to the demo


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-08 19:18:35 +00:00
Vadim Zeitlin
d29fe953ec wxMotif under AIX compiles
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7971 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-07 17:22:14 +00:00
Robert Roebling
f743e9389e The MSW radiobutton now informs about its state in the
event (m_int) as wxGTK did. Changed blindly.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-06 16:18:53 +00:00
George Tasker
037759a02e More updates - All wxDb members now documented - still needs proofreading done
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7963 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-06 10:41:23 +00:00
George Tasker
69b7ff3a83 Fixed a typo in a display string - Passowrd
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7962 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-06 10:39:54 +00:00
Vadim Zeitlin
23c44a6134 warnings fixed for compilation with VC++ at max warning level with optimization
(mainly "unreachable code"), another warning ("function not inlined") disabled
in defs.h, minor fixes to DLL project file template


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-06 10:12:09 +00:00
Ron Lee
a3a57f29ce fix for minimum required python version.
added i18n package.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7959 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-06 07:05:55 +00:00
George Tasker
c539c9d998 Updated to include information on the -interactive command line parameter
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-05 19:47:34 +00:00
George Tasker
d7bd0e960c Intermediate checkin of the wxDb database class manual pages - still incomplete, and not proofed yet
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-05 19:45:01 +00:00
George Tasker
1e1567d221 Typo unfixed, as the source file for this class also misspells the word Occurred
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-05 19:41:26 +00:00
George Tasker
6456a7f792 Added default constructors/destructors to allow plugging of (potentially large) memory leaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-05 18:49:22 +00:00
George Tasker
2941f53242 Reformatted source to normalize spacing/indentation - no code changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-05 18:34:44 +00:00
George Tasker
3c8c835c23 Reformatted source to normalize spacing/indentation - no code changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-05 18:17:19 +00:00
George Tasker
7109c7c2f8 Reformatted source to normalize - no code changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-05 18:16:14 +00:00
George Tasker
77dbcbc141 Comments added to acknowledge contributors
Cleanup of commented out blocks that were no longer needed


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-05 17:21:17 +00:00
George Tasker
6953221642 Comments added to acknowledge contributors
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-05 17:20:01 +00:00
George Tasker
b66b97e53c Replaced german variable names with english
wxDbGetConnection() default on scrolling cursors did not use wxODBC_FWD_ONLY_CURSORS


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-05 17:18:52 +00:00
George Tasker
8d67403dfd Replaced german variable names with english
wxDbGetConnection() did not check for the correct scrolling of cursors when re-using a cached database connection


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-05 17:16:44 +00:00
Vadim Zeitlin
50e38d88a2 added another inline AddTool
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-05 15:53:54 +00:00
Vadim Zeitlin
0b471f42ee added another inline AddTool
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-05 15:39:03 +00:00
Vadim Zeitlin
d350269679 more fixes for VC++ .dsps
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-05 12:03:12 +00:00
Vadim Zeitlin
13d6e033a3 fixed 2d radiobox layout and kbd handling
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-05 12:00:50 +00:00
George Tasker
2eec5d7fe2 Additional comments added for clarity and correctness
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7937 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-05 10:59:33 +00:00
George Tasker
523a1a306a Fixed typos in comments
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7936 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-05 10:49:37 +00:00
Vadim Zeitlin
1173ab2b37 better wording
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-04 20:15:04 +00:00
George Tasker
386cd1e43b Fixed some crashing code in dialog cleanup in some exceptional cases
Fixed memory leak
Set return codes on the modal dialogs to avoid use of uninitialized values


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7929 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-04 11:03:22 +00:00
Michael Bedward
50dce4e225 Removed redundant m_left etc. variables
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-04 05:16:26 +00:00
Václav Slavík
bfcc7524b1 fixed low resolution problem with wxPostScriptDC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7926 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-03 21:43:30 +00:00
Vadim Zeitlin
755528fe9a another bug in ParseDate fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7924 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-03 13:20:04 +00:00
Vadim Zeitlin
7cafa89468 fixed logic bug in ParseDate
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7923 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-03 12:38:16 +00:00
Robin Dunn
ad7560cc1b Various tweaks, fixes, missing methods, etc.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7922 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-03 02:51:27 +00:00
Robin Dunn
eae6b980f6 Various tweaks, fixes, missing methods, etc.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-03 02:02:45 +00:00
Vadim Zeitlin
361189d912 fixed bug with radiobox size being miscalculated if the label was too long
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-02 21:55:41 +00:00
George Tasker
4f71eca5df Fixed MySQL specific problems with creating non-primary indexes on columns not defined as NOT NULL
Fixed MySQL specific check on DropIndex error code 42S12


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-02 11:01:37 +00:00
George Tasker
72f6809886 Fixed SLLOGfn crash problem, thought his change breaks binary compatability with 2.2.0
Added 2.4 code inside "#if EXPERIMENTAL_WXDB_FUNCTIONS...#endif blocks, defaults to 0 so the new functions are not compiled


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7916 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-02 10:58:20 +00:00
George Tasker
dedae23fe7 Header changes for 2.4 added, but all are inside of #if...#endif blocks so that at compile time there is no changes to header from 2.2.0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-02 10:55:00 +00:00
George Tasker
b2a64291ba Change return value of GetExtendedDBErrorMsg2 to be a const char * instead of char *.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-02 10:44:55 +00:00
Julian Smart
9c26be6b7c Removed winmm.dll from delayload list.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7913 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-02 06:35:58 +00:00
Michael Bedward
c8da1e98e8 Fix to make wxGrid::SelectBlock do what it says.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-02 04:12:43 +00:00
George Tasker
80ccc1282c Subqueries for MySQL are now not performed, as MySQL does not support subqueries
Compile time warnings with GCC eliminated.

Call to wxDbCloseConnections() was missing from the frame ::OnCloseWindow() function, so that the connections to the database were not properly CLOSEd, they were only marked as FREE in the DB connection cache.

Several crash/segfault problems have been corrected

New functions added under the FILE menu for RECREATE TABLE and RECREATE INDEXES


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7911 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-01 18:47:04 +00:00
Vadim Zeitlin
30ebe8b325 added EVT_UPDATE_UI_RANGE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-01 15:38:37 +00:00
Vadim Zeitlin
01da3752ff explained how wxCB_READONLY works (under MSW) better
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-01 10:51:14 +00:00
Václav Slavík
2a3d83ce71 correct typo in cs.po
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-31 22:04:09 +00:00
Robert Roebling
dd37e60373 Fixed offset problem for hatches.
Shown in sample drawing now.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7904 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-31 15:29:39 +00:00
Vadim Zeitlin
bbca093198 made FONTMAPPER_ROOT_PATH absolute path
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-31 11:10:09 +00:00
Vadim Zeitlin
146e73f9fc some minor tweaks for wxBase
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-29 22:11:52 +00:00
Vadim Zeitlin
ccb0fa4972 (harmless) warning fix for VC++
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-29 22:10:00 +00:00
Vadim Zeitlin
e6a879172a fixes for VC++ wxBase DLL project files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7897 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-29 22:07:56 +00:00
Vadim Zeitlin
ef289fac18 added version info to wxBase.dll, corrected it for wxMSW.dll
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-29 22:07:18 +00:00
Vadim Zeitlin
fce5b5df0c fixed the problem with iconizing the miniframes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-27 22:52:59 +00:00
Vadim Zeitlin
75cd4558aa version 2.2.1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-27 22:10:18 +00:00
Vadim Zeitlin
d89a9967e2 improvements for VC++ project file generation with tmake
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-27 22:09:18 +00:00
Vadim Zeitlin
0c0dba254a added 16 flag to tabg.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-27 22:08:46 +00:00
Vadim Zeitlin
9c18af7c6f several unimportant warnings fixed for VC++ compilation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-27 22:06:17 +00:00
Vadim Zeitlin
1247459058 compilation fix: false -> FALSE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7875 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-27 15:00:24 +00:00
Vadim Zeitlin
0b397099c7 documented the weird behaviour of wxTextFile:GetPrev/NextLine
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7874 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-27 14:01:59 +00:00
Michael Bedward
2c33291c88 Copied main branch fixes for caret not showing in first row (wxmsw)
and highlight not being cleared when a cell is only partially visible.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7867 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-27 06:47:09 +00:00
David Webster
0855205063 fix for VA 3.0 vs 4.0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7851 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-26 20:06:24 +00:00
Vadim Zeitlin
b0f8234dd5 wxTreeCtrl::ItemHasChildren() should return TRUE if SetItemHasChildren() had been called
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-26 16:29:33 +00:00
Vadim Zeitlin
ba305d2c09 more tests
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-26 16:17:24 +00:00
Vadim Zeitlin
157ec6f245 resolving a conflict
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-26 16:16:43 +00:00
Vadim Zeitlin
c0eacd8c9d handle wxNO_FULL_REPAINT_ON_RESIZE for MDI children
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7847 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-26 16:16:30 +00:00
Vadim Zeitlin
a6f8c30c69 removed the warnings from HP-UX build log
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-26 16:09:16 +00:00
Vadim Zeitlin
e1f35294c9 documented recently added IsOk
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-26 16:08:03 +00:00
Vadim Zeitlin
1afd23b4fe note about wxSpinButton range
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7843 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-26 13:45:09 +00:00
Julian Smart
ad4e1ada75 Added cmdline.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-26 12:41:17 +00:00
Julian Smart
97ede207f5 Corrected makefile target bug
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7840 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-26 11:53:38 +00:00
Julian Smart
69be06765c Not sure why these files are being committed (CVS glitch?)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7838 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-26 08:50:46 +00:00
Vadim Zeitlin
ec89413101 one crash in GetAltForEncoding fixed (how many left to go?)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7836 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-25 18:58:29 +00:00
Vadim Zeitlin
f82c893819 added (inline) wxLocale::IsOk()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7830 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-25 16:41:08 +00:00
Vadim Zeitlin
5f6d27e2fe parse cmd line a bit more correctly (in size setting testing code)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7829 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-25 15:38:38 +00:00
Mark Johnson
c941c715dc dbtree.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7827 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-25 12:03:03 +00:00
Mark Johnson
3a4d5eac4b dbbrowse.cpp dbgrid.cpp dbtree.cpp doc.cpp pgmctrl.cpp
dbbrowse.dsp dbbrowse.dsw dummy.cpp


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-25 08:50:27 +00:00
Julian Smart
01fd9fc23a Fixed wxMotif breakage, sorry!
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-24 19:55:22 +00:00
Julian Smart
1d8b4ecf12 Added insertion point code to wxComboBox
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7822 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-24 15:26:59 +00:00
Vadim Zeitlin
893f085de3 added a note about wxTE_PROCESS_ENTER
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-24 12:50:12 +00:00
Vadim Zeitlin
f98b3e0b10 init m_text and m_vScrollbar to NULL in the default ctor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-24 09:03:13 +00:00
Julian Smart
542c5b121a Corrected test for _vsnprintf
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-24 09:01:57 +00:00
Michael Bedward
f8ddb870c1 Changes as per patch from Paul Gammans to fix bug in edit control
handling.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7814 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-24 06:27:12 +00:00
Julian Smart
cba254cf9a Added scripts to update .dsp files when version changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7810 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-23 15:24:03 +00:00
Julian Smart
3f4983bf30 Updated project and makefiles (VC++) to be more consistent.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7809 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-23 14:26:37 +00:00
Julian Smart
ab1b83b633 Mods for Cygwin 1.1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7807 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-22 14:01:27 +00:00
Julian Smart
fad2710181 Corrected some combobox-related code, changed ordering and added wxSpinCtrl
support as per bug report


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-21 15:43:14 +00:00
David Webster
ff11fd4c62 ftime enabled OS/2 code added by Guill....
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7803 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-21 13:06:37 +00:00
Michael Bedward
2c11e7c121 First batch of work for new wxGrid docs.
Very incomplete - still lots to do but will commit more
next week.  Please don't edit yet without letting me know
via the list.

 - Michael


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-21 08:24:18 +00:00
David Webster
336c799602 hopefully the final module definition file for VA 3.0 for release 2.2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-20 04:09:09 +00:00
David Webster
53b9834d36 removed a constant not defined for VA in filefn and once again removed #warning not supported by VisualAge
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7790 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-20 04:07:51 +00:00
David Webster
0afe3164b4 removed a comma at the end of an enumeration
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-20 04:06:06 +00:00
Ove Kaaven
e4277eca0a If the "partial" argument is true, you're probably meant to set the
LVFI_PARTIAL flag, not the LVFI_STRING flag again.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7780 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-19 08:56:40 +00:00
Ove Kaaven
c097dc3d01 Another case of fn_str() in wxFopen() ?
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7775 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-19 08:31:36 +00:00
Ove Kaaven
8de3998d30 More Unicode compilation fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7770 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-19 08:20:03 +00:00
Ove Kaaven
5edfb31e95 wxFopen(fname.fn_str(),...) does not make sense and does not compile in
Unicode mode. Just use wxFopen(fname,...)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7768 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-19 08:12:30 +00:00
Vadim Zeitlin
4f229bd746 handle wxDEFAULT as a default font size (12), not as just some value (70)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7765 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-19 08:01:32 +00:00
Vadim Zeitlin
ab2cd8651e unused static function (=> warning) commented out
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-19 07:31:15 +00:00
Vadim Zeitlin
54355138d0 corrected wxComboBox validator behaviour
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7763 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-19 07:20:03 +00:00
Vadim Zeitlin
3d68c787aa use filter index first, then the path to find the correct template
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7762 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-19 07:14:28 +00:00
Vadim Zeitlin
8f3299d8ee fixed wxCommandEvent::IsChecked() for the menu events
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7761 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-18 19:44:32 +00:00
Vadim Zeitlin
555b2cf3c9 fixed yet another column resizing bug: couldn't do it when the window was scrolled vertically
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-18 11:12:00 +00:00
Vadim Zeitlin
b98b2b27d6 wxCommandEvent::Checked() was renamed to IsChecked() (keeping the old name
too, of course), now works for menu item in wxMSW too and is documented
accordingly.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-18 07:59:05 +00:00
Robin Dunn
90678ba2ea minor changes to the build instructions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-18 04:50:43 +00:00
Robin Dunn
ab5df9e686 changed version number
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-18 04:11:11 +00:00
Robin Dunn
5ba9fb0691 one last little tweeak
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-18 04:08:09 +00:00
Vadim Zeitlin
27c89aeac2 more comments
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-17 22:01:41 +00:00
Robert Roebling
8b6d09851d Made checkable menu items use wxCommantEvent::Checked
Made wxComboBox case sensitive.
  Updates CHANGES.txt


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7753 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-17 17:07:07 +00:00
Robin Dunn
028de29b9d some minor changes and distrib stuff
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-17 14:44:20 +00:00
Robert Roebling
f9e9953e80 Added supprot for INSERT and DELETE in wxGTK menus,
Applied Dima's correction for DrawRoundedRectangle,
  Corrected indentation.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7750 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-17 11:50:35 +00:00
Ron Lee
afe121c935 updated version for 2.2.1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-15 13:52:23 +00:00
Robert Roebling
949f446dfc Corrected wrong lib.so name for 2.0.1.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-15 09:20:07 +00:00
Julian Smart
f2e0f93a0f Fix to docview to find the right frame for dialog parent
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-15 05:28:52 +00:00
Robin Dunn
29963001d3 some fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-14 05:17:27 +00:00
Robin Dunn
c18da485ed colouriser is almost working...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-14 05:16:40 +00:00
Robin Dunn
2e07b29dd9 Quick fix...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-14 04:01:48 +00:00
Robin Dunn
a75b761a1d Added PyShellWindow and a demo.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7739 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-14 03:43:23 +00:00
Julian Smart
f656067f27 Initialized variable in wxDocument constructor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7738 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-13 17:43:52 +00:00
Robert Roebling
5016f35584 Undid the bin-incompatible change to wxSize.
Corrected the Mask() creation on 16-bit visuals.
 Applied the cool patch for gtk_pizza() to reduce
   unnecessarry paint events.
 Added bzip-dist to create better compressed archives.
 Added files.lst to source distribution.
 Bumped version to 2.2.1.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7737 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-13 16:27:59 +00:00
Guillermo Rodriguez Garcia
c3a6e88593 Error in reset.xpm (it read new_xpm instead of reset_xpm
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-11 05:27:57 +00:00
Robin Dunn
e1e0d52884 small updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-11 04:49:31 +00:00
Robin Dunn
262804532c small updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-11 04:49:30 +00:00
Julian Smart
e44fed2cb2 Added missing consts to wxSize operators.
Corrected #ifdef for BC++/OLE automation class.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-10 19:02:24 +00:00
Guillermo Rodriguez Garcia
8598648fd1 Changed version number to 2.2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-10 06:08:05 +00:00
Guillermo Rodriguez Garcia
efcc189ef2 New files to add .lif pattern reading capabilities to Life
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7730 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-10 05:58:08 +00:00
Julian Smart
6b5f146a2b Resource sample reflects recent font correction; doc updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-10 05:47:45 +00:00
Julian Smart
d19e79247c Fix for BC++/16-bit and wxLongLong
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-09 14:08:28 +00:00
Julian Smart
723c762269 Corrections for 16-bit compilers, doc updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-09 13:40:05 +00:00
Julian Smart
6bf87dad49 Fixed release number in version.h, turned off WCHAR_T for Cygwin
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-09 12:59:44 +00:00
Karsten Ballüder
c55f0098d5 fixed compilation - please check for correctness
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-09 12:22:48 +00:00
Julian Smart
906b7d74a9 Removed 'inline' that crashed Mingw32 2.95.2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-09 08:50:47 +00:00
Vadim Zeitlin
cf9c8f73a9 apply the previous bug fix only under Windows
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-08 23:52:09 +00:00
Vadim Zeitlin
fca5322810 clearing the cvs mess..
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-08 23:49:58 +00:00
Bryan Petty
59acb9f291 This commit was manufactured by cvs2svn to create branch
'WX_2_2_BRANCH'.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7721 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-08 23:49:58 +00:00
Vadim Zeitlin
d4a0c23fcd clearing the cvs mess...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-08 23:46:00 +00:00
Vadim Zeitlin
05b8c7b93c version info for DLL build (unused)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-08 23:32:11 +00:00
Vadim Zeitlin
2e5b3a4634 fixed bug with directories with trailing (back)slashes in wxPathExists
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7718 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-08 23:18:09 +00:00
Vadim Zeitlin
a49123d60d test for wxListEvent::GetText()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-08 19:13:17 +00:00
Vadim Zeitlin
ad17bd33cf added colour tests
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-08 19:11:51 +00:00
Julian Smart
838ab8a108 SCF_ALL defined (Watcom C++ doesn't recognise it).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7715 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-08 17:01:14 +00:00
Julian Smart
0f82c38d0c Doc corrections
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-08 16:58:47 +00:00
Julian Smart
a3d1c18e7b Turn off wxUSE_WCHAR_T for Watcom C++.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7713 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-08 16:43:09 +00:00
Julian Smart
3a035fb95f Doc typos corrected, added wxDIALOG_UNIT_COMPATIBILITY test, made file open
error result in a message box (docview.cpp)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7712 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-08 10:29:17 +00:00
Julian Smart
92eaf25bd0 Added wxDIALOG_UNIT_COMPATIBILITY
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-08 10:27:09 +00:00
Robert Roebling
4c10583a28 Updated changes.txt.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-08 10:13:00 +00:00
Julian Smart
0d3c36e208 Updated gettext link
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7709 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-08 07:52:58 +00:00
Julian Smart
c04727830b Updated gettext documentation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-08 07:52:34 +00:00
Vadim Zeitlin
df5361af0f compilation fix for S_ISDIR and VC++
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7707 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-07 19:45:13 +00:00
Vadim Zeitlin
765814e38e use (POSIX) S_ISDIR instead of (not POSIX) S_IFDIR
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-07 10:07:10 +00:00
Vadim Zeitlin
78067d6c40 compilation fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-07 09:58:42 +00:00
Ron Lee
678ddc9aa9 made GetSelection return insertion point if no selection
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-06 23:47:47 +00:00
Vadim Zeitlin
717562e490 set item text in LIST_ITEM_ACTIVATED events
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7703 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-06 21:43:48 +00:00
Vadim Zeitlin
0119459c53 1. wColour now accepts both grey and gray under MSW
2. implemented setting colours for rich edit controls


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7702 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-06 21:34:07 +00:00
Robert Roebling
97b0241cf2 Fix for BadMatch problems on SGI.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7701 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-06 13:40:49 +00:00
Vadim Zeitlin
faf08d09e2 added wxArrayString::operator==() and !=()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7700 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-06 13:13:27 +00:00
Vadim Zeitlin
a3e99a54fb added dummy Set/GetMargin
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7699 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-06 11:23:34 +00:00
Vadim Zeitlin
3450f21ccf fixed wxColourDialog crash
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-05 19:27:30 +00:00
Vadim Zeitlin
05c7d17691 controls with wxTE_PROCESS_TAB may still generate navigation events
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7697 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-05 16:22:28 +00:00
Guillermo Rodriguez Garcia
0d14df868d #pragma message, and not #pragma warning, for BC++
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7696 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-05 14:08:20 +00:00
David Webster
1fc97740b8 no message
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7695 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-05 12:23:44 +00:00
Guillermo Rodriguez Garcia
268934d26f New cygwins seem to have commctrl.h as well
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7694 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-05 05:45:25 +00:00
Guillermo Rodriguez Garcia
1dcb6a4e5d Replaced a complex MINGW / GCC version check with a #if wxUSE_NORLANDER_HEADERS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-05 05:44:57 +00:00
Guillermo Rodriguez Garcia
b814f3aa5c Re-added a few warnings. Please don't just shut them off,
drop me a line instead (guille@iies.es)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7692 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-05 05:43:28 +00:00
Guillermo Rodriguez Garcia
b18568fe30 set WX????DLL to 1 when making a DLL
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7691 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-05 05:42:44 +00:00
Julian Smart
29285225da Removed WXDLLEXPORT from typedef.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-04 17:14:26 +00:00
Vadim Zeitlin
48a4aaa207 documented wxTextFile::Create()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-04 12:27:10 +00:00
Václav Slavík
70e5dd6b56 oops, previous commit was incomplete, fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7688 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-04 09:14:58 +00:00
Julian Smart
5623e844b6 brace matching removed from Tex2RTF (didn't work for \verb), doc
fixes


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7687 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-04 06:54:56 +00:00
Guillermo Rodriguez Garcia
a1d19f87a3 Another patch from Christoph Schulz for the Borland
makefiles. See the comments in any of the following
files: src\makeprog.b32, src\make32.env, src\msw\makefile.b32
or distrib\msw\tmake\b32.t


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7686 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-04 06:07:53 +00:00
Guillermo Rodriguez Garcia
73c6e8505e Changes to the BC makefiles as proposed by Christoph Schulz.
The problem was:
=== Cut ===
Unfortunately, now you cannot build a wxWin program using both static
wxWin library and static RTL (because _RTLDLL is now always defined).
=== Cut ===

This is fixed now:
=== Cut ===
Now, if you build/use wxWin as a DLL (WXMAKINGDLL=1/WXUSINGDLL=1)
the dynamic RTL (c?mt32??.dll) is used, otherwise the static
library.
=== Cut ===


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7685 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-04 06:03:13 +00:00
Robin Dunn
a8f9e1f310 fixed bug for garbage text in NotifyParent
Added method to set modification event mask


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-03 21:59:29 +00:00
Václav Slavík
068407ed84 documented wxPrinter::GetLastError & changed signatures
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7683 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-03 20:23:51 +00:00
Václav Slavík
7eec402f36 documented wxPrinter::GetLastError
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7682 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-03 20:23:41 +00:00
Václav Slavík
d506e640af changed return value of some wxHtmlEasyPrinting methods from void to bool (related to wxPrinter change)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-03 20:23:29 +00:00
Václav Slavík
8a7ec928f5 replaced wxMessageBox by wxLogError
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-03 20:23:02 +00:00
Václav Slavík
18747d0f9d added dome of wxPrinter::GetLastError usage
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7679 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-03 20:22:45 +00:00
Václav Slavík
3c10c250ff added wxPrinter::GetLastError
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7678 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-03 20:22:33 +00:00
Robin Dunn
62786fc3be Some missing methods and etc. added
Some minor tweaks and fixes


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7677 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-03 20:09:59 +00:00
Robin Dunn
e21e241714 Some missing methods and etc. added
Some minor tweaks and fixes


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-03 19:23:45 +00:00
Vadim Zeitlin
8dbef32aaf removed unnecessary code from wxResourceCache dtor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7675 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-03 17:02:29 +00:00
Václav Slavík
122e8c139e changed wxListMainWindow::m_lines from wxList to wxObjArray --> performance gain
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7674 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-03 16:16:40 +00:00
Vadim Zeitlin
a7798d1ce7 fixed facename comparison inwxFontList::FindOrCreateFont
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7673 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-03 11:03:51 +00:00
Vadim Zeitlin
71462b226d use 3 digits for milliseconds by default in Format
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-03 07:56:26 +00:00
Vadim Zeitlin
1362e5d0a0 wxUSE_ZLIB_H_IN_PATH added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7671 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-03 07:29:12 +00:00
Vadim Zeitlin
3dd8eab441 some mingw32 warnings fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7670 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-03 07:12:20 +00:00
Vadim Zeitlin
792a17440e fixed ToDouble/Long desc
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-03 06:54:15 +00:00
Vadim Zeitlin
2e18172773 minor changes here and there
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-02 22:04:57 +00:00
Vadim Zeitlin
41c3173dde tests for dclick on button
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7667 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-02 22:00:20 +00:00
Vadim Zeitlin
0955d39bd0 ms resolution wxDateTime tests
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7666 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-02 21:57:37 +00:00
Vadim Zeitlin
06ca83c4ee some explanation text in thel ines screen
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7665 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-02 21:56:53 +00:00
Vadim Zeitlin
948f1f2b77 1. fixed bug with the accels in sub menus not working
2. fixed minor bugs in wxCmdLineParser, underscores and digits are now allows
   in the option names
3. made wxGetLocalTimeMillis() public, documented it and other time functions,
   added wxDateTime::UNow(), also "%l" format specificator in
   wxDateTime::Format()
4. fixed fatal bug in wxTimeSpan::Format()
5. fixed nice bug in wxDateTime::Subtract(wxDateTime) which returned the result
   with the wrong sign


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-02 21:48:22 +00:00
Václav Slavík
888b22c897 modified status of Czech translation to DONE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-02 18:25:24 +00:00
Václav Slavík
ae519b8df7 fixed problems with translating titles for wxLogGui/wxLogDialog (no reentrancy danger)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7662 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-01 12:01:50 +00:00
Julian Smart
b024dc9b26 Oops, test for parent being NULL in DoModalShow
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7661 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-30 15:42:15 +00:00
Vadim Zeitlin
057327a687 fix for the previous fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-30 13:42:17 +00:00
Vadim Zeitlin
0e86e26936 unset the dialog as top level window in Destroy(), not in dtor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7659 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-30 13:38:08 +00:00
Jouk Jansen
c17d222122 Committing in .
VMS/GTK update

 Modified Files:
  Tag: WX_2_2_BRANCH
 	wxWindows/setup.h_vms
 ----------------------------------------------------------------------


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-30 12:40:57 +00:00
Julian Smart
741ca84241 Fixed DoShowModal again, to check that the oldFocus object isn't dead.
Added integer handling for wxTextCtrls in wxGenericValidator.
Added virtual function to wxGenericDragImage so it can do _really_ smooth
dragging under app control.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-29 20:28:53 +00:00
Václav Slavík
97d80a31a7 updated Czech catalogue
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-28 18:27:07 +00:00
Václav Slavík
177903e236 wxPrintPaperType::GetName now uses wxGetTranslation to obtain correct paper name
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7655 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-28 18:26:54 +00:00
Václav Slavík
94aaac5f83 list of papers now uses wxTRANSLATE() instead of _()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-28 18:26:46 +00:00
Stefan Neis
2ebbd666d9 Fix for hiding cell edit control that actually is smaller than a cell.
Use CellToRect in to more places instead of doing the same thing by hand.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-28 16:47:06 +00:00
Václav Slavík
0e591a96d8 wxHtmlWindow: fixed passing flags to wxScrolledWindow
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7652 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-28 15:56:38 +00:00
Vadim Zeitlin
e1ce4782d4 added some extra comparison operators to fix Sun CC 5.0 compilation to wxLongLongWx
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7651 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-28 15:49:53 +00:00
Vadim Zeitlin
e554697812 added missing parameters to some GetPageXXX()s
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-28 12:19:35 +00:00
Vadim Zeitlin
2bde25b093 fixed (and documented) wxColourDialog::Create()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7649 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-28 11:12:40 +00:00
Julian Smart
0c3e16933d Altered default wxTextCtrl height; removed wx_msw from cube.cpp;
widened a couple of controls in resource sample; changed a BC++ test
in longlong.h


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-28 07:37:27 +00:00
Ron Lee
09d7c0f79e fix for (re)setting a control to the system default colours
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7647 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-28 03:50:18 +00:00
Julian Smart
8064dd594d Fixed C++ comments, sorry about that.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7646 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-27 19:54:58 +00:00
Ron Lee
b0f0a3bd19 typo fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-27 15:53:09 +00:00
Vadim Zeitlin
b6ab93c400 fixed wxColour::operator!=
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-27 10:27:09 +00:00
Vadim Zeitlin
a750cce7a5 1. added wxFont::GetHFONT() const (GetResourceHandle() is not const...)
2. added GetHfont[Of] convenience macros to msw/private.h
3. wxWindow::GetCharWidth/Height() now use correct font


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7643 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-27 10:22:06 +00:00
Julian Smart
9e677ba35c What I predicted has come to pass :-) wxMSW wxDialog::DoShowModal crashes
when m_oldFocus has been destroyed, so we check the HWND with ::IsWindow.
Also some setup.h, makefile and TIFF library changes for Watcom compilation


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-26 12:02:55 +00:00
Robert Roebling
4d32dae4fe Compile fix.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7641 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-24 14:46:14 +00:00
Robert Roebling
551490e542 Updated changes.txt,
Removed use of Build Root Dir in wxGTK.spec,
  Small correction to tiff code,
  Added more tests (for Peek()) to stream tests
    in typetest sample,
  Fixed bug in wxTextInputStream::ReadWord()


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-24 14:25:00 +00:00
Julian Smart
7aed63fdb7 Fixed docview crash bug when On... functions return FALSE.
Fixed valgen.cpp to cope with strings in wxChoice/wxComboBox.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-24 08:05:21 +00:00
Robin Dunn
1ac341e016 Added wxLog and friends to wxPython
Various odds and ends


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-24 00:28:54 +00:00
Vadim Zeitlin
46f2e76b49 corrected Baltic encoding handling (patch from Nerijus <nerijus@sat.lt>)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7637 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-22 15:10:04 +00:00
Robert Roebling
ed55d1091b Added new TIFF code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-22 08:38:24 +00:00
Vadim Zeitlin
6b59747c47 added a note about new C++ logical operators keywords
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7635 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-22 08:37:54 +00:00
Vadim Zeitlin
c446668e29 fixes for compilers with weird isprint()/isdigit()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-22 08:10:57 +00:00
Vadim Zeitlin
9393e156ef fix for branch 'auto-collapse'
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-22 08:04:54 +00:00
Vadim Zeitlin
00ce683fb0 Sun CC 5.0 compilation fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-22 07:57:43 +00:00
Vadim Zeitlin
da872f02a5 undef inline before redefining it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-22 07:50:54 +00:00
Vadim Zeitlin
26eb0ba5b8 fixed "missing" initial resize of wxMDIChildFrame
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-21 21:10:38 +00:00
Václav Slavík
2ed1896868 added comment about setlocale() behavior
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7629 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-21 18:53:23 +00:00
Julian Smart
1008a84515 Fixed missing hotspot code; fixed misspelling in setup0.h; added missing
consts to wxPoint operators


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-21 14:09:18 +00:00
Vadim Zeitlin
d1016f9826 HP-UX compilation fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7627 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-21 12:12:44 +00:00
Vadim Zeitlin
7669ba3c67 1. wxKeyEvent::GetKeyCode() and HasModifiers() added and documented
2. wxGridCellEditor::IsAcceptedKey() added and implemented
3. no changes in other files (but cvs wants to commit them)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7626 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-21 09:15:59 +00:00
Michael Bedward
3ffdc4cfeb Stupid error in my last commit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-21 09:13:29 +00:00
Vadim Zeitlin
0c25b1bc0a reentrancy fix (extremely ugly, will have to do better soon)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7624 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-21 09:12:42 +00:00
Michael Bedward
8034c36f53 TAB key press at left or right of grid now saves editor value and
hides editor


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-21 09:06:27 +00:00
Vadim Zeitlin
271c9d0c5b added 'show columns info' menu command
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-21 09:03:53 +00:00
Michael Bedward
0a856f043d If grid cursor is at the bottom of a column a return key press will
now save the editor value and hide the editor.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-21 07:47:41 +00:00
Vadim Zeitlin
00f4f2918f add -D_REENTRANT for Alpha compilation as well
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-21 07:24:22 +00:00
Vadim Zeitlin
5d7899a2aa file I forgot to commit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7619 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-21 07:16:42 +00:00
Julian Smart
7e5510c0ad Further BC++ patches
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7618 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-21 07:07:36 +00:00
Robin Dunn
86d60447c3 Added gtk-config to build.cfg
some minor tweaks


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7617 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-21 03:48:31 +00:00
Vadim Zeitlin
ec66f52340 added a note about SetBlinkTime under MSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7616 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-20 21:09:36 +00:00
Julian Smart
3a3377d7bf Fix to wxGenericDragImage inefficiency
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-20 19:35:11 +00:00
Vadim Zeitlin
f7585687b2 don't start label editing when double clicking the item
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7614 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-20 12:45:33 +00:00
Vadim Zeitlin
43bc2aae58 oops, forgot to add
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7613 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-20 11:36:32 +00:00
Vadim Zeitlin
3d66a009ac 1. generic wxCaret fixes
2. wxGTK focus fix
3. wxCaret docs


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7612 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-20 11:35:39 +00:00
Robert Roebling
ddbed9f4d0 Corrected wxWindow::SetCursor().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7611 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-20 10:02:18 +00:00
Vadim Zeitlin
c68a7f32c4 fix for IRIX compilation with gcc (hopefully)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7610 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-20 07:30:55 +00:00
Vadim Zeitlin
5c5978df98 documented Left[Is]Down behaviour and changed the obsolete test in the sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7609 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-20 07:14:39 +00:00
Václav Slavík
c10d06a2bb documented connection with wxFileSystem
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7608 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-19 21:55:24 +00:00
Julian Smart
3e47e5afcf BC++ updates, propery form fix, dialog fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7607 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-19 14:23:14 +00:00
Vadim Zeitlin
b4e9e877bd 1. it is now possible to say ParseFormat("%4Y%2d%2m")
2. hard-coded a rollover date into ParseFormat("%y") - bad, but can't do
   anything better right now


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7606 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-19 11:59:53 +00:00
Vadim Zeitlin
0890fc3629 some HP-UX compiler warnings fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7605 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-19 11:25:02 +00:00
Robert Roebling
8494b2036a Added empty line at the end.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7604 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-19 11:10:17 +00:00
Robert Roebling
f4cabb889c Added more missing "class"s to friend decl.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7603 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-19 11:09:06 +00:00
Robert Roebling
bdbb707f0c Added missing "class" to friend decl.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-19 11:08:29 +00:00
Vadim Zeitlin
c1e56e2c29 allow dragging the divider line outside the window
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7601 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-19 10:21:17 +00:00
Vadim Zeitlin
b09e1f2987 may be resizing finally works now (I am not even sure any more)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-19 08:52:55 +00:00
Vadim Zeitlin
e797f13aca fixed GetMonth/YearStart/End off by 1 bug
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7599 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-19 08:38:43 +00:00
Vadim Zeitlin
b270f6e30e fixes to wxZipInputStream EOF (not) handling
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7598 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-19 08:10:21 +00:00
Vadim Zeitlin
4145aa5c05 forgotten fix for write_append and non existing file
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7597 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-19 08:09:51 +00:00
Julian Smart
b7bcf0138c BC++/Mingw32 patches applied
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-19 08:00:27 +00:00
Vadim Zeitlin
3591a31424 compilation error fixed (see Sun build log)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7595 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-19 07:50:53 +00:00
Vadim Zeitlin
8dad40e19b made GetSize() public
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7594 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-19 07:48:55 +00:00
Vadim Zeitlin
6ceff2c99a fixed problem with PushEventHandler() and OnIdle()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7593 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-19 07:44:35 +00:00
Vadim Zeitlin
f35ae7efb5 1. fixed wxDC::DrawArc() problem with full circles
2. replaced about a dozen occurences of some wxSTIPPLE_MASK_OPAQUE related
   code with a helper class (talk about code bloat...)
3. wxColourDialog parent is set correctly now, other minor fixes there


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-18 21:31:32 +00:00
Robert Roebling
0cf4561f43 Getting rid of CVS conflicts.
Fixed forgotten idle priority value in wxYield().


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7591 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-18 15:58:47 +00:00
Julian Smart
5b22c8f89e Added VC++ IDE tech note. Sorry, I'm not going to dumb it down to plain text...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-18 14:48:08 +00:00
Bart A.M. Jourquin
74cb08107a missing button.h header
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-18 12:19:49 +00:00
Robert Roebling
3e00a662d6 Compile fix (missing include).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-18 09:20:18 +00:00
Robert Roebling
5cc9ffe646 No GTK includes reported by wx-config. I left wxMotif
unchanged.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7587 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-18 08:57:40 +00:00
Robert Roebling
5f53644cbb Fix for ASSERT complaining about a call to SetColumnWidth
in list mode.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-18 08:55:47 +00:00
Vadim Zeitlin
ac82c949d0 1. wxFrame restores focus better
2. fixed _2_ memory leaks in wxGrid::IsCellEditControlShown
3. modified wxGridCellEditor::StartingKey() to accept several more keys
4. fixed (but why is this needed?) bug in wxCalCtrl appearance
5. made it possible to close the log dialog with <Esc> under MSW


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-17 22:44:45 +00:00
Vadim Zeitlin
afa7da4a16 fixed problem with set angle dialog
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7584 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-17 22:39:47 +00:00
Václav Slavík
8ebc8d5d7d updated Czech translations
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7583 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-17 16:31:53 +00:00
Václav Slavík
f333c6e7bb updated wxstd.po
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7582 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-17 16:31:40 +00:00
Václav Slavík
37dc9a7012 made paper names translatable
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7581 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-17 16:31:28 +00:00
Václav Slavík
5208c1aa1e added new platform-independent BMP writing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7580 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-17 16:31:10 +00:00
Vadim Zeitlin
12675983a2 column resizing is still broken :-((
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-16 15:34:21 +00:00
Vadim Zeitlin
aa54dcf52c fixed column resizing when the ctrl is horz scrolled
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7578 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-16 13:56:08 +00:00
Vadim Zeitlin
f5f1197540 added a note about IRIX, another entry for Solaris/wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7577 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-16 13:08:04 +00:00
Stefan Neis
c51147cf23 Avoid invalid update rectangles in wxGrid::BlockToDeviceRect(...)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-15 15:16:15 +00:00
Julian Smart
9be9d2f53d Small mods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7575 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-15 14:10:18 +00:00
Vadim Zeitlin
c3e5348ff8 added dynamic sample to the AC_OUTPUT (bug #79)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7574 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-14 13:09:45 +00:00
Vadim Zeitlin
5f3c23cb12 fixes for erros from bug #78
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7573 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-14 13:07:28 +00:00
Julian Smart
b1f22e19ef Ignore wxTHICK_FRAME in wxWindow constructor: only relevant to frames and
dialogs, interferes with other window styles otherwise.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7572 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-14 09:47:19 +00:00
Vadim Zeitlin
21be423168 oops, fatal MDI bug fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-13 19:07:26 +00:00
Vadim Zeitlin
089ec5295e note about logical ops and DrawText under Windows
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7570 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-13 19:06:47 +00:00
Vadim Zeitlin
845b598c7a caret API do something again even in non Unicode mode
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-13 14:58:15 +00:00
Robin Dunn
cc2a0b0170 some cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-13 03:44:42 +00:00
Robin Dunn
27e4c09614 more build and distrib stuff
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-13 03:34:27 +00:00
Robin Dunn
1dea0a08fe SWIGged code update
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-12 20:19:03 +00:00
Robin Dunn
a0c0d1c333 Added wxSpinCtrl
Added some missing methods and constants
Fixed wxTreeCtrl.HitTest bug
new SWIGged code


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7564 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-12 19:07:29 +00:00
Guillermo Rodriguez Garcia
b3dc3e89a6 When calling SetValue(), the insertion point is set to the beginning,
rather that to the end of the text. wx2.2 will have flags to customize
this behaviour.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7563 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-12 17:14:03 +00:00
Robert Roebling
8e8d1fee57 Corrected wxFFileInputStream as well.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7562 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-12 16:49:55 +00:00
Robert Roebling
a8452a5005 Corrected wxFFileStream to use binary mode.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-12 16:49:12 +00:00
Robin Dunn
492dc50b67 Fix so wxMDIParentFrame is actually shown when Show(TRUE) is called.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7560 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-12 16:34:01 +00:00
Robert Roebling
be1018ee90 Implemented Set/GetTopLabel() in wxMenuBar,
Set int field to new position in slider event.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7559 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-12 11:53:09 +00:00
Robin Dunn
d76f2a46dd some updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7558 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-11 01:52:57 +00:00
Robin Dunn
4320a952c6 gen code update
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7557 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-10 20:30:52 +00:00
Robin Dunn
04ae894cf4 distrib stuff
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7556 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-10 20:30:27 +00:00
Robin Dunn
c63e4e6898 typo fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-10 20:30:01 +00:00
Robert Roebling
f76a45441a Oops. Some uninitialized variables messed up the
colours on various systems.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-10 16:08:10 +00:00
Ron Lee
04e158348e fix for wxBusyCursorSuspender messing with wxIsBusy() state.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7553 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-09 21:15:49 +00:00
Robert Roebling
0f9a3aaea8 Increased version to 2.2.0,
Fixed minor waste in wxSizerItem,
  Changed wxGTK internal timer settings so that
    idle time is really after GTK finished.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7552 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-09 18:46:33 +00:00
Vadim Zeitlin
59277cb364 wxFile::Open(write_append) will create file if it doesn't exist
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7551 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-09 15:49:59 +00:00
Vadim Zeitlin
d26a990438 added tests for circles/ellipses/arcs...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7550 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-09 15:08:27 +00:00
Vadim Zeitlin
174345b445 added test for inverted text
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7549 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-09 14:41:34 +00:00
Vadim Zeitlin
adb176e718 fixed crash on exit in the drawing sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-09 14:35:23 +00:00
Julian Smart
551a706062 Adjusts struct size if there's an error.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7545 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-08 12:06:08 +00:00
Julian Smart
eb5ad261fd Correction
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7544 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-08 11:16:18 +00:00
Julian Smart
fec5a2a4b1 Added new tech note for icon creation/conversion, corrected config.cpp
to include <ctype.h> (necessary if not including windows.h),
corrected comment in mfctest.cpp


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7543 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-08 11:13:56 +00:00
Vadim Zeitlin
a38940ab11 apparently explicit operator=() is needed by Solaris C++ 5.0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7542 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-07 13:12:01 +00:00
Vadim Zeitlin
ab88076643 wxImageList::GetSize() documented and added to wxMSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7541 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-07 12:55:38 +00:00
Vadim Zeitlin
f880e232cc small fixes to MIME mailcap test command handling, more MIME tests in the sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7540 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-07 12:54:32 +00:00
Vadim Zeitlin
fd094b9d81 comment made more clear
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-07 12:53:33 +00:00
Vadim Zeitlin
8beb7b3288 1. fixed default dialog style to make them non resizeable again
2. fixed wxFrame::IsShown() which always returned TRUE before
3. wxWizard now calls TransferDataFromWindow() before calling
   wxWizardPage::GetNext() fixing an obvious bug
4. half-fixed fatal bug in wxDialog::ShowModal() which would crash if the
   top level app window was deleted while the modal dialog was shown


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7538 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-06 22:00:40 +00:00
Julian Smart
e6f3a43816 Changed the code that disabled __WXDEBUG__ to only disable global debug new.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-06 15:42:51 +00:00
Vadim Zeitlin
29f3b96f83 serious bug in wxListBase::DoCopy() fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-06 13:22:51 +00:00
Stefan Neis
f75f6530b0 More changes to SetCurrentCell.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-06 10:35:28 +00:00
Vadim Zeitlin
2bcb5cfd6a added 'Save...' button to the log dialog
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7534 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-06 08:51:21 +00:00
Robert Roebling
758ac86c09 Corrected gdk_draw_bitmap thing.
Corrected wrong libGL.so dependence of libwx_gtk.so.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7533 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-05 16:13:53 +00:00
Julian Smart
09efdbdbdd Added tech note
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-05 13:15:42 +00:00
Vadim Zeitlin
7e446e11e0 added and documented trivial wxDC::GetBackgroundMode(), documented several other missing wxDC functions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-05 10:24:55 +00:00
Vadim Zeitlin
62e6b49c33 crash in OnChar() for empty list control fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7530 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-05 10:16:14 +00:00
Michael Bedward
d9ca264808 Modified wxGrid::SetCurrentCell() to fix problem under wxMSW where
the grid was spending time drawing cells outside the visible area.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7529 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-05 10:04:55 +00:00
Julian Smart
5902841d30 Fixed doc error
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7527 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-03 13:03:13 +00:00
Julian Smart
3639911da7 Replaced C++Builder IDE tech note with up-to-date HTML file
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-03 10:26:42 +00:00
Julian Smart
8a6be78d08 Docs mods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-03 10:22:27 +00:00
Robert Roebling
9f92fb287b Changed release date to 4th June,
Made border around notebook sizer a bit bigger,
    you never know what people do with tabs.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7524 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-03 08:56:33 +00:00
Vadim Zeitlin
d9a54596d5 fixed some compilation warnings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-02 21:12:56 +00:00
Vadim Zeitlin
9aa0f3f84e some warnings fixed for compilation of lib/dll with VC++ 6 in release mode
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-02 20:59:49 +00:00
Robin Dunn
9604ea8a1f SWIGged code updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-02 17:01:26 +00:00
Robin Dunn
9f27c30f49 updates to match C++ grid
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7520 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-02 16:52:25 +00:00
Guillermo Rodriguez Garcia
2b8df44d57 SIF_TRACKPOS didn't appear in mingw until 2.95.2,
so I just #define it if it's missing.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-02 12:46:52 +00:00
Robin Dunn
8731dddafd fix bug where tooltip notifications could generate spin events
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-02 12:41:04 +00:00
Robin Dunn
a95ee79d9c Removed automatic "Magic Event Methods" bindings
Added explicit bindings where needed
other assorted odds and ends


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-02 01:50:43 +00:00
Julian Smart
c1af1ea6b5 Doc fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7516 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-06-01 08:21:37 +00:00
Vadim Zeitlin
089337645a added possibility to view arbitrary images
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7515 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-31 22:27:23 +00:00
Bart A.M. Jourquin
ee4ddd9f0b initialize insertable to TRUE in ctor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-31 14:28:11 +00:00
Vadim Zeitlin
1f15195e08 translate window menu title in MDI parent frame
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-30 20:44:06 +00:00
Vadim Zeitlin
ff05c6bb11 wxStaticLine should now generate mouse messages
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-30 19:41:59 +00:00
Stefan Neis
5681482475 Changed wxGrid::Refresh to not do anything,
modified EndBatch accordingly to still update the grid.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-30 13:08:38 +00:00
Ron Lee
3c6bc198d9 added debug versions of wxBase and wxGtk packages.
made -contrib packages gtk-contrib since they, well.. are
and it will make it simpler to add other ports.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7510 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-29 19:09:55 +00:00
Vadim Zeitlin
04fc6c1725 wxTHICK_FRAME the same as wxRESIZE_BORDER
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7509 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-29 10:04:31 +00:00
Julian Smart
70db8eec06 Doc fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-29 07:37:24 +00:00
Vadim Zeitlin
74008a4cd4 corrected wxFile::Write() return type desc
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7507 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-28 22:09:19 +00:00
Vadim Zeitlin
b6276d5829 wxImageList::Create(width, height) added, as in wxMSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7506 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-28 22:01:21 +00:00
Vadim Zeitlin
eff56bb979 1. added missing const's to wxGrid::CalcXXX(wxRegion& r) fixing compilation
2. put frames with parent into wxTopLevelWindows too


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-28 21:45:00 +00:00
Ove Kaaven
540ad1b39d Save registry string keys correctly in Unicode mode.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-28 20:51:42 +00:00
Stefan Neis
d270402a9f Fixed SetCurrentCell for Motif, removed SelectionToDEviceRect.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-28 14:16:10 +00:00
Stefan Neis
e54334e7f1 Fix for not using precompiled headers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7502 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-28 12:42:18 +00:00
Robert Roebling
d6ce5a908c Made docs about wxTextCtrl::SetValue() precise wrt to modified state.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7501 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-28 08:35:48 +00:00
Robert Roebling
b8ad056e8d wxTextCtrl::SetValue() sets the controls state to unmodified.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-28 08:35:07 +00:00
Vadim Zeitlin
aa680ee1e8 fix for stdin redirection
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7499 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-26 21:54:22 +00:00
Vadim Zeitlin
3d0b89c1ca no changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-26 15:19:43 +00:00
Vadim Zeitlin
5fff5f8a27 added and documented (and using in the sample) wxProcess::CloseOutput()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-26 15:18:07 +00:00
Vadim Zeitlin
bbc7adbd09 added wxDC::ResetBoundingBox(), documented it and CalcBoundingBox() too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-26 12:15:38 +00:00
Bart A.M. Jourquin
45c09d1e66 Improved new GetColumns, based on the old one + smoother database-type conversion and proper field order
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-26 11:18:44 +00:00
Bart A.M. Jourquin
9879663237 Improved new GetColumns, based on the old one + smoother database-type conversion and proper field order
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7494 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-26 11:13:28 +00:00
Vadim Zeitlin
af899cb15b fix warning about virtual function hiding
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-26 10:35:44 +00:00
Vadim Zeitlin
d168273d36 remove Sun CC warning
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7492 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-26 10:30:08 +00:00
Vadim Zeitlin
31fb9a5779 1. stderr redirection seems to work under Windows too (documented new
wxProcess method too)
2. don't show the window of the (console) process in wxExecute if IO is
   redirected
3. implemented wxColourDialog::SetTitle
4. implemented wxGauge95::SetForeground/BackgroundColour()


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7491 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-25 21:54:23 +00:00
Vadim Zeitlin
54d5ffd6c3 stdout redirection for Unix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7490 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-25 18:35:52 +00:00
Vadim Zeitlin
b912a066c2 added APPEXTRA{C|CPP|CXX}FLAGS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-25 18:35:32 +00:00
Vadim Zeitlin
7b235d47c0 fix for wxObjectArray::Clear()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-25 18:34:49 +00:00
Vadim Zeitlin
b0d2cd55b4 patch for bounding box initialization
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7487 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-25 18:29:26 +00:00
Vadim Zeitlin
92963bc943 added missing wxDateSpan methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7486 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-25 14:50:14 +00:00
Unknown (MT)
fbdcfa4c82 Remove frame on a SetMenuBar(NULL)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7485 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-24 23:10:47 +00:00
Robin Dunn
5272b7f059 SciLexer.h from Scintilla is used to get the constants used for all
the lexical states, for setting styles.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7484 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-24 20:39:04 +00:00
Robin Dunn
8c43f741f4 note to specify the version of Scintilla in use
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7483 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-24 20:37:20 +00:00
Václav Slavík
ac27286674 added wxToolTip documentation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7482 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-24 20:35:46 +00:00
Václav Slavík
029bc77adc documented Set/GetToolTip
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7481 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-24 20:35:34 +00:00
Václav Slavík
29afd50360 updated wxListEvent documentation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-24 20:35:22 +00:00
Robin Dunn
0212a4c2aa workaround a bug in SWIG
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-24 20:35:06 +00:00
Robin Dunn
9be0381b20 Some PythonNotes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-24 17:30:38 +00:00
Robin Dunn
37bb827fa9 Added wxDateTime, wxTimeSpan, and wxDateSpan to wxPython.utils.
Added wxCalendarCtrl.

Other tweaks and fixes.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-24 14:57:52 +00:00
Julian Smart
c777c58b76 Some doc tidying
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-24 09:08:03 +00:00
Robin Dunn
133d8d0745 Added DYNAMIC_CLASS macros for wxCalendarEvent
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-24 04:25:41 +00:00
David Webster
ef854828f2 Update module definition for wxOS2 VA 3.0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-24 03:34:14 +00:00
Robin Dunn
96901a6f4c added some missing Scintilla constants for events.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-24 00:56:14 +00:00
Vadim Zeitlin
f998c383d4 minor changes to the sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7472 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-23 22:54:08 +00:00
Vadim Zeitlin
a1777c3e92 fixes for wxExecute with redirection
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7471 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-23 22:50:45 +00:00
Václav Slavík
b91a42d6d9 fixed parsing of HTML tags of the form <tagname\nproperties> + \t parsing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-23 21:09:59 +00:00
David Webster
a61421124a More accelerator work
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7469 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-23 21:00:52 +00:00
Julian Smart
d30143f3cb Misc small mods for WIN16 and making HTB files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-23 18:55:07 +00:00
Julian Smart
77a93d3eb4 defs.h had been altered so only 3 MSW compilers were allowed for WXDLLEXPORT :-)
false removed from dbtable.cpp. WS_CLIPCHILDREN/SIBLINGS added to glcanvas.cpp.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7467 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-23 13:14:29 +00:00
Julian Smart
fcd984f8a1 Motif fixes, distribution script fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-23 12:16:31 +00:00
Robin Dunn
4c25e5b0ba Fixed "Substract" typo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-23 06:31:50 +00:00
Robin Dunn
0126cabac6 Fixed "Substract" typo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7464 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-23 06:23:59 +00:00
Vadim Zeitlin
9047a3c139 fix for crash in wxTreeCtrl::GetSelections() when the tree is empty
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-23 06:01:58 +00:00
David Webster
3844b70dd8 Some more accelerator fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7462 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-22 21:23:58 +00:00
Robert Roebling
04652a15c8 dnd event blocking switched off now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7461 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-22 18:05:24 +00:00
David Webster
77bc12b08f removal of VA #ifdefs aournd delete operators and some additional support for accelerators
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7460 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-22 14:04:14 +00:00
David Webster
fd4afea729 removal of VA #ifdefs aournd delete operators
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-22 14:03:03 +00:00
Julian Smart
7a702aa804 Doc debugging
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-22 13:43:32 +00:00
Vadim Zeitlin
0acd3d9a08 another buglet in ParseDate() fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7457 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-22 13:10:15 +00:00
Vadim Zeitlin
da14645955 better ParseDate() test
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-22 12:53:56 +00:00
Vadim Zeitlin
9bcefc38f1 several bug fixes in ParseDate()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-22 12:35:02 +00:00
Vadim Zeitlin
5469ae1795 add -isystem for gcc on Solaris
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-22 11:14:56 +00:00
Julian Smart
7c777c5c15 Added bc_ide.txt as a tech note; updated readme; added CHM targets for makefiles
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7453 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-22 11:13:10 +00:00
Julian Smart
72ef08c782 Fixed OnSize corruption problem
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7452 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-22 08:28:58 +00:00
Ron Lee
d683b85f75 totally rehashed the build system to be much less monolithic, it's now
possible to build subsets of the available packages and easier to add
new packages in a much more modular fashion.
updated for changes to wxPython.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-22 02:43:31 +00:00
Ron Lee
fc5e41a7ba made Robert's fix for wxBase too, and cleaned a couple of typos
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-22 02:34:17 +00:00
Robert Roebling
1c09143020 setup.h now tests if wx-config is being used and
changes the search path from wx/gtk/.. to
     wx/gtkd/.. when __WXDEBUG__ is defined.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-21 16:17:21 +00:00
Robert Roebling
b9464e8d4e wx-config now defines __USE_WXCONFIG__
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-21 16:15:27 +00:00
Robert Roebling
b4e0cd2a78 Tried to fix problem with events being blocked in the
drop *target* by the global block from the drop
    source.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7447 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-21 13:20:33 +00:00
George Tasker
cf5d275eb8 Fixed problem where if a table had no insertable columns, construction of the insertion statemtent would fail, which then would cause unstable behavior at a later time. Now if Insert() is called and there are no insertable columns, insert will return a failure.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-21 10:49:22 +00:00
George Tasker
c160361dcf Cleaned up some unix compilation problems due to for loops declaring a variable in the for statement
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-21 10:45:29 +00:00
Ron Lee
8ba2c5be88 don't bug out if no .mo files exist
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7444 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-21 03:43:59 +00:00
Ron Lee
aaa42385ce updated PYTHON_DIST for new wxPython location.
added INTL_DIST target for i18n files when --enable-intl is used.
make install now installs any .mo files it finds in locale.
bugfix for make install being a no op with static wxBase.
libs built with __WXDEBUG__ can now be installed alongside libs built without.
locale/Makefile now autodetects which languages are supported when make allpo
is used and added allmo target.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-20 22:17:32 +00:00
Robin Dunn
99f792deea More build/distrib updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7442 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-20 19:25:37 +00:00
Robin Dunn
eb7d6db675 forgot this file in yesterday's STC checkin
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7441 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-20 18:56:04 +00:00
Robin Dunn
fec9970c39 New code from Scintilla and supporting code in STC.
Styles can now have underlines, new indicator types, zoom-in and
zoom-out methods.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7440 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-20 03:25:18 +00:00
Robin Dunn
e1cac7c231 New code from Scintilla and supporting code in STC.
Styles can now have underlines, new indicator types, zoom-in and
zoom-out methods.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-20 03:24:11 +00:00
Robin Dunn
1f5e577084 gave wxTheApp->argv a real set of values
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7438 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-20 00:13:02 +00:00
Ron Lee
9c54b21732 updated for dk -> da too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7437 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-19 23:54:47 +00:00
Ron Lee
569de831ba renamed dk.po -> da.po
dk is the internet tld, but da is the correct
iso639 country code for the locale data


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-19 23:41:41 +00:00
Vadim Zeitlin
8ab9b79aa1 bug fix for some weird combobox behaviour
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-19 22:27:46 +00:00
David Webster
70b6f373b0 coded wxFont!
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-19 18:16:39 +00:00
Robert Roebling
7b271e861b Bumped up version to 2.1.16.
Semi-fixed list ctrl's header again.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-19 18:08:59 +00:00
Vadim Zeitlin
1fd26975c8 SetModal() deprecated
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7432 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-19 14:55:55 +00:00
Vadim Zeitlin
9ced6db5a5 compilation fixes for compilers without PCHs (Julian, what about looking at the daily rebuild pages?)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7431 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-19 14:03:38 +00:00
Vadim Zeitlin
398637f576 fix for the new headers which define _WIN32_WINNT == 0x0500
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7430 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-19 13:59:40 +00:00
Robin Dunn
99d564be95 Removed wxPython from the old location
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-19 06:12:58 +00:00
Robin Dunn
a61639123c more build and distrib stuff
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-19 02:48:17 +00:00
Vadim Zeitlin
e36ee5f7aa 1. fixed toolbar deletion problem (don't leave hole any longer)
2. tried to fix modal dialog handling


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7427 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-18 23:02:49 +00:00
Robin Dunn
42413911cc distrib tools updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7426 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-18 20:07:54 +00:00
Robin Dunn
cc63ae0fcc changed DLL version number
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7425 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-18 19:53:58 +00:00
Robin Dunn
6d9092202d more SWIGged code updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7424 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-18 19:46:31 +00:00
Robin Dunn
14f5789360 fixed a warning
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-18 19:45:48 +00:00
Robin Dunn
e2f3066a9c fixed some warnings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7422 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-18 19:45:04 +00:00
Ron Lee
c74f7c1383 matched param defaults to .h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7421 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-18 16:46:04 +00:00
Julian Smart
1a3cfaf5a6 Various wxMotif fixes. Changed rotate sample to use a wxScrolledWindow
instead of the frame, so it works on wxMotif.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7420 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-18 15:01:52 +00:00
Vadim Zeitlin
0bd879bad6 (re?)added support for params to wxGridCellFloatEditor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-18 12:29:02 +00:00
Julian Smart
7a5a0c9f34 Use hwndOwner in Print/page setup dialogs.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-18 10:05:40 +00:00
Robin Dunn
cabc28c46e Added wxDragImage and demo, (used wxGenericDragImage for both
platforms)

Added demo of changing keyboard handling in wxGrid

SWIGged sources update


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7417 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-17 20:45:27 +00:00
Robin Dunn
a1e181ef4d Added wxDragImage and demo, (used wxGenericDragImage for both
platforms)

Added demo of changing keyboard handling in wxGrid

SWIGged sources update


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-17 20:39:47 +00:00
Robert Roebling
1b51ff0849 Added a couple of const to == and != operators.
Removed no-flicker hack which seems to be a
   problem on Sun.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7415 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-17 20:07:24 +00:00
Vadim Zeitlin
a5fc62d05d regenerated
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-17 17:24:20 +00:00
Vadim Zeitlin
efcd017c71 attempt for a Solaris compilation fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7413 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-17 17:22:21 +00:00
Vadim Zeitlin
c449ac8125 don't overwrite the initial part of config.log when checking for VPATH
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-17 17:19:16 +00:00
Julian Smart
797aa4038f wxMSW & wxMotif: added const to GDI object ==, != operators
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-17 12:11:17 +00:00
Julian Smart
10b371fa0e Typos corrected.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-17 11:02:53 +00:00
Vadim Zeitlin
902153ef4a wxGridSizer demo added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-16 15:10:24 +00:00
Jouk Jansen
3ce78ed297 Committing in .
Small problems/warnings solved:
  grid.cpp contained non-reachable code
  parser.y contained definitions for Alpha/True64 which should not be included
     for Alpha/VMS.

 Modified Files:
  Tag: WX_2_2_BRANCH
 	wxWindows/src/common/parser.y wxWindows/src/generic/grid.cpp
 ----------------------------------------------------------------------


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-16 11:30:25 +00:00
Robin Dunn
adf72aeaf7 more updates for new directory structure
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-16 05:20:58 +00:00
Michael Bedward
5b0d059b3e Added Auto-size cols option to the View menu
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-16 03:25:16 +00:00
Robin Dunn
015e85cdf7 Moved and reorganized wxPython directories
Now builds into an intermediate wxPython package directory before
installing


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7403 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-16 02:07:32 +00:00
Václav Slavík
e0c1bcc8f4 fixed rendering of underlined text (the line may be bolder than 0 now)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-15 20:31:27 +00:00
Vadim Zeitlin
c866dfa40c vCard writing tests
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7401 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-15 16:05:32 +00:00
Vadim Zeitlin
53b3fe94d5 DEC OSF/1 entry added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-15 14:02:51 +00:00
Vadim Zeitlin
be8e2100c1 fix for yacc compilation on Alpha
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7399 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-15 12:26:13 +00:00
Václav Slavík
34de32c717 modified HHP/HHC parser so that page names may contain &entities;
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-14 20:02:34 +00:00
Václav Slavík
5e22259222 removed wxDC::m_scaleFactor (never used, had random value)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7397 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-14 17:32:36 +00:00
Václav Slavík
d3c3c062d9 removed m_scaleFactor from PS printing (had random value)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7396 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-14 17:31:34 +00:00
Václav Slavík
f6f9b93b17 replaced deprecated use of wxPostScript ctor by the version that uses wxPrintData
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-14 17:31:18 +00:00
Vadim Zeitlin
f5ea644170 some vCard test code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-14 14:46:09 +00:00
Ron Lee
5d301221bc more proofreading touchups :)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7393 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-13 17:45:38 +00:00
Stefan Neis
fbbfc840a4 Removed #pragma interface/implementation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-12 22:18:37 +00:00
Michael Bedward
d66093c7b6 Check for multiple calls to wxGrid::CreateGrid
Changed number format for wxGridCellFloatEditor from f to g


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7391 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-12 11:05:30 +00:00
Vadim Zeitlin
aa59afd1ea wxFTP uploading tests
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-12 10:37:49 +00:00
Robin Dunn
029713d7e1 removed wxPython module
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-11 21:15:02 +00:00
Stefan Neis
fc3e2a3a66 Changed selection behaviour: Current selection will not be removed
_only_ if Ctrl is down when clicking.
Untabified.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-11 19:56:51 +00:00
Robin Dunn
44faee407c added grid sizers
changed some build configurations


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-11 19:30:19 +00:00
Vadim Zeitlin
08392f16cc bug in ~wxOutputFTPStream which prevented multiple uploads fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7384 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-11 13:03:59 +00:00
Vadim Zeitlin
1f5e4b9004 fix for the fix for Centre()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7382 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-11 11:17:42 +00:00
Vadim Zeitlin
7162312f78 a fix for Centre() to always use the top level parent
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7381 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-11 11:05:04 +00:00
Vadim Zeitlin
9b9d5355c8 some more tbar tests
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-10 23:28:03 +00:00
Vadim Zeitlin
364de90c91 fix for the stat bar positioning
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7379 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-10 23:27:33 +00:00
Karsten Ballüder
548812d9af Updated from Mahogany source
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-10 20:00:53 +00:00
Robert Roebling
bf49fbcff9 Added wxImage:Copy()
Added first 30% of wxImage::Paste()


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7377 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-10 18:17:53 +00:00
Julian Smart
804a3434d6 Dialog Editor corrections, wxListBox::GetSelections correction
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7376 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-10 17:39:35 +00:00
Julian Smart
5a6d3ec3b1 DrawIcon correction for WIN16
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7375 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-10 13:21:24 +00:00
Julian Smart
dde04b1546 Corrected DrawIcon to take into account different icon sizes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7374 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-10 12:11:39 +00:00
Vadim Zeitlin
5c06d1b014 make -> nmake for VC++
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7373 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-10 12:02:24 +00:00
Vadim Zeitlin
c17cc4a96f owner drawn buttons change appearance when double clicked
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-09 21:18:19 +00:00
Vadim Zeitlin
a58b3aa909 1. fixed thumb track/release events for positions > 65536
2. fixed (untested) wxSpinCtrl::GetPosition()


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7371 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-09 21:11:30 +00:00
Vadim Zeitlin
8dbbdfd06f serious bug in KeyExists() fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7367 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-08 22:49:40 +00:00
Robert Roebling
fb5ac85a06 Made a few helper functions public.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7366 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-08 11:39:05 +00:00
Bart A.M. Jourquin
ed62f512c0 include dcscreen.h and settings.h for gcc
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7365 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-08 08:12:37 +00:00
Vadim Zeitlin
cdde63f535 1. buttons now generate double click events
2. double clicking in the tree ctrl generates an activate event
3. bug with hidden listbox mysteriously being shown fixed
4. tried to adjust the checkbox size


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-07 20:35:00 +00:00
Ron Lee
6b958cfc0b update for changes to wxPython
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-07 19:29:15 +00:00
Robert Roebling
8e1a0be217 Added and documented wxImage::Mirror() and wxImage::Rotate90().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-06 17:30:50 +00:00
Robert Roebling
4a18b95556 Added docs for new wxImage constructor.
Began docs for grid sizers.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-05 20:17:41 +00:00
Robert Roebling
76dfc86313 Add possibility to create a wxImage from
static data (or data on the stack) without
    using the heap.
  Tried to fix the crash-all-apps problem
    reported in the list.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7359 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-05 19:21:55 +00:00
David Webster
5c89255496 Some DC and Statusbar fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-05 19:07:28 +00:00
Ron Lee
76727e0cbf typo fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7356 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-05 15:55:11 +00:00
Robin Dunn
366e627490 Added wxTipProfider and friends
Tweaked wxGrid a bit.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-05 15:06:55 +00:00
Robin Dunn
61471de76f Methods to change the cell highlight colour
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-05 15:00:00 +00:00
Julian Smart
10c16e31a6 Fixed sash window colour (highlight wasn't showing up); Dialog Editor fix
for space distribution


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7351 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-05 10:01:19 +00:00
Stefan Neis
64561c3308 Fixed cell highlighting for disabled grid lines.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-05 09:43:29 +00:00
Ron Lee
42ab7508e8 workaround for one gtk Combo horror
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7349 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-05 08:10:50 +00:00
Robin Dunn
ddc0b275b3 fix for when gridlines are disabled. something still needs to be done
to crrectly redraw after the cell highlight moves.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-04 19:22:55 +00:00
Robin Dunn
36ce8f44db added ability to disable gridlines in the sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-04 19:09:30 +00:00
Bart A.M. Jourquin
fa3a64d1ad more info fetched in GetColumns
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7346 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-04 15:44:39 +00:00
Bart A.M. Jourquin
af9bf0bc25 typedef struct error fixed for bcc
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-04 12:42:58 +00:00
Bart A.M. Jourquin
d55da698a8 new GetColumns() members
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-04 12:19:28 +00:00
Vadim Zeitlin
d70b1ce4d2 test for array sorting added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-04 11:52:32 +00:00
Vadim Zeitlin
5fe87ba09f assert when sorting wxArrayString twice fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-04 11:42:51 +00:00
Ron Lee
758a4bb5a6 added comment about validators and SetValue(FALSE)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-03 17:01:47 +00:00
Ron Lee
806b8a2301 typo fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7340 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-03 17:00:29 +00:00
Vadim Zeitlin
f96ed10a83 trying to fix a (spurious) memory leak report
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7339 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-03 11:06:56 +00:00
Robert Roebling
da131498e8 Fixed colour buglet in wxListCtrl.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7338 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-02 16:19:05 +00:00
Robert Roebling
c518860f60 Test for wxST_NO_AUTORESIZE in controls sample.
Add lots of code to change the (German) comma in
    floating point number string in Postscript
    code to ".".


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7337 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-02 15:34:14 +00:00
Vadim Zeitlin
066b2a4c3e 1. fixed fatal bug in SetImageList()
2. tried to make header resizing work with horz scrolling - it still doesn't


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7336 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-02 14:47:03 +00:00
Vadim Zeitlin
69400134a8 added wxLogWindow::OnFrameClose()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-02 07:52:35 +00:00
David Webster
5eabe5bbbf Statusbar updates.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-02 03:51:51 +00:00
Robert Roebling
dc3f2c920f Fixed wxNotebook::RemovePage(),
Made modal dialogs children of wxApp->GetTopWindow() if
    no parent is given.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7333 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-01 20:20:16 +00:00
David Webster
3d3cbc05f6 Changes to DC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7332 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-01 19:36:32 +00:00
Robert Roebling
076e41016d Tried to fix problem with wrong fonts in tool tips.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7331 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-01 19:04:30 +00:00
Ron Lee
cd73d539f6 fixed combo.h -> combobox.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7330 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-01 18:55:23 +00:00
Vadim Zeitlin
421da573e5 added wxFileConfig::SetUmask()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7329 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-01 13:40:00 +00:00
Václav Slavík
9faba833a2 fixed memory leak in modules list (devik's patch)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7328 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-01 13:08:56 +00:00
Ron Lee
4401790cca fix to correctly adjust growable bits of FlexGridSizer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7327 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-01 13:08:11 +00:00
Vadim Zeitlin
efe67f809f corrected alignment of the descriptions in the Usage() message
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-01 12:31:11 +00:00
Vadim Zeitlin
6b0b085ef4 added wxConstCast to fix compilation error
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7325 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-30 22:20:06 +00:00
Vadim Zeitlin
0ca080a91b give wizard buttons standard ids (wxID_FORWARD)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-30 16:29:27 +00:00
Vadim Zeitlin
01f39d1f1a bug recently introduced in wxWizard::GetPageSize() fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7323 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-30 16:15:18 +00:00
Julian Smart
0e950afdf3 BC++ fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7322 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-30 16:05:24 +00:00
Julian Smart
da95cfa91d Chnaged name for text sample with BC++
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7321 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-30 16:02:52 +00:00
George Tasker
0187c87a03 Removed semicolon from the end of DECLARE_EVENT_TABLE() lines that prevented BC5 from compiling this sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7320 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-30 15:30:05 +00:00
George Tasker
bb5aa6e588 TARGET= line said CONTROLS instead of TEXT
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-30 13:28:29 +00:00
Robin Dunn
478e209df5 tweaks and code updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-29 18:34:13 +00:00
Vadim Zeitlin
a2b28e922b don't use wxFile::Eof() (for the reasons explained in the docs now :-) in wxTextFile - this allows it to be used with FIFOs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-29 18:07:33 +00:00
Robert Roebling
498db281b5 Set wxGTK's GTK idle priority back up to 0,
wxGTK's frame's toolbar is now in m_children again,
    as wxFrameBase's idle logic and the update UI
    code based on it require that.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-29 16:03:42 +00:00
Robin Dunn
2442422672 More STC fixes. The demo now shows Calltips and AtuoComplete
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-29 05:18:40 +00:00
Robin Dunn
6e96414894 More STC fixes. Calltips and AutoComplete work now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-29 05:17:21 +00:00
Robin Dunn
91c93b48e9 Fixed FullPaint for brace matching
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7313 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-29 02:45:22 +00:00
David Webster
1f9c607e98 Some framework updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-28 21:28:04 +00:00
Robin Dunn
9f0e1cfc63 Another off-by-one error fixed in STC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-28 17:20:58 +00:00
Vadim Zeitlin
9215f35ef8 small fix to the code I just commited
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-28 14:19:47 +00:00
Vadim Zeitlin
d7030ac6aa added and documented wxWizard::SetPageSize()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7309 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-28 14:06:33 +00:00
Bart A.M. Jourquin
9de1150e2d Add support for Virtuoso
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-28 13:45:52 +00:00
David Webster
89ee194efd static data members cannot be redeclared static in the cpp file under VisualAge, it already knows that it is static
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-28 12:59:22 +00:00
David Webster
4cf39e614a Virtual function hiding suppression
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-28 12:45:20 +00:00
Vadim Zeitlin
23cf28b3db made dnd cursors/icons slightly more usable (and much more documented)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-28 12:45:15 +00:00
Julian Smart
61dfd2bea1 Win16 fixes (incl. slider not sending messages, text ctrl not showing consistent
colours


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-28 09:49:32 +00:00
Robin Dunn
647455ee0f various tweaks, fixes, and doodads
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7303 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-28 06:49:26 +00:00
Robin Dunn
efecda0bf7 Some wxStyledTextCtrl bugfixes
Merged in new Scintilla sources

Added new methods to wxStyledTextCtrl to match new Scintilla capabilities.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-28 06:37:53 +00:00
Vadim Zeitlin
21aff0fe10 corrected bug with m_selection not being initialized in CreateGrid() and SetTable()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-28 05:50:11 +00:00
Vadim Zeitlin
2073bb3d4d compilation fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-28 05:37:19 +00:00
Vadim Zeitlin
9e13e99d6d wxUSE_UNICODE set to 0 by default, added wxUSE_WCHAR_T
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7299 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-28 05:36:24 +00:00
Vadim Zeitlin
4f96bc6cb6 use CRT in DLL for wxBase too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-27 20:51:11 +00:00
Vadim Zeitlin
4dbc8006b4 added test for wxDateTime TZ/DST bug
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-27 20:46:55 +00:00
Vadim Zeitlin
007d1132e2 added test for combo/focus bug
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-27 20:45:35 +00:00
Vadim Zeitlin
df8442a339 fixed problem with help text being left in the status bar
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-27 20:42:09 +00:00
Vadim Zeitlin
b12ce2ff6d attempts to fix the proplist crash - fruitless
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-27 18:03:34 +00:00
Vadim Zeitlin
071bb1283a some more convenience functions/wrappers (all inline, cross-platform)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-27 18:02:48 +00:00
Julian Smart
7322bbe14e Further non-PCH fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7292 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-27 17:46:35 +00:00
Julian Smart
19c9086b55 Added missing brush.h includes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7291 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-27 17:41:29 +00:00
Robin Dunn
7a618981ce Made the DLL load lots faster by specifying that other DLLs it depends
on are to be loaded on demand.  The is experimental, but it works for
wxPython.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-27 16:46:55 +00:00
Robin Dunn
fc2518abb5 some minor tweaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-27 16:41:48 +00:00
Vadim Zeitlin
5eaa587e28 don't wxLogWarn() about missing strings, but just wxLogDebug() them
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-27 15:44:17 +00:00
Robin Dunn
24e1c5fbb2 ifdeff'd out the region checking code in DrawAllGridLines
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7287 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-27 15:26:50 +00:00
Vadim Zeitlin
1a0e95d600 documented ReadLine/Word() and SetStringSeparators()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7286 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-27 15:09:38 +00:00
Václav Slavík
3e7b695396 it's replaced by it is, 'll by will
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-27 14:33:00 +00:00
Bart A.M. Jourquin
77836a61b3 Adding support for OpenLink driver on MSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7284 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-27 12:27:22 +00:00
Bart A.M. Jourquin
a99c0d5331 add support for SQL Server with OpenLink driver for Unix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-27 11:37:47 +00:00
Unknown (MT)
4aba0fc00a DLLEXPORT wxStatusBar
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-27 04:40:31 +00:00
Vadim Zeitlin
63e26a7756 1. disabled WS_EX_CONTROLPARENT as I don't know how to work around it otherwise
2. corrected assignments to non-const references


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-26 20:53:19 +00:00
Julian Smart
a5b3c8eaae Fix for disabled controls
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-26 16:39:27 +00:00
Vadim Zeitlin
c513dcd1dd don't even try running Unicode programs under Win9x
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-26 14:17:07 +00:00
Julian Smart
f8cc27023e Fixed assert problem due to radiobox being clicked.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-26 13:46:13 +00:00
Vadim Zeitlin
01e92d1232 patch from Kristjan Jonsson <kj@raunvis.hi.is> to wxCheckBox::DoGetBestSize()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-26 12:49:07 +00:00
Julian Smart
ac41c5e183 Small fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-25 19:23:55 +00:00
Robin Dunn
c4ad8c9c3a Some final tweaks prior to release
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7275 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-25 17:57:29 +00:00
Robin Dunn
9bc38e1e0c Some final tweaks prior to release
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-25 16:46:45 +00:00
Julian Smart
2ba791ada8 Fixed design flaw in splitter window whereby you couldn't have a sash without
a border. Fixed sash layout window bug that didn't erase old sash on resize.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-25 14:35:58 +00:00
Bart A.M. Jourquin
37aba5df39 support of Sybase ASE 11
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-25 13:33:31 +00:00
Vadim Zeitlin
547b668c7b fix for ugly code doing undefined things to wxF(F)ile
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-25 07:07:56 +00:00
Vadim Zeitlin
041bc561e8 adjust spacing and calculate layout correctly for icons larger than 32x32
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7270 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-25 07:03:41 +00:00
Julian Smart
9d98a27ad6 More Unicode fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-25 06:03:12 +00:00
Vadim Zeitlin
e54cfe2b28 fix for Insert() with tear off menus
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-24 19:50:48 +00:00
Vadim Zeitlin
300f993794 fixes for IsOnline() and IsAlwaysOnline()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7267 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-24 19:49:27 +00:00
Julian Smart
510336b11a Fixed bad file
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7266 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-24 18:34:29 +00:00
Julian Smart
161973e94e Fixed bad file
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-24 18:33:50 +00:00
Julian Smart
ce006a8f2b Trying to fix corrupted GIFs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-24 18:18:05 +00:00
Guillermo Rodriguez Garcia
cdc6bea96e Removed unused variable
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7263 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-24 16:14:24 +00:00
Julian Smart
640fcfb074 Added the odd 'the'
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-24 14:35:20 +00:00
Vadim Zeitlin
6c8a91b333 added and documented wxCHECK_VERSION
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-24 14:32:10 +00:00
Václav Slavík
40a9876e4f minor language change
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-24 13:37:29 +00:00
Václav Slavík
a8aff7b454 a hack to workaround missing wxBuffer in wxBase/Unix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-24 13:37:22 +00:00
Václav Slavík
1a77ecaae2 moved wxDebugMsg, wxFatalError, wxError out of #if wxUSE_GUI
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7258 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-24 13:37:14 +00:00
Václav Slavík
d6a1ccea22 added APPEXTRADEFS to .cpp, .c rules (makes tex2rtf compile with wxBase)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-24 13:37:07 +00:00
Robin Dunn
59c777d597 build and distrib things
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7256 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-24 05:09:12 +00:00
Robin Dunn
caf1045491 build and distrib things
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-24 04:44:39 +00:00
Václav Slavík
6d2df48070 VFS -> virtual file system expansion; fixed typos in fs.tex
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-23 19:07:42 +00:00
Václav Slavík
4a969a50f3 documented wxNotebook style flags
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7253 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-23 19:01:38 +00:00
Václav Slavík
b2720efe88 fixed typo causing REF NOT FOUND
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-23 19:01:27 +00:00
Václav Slavík
a1f822476a added png files to DATAFILES
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-23 19:01:22 +00:00
Stefan Neis
2dce793e22 Added #define to resolve strcasecmp/stricmp issue under OS/2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7250 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-23 16:35:06 +00:00
Stefan Neis
2c1bc3a7fa Added define needed by EMX.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7249 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-23 16:24:26 +00:00
Stefan Neis
ed93eb78ec Added include for non-precompiled headers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7248 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-23 16:23:17 +00:00
Julian Smart
3049cbeb6a Some doc corrections
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-23 15:53:30 +00:00
Stefan Neis
4f0a1b07e6 Changed MM_DELETEITEM to MM_REMOVEITEM so reinserting is possible.
This possibly created a memory leak?


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7246 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-23 14:26:06 +00:00
Julian Smart
f9a07d0026 Attempts to make it compile in Unicode mode
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7245 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-23 12:39:45 +00:00
Vadim Zeitlin
c20c8cb95d a demo for wxGTK bug added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7244 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-23 08:56:36 +00:00
Vadim Zeitlin
d05e8f3f5c wxNotebook::RemovePage() now only gives critical assert failures instead of crashing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7243 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-23 07:06:15 +00:00
Vadim Zeitlin
c72dfe98dc unused parameters taken inside WXUNUSED()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-23 06:53:19 +00:00
Vadim Zeitlin
d298a528f4 gtk_pizza_adjustment_changed() unused, ifdef'd out
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-23 06:51:04 +00:00
Vadim Zeitlin
5c70756a8f added that wxSP_HORIZONTAL is not supported in wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7240 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-23 06:48:09 +00:00
Vadim Zeitlin
e48b7d7c05 1. fixed typo in filelist.txt
2. some DLL makefiles/compilation/linking fixes


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7239 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-22 21:24:45 +00:00
Stefan Neis
80b2a27b78 Fixed wxMenuItem::Enable.
Added unique IDs to all menus (using a new static member of wxMenu).
Use wxWindow's ID as menu item ID seen by OS/2.
Rewrote wxMenu::DoInsertOrAppend which now uses the MENUITEM of the
      submenu or menu item which already contains most of the needed
      informations (especially the ID!)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7238 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-22 18:05:56 +00:00
Julian Smart
0fa7b0e3e5 Dialog Editor bug fixes, old resource conversion, additional layout helpers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7237 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-22 14:41:06 +00:00
Julian Smart
076d7d4005 Fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7236 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-21 19:17:34 +00:00
Julian Smart
f9bcbc2e9c Added a fix to taskbar; minor mods to help controllers; added justification
options to wxButton and wxBitmapButton


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7235 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-21 19:15:49 +00:00
Julian Smart
6917fd5dee Added some wxBU_... justification styles (WIN32 only)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7234 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-21 19:14:46 +00:00
Robin Dunn
50b5f614b9 some more demo tweaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7233 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-21 18:02:48 +00:00
Robin Dunn
b2531949f3 Put the control's value in the event object for EVT_TEXT_ENTER
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-21 17:43:11 +00:00
Robin Dunn
01fa0d6d0f Version number in the DLL filename
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7231 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-21 17:38:48 +00:00
Robin Dunn
f00772c92e A clarification in the docs for a wxPython method.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-21 17:35:36 +00:00
Robin Dunn
ebdaf2dec8 Fixed a missing parameter in wxStyledTextCtrl::GetLastChild
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7229 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-21 17:16:35 +00:00
Robin Dunn
cf55f9ed7e Added line folding to the STC demo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7228 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-21 17:14:48 +00:00
Robin Dunn
f70cba4b45 fixed some DOS/Unix line-terminator confusion in the source files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-21 16:44:19 +00:00
Guillermo Rodriguez Garcia
9a993e53d7 Reverted recent WinMain changes due to incompatibility with the default
WinMain declaration when windows.h was being included from other headers
(compilers thought that we were trying to overload a C function and aborted
compilation of the library)

Current status is: For __WXMSW__ only, and only if WXUSINGDLL, this file
#includes <windows.h> (and then "wx/msw/private.h") and declares WinMain
correctly (matching the signature in <windows.h>).

This change does not affect non-DLL builds.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-21 15:09:51 +00:00
Bart A.M. Jourquin
aad4335f6b Add support for Sybase 11
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7225 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-21 10:15:03 +00:00
Robin Dunn
017582cd23 More STC fixes and tweaks.
Added another STC demo for wxPython.  This one sets up an editor with
the Python lexer and a bunch of styles.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7224 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-21 09:14:06 +00:00
Robin Dunn
156cb8c2e4 More STC fixes and tweaks. (Try Ctrl-KP_plus and Ctrl-KP_minus for a
really COOL feature that's no longer broken on MSW)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7223 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-21 09:09:37 +00:00
Robin Dunn
07b1aad30f generated code update
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7222 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-21 05:00:51 +00:00
Robin Dunn
9a92e83940 demo adjustments
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7221 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-21 04:59:19 +00:00
Robin Dunn
b261e3335a More wxStyledTextCtrl fixes, and updates.
I'm also trying to use the C++ class definitions in the header
directly for SWIG/wxPython instead of a cleaned up simplified version
like I usually do.  So far so good.

Some file name changes


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-21 04:48:14 +00:00
Robin Dunn
f0d481f8fe More wxStyledTextCtrl fixes, and updates.
I'm also trying to use the C++ class definitions in the header
directly for SWIG/wxPython instead of a cleaned up simplified version
like I usually do.  So far so good.

Some file name changes


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7219 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-21 03:33:17 +00:00
Robin Dunn
e920d72d4a More wxStyledTextCtrl fixes, and updates.
I'm also trying to use the C++ class definitions in the header
directly for SWIG/wxPython instead of a cleaned up simplified version
like I usually do.  So far so good.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7218 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-21 03:30:24 +00:00
Robin Dunn
2512232672 fixed off-by-one problem in pinting of the selection area
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7217 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-20 18:29:44 +00:00
Robin Dunn
51422a89ac changed the radius used on the rounded rectangle
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7216 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-20 07:39:43 +00:00
Robin Dunn
140601fe00 Added some missing identifiers, changed some constants to match Scintilla
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7215 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-20 07:39:20 +00:00
Robin Dunn
a1a43473a6 Added a typemap that converts strings to wxColour objects either using
the colour name or a string of the format #RRGGBB

Started the wxStyledTextCtrl Python demos

Other assorted tweaks and fixes


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-20 07:37:58 +00:00
Robin Dunn
9b4c5d5a21 Fixed SetFonts methods to properly accept a Python list for the sizes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7213 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-20 07:34:04 +00:00
Julian Smart
d72d009d64 Replaced wxMotif.spec with clone of wxGTK one (old one didn't work, apparently)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-19 14:38:03 +00:00
Julian Smart
a5940b398c Added tech notes on contributing and on making RPMs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7211 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-19 14:36:16 +00:00
Stefan Neis
5498f96bfe Renamed IsCellEditControlDisplayed() to IsCellEditControlShown().
Replaces some more IsCellEditControlEnabled() by IsCellEditControlShown().


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7210 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-18 15:14:53 +00:00
Julian Smart
9bafeae845 Compile fix to grid.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7209 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-18 14:00:00 +00:00
Vadim Zeitlin
c3d12e0433 fixed bug in AddRoot() which wasn't refreshing everything properly and so a tree without children wasn't displayed properly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7208 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-18 13:44:48 +00:00
Julian Smart
a94d44b9b7 Some updates; simple wxHTML/external HTML controllers now have DisplaySection(const wxString&).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7207 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-18 11:13:16 +00:00
Stefan Neis
fa1b3a43cc Added IsCellEditControlDisplayed() and use it from SetCellValue.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7206 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-18 10:51:38 +00:00
Julian Smart
0a47db39df Added wxCHMHelpController, updated help demo. Added DisplaySection(const wxString&)
to wxHelpControllerBase. Corrected some Dialog Editor bugs.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-18 10:30:25 +00:00
Vadim Zeitlin
9d62ffe24a fixes for dialogs whose parent is wxMDI<whatever>Frame
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7204 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-18 09:47:09 +00:00
Vadim Zeitlin
88c3e369b9 forgot to commit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7203 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-18 08:41:29 +00:00
Vadim Zeitlin
f908d9c1ea test for SetEditable() and wxTE_PROCESS_ENTER added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7202 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-18 08:41:06 +00:00
Vadim Zeitlin
1b6220e1e1 wxMDIChildFrame::SetTitle() works
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7201 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-18 08:24:04 +00:00
Vadim Zeitlin
86d43dcfc0 test for GetLastPosition() added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-17 22:54:57 +00:00
Václav Slavík
3a48624f10 wxGTK-only fix for WindowMaker redraw problem in wxLogDialog::OnDetails
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7199 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-17 22:44:27 +00:00
Vadim Zeitlin
7354522239 added and documented wxDllLoader::GetDllExt()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7198 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-17 22:44:23 +00:00
Vadim Zeitlin
b8be5a9f03 added and documented wxString::StartsWith()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7197 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-17 17:30:01 +00:00
Vadim Zeitlin
897e170014 wxRadioBox now generates the EVT_FOCUS_SET/KILL events (tests for this added
to the controls sample)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7196 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-17 16:11:16 +00:00
Julian Smart
23373d8e9b Now creates wxBitmapButton from resource even if can't find the bitmap.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7195 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-17 14:06:48 +00:00
Vadim Zeitlin
9d7ec6e5d8 small typo fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7194 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-17 14:04:38 +00:00
Bart A.M. Jourquin
4536c57837 removing SetNumberOfColumns()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7193 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-17 13:52:53 +00:00
Julian Smart
32ca12e65e Fixed bug in helpctrl.cpp (testing for m_Config); made old-style HTML help
optional so will compile on MSW


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7192 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-17 09:56:16 +00:00
Julian Smart
ad2fbd102d Removed a memory leak in fs_zip.cpp; trivial formatting in helpdata.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7191 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-17 09:28:18 +00:00
Václav Slavík
c5da51bcb3 updated
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7190 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-17 08:14:56 +00:00
Václav Slavík
9980663066 fixed compilation bug
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7189 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-17 08:14:41 +00:00
Robin Dunn
50963011c2 updates for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7188 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-17 06:25:47 +00:00
Robin Dunn
9bf69b7bb5 more changes to the demo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7187 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-17 04:25:48 +00:00
Vadim Zeitlin
833a6790ad 1. corrected some asserts/crashes in controls
2. added test for SetValue() in text


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7186 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-17 00:01:16 +00:00
Vadim Zeitlin
59d3027c0c 1. wxTextCtrl::SetValue() moves the cursor to the end of text (as in GTK)
2. bug in wxThread::Delete() when the thread hadn't been staretd fixed
3. setting font for radiobox now works immediately (you had to invalidate
   the window manually, e.g. by covering it with another one, before)
4. added and documented wxConstCast() and wxStaticCast()
5. attempts to make wxFontEnumeraotr::EnumEncodings() work under MSW


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7185 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-16 23:58:50 +00:00
David Webster
831026c188 Fixes for the outstanding errors in minimal.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7184 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-16 21:31:58 +00:00
Stefan Neis
231237044b Updated to current API.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7183 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-16 19:34:22 +00:00
Stefan Neis
eb24f2e86d Fixed Scrollbar handling.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7182 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-16 16:56:49 +00:00
Vadim Zeitlin
7bdff45316 1. fixed assert failure/crash when clicking in empty checklistboxes
2. wrote wxBMPHandler::SaveFile()
3. fixed stupid bug in handling DDE commands in wxMimeTypesManager


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7181 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-16 00:19:37 +00:00
Ron Lee
6f3340ff6e reverted some earlier changes nuked by RR fixing the same problem -- only differently, breaking compilation again
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7180 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-15 20:37:33 +00:00
Ron Lee
ad41d52d22 s/menuString/menuLabel/ in wxMenuBar::FindMenuItem to fix bug similar to that in gtk version
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7179 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-15 19:38:40 +00:00
Ron Lee
8518f82156 bugfix for gtk wxMenuBar::FindMenuItem to strip special chars before comparison
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7178 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-15 19:30:38 +00:00
Robert Roebling
a053a88994 Correction to minimal size of wxSizers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7177 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-15 17:35:24 +00:00
Julian Smart
ae85cb4b2c Changed names of image-related VC++ project files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7176 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-15 16:40:05 +00:00
Robert Roebling
26d865b08d TODO updated.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7175 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-15 11:26:55 +00:00
Brian Smith
8f2a1b9c01 Added Stefan's fix for messages being incorrectly ignored.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7174 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-15 10:26:25 +00:00
Brian Smith
18d014e3ed Added WinMessageBox() code, mainly from the Windows version.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-15 10:25:08 +00:00
Robert Roebling
dc4ab3c264 Made tex2rtf compile again,
Added wxSizer::SetMinSize() (documented)
  Added wxSizer::SetItemMinSize()


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7172 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-15 09:20:56 +00:00
David Webster
1d0430ce13 VA 3.0 cannot utilize the _Export macro in this configuration
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7171 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-15 00:38:35 +00:00
Vadim Zeitlin
85c9db78f3 updated to test combo box events
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7170 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-14 22:40:07 +00:00
Vadim Zeitlin
c617e0de6b send key up/down events too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7169 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-14 22:38:51 +00:00
Vadim Zeitlin
e10b3395bc fix for the fix for HAVE_THREAD_PRIORITY_FUNCTIONS detection
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7168 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-14 19:46:35 +00:00
Vadim Zeitlin
9382d73538 fixes for HAVE_THREAD_PRIORITY_FUNCTIONS detection
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7167 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-14 19:32:15 +00:00
Vadim Zeitlin
351cc2a737 wxSpinCtrl::GetSize() should work now (thanks to Kristjan Jonsson)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7166 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-14 18:53:26 +00:00
Vadim Zeitlin
87f968fb5a fixes for Unix detection (test for __UNIX__ in include/wx/defs.h) and for
NetBSD detection in configure


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7165 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-14 18:29:30 +00:00
Vadim Zeitlin
f568f52dd8 wxString::replace() assert fixed, test for it added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7164 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-14 18:08:35 +00:00
Ron Lee
27df708603 build .debs with new grid now that ok for wxPython too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7163 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-14 16:12:50 +00:00
Ron Lee
49f74d51eb fixed broken compilation under Linux,
ULONG undefined and a duplicated global var name.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7162 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-14 16:02:23 +00:00
Ron Lee
b820f3ab56 switched green/blue in SetRGB params
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-14 15:59:16 +00:00
Brian Smith
9f6de777bb Fixed listbox on windows.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7160 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-14 07:53:35 +00:00
Václav Slavík
f6f09fc812 documented need of read-write image handler
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7159 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-13 20:15:39 +00:00
Vadim Zeitlin
99f55f5c26 fix for menu helpstring in the status bar for MDI child frames
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7158 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-13 18:03:34 +00:00
Vadim Zeitlin
cbb5561c49 unused var in GSocket_SetServer removed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7157 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-13 17:57:01 +00:00
Ron Lee
5a6c3a9171 added -kwxGetTranslation to locale/Makefile and updated .po files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7156 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-13 17:33:33 +00:00
Ron Lee
4360bc4eae added missing wxTRANSLATE for 'Details'
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7155 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-13 17:19:30 +00:00
Julian Smart
970047bbc3 Gave the sash and splitter windows Create and Init methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-13 16:18:00 +00:00
George Tasker
379b9ba2cf Changed the default of wxODBC_BACKWARD_COMPATABILITY to be 0, as it should have been
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7153 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-13 15:48:37 +00:00
Bart A.M. Jourquin
1e58bda79b add SetNumberOfColumns()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7152 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-13 14:27:58 +00:00
Julian Smart
afb749d412 Renamed project files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-13 10:56:12 +00:00
Julian Smart
e12fec0574 New tech note, corrected makeprog.b32
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-13 09:31:19 +00:00
Julian Smart
49b332a96d Removed assert when charset not recognised
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-13 08:35:50 +00:00
Robin Dunn
02d3522ba6 More ActiveX stuff. Can now automatically catch callbacks (events) from the
COM object.  I actually create a new class on the fly that derives
from wxWindow, the COM CoClass and others needed to make it all work.
The resulting class can be instantiated just like wxWindow, used in
sizers, etc.  It also responds to all COM method calls, properties, etc.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-13 08:17:58 +00:00
Julian Smart
dbe13b1101 Removing files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7147 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-13 07:08:47 +00:00
Vadim Zeitlin
1de119b2d9 some warnings fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-12 23:38:50 +00:00
Vadim Zeitlin
8b3b778f3d wxTextCtrl::GetLineText() fixes:
a) doesn't crash
 b) more efficient
 c) works in Unicode mode


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-12 23:38:20 +00:00
Vadim Zeitlin
bea6a318d9 removed incorrect labels
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7144 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-12 23:30:47 +00:00
Stefan Neis
6b9c32dccc Added a define needed by EMX when compiling for OS/2 presentation manager.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-12 20:20:02 +00:00
Václav Slavík
6ff5b6cd0a fixed duplicate definition bug
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7142 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-12 19:54:57 +00:00
Julian Smart
d51d8a8d8a Replaced the HTML doc GIF icons with slightly nicer ones (I think)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7141 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-12 15:13:46 +00:00
Julian Smart
cd847575d0 Removed a redundant Show(TRUE) from details dialog (causes assert);
tried in vain to allow empty tree control labels (doesn't seem possible)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-12 15:12:49 +00:00
George Tasker
c5a94cbde9 Updated to use the new wxDb/wxDbTable accessors
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7139 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-12 11:28:22 +00:00
George Tasker
9083d34b55 Added #if wxODBC_BACKWARD_COMPATABILITY checking to determine whether deprecated functions/classes/enums/etc are available or not.
Cleaned up various naming conventions.
from/orderBy/where are now wxString type if wxODBC_BACKWARD_COMPATABILITY is 0
Accessors added for member variables
If wxODBC_BACKWARD_COMPATABILITY is 0, then member variables that have accessors are now defined in the PRIVATE: section of the class, rather than the PUBLIC:.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7138 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-12 11:27:15 +00:00
David Webster
cfff4cf98d Set proper handles for the menubar
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7137 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-12 04:40:45 +00:00
Robin Dunn
aaca0586f2 FileBrowseButton now has history, updated demo
Added ActiveXWrapper and demos.  It can't do callback events yet, but
I'm working on it.  Can curently embed a control and make method calls
to it.

Updated the wxCalendar (python version)  and it's demo.  It now has
printing support.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7136 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-12 03:06:57 +00:00
David Webster
7b84e4c356 minor OS/2 VA 3.0 #ifdefs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7135 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-12 00:50:53 +00:00
David Webster
05255a3cb4 no message
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-12 00:46:43 +00:00
Vadim Zeitlin
a3e29acf45 1. spin ctrl now generates char/key events
2. grid sets focus to the number editor


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7133 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-12 00:11:36 +00:00
Vadim Zeitlin
d7102a0b12 some fixes for missing/incorrect links
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7132 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-12 00:09:38 +00:00
Robert Roebling
706e8aa34d Missing accessors for wxSizer items.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7131 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-11 22:08:21 +00:00
David Webster
287456ff2f Wrong Tiff library specified in wxwindll.icc
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7130 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-11 21:05:40 +00:00
David Webster
732c17643c Added needed copies (dosyacc and doslex) to the VA 4.0 .icc files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-11 21:03:48 +00:00
George Tasker
7b41d11654 Fixed spelling typos
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-11 15:56:21 +00:00
George Tasker
f018ef133c Added checks for mismatched curly braces so that when docs are generated, a count of the curly braces that have been processed are kept track of. If they mismatch, the file name is reported as having mismatched braces. If more closed braces are detected than open braces, then the line that the first extra close brace is detected on is reported.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7124 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-11 15:50:53 +00:00
Brian Smith
b92f1634b4 Forgot to remove debug code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-11 15:38:55 +00:00
Brian Smith
101751fbef Missing create_wps_objects() prototype.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-11 15:31:34 +00:00
Brian Smith
03d95fca3e Added ability to make Start Menu Program folders and shortcuts.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7120 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-11 15:29:55 +00:00
Stefan Neis
9d9d970d70 Moved most of the code from Insert/Append/DeleteRows/Columns to
Redimension.
Put call to CalcDimension inside 'if (!GetBatchCount)' and
    added a call to CalcDimension to wxGrid's Refresh.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7118 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-11 13:52:58 +00:00
Brian Smith
36508e0a17 Added wxInstall a self extracting installation program using wxWindows.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-11 12:38:07 +00:00
Julian Smart
40f04bce6e Added HTML Help file list
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7116 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-11 12:12:33 +00:00
Julian Smart
bf5b9adcfd Small mods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7115 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-11 12:11:52 +00:00
Julian Smart
98420eb8ab Further fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-11 11:32:52 +00:00
Julian Smart
64dffa993f Small changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7113 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-11 11:26:52 +00:00
Julian Smart
f0d59a5183 Doc fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-11 11:23:59 +00:00
Robert Roebling
48f1ed8cf1 CentreOnParent() didn't work at all for top level windows
on top level windows.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7111 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-11 10:26:16 +00:00
George Tasker
df9b4349d5 Added a #define for wxODBC_BACKWARD_COMPATABILITY
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7110 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-11 01:48:17 +00:00
Guillermo Rodriguez Garcia
d096e52c4e Fixed WXDIR
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7109 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-11 00:52:08 +00:00
Guillermo Rodriguez Garcia
fb71e6560f Added a few samples
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-11 00:51:34 +00:00
Guillermo Rodriguez Garcia
073638823a Removed the unused wxOsVersion var
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7107 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-11 00:36:48 +00:00
Guillermo Rodriguez Garcia
91b240626c Sorry, forgot to add a comment to the previous changelog! Under
MSW, WXHINSTANCE is now defined as void WXFAR * instead of unsigned long.

[this commit itself adds nothing]


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-10 21:57:05 +00:00
Guillermo Rodriguez Garcia
2d853594de The CASTWNDPROC logic was not necessary since this file always includes
<windows.h>. Replaced with a typedef to WNDPROC or FARPROC (depending on
whether STRICT mode is being used). Change proposed by Christoph Schulz


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-10 21:54:24 +00:00
Guillermo Rodriguez Garcia
25935ea919 The WXDLLEXPORT macros now used __declspec (double leading underscore) for
all MSW compilers. Change proposed by Christoph Schulz.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7104 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-10 21:50:27 +00:00
Vadim Zeitlin
a8ef3d8656 small correction for wxUSE_GUI definition
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7103 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-10 21:13:17 +00:00
Ove Kaaven
6565df6e22 Seems I forgot to commit a wxRename fix in here (again)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7102 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-10 19:41:29 +00:00
Stefan Neis
29dc4ad27d Fixed several keyboard handling problems:
- KeyUp event handlers added to label windows
      - pass a "TRUE"for ShiftDown upon selection events triggered by
        release of Shift Key (so one can see from the generated event,
        that we are _adding_ to the current selection).
      - Shrinking the selection by keyboard should now be possible, even
        if the selection starts at the border of the grid.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7101 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-10 14:09:22 +00:00
George Tasker
5ceaa05a92 Sample was missing the call to SQLFreeEnv() required to release the ODBC environment handle memory
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-10 12:45:26 +00:00
George Tasker
164d4e5f7d Fixed a "char *" usage to use "const char *" as it should have
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-10 12:24:46 +00:00
Ron Lee
0cf8500f7f quick fix for locale/Makefile
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-09 19:26:16 +00:00
Robin Dunn
ea9547993b More updates and generated code for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-09 07:07:55 +00:00
Robin Dunn
569077d4d6 updates to track changes in CVS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-09 03:07:09 +00:00
Vadim Zeitlin
cacdec1b9c wxWindowCreate/DestroyEvent now derive from wxCommandEvent
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-08 21:55:02 +00:00
Vadim Zeitlin
82f640ebc2 added a modal dialog test
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-08 21:50:29 +00:00
Stefan Neis
6dcd4ea9fb Added include to os2/private.h to make EMX compile again.
Removed second conditional include to wx/defs.h after an unconditional include.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7093 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-08 21:19:01 +00:00
Vadim Zeitlin
a9a3ea615f wxDialUpManager docs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-08 20:44:46 +00:00
Ove Kaaven
6313775835 wxRemove and wxRename takes const wxChar*, do NOT use fn_str()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7091 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-08 15:50:45 +00:00
Ove Kaaven
da4912c332 Fallback implementation of wxRemove and wxRename
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7090 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-08 15:48:23 +00:00
Ove Kaaven
36777af9e0 Fallback prototypes for wxRemove and wxRename
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7089 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-08 15:47:47 +00:00
Stefan Neis
f9823427eb Corrected handling of row/column attributes/selections if all columns/rows
are removed.
Emit EVT_GRID_CELL_LEFT_CLICK before doing any processing of the left click
        mouse event (instead of emitting it somewhere in the middle).
Moved calls to UpdateAttrRows/Cols to wxGrid's Insert/DeleteRow/Column
        (thereby eliminating the need for two now removed functions).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-08 15:30:20 +00:00
Robert Roebling
7fa76dcfec New wxFlexGridSizer.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7087 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-08 12:00:17 +00:00
Guillermo Rodriguez Garcia
ffe8056c56 Added WXFAR to the char* param in the WinMain declaration for clarity
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7086 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-08 11:59:56 +00:00
Guillermo Rodriguez Garcia
7b68a8190e Patch from Christoph Schulz - the CPPFLAGS definition was overriding
that of makeb32.env


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-08 11:58:21 +00:00
Guillermo Rodriguez Garcia
9899bb5bef A couple of changes related to the way that URLs are parsed to form
a valid URI in the wxURL::ConvertToValidURI function. Modified to comply
with RFC2396 as much as possible, see comments in the code.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7084 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-08 11:19:50 +00:00
Robin Dunn
d1a4ef79ad Changed wxGridCellChoiceEditor's constructor to take an array of
wxStrings instead of wxChar*'s.  This saved a lot of work for
wxPython.

Fixed my GetBestSize fix from yesterday

Changed wxGrid::Redimension to do a refresh (if not GetBatchCount) so
newly appended rows, etc. would show up right away.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7083 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-08 08:18:39 +00:00
Robin Dunn
a410206586 Changed wxGridCellChoiceEditor's constructor to take an array of
wxStrings instead of wxChar*'s.  This saved a lot of work for
wxPython.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7082 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-08 08:16:08 +00:00
Robin Dunn
87b389965c More grid demos and some bugs fixed
Made (virtual method) callbacks into Python code more safe, and
removed the confusion if there was a matching method in the base
class.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-08 08:11:20 +00:00
Ove Kaaven
487d976143 Seems to have forgotten to commit this small
isspace => wxIsspace change earlier...


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7080 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-07 23:58:43 +00:00
Vadim Zeitlin
73cdc44ee3 fix assert failure in LVN_KEYDOWN handler sometimes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7079 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-07 22:01:01 +00:00
Robin Dunn
9d0c056be4 added autoscroll flag for the text editor
enabled SPACE to activate the editor


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7078 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-06 22:25:49 +00:00
David Webster
81acc00826 More OS/2, Control Program from ansi 'C' io fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-06 21:49:35 +00:00
Robin Dunn
94ff3feeee Fixed wxGridCellStringRenderer::DoGetBestSize to take multiple lines
into account and wxGrid::AutoSizeColOrRow to give a few pixels of
padding for rows like it does for columns.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-06 21:15:45 +00:00
Robert Roebling
6067cee7fa Added wxGridSizer.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7075 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-06 19:31:51 +00:00
Vadim Zeitlin
8bbce21e90 a not-always-correct assert fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-06 14:25:00 +00:00
Vadim Zeitlin
e7e0babfe6 explained how to use wxString ctor with binary data
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-06 14:24:19 +00:00
Vadim Zeitlin
7ea5a250fb SCO UnixWare added to the list of platforms
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7072 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-06 14:03:59 +00:00
Vadim Zeitlin
19cec877f7 1. added some tests for setting the fonts
2. don't try touse iso8859-2 encoding by default (error msg is annoying)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-06 13:59:14 +00:00
Vadim Zeitlin
3afa16bc19 wxMkdir/Rmdir clash fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7070 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-06 13:41:10 +00:00
Vadim Zeitlin
92f4ec38a5 another warning fixed/hidden
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-06 13:40:16 +00:00
Vadim Zeitlin
476e5f73c1 some long to int warnings from HP-UX log fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-06 13:08:23 +00:00
Vadim Zeitlin
f30f5bd933 wxMkdir/Rmdir clash fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7067 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-06 12:59:20 +00:00
Vadim Zeitlin
7295717d1d some harmless warnings fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-06 12:55:00 +00:00
Vadim Zeitlin
f5cc1e2daf compilation fix for !PCH
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-06 12:52:35 +00:00
Robin Dunn
31638be931 Some minor build issues for wxGTK
Some sources (from .i files) for wxGTK


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-05 19:21:39 +00:00
Robin Dunn
787b465cf0 Lots of little changes.
Added wrappers for the new wxGrid, and beginings of the demo of it.
Changed version number


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-05 18:29:28 +00:00
Vadim Zeitlin
8474223c94 Unicode related compilation and run-time fixes (wxUSE_MULTIBYTE removed)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7062 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-05 00:13:47 +00:00
Václav Slavík
a7db881a8b synchronized strings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-04 21:10:55 +00:00
Guillermo Rodriguez Garcia
dda9ed859c Changed xpmi.h to XpmI.h (the correct file name) in an #include directive
to avoid problems when cross-compiling from Linux to Windows/mingw


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-04 16:45:49 +00:00
Vadim Zeitlin
bb942f0b29 1. wxDateTime almost finished
2. wxCalendarCtrl documented


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7059 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-04 01:28:46 +00:00
George Tasker
21536be6cc Now uses wxDB_XXXX naming for constants
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7058 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-03 22:35:03 +00:00
George Tasker
91eebab42f Provided wxDB_XXXX naming for constants
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-03 22:34:18 +00:00
Vadim Zeitlin
d22a51d11e Watcom 11 added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-03 22:18:39 +00:00
David Webster
cc33eb194d env file for VA 3.0 to use new wx22.def module definition file for .dll builds
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-03 13:55:17 +00:00
David Webster
d229db78be Resource file specifically for VisualAge V4.0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-03 13:25:07 +00:00
George Tasker
6a7d62f318 Adjusted demo to reflect class name changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-03 12:39:34 +00:00
George Tasker
3703308721 Adjusted sample to reflect class name changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-03 12:32:28 +00:00
George Tasker
b5c119361b Class renaming so that all ODBC related classes begin with wxDbXxxxx. Backward compatability is maintained using typedefs.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-03 12:11:52 +00:00
George Tasker
d756f29d61 Class renaming so that as ODBC related functions begin with wxDbXxxxx. Backward compatability is maintained using typedefs.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-03 12:11:01 +00:00
Václav Slavík
b8aa8301fc fixed bug with details list not being shown under fvwm2 and windowmaker
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-03 08:16:27 +00:00
David Webster
3646a28b11 Adding new module definition file for VisualAge V3.0 for OS/2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-03 04:47:12 +00:00
David Webster
74d178603e Removing old OS/2 module definition file
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7046 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-03 04:45:53 +00:00
David Webster
eaa8de7cdb VA4.0 update for building a .dll
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7045 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-03 04:45:00 +00:00
David Webster
27452ac50e Multiple fixes for OS/2 including getting rid of the C++ unfriendly direct.h and substituting control program io. Various GUI fixes, too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7044 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-03 04:23:48 +00:00
David Webster
7d12fcd019 Getting rid of std 'C' io for OS/2 and substituting friendlier Control Program io.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-03 04:22:06 +00:00
Vadim Zeitlin
54d02b59ad compilation fixes for non unicode mode
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7042 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-03 01:07:56 +00:00
Vadim Zeitlin
4e0291da3c non Unicode VC++ fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7041 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-03 00:40:52 +00:00
Vadim Zeitlin
66c750fe1f 1. wxWizard docs added
2. wxDllLoader docs added (not wxLibrary though - have no idea about this one)
3. some minor fixes to wxCmdLineParser and wx[F]File docs


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-03 00:39:07 +00:00
Robin Dunn
316917bffc Added "wxPaintDC dc(this);" to wxGrid::OnPaint prevent too many
paintevents that don't actually do anything.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-02 21:58:46 +00:00
Robin Dunn
9a0fa1f97d changing \ to /
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7038 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-02 21:30:59 +00:00
Ove Kaaven
edd170072c Made wxMBConv::c??2?? methods handle conversion failures
(by returning a NULL buffer... this causes an assertion failure in
buffer.h in debug mode, perhaps that assert should be removed?
Well, it's better than completely unpredictable behaviour anyway)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7037 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-02 21:05:43 +00:00
Ove Kaaven
9a4920b88f Made wx[F]File::Write(wxString) convert string to multibyte encoding
(added optional conversion parameter). If someone actually wants to write
text files in real Unicode format, I feel that a wxMBConvUTF16 or
something should be written (which would be more portable than writing
wchar_t buffers directly, considering byte order and widths and such).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-02 20:45:18 +00:00
Guillermo Rodriguez Garcia
8a2a71db83 mingw makefiles don't like backslashes!!!
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7035 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-02 15:51:45 +00:00
Stefan Neis
8f2a695c7e Added wxStat define for non-MSVC environments.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-02 12:11:20 +00:00
Robin Dunn
4d350ff2ca Exported a few more things for DLL builds.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-02 03:27:55 +00:00
Ove Kaaven
73830147df A few documentation updates, cross-references, properties of UTF-8,
wx??2??buf macros.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7032 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-02 00:27:04 +00:00
Vadim Zeitlin
9728ba5c8a compilation in Unicode mode works with VC++
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-01 23:19:12 +00:00
Guillermo Rodriguez Garcia
a250a49231 Mingw makefiles shouldn't use backslashes!
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-01 23:01:07 +00:00
Vadim Zeitlin
f696bf6ad8 more wchar_t tests
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7029 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-01 22:54:43 +00:00
Vadim Zeitlin
01065b945b add compile-time setting to use XPMs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-01 21:35:06 +00:00
Vadim Zeitlin
37b592312a 1. fixed deletion of buttons in toolbar with old comctl32.dll
2. XPMs can be used in toolbar buttons


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-01 21:21:22 +00:00
Stefan Neis
89d645f834 Fixed minor bug in minimizing/maximizing windows.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-01 20:02:20 +00:00
Vadim Zeitlin
67c9a0797c works for other branches than the main one too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-01 16:34:43 +00:00
Vadim Zeitlin
101c20d554 attempting to fix sa_handler signature for IRIX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-01 16:34:20 +00:00
Robert Roebling
94f171bf97 wxDirDialog now opens the right dir folder
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-04-01 11:38:04 +00:00
Robin Dunn
31dd5b6281 another rename
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-31 19:46:00 +00:00
Guillermo Rodriguez Garcia
f81f04c12c Replaced XPM correct file names (not all lowercase)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7021 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-31 18:47:39 +00:00
Vadim Zeitlin
39d4044805 newer versions from GTK+ 1.3.x
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7020 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-31 18:23:08 +00:00
Vadim Zeitlin
3877d3b5bc regenerated makefiles from templates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7019 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-31 18:21:40 +00:00
Vadim Zeitlin
b3000445d8 corrected syntax error
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-31 18:16:48 +00:00
Vadim Zeitlin
39cd08a993 make font conversions work in wxBase
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-31 18:12:32 +00:00
Robin Dunn
41f8d6eecb renaming files (changing case) at Guillermo's request
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-31 18:02:43 +00:00
Robin Dunn
722c71a8cf Reapplying Eric's changes on the 2.2 branch. They are:
1.  I have grabbed a new copy of the original Scintilla code from its
CVS repository on SourceForge.  I believe this code corresponds to
Scintilla 1.24.

2.  That code included several new files (stc/scintilla/src/Lex*.cxx)

3.  I added mentions of those files to Makefile.in and the .dsp file.

4.  I added a new required method to PlatWX.cpp, but it doesn't do
anything, and I don't think it needs to.

5.  I added code to stc.cpp which gratuitously references all of the
lexers, to prevent them from being optimized away by the linker.

6.  I modified (stc/scintilla/src/Lex*.cxx) to make the LexerModule
objects externally visible.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7015 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-31 17:47:52 +00:00
Stefan Neis
1904bfd1e9 Repaired semantics of EVT_GRID_SELECT_CELL.
Added OnKeyUp handler for selection with Shift+arrow keys.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-31 17:04:54 +00:00
Guillermo Rodriguez Garcia
848bb8e625 For DLL builds, the declaration of WinMain now takes fake
arguments (WXHINSTANCE, WXHINSTANCE, char*, int) in order
to avoid the need of #including <windows.h> from app.h.
Also, WinMain is now declared as extern "C".


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-31 16:16:05 +00:00
Vadim Zeitlin
864714b947 added -L/usr/lib for HP-UX shared lib
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7011 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-31 14:30:58 +00:00
Vadim Zeitlin
dbb6642ba2 changed order of libraries: -lz, -lm should now be at the end
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-31 14:23:57 +00:00
Vadim Zeitlin
7f30725c85 1. fixed wxBitmapButtons in wxStatBar95 bug
2. fixed handling of accels in wxDocMDIParentFrame
3. fixed wxComboBox tooltips


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7009 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-31 00:21:24 +00:00
Vadim Zeitlin
40dd4a59a2 1. statbar shows that wxBitmapButtons do work with it
2. some accels added to [doc]mdi samples


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7008 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-31 00:20:42 +00:00
Vadim Zeitlin
1c45dfd0e9 show that comboboxes do get char events now
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7007 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-30 22:33:18 +00:00
Vadim Zeitlin
54d68b7174 only use __forceinline for VC++ 6.0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-30 22:30:42 +00:00
Vadim Zeitlin
597acb605c 1. fixed apparent bug in wxGrid code
2. fixed WM_CHAR handling in combobox
3. fixed controls positioning in the toolbar with older comctl32.dll/mingw32


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-30 22:26:34 +00:00
David Webster
3139a47403 Fix for the runaway WM_PAINT message in wxFrame.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-30 22:17:43 +00:00
Vadim Zeitlin
6577ef5ffc test for dlerror() added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-30 18:53:30 +00:00
Vadim Zeitlin
68a1337089 wxDllLoader test fixed for Linux
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-30 18:52:18 +00:00
Vadim Zeitlin
2dff8d830d unused var warning fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-30 18:45:57 +00:00
Vadim Zeitlin
7188bfcf6e tests for key/char events
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-30 18:21:18 +00:00
Vadim Zeitlin
abb5e0c057 fill the wxListEvent fields when sending LIST_KEY_DOWN event
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-30 18:20:11 +00:00
Vadim Zeitlin
266f6c261f select the initially specified path in the tree
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-30 18:14:24 +00:00
Vadim Zeitlin
bbeed8c707 refresh menu item should work now
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-30 17:05:57 +00:00
Stefan Neis
428f582c20 Selecting by Shift+arrow key wouldn't notice, if it was moving beyond the
grid bounds; now it does.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-30 15:44:59 +00:00
Stefan Neis
053ad70036 Modified version of DrawGridSpace.
Added minor improvement suggested by GRG.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-30 15:24:48 +00:00
Stefan Neis
f9b5150a08 Added a deselection event for ClearSelection()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-30 15:17:04 +00:00
Vadim Zeitlin
24754f6ac2 1. some more notes about Unicode compilation
2. wxUSE_WCHAR_T is not always (re)defined as 1 in wxchar.h (grrr..)
3. added wxDllLoader test to console sample
4. wxComboBox now gets WM_CHAR


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-30 00:16:18 +00:00
Vadim Zeitlin
ee5bb015fe more tests
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-30 00:15:31 +00:00
Vadim Zeitlin
45680bc875 some consistncy tests added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-29 21:48:06 +00:00
Václav Slavík
4c751ba476 added wxHF_FLATTOOLBAR
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-29 19:11:12 +00:00
Ron Lee
5150fda961 recommitting after I lost a race with Vadim :-)
relevant changes were:
  contrib libs now build with an soname when you --enable-burnt_name
  added -Wall (CXXWARNINGS) to CFLAGS for gcc


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-29 17:48:12 +00:00
Vadim Zeitlin
16d8c174e7 1. attempts to fix vsnprintf() check
2. use AC_TRY_COMPILE(), not RUN() for vscanf() check
3. don't test for joystick support in !wxUSE_GUI


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6983 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-29 16:33:26 +00:00
Vadim Zeitlin
7a063aed7c another small test added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6982 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-29 15:34:57 +00:00
Ron Lee
724b684729 contrib libs now build with an soname when you --enable-burnt_name
added -Wall to CFLAGS
added Makefile.in's for ogl samples
more spring cleaning of contrib makefiles
contrib libs now go in $(top_builddir)/lib
removed duplicate $(APPEXTRADEFS) from compile flags
fixed makelib.env install target to install headers too
More changes to Debian packaging:
  using system libs now
  added runtime and -dev packages for contrib libs
  split headers to a separate package to make Base independant of gui libs


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-29 15:32:47 +00:00
Vadim Zeitlin
d0a52e0bbd corrected documentation of spin events, added wxSpinEvent class docs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6980 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-29 14:46:00 +00:00
Vadim Zeitlin
43e3c488db regenerated with tmake
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6979 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-29 14:19:01 +00:00
Václav Slavík
a8657df481 fixed bug in Makefile: did not copy doc directory -> sample didn't work
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-29 10:41:53 +00:00
Ron Lee
43c558d6c6 wrapped code in #if wxUSE_JOYSTICK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-29 06:27:52 +00:00
Václav Slavík
3b1dca0421 fixed bug in handling tags that use CR or LF as properties deliminer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-28 21:20:36 +00:00
Guillermo Rodriguez Garcia
3658812d91 There was no event handler defined for the 'Exit' menu option
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6975 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-28 20:51:34 +00:00
Vadim Zeitlin
970f410fba results for IRIX and HP-UX added/updated
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-28 18:57:50 +00:00
Vadim Zeitlin
441284d297 compilation error for HP-UX fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-28 18:30:13 +00:00
Vadim Zeitlin
50ef70097b compilation error with non-gcc fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6972 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-28 18:16:09 +00:00
Julian Smart
b30ba481be Added an assert to dialog.cpp to make it clearer where the failure happened.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6970 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-28 09:29:14 +00:00
Guillermo Rodriguez Garcia
b60473e401 Replaced one call to isalpha with wxIsalnum in wxURL::ConvertToValidURI because:
a) numeric characters are also valid in an URI
b) wxIsXXX should be used for wxChar instead of ANSI-C isXXX, so that the
   code will also work in Unicode builds


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6969 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-28 08:59:12 +00:00
Julian Smart
d6f6f90a65 Fixed buggy printer-setting-remembering bug fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6968 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-28 08:52:19 +00:00
Robin Dunn
bf37745c30 minor updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-28 06:13:29 +00:00
David Webster
6b44ceb65f Merge between dev and stable
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-28 05:13:00 +00:00
David Webster
8527a3f264 Merge between dev and stable
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6965 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-28 05:10:48 +00:00
Robin Dunn
809527ae06 Don't hard-code the CRT library name, let the /M* flag set the default.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-28 00:55:44 +00:00
Ove Kaaven
595f4bc27a IMHO, putting #if defined(__VISAGECPP__) (is it Visual Age?) around the
two known trouble lines in here was a stupid idea (the work of someone
who didn't pay attention to wx-dev discussions?)...
now that wxEncodingConverter is fixed, I took them away...


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6963 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-28 00:39:51 +00:00
Ove Kaaven
8a2d60784d OK, fixing wxEncodingConverter was a little bit harder than I expected
because of some dodgy overloading implementation in here, but this ought
to do it, I think... (or is it hope?)

I wonder if my tree still keeps on having unicode enabled even when I
reconfigure with --disable-unicode, and that's why I didn't detect the
wxEncodingConverter problem myself? Wonder if that is still the case?


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6962 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-28 00:34:38 +00:00
Guillermo Rodriguez Garcia
387cdaf2f4 Use 'localhost' directly instead of wxGetHostName, which sometimes does not
do the right thing. This change doesn't affect DDE classes, which ignore this
argument anyway.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-27 19:40:37 +00:00
David Webster
fc478ddb79 GSOCKET fix from dev branch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-27 18:35:03 +00:00
David Webster
5ab57de77d Compile bug for unsuitable method in MB2WC and WX2MB procs. VA only
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6959 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-27 18:34:35 +00:00
Vadim Zeitlin
b328857cfb wxCmdLineParser docs added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6958 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-27 18:01:16 +00:00
Julian Smart
b56958a1b8 Added symbol to work around comctl32.dll problems
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-27 17:11:42 +00:00
Vadim Zeitlin
3ca1eceb08 don't trasnform output dir name to lower case
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-27 15:33:10 +00:00
Vadim Zeitlin
bcfc655bca a usage msg cosemtic fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-27 15:29:32 +00:00
George Tasker
3a46d09870 Start of the Latex documentation of the wxDB/wxTable classes, converting them from MSWord
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-27 15:29:04 +00:00
Stefan Neis
233da17eb2 SelectCell forgot to pass ControlDown & Co to SelectBlock in row/column
selection mode.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-27 12:13:13 +00:00
Ron Lee
bc23effaaa added joystick.cpp to filelist for gtk.
added datafile to joystick sample makefile.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-26 17:38:51 +00:00
Ron Lee
de69e5b8fb added missing bits for static _gl lib
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-26 17:24:58 +00:00
Stefan Neis
fdbd6b7d7c Moved APPEXTRALIBS to beginning of LDLIBS, since they might depend on wx library.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-26 15:35:31 +00:00
Stefan Neis
6989e08f3a Changed wxGrid::OnPaint to call Refresh on subwindows.
Added Refresh to wxGrid::EndBatch().
Use batch mode in sample.
Changed CalcDimension to better handle cases with zero columns or rows.
No more automatic insertion of column when adding rows to a grid without
        columns.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-26 12:36:59 +00:00
Robin Dunn
48ed8556ac First pass on STC wrappers
Lots of little fixes, tweaks, additions, etc.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-26 02:39:21 +00:00
Ove Kaaven
ad7e243fbd Try to avoid sending a string through mbstowcs() when already Unicode
(added #if wxUSE_UNICODE etc).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-25 23:12:57 +00:00
Ove Kaaven
ad5730d735 Unicode fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-25 23:10:16 +00:00
Ove Kaaven
849963ea9e Compiles better under Unicode now (but works is another issue)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-25 23:09:02 +00:00
Ove Kaaven
049bf7d36f wxLogError()'s second argument is wxChar*,
so it likes c_str() better than mb_str()


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-25 23:07:40 +00:00
Ove Kaaven
ab64366836 A couple of Unicode fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-25 23:06:31 +00:00
Ove Kaaven
12c1498d81 I suppose text validators may take Unicode input as well.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-25 23:05:30 +00:00
Ove Kaaven
659755d7c2 wxResourceBuffer changed back to char*.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-25 23:03:52 +00:00
Ove Kaaven
0166fed863 A few Unicode fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-25 23:03:26 +00:00
Ove Kaaven
caf45e24c0 Trashed old wxCSConv loader code. Replaced with code that uses
wxTheFontMapper->CharsetToEncoding and wxEncodingConverter for now
(trying to do something more major would probably be too big for
WX_2_2_BRANCH, this can be reimplemented in a better way later).
Untested but compiles fine and ought to work.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6937 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-25 23:01:29 +00:00
Ove Kaaven
8fac236758 Improved conversion constructor arrangement to always allow a second
wxMBConv-type argument (changes the signature of the non-Unicode
create-from-wchar_t constructor).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6936 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-25 22:56:20 +00:00
Ove Kaaven
c6f724133d Corrected a cut&paste-syndrome-typo (it said MB instead of WX).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-25 18:21:14 +00:00
Julian Smart
a056ae5da9 Removed inline that caused strange a link error
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-25 18:10:06 +00:00
Ove Kaaven
9f6905e5e9 Some operator!= against wx[W]CharBuffer that was necessary to compile
wxWindows with Borland C++ 5.02


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-25 17:17:12 +00:00
Julian Smart
ae65b148b8 Fixed c_string typo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6932 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-25 14:46:40 +00:00
Ove Kaaven
ec48224709 Topic overview for wxMBConv classes (more or less).
Describes how it is *supposed* to work, not how it actually works, but
I'll begin implementing the missing pieces as soon as I get my tree to
compile in Unicode mode again...


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-25 14:41:21 +00:00
Stefan Neis
857a175053 Added support for grids with m_numRows=0. SelectRow(i,TRUE) now sets
ControlDown to TRUE in the generated event.
Fixed stupid bug in row/column deletion in griddemo.cpp


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-25 14:02:54 +00:00
Robert Roebling
afc91dbf75 wxListCtrl doesn't select the first item in
single selection mode anymore (as per MSW).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6929 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-25 13:36:03 +00:00
Ove Kaaven
ff9282a83f Some documentatin for wxConv classes. But still need to write an overview...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6928 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-25 11:49:20 +00:00
Václav Slavík
7dc5c3c803 update Czech translations - now in sync with 2.1.14 (and hopefully 2.2)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-24 22:35:57 +00:00
Julian Smart
7f4bca30df Unmods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6926 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-24 19:26:56 +00:00
Robert Roebling
dc25e1d304 Trying fight aganist CVS clashes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-24 17:45:40 +00:00
Vadim Zeitlin
356cbde599 added wxTreeCtrl::ExpandAll() which is now called by char handler when '*' is
pressed to expand all subitems (MSW compatible)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6924 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-24 16:03:29 +00:00
Vadim Zeitlin
39d496f99f include
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6923 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-24 16:02:42 +00:00
Vadim Zeitlin
8fb34454e4 fixed #pragma interface hell
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6922 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-24 15:52:09 +00:00
Julian Smart
2e377124b4 Added modal dialog OnIdle processing; added asserts to helpfrm.cpp to confirm
XPM loading problem; fixes some compilos.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-24 15:48:10 +00:00
Vadim Zeitlin
eb118c55fd fix for casting from GtkScrolledWindow to GtkWindow: don't call
gtk_window_set_geometry_hints for MDI children


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-24 14:04:46 +00:00
Vadim Zeitlin
5f5083ca69 compilation fixes for Unix after Unicode fixes for Windows
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6919 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-24 13:59:22 +00:00
Vadim Zeitlin
93f4eec3c9 added wxThread() ctor parameter description
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6918 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-24 13:57:42 +00:00
Julian Smart
62a2a686a5 Compile problem fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-24 13:21:25 +00:00
Julian Smart
846b6d921a Unicode fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6916 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-24 12:12:21 +00:00
Julian Smart
d15a450d54 Some Unicode changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-24 11:31:14 +00:00
Vadim Zeitlin
9be2e3416d compilation/linking fixes for DLL build in release mode
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-24 01:56:00 +00:00
Julian Smart
f7b5f357d4 Some more script bits
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6913 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-23 21:19:49 +00:00
Julian Smart
6ed30bba72 Made it possible to switch off more settings; fixed wxScrollWindow::Scroll bug
(if x == oldx, skipped processing of y direction)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-23 21:16:24 +00:00
Guillermo Rodriguez Garcia
9c1df6be77 Updated mingw/cygwin information
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-22 20:23:49 +00:00
Julian Smart
8dcaa21a6d Fixed BC++ makefile for FINAL=1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-22 19:10:39 +00:00
Robert Roebling
4fc4819958 Bumped up to 2.1.15.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-22 18:31:28 +00:00
Robert Roebling
5983e80bae Corrected wxGTK.spec as per 2.1.14 (hadn't commited),
Removed include "gtk.h" from the public pen.h header and
     added check for this to configure etc.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6906 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-22 18:04:07 +00:00
Vadim Zeitlin
5795cc366f added a note about comctl32.dll bug
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-22 12:57:52 +00:00
Vadim Zeitlin
fe2ebc8542 Cygwin tested
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6904 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-22 12:56:53 +00:00
Vadim Zeitlin
8b0cbaa206 french translation done!
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-22 12:56:23 +00:00
Vadim Zeitlin
d68bc1ffa6 small fix for msg catalog search path
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-22 12:55:39 +00:00
Vadim Zeitlin
f6eb66c345 the French translations for wxWin
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-22 12:33:28 +00:00
Vadim Zeitlin
988ba3ce13 check for vsnprintf() with C++ compiler
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-22 12:02:06 +00:00
Guillermo Rodriguez Garcia
fb5e087649 Various small fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6895 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-21 21:02:43 +00:00
Guillermo Rodriguez Garcia
ad269e4c7c Fixed a memory leak in wxTCPServer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-21 20:34:06 +00:00
Julian Smart
c26fc0be88 Started (but got bored with) Unicode corrections; wxTreeCtrl correction; misc.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-21 20:33:34 +00:00
George Tasker
9a0466f130 Fixed typos in the docs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-21 19:18:16 +00:00
Vadim Zeitlin
dcb8d5e619 test for shl_load() with -ldld (needed under HP-UX)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6891 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-21 17:45:22 +00:00
Bryan Petty
f7bdc70eca This commit was manufactured by cvs2svn to create branch
'WX_2_2_BRANCH'.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-21 17:45:22 +00:00
584 changed files with 418832 additions and 19140 deletions

1396
contrib/include/wx/stc/stc.h Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,56 @@
###############################################################################
# Purpose: Makefile.in for STC contrib for Unix with autoconf
# Created: 14.03.00
# Author: VZ
# Version: $Id$
###############################################################################
top_srcdir = @top_srcdir@/..
top_builddir = ../../..
scintilla_dir = $(top_srcdir)/contrib/src/stc/scintilla
libsrc_dir = contrib/src/stc@PATH_IFS@$(scintilla_dir)/src
TARGET_LIBNAME=libstc
LIBVERSION_CURRENT=1
LIBVERSION_REVISION=0
LIBVERSION_AGE=0
HEADER_PATH=$(top_srcdir)/contrib/include/wx
HEADER_SUBDIR=stc
HEADERS=stc.h
OBJECTS=PlatWX.o ScintillaWX.o stc.o \
DocumentAccessor.o \
LexCPP.o \
LexHTML.o \
LexLua.o \
LexOthers.o \
LexPerl.o \
LexPython.o \
LexSQL.o \
LexVB.o \
UniConversion.o \
WindowAccessor.o \
AutoComplete.o \
CallTip.o \
CellBuffer.o \
ContractionState.o \
Document.o \
Editor.o \
Indicator.o \
KeyMap.o \
KeyWords.o \
LineMarker.o \
PropSet.o \
ScintillaBase.o \
Style.o \
ViewStyle.o \
PosRegExp.o \
APPEXTRADEFS=-D__WX__ -DSCI_LEXER -I$(scintilla_dir)/src -I$(scintilla_dir)/include -I$(top_srcdir)/contrib/include
include $(top_builddir)/src/makelib.env

712
contrib/src/stc/PlatWX.cpp Normal file
View File

@@ -0,0 +1,712 @@
// Scintilla source code edit control
// PlatWX.cxx - implementation of platform facilities on wxWindows
// Copyright 1998-1999 by Neil Hodgson <neilh@scintilla.org>
// Robin Dunn <robin@aldunn.com>
// The License.txt file describes the conditions under which this software may be distributed.
#include <ctype.h>
#include "Platform.h"
#include "wx/stc/stc.h"
#ifdef __WXGTK__
#include <gtk/gtk.h>
#endif
Point Point::FromLong(long lpoint) {
return Point(lpoint & 0xFFFF, lpoint >> 16);
}
wxRect wxRectFromPRectangle(PRectangle prc) {
wxRect rc(prc.left, prc.top,
prc.right-prc.left, prc.bottom-prc.top);
return rc;
}
PRectangle PRectangleFromwxRect(wxRect rc) {
return PRectangle(rc.GetLeft(), rc.GetTop(), rc.GetRight(), rc.GetBottom());
}
Colour::Colour(long lcol) {
co.Set(lcol & 0xff, (lcol >> 8) & 0xff, (lcol >> 16) & 0xff);
}
Colour::Colour(unsigned int red, unsigned int green, unsigned int blue) {
co.Set(red, green, blue);
}
bool Colour::operator==(const Colour &other) const {
return co == other.co;
}
long Colour::AsLong() const {
return (((long)co.Blue() << 16) |
((long)co.Green() << 8) |
((long)co.Red()));
}
unsigned int Colour::GetRed() {
return co.Red();
}
unsigned int Colour::GetGreen() {
return co.Green();
}
unsigned int Colour::GetBlue() {
return co.Blue();
}
Palette::Palette() {
used = 0;
allowRealization = false;
}
Palette::~Palette() {
Release();
}
void Palette::Release() {
used = 0;
}
// This method either adds a colour to the list of wanted colours (want==true)
// or retrieves the allocated colour back to the ColourPair.
// This is one method to make it easier to keep the code for wanting and retrieving in sync.
void Palette::WantFind(ColourPair &cp, bool want) {
if (want) {
for (int i=0; i < used; i++) {
if (entries[i].desired == cp.desired)
return;
}
if (used < numEntries) {
entries[used].desired = cp.desired;
entries[used].allocated = cp.desired;
used++;
}
} else {
for (int i=0; i < used; i++) {
if (entries[i].desired == cp.desired) {
cp.allocated = entries[i].allocated;
return;
}
}
cp.allocated = cp.desired;
}
}
void Palette::Allocate(Window &) {
if (allowRealization) {
}
}
Font::Font() {
id = 0;
ascent = 0;
}
Font::~Font() {
}
void Font::Create(const char *faceName, int characterSet, int size, bool bold, bool italic) {
Release();
id = new wxFont(size,
wxDEFAULT,
italic ? wxITALIC : wxNORMAL,
bold ? wxBOLD : wxNORMAL,
false,
faceName,
wxFONTENCODING_DEFAULT);
}
void Font::Release() {
if (id)
delete id;
id = 0;
}
Surface::Surface() :
hdc(0), hdcOwned(0), bitmap(0),
x(0), y(0) {
}
Surface::~Surface() {
Release();
}
void Surface::Release() {
if (bitmap) {
((wxMemoryDC*)hdc)->SelectObject(wxNullBitmap);
delete bitmap;
bitmap = 0;
}
if (hdcOwned) {
delete hdc;
hdc = 0;
hdcOwned = false;
}
}
bool Surface::Initialised() {
return hdc != 0;
}
void Surface::Init() {
Release();
hdc = new wxMemoryDC();
hdcOwned = true;
// **** ::SetTextAlign(hdc, TA_BASELINE);
}
void Surface::Init(SurfaceID hdc_) {
Release();
hdc = hdc_;
// **** ::SetTextAlign(hdc, TA_BASELINE);
}
void Surface::InitPixMap(int width, int height, Surface *surface_) {
Release();
hdc = new wxMemoryDC(surface_->hdc);
hdcOwned = true;
bitmap = new wxBitmap(width, height);
((wxMemoryDC*)hdc)->SelectObject(*bitmap);
// **** ::SetTextAlign(hdc, TA_BASELINE);
}
void Surface::PenColour(Colour fore) {
hdc->SetPen(wxPen(fore.co, 1, wxSOLID));
}
void Surface::BrushColor(Colour back) {
hdc->SetBrush(wxBrush(back.co, wxSOLID));
}
void Surface::SetFont(Font &font_) {
if (font_.GetID()) {
hdc->SetFont(*font_.GetID());
}
}
int Surface::LogPixelsY() {
return hdc->GetPPI().y;
}
int Surface::DeviceHeightFont(int points) {
return points * LogPixelsY() / 72;
}
void Surface::MoveTo(int x_, int y_) {
x = x_;
y = y_;
}
void Surface::LineTo(int x_, int y_) {
hdc->DrawLine(x,y, x_,y_);
x = x_;
y = y_;
}
void Surface::Polygon(Point *pts, int npts, Colour fore,
Colour back) {
PenColour(fore);
BrushColor(back);
hdc->DrawPolygon(npts, (wxPoint*)pts);
}
void Surface::RectangleDraw(PRectangle rc, Colour fore, Colour back) {
PenColour(fore);
BrushColor(back);
hdc->DrawRectangle(wxRectFromPRectangle(rc));
}
void Surface::FillRectangle(PRectangle rc, Colour back) {
BrushColor(back);
hdc->SetPen(*wxTRANSPARENT_PEN);
hdc->DrawRectangle(wxRectFromPRectangle(rc));
}
void Surface::FillRectangle(PRectangle rc, Surface &surfacePattern) {
wxBrush br;
if (surfacePattern.bitmap)
br = wxBrush(*surfacePattern.bitmap);
else // Something is wrong so display in red
br = wxBrush(*wxRED, wxSOLID);
hdc->SetPen(*wxTRANSPARENT_PEN);
hdc->SetBrush(br);
hdc->DrawRectangle(wxRectFromPRectangle(rc));
}
void Surface::RoundedRectangle(PRectangle rc, Colour fore, Colour back) {
PenColour(fore);
BrushColor(back);
hdc->DrawRoundedRectangle(wxRectFromPRectangle(rc), 4);
}
void Surface::Ellipse(PRectangle rc, Colour fore, Colour back) {
PenColour(fore);
BrushColor(back);
hdc->DrawEllipse(wxRectFromPRectangle(rc));
}
void Surface::Copy(PRectangle rc, Point from, Surface &surfaceSource) {
wxRect r = wxRectFromPRectangle(rc);
hdc->Blit(r.x, r.y, r.width, r.height,
surfaceSource.hdc, from.x, from.y, wxCOPY);
}
void Surface::DrawText(PRectangle rc, Font &font, int ybase,
const char *s, int len, Colour fore, Colour back) {
SetFont(font);
hdc->SetTextForeground(fore.co);
hdc->SetTextBackground(back.co);
FillRectangle(rc, back);
// ybase is where the baseline should be, but wxWin uses the upper left
// corner, so I need to calculate the real position for the text...
hdc->DrawText(wxString(s, len), rc.left, ybase - font.ascent);
}
void Surface::DrawTextClipped(PRectangle rc, Font &font, int ybase, const char *s, int len, Colour fore, Colour back) {
SetFont(font);
hdc->SetTextForeground(fore.co);
hdc->SetTextBackground(back.co);
FillRectangle(rc, back);
hdc->SetClippingRegion(wxRectFromPRectangle(rc));
// see comments above
hdc->DrawText(wxString(s, len), rc.left, ybase - font.ascent);
hdc->DestroyClippingRegion();
}
int Surface::WidthText(Font &font, const char *s, int len) {
SetFont(font);
int w;
int h;
hdc->GetTextExtent(wxString(s, len), &w, &h);
return w;
}
void Surface::MeasureWidths(Font &font, const char *s, int len, int *positions) {
SetFont(font);
int totalWidth = 0;
for (int i=0; i<len; i++) {
int w;
int h;
hdc->GetTextExtent(s[i], &w, &h);
totalWidth += w;
positions[i] = totalWidth;
}
}
int Surface::WidthChar(Font &font, char ch) {
SetFont(font);
int w;
int h;
hdc->GetTextExtent(ch, &w, &h);
return w;
}
#define EXTENT_TEST " `~!@#$%^&*()-_=+\\|[]{};:\"\'<,>.?/1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
int Surface::Ascent(Font &font) {
SetFont(font);
int w, h, d, e;
hdc->GetTextExtent(EXTENT_TEST, &w, &h, &d, &e);
font.ascent = h - d;
return font.ascent;
}
int Surface::Descent(Font &font) {
SetFont(font);
int w, h, d, e;
hdc->GetTextExtent(EXTENT_TEST, &w, &h, &d, &e);
return d;
}
int Surface::InternalLeading(Font &font) {
return 0;
}
int Surface::ExternalLeading(Font &font) {
SetFont(font);
int w, h, d, e;
hdc->GetTextExtent(EXTENT_TEST, &w, &h, &d, &e);
return e;
}
int Surface::Height(Font &font) {
SetFont(font);
return hdc->GetCharHeight();
}
int Surface::AverageCharWidth(Font &font) {
SetFont(font);
return hdc->GetCharWidth();
}
int Surface::SetPalette(Palette *pal, bool inBackGround) {
return 0; // **** figure out what to do with palettes...
}
void Surface::SetClip(PRectangle rc) {
hdc->SetClippingRegion(wxRectFromPRectangle(rc));
}
void Surface::FlushCachedState() {
}
Window::~Window() {
}
void Window::Destroy() {
if (id)
id->Destroy();
id = 0;
}
bool Window::HasFocus() {
return wxWindow::FindFocus() == id;
}
PRectangle Window::GetPosition() {
wxRect rc(id->GetPosition(), id->GetSize());
return PRectangleFromwxRect(rc);
}
void Window::SetPosition(PRectangle rc) {
wxRect r = wxRectFromPRectangle(rc);
id->SetSize(r);
}
void Window::SetPositionRelative(PRectangle rc, Window) {
SetPosition(rc); // ????
}
PRectangle Window::GetClientPosition() {
wxSize sz = id->GetClientSize();
return PRectangle(0, 0, sz.x, sz.y);
}
void Window::Show(bool show) {
id->Show(show);
}
void Window::InvalidateAll() {
id->Refresh(false);
}
void Window::InvalidateRectangle(PRectangle rc) {
wxRect r = wxRectFromPRectangle(rc);
id->Refresh(false, &r);
}
void Window::SetFont(Font &font) {
id->SetFont(*font.GetID());
}
void Window::SetCursor(Cursor curs) {
int cursorId;
switch (curs) {
case cursorText:
cursorId = wxCURSOR_IBEAM;
break;
case cursorArrow:
cursorId = wxCURSOR_ARROW;
break;
case cursorUp:
cursorId = wxCURSOR_ARROW; // ** no up arrow... wxCURSOR_UPARROW;
break;
case cursorWait:
cursorId = wxCURSOR_WAIT;
break;
case cursorHoriz:
cursorId = wxCURSOR_SIZEWE;
break;
case cursorVert:
cursorId = wxCURSOR_SIZENS;
break;
case cursorReverseArrow:
cursorId = wxCURSOR_POINT_RIGHT;
break;
default:
cursorId = wxCURSOR_ARROW;
break;
}
id->SetCursor(wxCursor(cursorId));
}
void Window::SetTitle(const char *s) {
id->SetTitle(s);
}
class wxSTCListBox : public wxListBox {
public:
wxSTCListBox(wxWindow* parent, wxWindowID id)
: wxListBox(parent, id, wxDefaultPosition, wxDefaultSize,
0, NULL, wxLB_SINGLE | wxLB_SORT | wxSIMPLE_BORDER)
{}
void OnFocus(wxFocusEvent& event) {
GetParent()->SetFocus();
event.Skip();
}
#ifdef __WXGTK__
void DoSetFirstItem(int n);
#endif
private:
DECLARE_EVENT_TABLE()
};
BEGIN_EVENT_TABLE(wxSTCListBox, wxListBox)
EVT_SET_FOCUS(wxSTCListBox::OnFocus)
END_EVENT_TABLE()
#ifdef __WXGTK__
// This can be removed after 2.2.2 I think
void wxSTCListBox::DoSetFirstItem( int n )
{
wxCHECK_RET( m_list, wxT("invalid listbox") );
if (gdk_pointer_is_grabbed () && GTK_WIDGET_HAS_GRAB (m_list))
return;
// terribly efficient
const gchar *vadjustment_key = "gtk-vadjustment";
guint vadjustment_key_id = g_quark_from_static_string (vadjustment_key);
GtkAdjustment *adjustment =
(GtkAdjustment*) gtk_object_get_data_by_id (GTK_OBJECT (m_list), vadjustment_key_id);
wxCHECK_RET( adjustment, wxT("invalid listbox code") );
GList *target = g_list_nth( m_list->children, n );
wxCHECK_RET( target, wxT("invalid listbox index") );
GtkWidget *item = GTK_WIDGET(target->data);
wxCHECK_RET( item, wxT("invalid listbox code") );
// find the last item before this one which is already realized
size_t nItemsBefore;
for ( nItemsBefore = 0; item && (item->allocation.y == -1); nItemsBefore++ )
{
target = target->prev;
if ( !target )
{
// nothing we can do if there are no allocated items yet
return;
}
item = GTK_WIDGET(target->data);
}
gtk_adjustment_set_value(adjustment,
item->allocation.y +
nItemsBefore*item->allocation.height);
}
#endif
ListBox::ListBox() {
}
ListBox::~ListBox() {
}
void ListBox::Create(Window &parent, int ctrlID) {
id = new wxSTCListBox(parent.id, ctrlID);
// id = new wxListBox(parent.id, ctrlID, wxDefaultPosition, wxDefaultSize,
// 0, NULL, wxLB_SINGLE | wxLB_SORT | wxSIMPLE_BORDER);
}
PRectangle ListBox::GetDesiredRect() {
wxSize sz = ((wxListBox*)id)->GetBestSize();
PRectangle rc;
rc.top = 0;
rc.left = 0;
if (sz.x > 150) // TODO: A better way to determine these max sizes
sz.x = 150;
if (sz.y > 100)
sz.y = 100;
rc.right = sz.x;
rc.bottom = sz.y;
return rc;
}
void ListBox::SetAverageCharWidth(int width) {
aveCharWidth = width;
}
void ListBox::SetFont(Font &font) {
Window::SetFont(font);
}
void ListBox::Clear() {
((wxListBox*)id)->Clear();
}
void ListBox::Append(char *s) {
((wxListBox*)id)->Append(s);
}
int ListBox::Length() {
return ((wxListBox*)id)->Number();
}
void ListBox::Select(int n) {
((wxListBox*)id)->SetSelection(n);
#ifdef __WXGTK__
if (n > 4)
n = n - 4;
else
n = 1;
((wxListBox*)id)->SetFirstItem(n);
#endif
}
int ListBox::GetSelection() {
return ((wxListBox*)id)->GetSelection();
}
int ListBox::Find(const char *prefix) {
if (prefix) {
for (int x=0; x < ((wxListBox*)id)->Number(); x++) {
wxString text = ((wxListBox*)id)->GetString(x);
if (text.StartsWith(prefix))
return x;
}
}
return -1;
}
void ListBox::GetValue(int n, char *value, int len) {
wxString text = ((wxListBox*)id)->GetString(n);
strncpy(value, text.c_str(), len);
value[len-1] = '\0';
}
void ListBox::Sort() {
// wxWindows keeps sorted so no need to sort
}
Menu::Menu() : id(0) {
}
void Menu::CreatePopUp() {
Destroy();
id = new wxMenu();
}
void Menu::Destroy() {
if (id)
delete id;
id = 0;
}
void Menu::Show(Point pt, Window &w) {
w.GetID()->PopupMenu(id, pt.x - 4, pt.y);
Destroy();
}
Colour Platform::Chrome() {
wxColour c;
c = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE);
return Colour(c.Red(), c.Green(), c.Blue());
}
Colour Platform::ChromeHighlight() {
wxColour c;
c = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DHIGHLIGHT);
return Colour(c.Red(), c.Green(), c.Blue());
}
const char *Platform::DefaultFont() {
return wxNORMAL_FONT->GetFaceName();
}
int Platform::DefaultFontSize() {
return 8;
}
unsigned int Platform::DoubleClickTime() {
return 500; // **** ::GetDoubleClickTime();
}
void Platform::DebugDisplay(const char *s) {
wxLogDebug(s);
}
bool Platform::IsKeyDown(int key) {
return false; // I don't think we'll need this.
}
long Platform::SendScintilla(WindowID w,
unsigned int msg,
unsigned long wParam,
long lParam) {
wxStyledTextCtrl* stc = (wxStyledTextCtrl*)w;
return stc->SendMsg(msg, wParam, lParam);
}
// These are utility functions not really tied to a platform
int Platform::Minimum(int a, int b) {
if (a < b)
return a;
else
return b;
}
int Platform::Maximum(int a, int b) {
if (a > b)
return a;
else
return b;
}
#define TRACE
void Platform::DebugPrintf(const char *format, ...) {
#ifdef TRACE
char buffer[2000];
va_list pArguments;
va_start(pArguments, format);
vsprintf(buffer,format,pArguments);
va_end(pArguments);
Platform::DebugDisplay(buffer);
#endif
}
int Platform::Clamp(int val, int minVal, int maxVal) {
if (val > maxVal)
val = maxVal;
if (val < minVal)
val = minVal;
return val;
}

View File

@@ -0,0 +1,47 @@
This contrib is the wxStyledTextCtrl, which is a wrapper around the
Scintilla edit control. (See www.scintilla.org)
There is still VERY MUCH to be done, most notable of which is a more
advanced sample that exercises more of the code. (I havn't tested
AutoComplete or CallTips, or most of the event types at all yet.) And
also documentation, adding wrappers for some new scintilla
functionality, building and testing on wxGTK, etc. Be patient, it all
will get there soon.
Let me describe a bit about the architecture I am implementing...
Obviously there is the Platform layer which implements the varioius
platform classes by using wxWindows classes and filling in where
needed. Then there is a ScintillaWX class that is derived from
ScintillaBase and implements the necessary virtual methods that
Scintilla needs to fully funciton. This class however is not meant to
ever be used directly by wx programmers. I call it one end of the
bridge between the wx and Scintilla worlds. The other end of the
bridge is a class called wxStyledTextCtrl that looks, feels and acts
like other classes in wxWindows. Here is a diagram:
+------------------+ +-------------------+
| wxStyledTextCtrl |--bridge--| ScintillaWX |
+------------------+ +-------------------+
| ScintillaBase |
+-------------------+
| Editor |
+-------------------+
| PlatWX |
+-------------------+
wxStyledTextCtrl derives from wxControl so it has a window that can be
drawn upon. When a wxStyledTextCtrl is constructed it constructs a
ScintillaWX for itself and passes itself to the scintilla object to be
set as the wMain and wDraw attributes. All method calls on the STC
are sent over the bridge in the form of calls to ScintiallWX::WndProc.
All notifications are sent back over the bridge and turned into
wxEvents.
Robin

View File

@@ -0,0 +1,515 @@
////////////////////////////////////////////////////////////////////////////
// Name: ScintillaWX.cxx
// Purpose: A wxWindows implementation of Scintilla. A class derived
// from ScintillaBase that uses the "wx platform" defined in
// PlatformWX.cxx This class is one end of a bridge between
// the wx world and the Scintilla world. It needs a peer
// object of type wxStyledTextCtrl to function.
//
// Author: Robin Dunn
//
// Created: 13-Jan-2000
// RCS-ID: $Id$
// Copyright: (c) 2000 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#include <ctype.h>
#include "ScintillaWX.h"
#include "wx/stc/stc.h"
//----------------------------------------------------------------------
const int H_SCROLL_MAX = 2000;
const int H_SCROLL_STEP = 20;
const int H_SCROLL_PAGE = 200;
//----------------------------------------------------------------------
// Helper classes
class wxSTCTimer : public wxTimer {
public:
wxSTCTimer(ScintillaWX* swx) {
this->swx = swx;
}
void Notify() {
swx->DoTick();
}
private:
ScintillaWX* swx;
};
bool wxSTCDropTarget::OnDropText(wxCoord x, wxCoord y, const wxString& data) {
return swx->DoDropText(x, y, data);
}
wxDragResult wxSTCDropTarget::OnEnter(wxCoord x, wxCoord y, wxDragResult def) {
return swx->DoDragEnter(x, y, def);
}
wxDragResult wxSTCDropTarget::OnDragOver(wxCoord x, wxCoord y, wxDragResult def) {
return swx->DoDragOver(x, y, def);
}
void wxSTCDropTarget::OnLeave() {
swx->DoDragLeave();
}
class wxSTCCallTip : public wxWindow {
public:
wxSTCCallTip(wxWindow* parent, int ID, CallTip* ct)
: wxWindow(parent, ID)
{
m_ct = ct;
}
void OnPaint(wxPaintEvent& evt) {
wxPaintDC dc(this);
Surface surfaceWindow;
surfaceWindow.Init(&dc);
m_ct->PaintCT(&surfaceWindow);
surfaceWindow.Release();
}
CallTip* m_ct;
DECLARE_EVENT_TABLE()
};
BEGIN_EVENT_TABLE(wxSTCCallTip, wxWindow)
EVT_PAINT(wxSTCCallTip::OnPaint)
END_EVENT_TABLE()
//----------------------------------------------------------------------
// Constructor/Destructor
ScintillaWX::ScintillaWX(wxStyledTextCtrl* win) {
capturedMouse = false;
wMain = win;
wDraw = win;
stc = win;
Initialise();
}
ScintillaWX::~ScintillaWX() {
SetTicking(false);
}
//----------------------------------------------------------------------
// base class virtuals
void ScintillaWX::Initialise() {
//ScintillaBase::Initialise();
dropTarget = new wxSTCDropTarget;
dropTarget->SetScintilla(this);
stc->SetDropTarget(dropTarget);
}
void ScintillaWX::Finalise() {
ScintillaBase::Finalise();
}
void ScintillaWX::StartDrag() {
wxDropSource source(wMain.GetID());
wxTextDataObject data(dragChars);
wxDragResult result;
source.SetData(data);
result = source.DoDragDrop(TRUE);
if (result == wxDragMove && dropWentOutside)
ClearSelection();
inDragDrop = FALSE;
SetDragPosition(invalidPosition);
}
void ScintillaWX::SetTicking(bool on) {
wxSTCTimer* steTimer;
if (timer.ticking != on) {
timer.ticking = on;
if (timer.ticking) {
steTimer = new wxSTCTimer(this);
steTimer->Start(timer.tickSize);
timer.tickerID = (int)steTimer;
} else {
steTimer = (wxSTCTimer*)timer.tickerID;
steTimer->Stop();
delete steTimer;
timer.tickerID = 0;
}
}
timer.ticksToWait = caret.period;
}
void ScintillaWX::SetMouseCapture(bool on) {
if (on && !capturedMouse)
wMain.GetID()->CaptureMouse();
else if (!on && capturedMouse)
wMain.GetID()->ReleaseMouse();
capturedMouse = on;
}
bool ScintillaWX::HaveMouseCapture() {
return capturedMouse;
}
void ScintillaWX::ScrollText(int linesToMove) {
int dy = vs.lineHeight * (linesToMove);
// TODO: calculate the rectangle to refreshed...
wMain.GetID()->ScrollWindow(0, dy);
}
void ScintillaWX::SetVerticalScrollPos() {
wMain.GetID()->SetScrollPos(wxVERTICAL, topLine);
}
void ScintillaWX::SetHorizontalScrollPos() {
wMain.GetID()->SetScrollPos(wxHORIZONTAL, xOffset);
}
bool ScintillaWX::ModifyScrollBars(int nMax, int nPage) {
bool modified = false;
int sbMax = wMain.GetID()->GetScrollRange(wxVERTICAL);
int sbThumb = wMain.GetID()->GetScrollThumb(wxVERTICAL);
int sbPos = wMain.GetID()->GetScrollPos(wxVERTICAL);
if (sbMax != nMax || sbThumb != nPage) {
wMain.GetID()->SetScrollbar(wxVERTICAL, sbPos, nPage, nMax);
modified = true;
}
sbMax = wMain.GetID()->GetScrollRange(wxHORIZONTAL);
sbThumb = wMain.GetID()->GetScrollThumb(wxHORIZONTAL);
if ((sbMax != H_SCROLL_MAX) || (sbThumb != H_SCROLL_STEP)) {
wMain.GetID()->SetScrollbar(wxHORIZONTAL, 0, H_SCROLL_STEP, H_SCROLL_MAX);
modified = true;
}
return modified;
}
void ScintillaWX::NotifyChange() {
stc->NotifyChange();
}
void ScintillaWX::NotifyParent(SCNotification scn) {
stc->NotifyParent(&scn);
}
void ScintillaWX::Copy() {
if (currentPos != anchor) {
char* text = CopySelectionRange();
wxTheClipboard->Open();
wxTheClipboard->SetData(new wxTextDataObject(text));
wxTheClipboard->Close();
}
}
void ScintillaWX::Paste() {
pdoc->BeginUndoAction();
ClearSelection();
wxTextDataObject data;
bool canPaste;
wxTheClipboard->Open();
canPaste = wxTheClipboard->GetData(data);
wxTheClipboard->Close();
if (canPaste) {
wxString str = data.GetText();
int len = str.Length();
pdoc->InsertString(currentPos, str.c_str(), len);
SetEmptySelection(currentPos + len);
}
pdoc->EndUndoAction();
NotifyChange();
Redraw();
}
bool ScintillaWX::CanPaste() {
wxTextDataObject data;
bool canPaste;
wxTheClipboard->Open();
canPaste = wxTheClipboard->GetData(data);
wxTheClipboard->Close();
return canPaste;
}
void ScintillaWX::CreateCallTipWindow(PRectangle) {
ct.wCallTip = new wxSTCCallTip(wDraw.GetID(), -1, &ct);
ct.wDraw = ct.wCallTip;
}
void ScintillaWX::AddToPopUp(const char *label, int cmd, bool enabled) {
if (!label[0])
popup.GetID()->AppendSeparator();
else
popup.GetID()->Append(cmd, label);
if (!enabled)
popup.GetID()->Enable(cmd, enabled);
}
void ScintillaWX::ClaimSelection() {
}
long ScintillaWX::DefWndProc(unsigned int /*iMessage*/, unsigned long /*wParam*/, long /*lParam*/) {
return 0;
}
long ScintillaWX::WndProc(unsigned int iMessage, unsigned long wParam, long lParam) {
// switch (iMessage) {
// case EM_CANPASTE:
// return CanPaste();
// default:
return ScintillaBase::WndProc(iMessage, wParam, lParam);
// }
// return 0;
}
//----------------------------------------------------------------------
// Event delegates
void ScintillaWX::DoPaint(wxDC* dc, wxRect rect) {
paintState = painting;
Surface surfaceWindow;
surfaceWindow.Init(dc);
PRectangle rcPaint = PRectangleFromwxRect(rect);
dc->BeginDrawing();
Paint(&surfaceWindow, rcPaint);
dc->EndDrawing();
surfaceWindow.Release();
if (paintState == paintAbandoned) {
// Painting area was insufficient to cover new styling or brace highlight positions
FullPaint();
}
paintState = notPainting;
#ifdef __WXGTK__
// On wxGTK the editor window paints can overwrite the listbox...
if (ac.Active())
((wxWindow*)ac.lb.GetID())->Refresh(TRUE);
#endif
}
void ScintillaWX::DoHScroll(int type, int pos) {
int xPos = xOffset;
switch (type) {
case wxEVT_SCROLLWIN_LINEUP:
xPos -= H_SCROLL_STEP;
break;
case wxEVT_SCROLLWIN_LINEDOWN:
xPos += H_SCROLL_STEP;
break;
case wxEVT_SCROLLWIN_PAGEUP:
xPos -= H_SCROLL_PAGE;
break;
case wxEVT_SCROLLWIN_PAGEDOWN:
xPos += H_SCROLL_PAGE;
break;
case wxEVT_SCROLLWIN_TOP:
xPos = 0;
break;
case wxEVT_SCROLLWIN_BOTTOM:
xPos = H_SCROLL_MAX;
break;
case wxEVT_SCROLLWIN_THUMBTRACK:
xPos = pos;
break;
}
HorizontalScrollTo(xPos);
}
void ScintillaWX::DoVScroll(int type, int pos) {
int topLineNew = topLine;
switch (type) {
case wxEVT_SCROLLWIN_LINEUP:
topLineNew -= 1;
break;
case wxEVT_SCROLLWIN_LINEDOWN:
topLineNew += 1;
break;
case wxEVT_SCROLLWIN_PAGEUP:
topLineNew -= LinesToScroll();
break;
case wxEVT_SCROLLWIN_PAGEDOWN:
topLineNew += LinesToScroll();
break;
case wxEVT_SCROLLWIN_TOP:
topLineNew = 0;
break;
case wxEVT_SCROLLWIN_BOTTOM:
topLineNew = MaxScrollPos();
break;
case wxEVT_SCROLLWIN_THUMBTRACK:
topLineNew = pos;
break;
}
ScrollTo(topLineNew);
}
void ScintillaWX::DoSize(int width, int height) {
PRectangle rcClient(0,0,width,height);
SetScrollBarsTo(rcClient);
DropGraphics();
}
void ScintillaWX::DoLoseFocus(){
DropCaret();
}
void ScintillaWX::DoGainFocus(){
ShowCaretAtCurrentPosition();
}
void ScintillaWX::DoSysColourChange() {
InvalidateStyleData();
}
void ScintillaWX::DoButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt) {
ButtonDown(pt, curTime, shift, ctrl, alt);
}
void ScintillaWX::DoButtonUp(Point pt, unsigned int curTime, bool ctrl) {
ButtonUp(pt, curTime, ctrl);
}
void ScintillaWX::DoButtonMove(Point pt) {
ButtonMove(pt);
}
void ScintillaWX::DoAddChar(char ch) {
//bool acActiveBeforeCharAdded = ac.Active();
AddChar(ch);
//if (acActiveBeforeCharAdded)
// AutoCompleteChanged(ch);
}
int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt) {
switch (key) {
case WXK_DOWN: key = SCK_DOWN; break;
case WXK_UP: key = SCK_UP; break;
case WXK_LEFT: key = SCK_LEFT; break;
case WXK_RIGHT: key = SCK_RIGHT; break;
case WXK_HOME: key = SCK_HOME; break;
case WXK_END: key = SCK_END; break;
case WXK_PRIOR: key = SCK_PRIOR; break;
case WXK_NEXT: key = SCK_NEXT; break;
case WXK_DELETE: key = SCK_DELETE; break;
case WXK_INSERT: key = SCK_INSERT; break;
case WXK_ESCAPE: key = SCK_ESCAPE; break;
case WXK_BACK: key = SCK_BACK; break;
case WXK_TAB: key = SCK_TAB; break;
case WXK_RETURN: key = SCK_RETURN; break;
case WXK_ADD: key = SCK_ADD; break;
case WXK_SUBTRACT: key = SCK_SUBTRACT; break;
case WXK_DIVIDE: key = SCK_DIVIDE; break;
case WXK_CONTROL: key = 0; break;
case WXK_ALT: key = 0; break;
case WXK_SHIFT: key = 0; break;
}
return KeyDown(key, shift, ctrl, alt);
}
void ScintillaWX::DoCommand(int ID) {
Command(ID);
}
void ScintillaWX::DoContextMenu(Point pt) {
ContextMenu(pt);
}
void ScintillaWX::DoOnListBox() {
AutoCompleteCompleted();
}
//----------------------------------------------------------------------
bool ScintillaWX::DoDropText(long x, long y, const wxString& data) {
SetDragPosition(invalidPosition);
int movePos = PositionFromLocation(Point(x,y));
DropAt(movePos, data, dragResult == wxDragMove, FALSE); // TODO: rectangular?
return TRUE;
}
wxDragResult ScintillaWX::DoDragEnter(wxCoord x, wxCoord y, wxDragResult def) {
return def;
}
wxDragResult ScintillaWX::DoDragOver(wxCoord x, wxCoord y, wxDragResult def) {
SetDragPosition(PositionFromLocation(Point(x, y)));
dragResult = def;
return def;
}
void ScintillaWX::DoDragLeave() {
SetDragPosition(invalidPosition);
}
//----------------------------------------------------------------------
// Redraw all of text area. This paint will not be abandoned.
void ScintillaWX::FullPaint() {
paintState = painting;
// rcPaint = GetTextRectangle();
// wxClientDC dc(wMain.GetID());
// Surface surfaceWindow;
// surfaceWindow.Init(&dc);
// Paint(&surfaceWindow, rcPaint);
// surfaceWindow.Release();
wMain.GetID()->Refresh(FALSE);
paintState = notPainting;
}
void ScintillaWX::DoScrollToLine(int line) {
ScrollTo(line);
}
void ScintillaWX::DoScrollToColumn(int column) {
HorizontalScrollTo(column * vs.spaceWidth);
}
//----------------------------------------------------------------------
//----------------------------------------------------------------------

View File

@@ -0,0 +1,152 @@
////////////////////////////////////////////////////////////////////////////
// Name: ScintillaWX.h
// Purpose: A wxWindows implementation of Scintilla. A class derived
// from ScintillaBase that uses the "wx platform" defined in
// PlatWX.cpp. This class is one end of a bridge between
// the wx world and the Scintilla world. It needs a peer
// object of type wxStyledTextCtrl to function.
//
// Author: Robin Dunn
//
// Created: 13-Jan-2000
// RCS-ID: $Id$
// Copyright: (c) 2000 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifndef __ScintillaWX_h__
#define __ScintillaWX_h__
//----------------------------------------------------------------------
#include "Platform.h"
#include "Scintilla.h"
#ifdef SCI_LEXER
#include "SciLexer.h"
#include "PropSet.h"
#include "Accessor.h"
#include "KeyWords.h"
#endif
#include "ContractionState.h"
#include "SVector.h"
#include "CellBuffer.h"
#include "CallTip.h"
#include "KeyMap.h"
#include "Indicator.h"
#include "LineMarker.h"
#include "Style.h"
#include "ViewStyle.h"
#include "AutoComplete.h"
#include "Document.h"
#include "Editor.h"
#include "ScintillaBase.h"
#include <wx/wx.h>
#include <wx/dataobj.h>
#include <wx/clipbrd.h>
#include <wx/dnd.h>
//----------------------------------------------------------------------
class wxStyledTextCtrl; // forward
class ScintillaWX;
//----------------------------------------------------------------------
// Helper classes
class wxSTCDropTarget : public wxTextDropTarget {
public:
void SetScintilla(ScintillaWX* swx) {
this->swx = swx;
}
bool OnDropText(wxCoord x, wxCoord y, const wxString& data);
wxDragResult OnEnter(wxCoord x, wxCoord y, wxDragResult def);
wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def);
void OnLeave();
private:
ScintillaWX* swx;
};
//----------------------------------------------------------------------
class ScintillaWX : public ScintillaBase {
public:
ScintillaWX(wxStyledTextCtrl* win);
~ScintillaWX();
// base class virtuals
virtual void Initialise();
virtual void Finalise();
virtual void StartDrag();
virtual void SetTicking(bool on);
virtual void SetMouseCapture(bool on);
virtual bool HaveMouseCapture();
virtual void ScrollText(int linesToMove);
virtual void SetVerticalScrollPos();
virtual void SetHorizontalScrollPos();
virtual bool ModifyScrollBars(int nMax, int nPage);
virtual void Copy();
virtual void Paste();
virtual void CreateCallTipWindow(PRectangle rc);
virtual void AddToPopUp(const char *label, int cmd = 0, bool enabled = true);
virtual void ClaimSelection();
virtual long DefWndProc(unsigned int iMessage,
unsigned long wParam,
long lParam);
virtual long WndProc(unsigned int iMessage,
unsigned long wParam,
long lParam);
virtual void NotifyChange();
virtual void NotifyParent(SCNotification scn);
// Event delegates
void DoPaint(wxDC* dc, wxRect rect);
void DoHScroll(int type, int pos);
void DoVScroll(int type, int pos);
void DoSize(int width, int height);
void DoLoseFocus();
void DoGainFocus();
void DoSysColourChange();
void DoButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt);
void DoButtonUp(Point pt, unsigned int curTime, bool ctrl);
void DoButtonMove(Point pt);
void DoAddChar(char ch);
int DoKeyDown(int key, bool shift, bool ctrl, bool alt);
void DoTick() { Tick(); }
bool DoDropText(long x, long y, const wxString& data);
wxDragResult DoDragEnter(wxCoord x, wxCoord y, wxDragResult def);
wxDragResult DoDragOver(wxCoord x, wxCoord y, wxDragResult def);
void DoDragLeave();
void DoCommand(int ID);
void DoContextMenu(Point pt);
void DoOnListBox();
// helpers
void FullPaint();
bool CanPaste();
bool GetHideSelection() { return hideSelection; }
void DoScrollToLine(int line);
void DoScrollToColumn(int column);
private:
bool capturedMouse;
wxStyledTextCtrl* stc;
wxSTCDropTarget* dropTarget;
wxDragResult dragResult;
};
//----------------------------------------------------------------------
#endif

250
contrib/src/stc/StcVC.dsp Normal file
View File

@@ -0,0 +1,250 @@
# Microsoft Developer Studio Project File - Name="StcVC" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 5.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=StcVC - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "StcVC.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "StcVC.mak" CFG="StcVC - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "StcVC - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "StcVC - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
!IF "$(CFG)" == "StcVC - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
RSC=rc.exe
# ADD BASE RSC /l 0x809
# ADD RSC /l 0x809
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../include" /I "scintilla/include" /I "scintilla/src" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "__WX__" /D "SCI_LEXER" /FD /c
# SUBTRACT CPP /YX
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\..\lib\stc.lib"
!ELSEIF "$(CFG)" == "StcVC - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
RSC=rc.exe
# ADD BASE RSC /l 0x809
# ADD RSC /l 0x809
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "../../../include" /I "../../include" /I "scintilla/include" /I "scintilla/src" /D "_DEBUG" /D DEBUG=1 /D "__WXDEBUG__" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "__WX__" /D "SCI_LEXER" /FD /c
# SUBTRACT CPP /YX
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\..\lib\stcd.lib"
!ENDIF
# Begin Target
# Name "StcVC - Win32 Release"
# Name "StcVC - Win32 Debug"
# Begin Group "Stc"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\PlatWX.cpp
# End Source File
# Begin Source File
SOURCE=.\ScintillaWX.cpp
# End Source File
# Begin Source File
SOURCE=.\ScintillaWX.h
# End Source File
# Begin Source File
SOURCE=.\stc.cpp
# End Source File
# End Group
# Begin Group "Scintilla"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\scintilla\src\Accessor.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\AutoComplete.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\AutoComplete.h
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\CallTip.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\CallTip.h
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\CellBuffer.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\CellBuffer.h
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\ContractionState.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\ContractionState.h
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\Document.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\Document.h
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\Editor.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\Editor.h
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\Indicator.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\Indicator.h
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\KeyMap.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\KeyMap.h
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\KeyWords.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\LexCPP.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\LexHTML.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\LexOthers.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\LexPerl.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\LexPython.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\LexSQL.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\LexVB.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\LineMarker.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\LineMarker.h
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\PropSet.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\ScintillaBase.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\ScintillaBase.h
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\Style.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\Style.h
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\SVector.h
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\ViewStyle.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\ViewStyle.h
# End Source File
# End Group
# End Target
# End Project

29
contrib/src/stc/StcVC.dsw Normal file
View File

@@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "StcVC"=.\StcVC.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -0,0 +1,684 @@
#!/bin/env python
#----------------------------------------------------------------------------
# Name: gen_iface.py
# Purpose: Generate stc.h and stc.cpp from the info in Scintilla.iface
#
# Author: Robin Dunn
#
# Created: 5-Sept-2000
# RCS-ID: $Id$
# Copyright: (c) 2000 by Total Control Software
# Licence: wxWindows license
#----------------------------------------------------------------------------
import sys, string, re
from fileinput import FileInput
IFACE = './scintilla/include/Scintilla.iface'
H_TEMPLATE = './stc.h.in'
CPP_TEMPLATE = './stc.cpp.in'
H_DEST = '../../include/wx/stc/stc.h' # './stc_test.h' #
CPP_DEST = './stc.cpp' #'./stc_test.cpp'
# Value prefixes to convert
valPrefixes = [('SCI_', ''),
('SC_', ''),
('SCN_', None), # just toss these...
('SCEN_', None),
('SCE_', ''),
('SCLEX_', 'LEX_'),
('SCK_', 'KEY_'),
('SCFIND_', 'FIND_'),
('SCWS_', 'WS_'),
]
# Message funcion values that should have a CMD_ constant as well
cmdValues = [ (2300, 2350), 2011, 2013, (2176, 2180) ]
# Map some generic typenames to wx types, using return value syntax
retTypeMap = {
'position': 'int',
'string': 'wxString',
'colour': 'wxColour',
}
# Map some generic typenames to wx types, using parameter syntax
paramTypeMap = {
'position': 'int',
'string': 'const wxString&',
'colour': 'const wxColour&',
'keymod': 'int',
}
# Map of method info that needs tweaked. Either the name needs changed, or
# the method definition/implementation. Tuple items are:
#
# 1. New method name. None to skip the method, 0 to leave the
# default name.
# 2. Method definition for the .h file, 0 to leave alone
# 3. Method implementation for the .cpp file, 0 to leave alone.
# 4. tuple of Doc string lines, or 0 to leave alone.
#
methodOverrideMap = {
'AddText' : (0,
'void %s(const wxString& text);',
'''void %s(const wxString& text) {
SendMsg(%s, text.Len(), (long)text.c_str());''',
0),
'AddStyledText' : (0,
'void %s(const wxString& text);',
'''void %s(const wxString& text) {
SendMsg(%s, text.Len(), (long)text.c_str());''',
0),
'GetViewWS' : ( 'GetViewWhiteSpace', 0, 0, 0),
'SetViewWS' : ( 'SetViewWhiteSpace', 0, 0, 0),
'GetStyledText' : (0,
'wxString %s(int startPos, int endPos);',
'''wxString %s(int startPos, int endPos) {
wxString text;
int len = endPos - startPos;
TextRange tr;
tr.lpstrText = text.GetWriteBuf(len*2+1);
tr.chrg.cpMin = startPos;
tr.chrg.cpMax = endPos;
SendMsg(%s, 0, (long)&tr);
text.UngetWriteBuf(len*2);
return text;''',
('Retrieve a buffer of cells.',)),
'PositionFromPoint' : (0,
'int %s(wxPoint pt);',
'''int %s(wxPoint pt) {
return SendMsg(%s, pt.x, pt.y);''',
0),
'GetCurLine' : (0,
'wxString %s(int* OUTPUT=NULL);',
'''wxString %s(int* linePos) {
wxString text;
int len = LineLength(GetCurrentLine());
char* buf = text.GetWriteBuf(len+1);
int pos = SendMsg(%s, len, (long)buf);
text.UngetWriteBuf();
if (linePos) *linePos = pos;
return text;''',
0),
'SetUsePalette' : (None, 0,0,0),
'MarkerSetFore' : ('MarkerSetForeground', 0, 0, 0),
'MarkerSetBack' : ('MarkerSetBackground', 0, 0, 0),
'MarkerDefine' : (0,
'''void %s(int markerNumber, int markerSymbol,
const wxColour& foreground = wxNullColour,
const wxColour& background = wxNullColour);''',
'''void %s(int markerNumber, int markerSymbol,
const wxColour& foreground,
const wxColour& background) {
SendMsg(%s, markerNumber, markerSymbol);
if (foreground.Ok())
MarkerSetForeground(markerNumber, foreground);
if (background.Ok())
MarkerSetBackground(markerNumber, background);''',
('Set the symbol used for a particular marker number,',
'and optionally the for and background colours.')),
'SetMarginTypeN' : ('SetMarginType', 0, 0, 0),
'GetMarginTypeN' : ('GetMarginType', 0, 0, 0),
'SetMarginWidthN' : ('SetMarginWidth', 0, 0, 0),
'GetMarginWidthN' : ('GetMarginWidth', 0, 0, 0),
'SetMarginMaskN' : ('SetMarginMask', 0, 0, 0),
'GetMarginMaskN' : ('GetMarginMask', 0, 0, 0),
'SetMarginSensitiveN' : ('SetMarginSensitive', 0, 0, 0),
'GetMarginSensitiveN' : ('GetMarginSensitive', 0, 0, 0),
'StyleSetFore' : ('StyleSetForeground', 0, 0, 0),
'StyleSetBack' : ('StyleSetBackground', 0, 0, 0),
'SetSelFore' : ('SetSelForeground', 0, 0, 0),
'SetSelBack' : ('SetSelBackground', 0, 0, 0),
'SetCaretFore' : ('SetCaretForeground', 0, 0, 0),
'StyleSetFont' : ('StyleSetFaceName', 0, 0, 0),
# need to fix this to map between wx and scintilla encoding flags, leave it out for now...
'StyleSetCharacterSet' : (None, 0, 0, 0),
'AssignCmdKey' : ('CmdKeyAssign',
'void %s(int key, int modifiers, int cmd);',
'''void %s(int key, int modifiers, int cmd) {
SendMsg(%s, MAKELONG(key, modifiers), cmd);''',
0),
'ClearCmdKey' : ('CmdKeyClear',
'void %s(int key, int modifiers);',
'''void %s(int key, int modifiers) {
SendMsg(%s, MAKELONG(key, modifiers));''',
0),
'ClearAllCmdKeys' : ('CmdKeyClearAll', 0, 0, 0),
'SetStylingEx' : ('SetStyleBytes',
'void %s(int length, char* styleBytes);',
'''void %s(int length, char* styleBytes) {
SendMsg(%s, length, (long)styleBytes);''',
0),
'IndicSetStyle' : ('IndicatorSetStyle', 0, 0, 0),
'IndicGetStyle' : ('IndicatorGetStyle', 0, 0, 0),
'IndicSetFore' : ('IndicatorSetForeground', 0, 0, 0),
'IndicGetFore' : ('IndicatorGetForeground', 0, 0, 0),
'AutoCShow' : ('AutoCompShow', 0, 0, 0),
'AutoCCancel' : ('AutoCompCancel', 0, 0, 0),
'AutoCActive' : ('AutoCompActive', 0, 0, 0),
'AutoCPosStart' : ('AutoCompPosStart', 0, 0, 0),
'AutoCComplete' : ('AutoCompComplete', 0, 0, 0),
'AutoCStops' : ('AutoCompStops', 0, 0, 0),
'AutoCSetSeparator' : ('AutoCompSetSeparator', 0, 0, 0),
'AutoCGetSeparator' : ('AutoCompGetSeparator', 0, 0, 0),
'AutoCSelect' : ('AutoCompSelect', 0, 0, 0),
'AutoCSetCancelAtStart' : ('AutoCompSetCancelAtStart', 0, 0, 0),
'AutoCGetCancelAtStart' : ('AutoCompGetCancelAtStart', 0, 0, 0),
'AutoCSetFillUps' : ('AutoCompSetFillUps', 0, 0, 0),
'AutoCSetChooseSingle' : ('AutoCompSetChooseSingle', 0, 0, 0),
'AutoCGetChooseSingle' : ('AutoCompGetChooseSingle', 0, 0, 0),
'AutoCSetIgnoreCase' : ('AutoCompSetIgnoreCase', 0, 0, 0),
'AutoCGetIgnoreCase' : ('AutoCompGetIgnoreCase', 0, 0, 0),
'SetHScrollBar' : ('SetUseHorizontalScrollBar', 0, 0, 0),
'GetHScrollBar' : ('GetUseHorizontalScrollBar', 0, 0, 0),
'GetCaretFore' : ('GetCaretForeground', 0, 0, 0),
'GetUsePalette' : (None, 0, 0, 0),
'FindText' : (0,
'''int %s(int minPos, int maxPos,
const wxString& text,
bool caseSensitive, bool wholeWord);''',
'''int %s(int minPos, int maxPos,
const wxString& text,
bool caseSensitive, bool wholeWord) {
TextToFind ft;
int flags = 0;
flags |= caseSensitive ? SCFIND_MATCHCASE : 0;
flags |= wholeWord ? SCFIND_WHOLEWORD : 0;
ft.chrg.cpMin = minPos;
ft.chrg.cpMax = maxPos;
ft.lpstrText = (char*)text.c_str();
return SendMsg(%s, flags, (long)&ft);''',
0),
'FormatRange' : (0,
'''int %s(bool doDraw,
int startPos,
int endPos,
wxDC* draw,
wxDC* target, // Why does it use two? Can they be the same?
wxRect renderRect,
wxRect pageRect);''',
''' int %s(bool doDraw,
int startPos,
int endPos,
wxDC* draw,
wxDC* target, // Why does it use two? Can they be the same?
wxRect renderRect,
wxRect pageRect) {
RangeToFormat fr;
fr.hdc = draw;
fr.hdcTarget = target;
fr.rc.top = renderRect.GetTop();
fr.rc.left = renderRect.GetLeft();
fr.rc.right = renderRect.GetRight();
fr.rc.bottom = renderRect.GetBottom();
fr.rcPage.top = pageRect.GetTop();
fr.rcPage.left = pageRect.GetLeft();
fr.rcPage.right = pageRect.GetRight();
fr.rcPage.bottom = pageRect.GetBottom();
fr.chrg.cpMin = startPos;
fr.chrg.cpMax = endPos;
return SendMsg(%s, doDraw, (long)&fr);''',
0),
'GetLine' : (0,
'wxString %s(int line);',
'''wxString %s(int line) {
wxString text;
int len = LineLength(line);
char* buf = text.GetWriteBuf(len+1);
int pos = SendMsg(%s, line, (long)buf);
text.UngetWriteBuf();
return text;''',
('Retrieve the contents of a line.',)),
'SetSel' : ('SetSelection', 0, 0, 0),
'GetSelText' : ('GetSelectedText',
'wxString %s();',
'''wxString %s() {
wxString text;
int start;
int end;
GetSelection(&start, &end);
int len = end - start;
char* buff = text.GetWriteBuf(len+1);
SendMsg(%s, 0, (long)buff);
text.UngetWriteBuf();
return text;''',
('Retrieve the selected text.',)),
'GetTextRange' : (0,
'wxString %s(int startPos, int endPos);',
'''wxString %s(int startPos, int endPos) {
wxString text;
int len = endPos - startPos;
char* buff = text.GetWriteBuf(len+1);
TextRange tr;
tr.lpstrText = buff;
tr.chrg.cpMin = startPos;
tr.chrg.cpMax = endPos;
SendMsg(%s, 0, (long)&tr);
text.UngetWriteBuf();
return text;''',
('Retrieve a range of text.',)),
'PointXFromPosition' : (None, 0, 0, 0),
'PointYFromPosition' : (None, 0, 0, 0),
'ScrollCaret' : ('EnsureCaretVisible', 0, 0, 0),
'ReplaceSel' : ('ReplaceSelection', 0, 0, 0),
'Null' : (None, 0, 0, 0),
'GetText' : (0,
'wxString %s();',
'''wxString %s() {
wxString text;
int len = GetTextLength();
char* buff = text.GetWriteBuf(len+1);
SendMsg(%s, len, (long)buff);
buff[len] = 0;
text.UngetWriteBuf();
return text;''',
('Retrieve all the text in the document.', )),
'GetDirectFunction' : (None, 0, 0, 0),
'GetDirectPointer' : (None, 0, 0, 0),
'CallTipPosStart' : ('CallTipPosAtStart', 0, 0, 0),
'CallTipSetHlt' : ('CallTipSetHighlight', 0, 0, 0),
'CallTipSetBack' : ('CallTipSetBackground', 0, 0, 0),
# Remove all methods that are key commands since they can be
# executed with CmdKeyExecute
'LineDown' : (None, 0, 0, 0),
'LineDownExtend' : (None, 0, 0, 0),
'LineUp' : (None, 0, 0, 0),
'LineUpExtend' : (None, 0, 0, 0),
'CharLeft' : (None, 0, 0, 0),
'CharLeftExtend' : (None, 0, 0, 0),
'CharRight' : (None, 0, 0, 0),
'CharRightExtend' : (None, 0, 0, 0),
'WordLeft' : (None, 0, 0, 0),
'WordLeftExtend' : (None, 0, 0, 0),
'WordRight' : (None, 0, 0, 0),
'WordRightExtend' : (None, 0, 0, 0),
'Home' : (None, 0, 0, 0),
'HomeExtend' : (None, 0, 0, 0),
'LineEnd' : (None, 0, 0, 0),
'LineEndExtend' : (None, 0, 0, 0),
'DocumentStart' : (None, 0, 0, 0),
'DocumentStartExtend' : (None, 0, 0, 0),
'DocumentEnd' : (None, 0, 0, 0),
'DocumentEndExtend' : (None, 0, 0, 0),
'PageUp' : (None, 0, 0, 0),
'PageUpExtend' : (None, 0, 0, 0),
'PageDown' : (None, 0, 0, 0),
'PageDownExtend' : (None, 0, 0, 0),
'EditToggleOvertype' : (None, 0, 0, 0),
'Cancel' : (None, 0, 0, 0),
'DeleteBack' : (None, 0, 0, 0),
'Tab' : (None, 0, 0, 0),
'BackTab' : (None, 0, 0, 0),
'NewLine' : (None, 0, 0, 0),
'FormFeed' : (None, 0, 0, 0),
'VCHome' : (None, 0, 0, 0),
'VCHomeExtend' : (None, 0, 0, 0),
'ZoomIn' : (None, 0, 0, 0),
'ZoomOut' : (None, 0, 0, 0),
'DelWordLeft' : (None, 0, 0, 0),
'DelWordRight' : (None, 0, 0, 0),
'LineCut' : (None, 0, 0, 0),
'LineDelete' : (None, 0, 0, 0),
'LineTranspose' : (None, 0, 0, 0),
'LowerCase' : (None, 0, 0, 0),
'UpperCase' : (None, 0, 0, 0),
'LineScrollDown' : (None, 0, 0, 0),
'LineScrollUp' : (None, 0, 0, 0),
'GetDocPointer' : (0,
'void* %s();',
'''void* %s() {
return (void*)SendMsg(%s);''',
0),
'SetDocPointer' : (0,
'void %s(void* docPointer);',
'''void %s(void* docPointer) {
SendMsg(%s, (long)docPointer);''',
0),
'CreateDocument' : (0,
'void* %s();',
'''void* %s() {
return (void*)SendMsg(%s);''',
0),
'AddRefDocument' : (0,
'void %s(void* docPointer);',
'''void %s(void* docPointer) {
SendMsg(%s, (long)docPointer);''',
0),
'ReleaseDocument' : (0,
'void %s(void* docPointer);',
'''void %s(void* docPointer) {
SendMsg(%s, (long)docPointer);''',
0),
'GrabFocus' : (None, 0, 0, 0),
'' : ('', 0, 0, 0),
}
#----------------------------------------------------------------------------
def processIface(iface, h_tmplt, cpp_tmplt, h_dest, cpp_dest):
curDocStrings = []
values = []
methods = []
# parse iface file
fi = FileInput(iface)
for line in fi:
line = line[:-1]
if line[:2] == '##' or line == '':
#curDocStrings = []
continue
op = line[:4]
if line[:2] == '# ': # a doc string
curDocStrings.append(line[2:])
elif op == 'val ':
parseVal(line[4:], values, curDocStrings)
curDocStrings = []
elif op == 'fun ' or op == 'set ' or op == 'get ':
parseFun(line[4:], methods, curDocStrings, values)
curDocStrings = []
elif op == 'cat ':
if string.strip(line[4:]) == 'Deprecated':
break # skip the rest of the file
elif op == 'evt ':
pass
else:
print '***** Unknown line type: ', line
# process templates
data = {}
data['VALUES'] = processVals(values)
defs, imps = processMethods(methods)
data['METHOD_DEFS'] = defs
data['METHOD_IMPS'] = imps
# get template text
h_text = open(h_tmplt).read()
cpp_text = open(cpp_tmplt).read()
# do the substitutions
h_text = h_text % data
cpp_text = cpp_text % data
# write out destination files
open(h_dest, 'w').write(h_text)
open(cpp_dest, 'w').write(cpp_text)
#----------------------------------------------------------------------------
def processVals(values):
text = []
for name, value, docs in values:
if docs:
text.append('')
for x in docs:
text.append('// ' + x)
text.append('#define %s %s' % (name, value))
return string.join(text, '\n')
#----------------------------------------------------------------------------
def processMethods(methods):
defs = []
imps = []
for retType, name, number, param1, param2, docs in methods:
retType = retTypeMap.get(retType, retType)
params = makeParamString(param1, param2)
name, theDef, theImp, docs = checkMethodOverride(name, number, docs)
if name is None:
continue
# Build the method definition for the .h file
if docs:
defs.append('')
for x in docs:
defs.append(' // ' + x)
if not theDef:
theDef = ' %s %s(%s);' % (retType, name, params)
defs.append(theDef)
# Build the method implementation string
if docs:
imps.append('')
for x in docs:
imps.append('// ' + x)
if not theImp:
theImp = '%s wxStyledTextCtrl::%s(%s) {\n ' % (retType, name, params)
if retType == 'wxColour':
theImp = theImp + 'long c = '
elif retType != 'void':
theImp = theImp + 'return '
theImp = theImp + 'SendMsg(%s, %s, %s)' % (number,
makeArgString(param1),
makeArgString(param2))
if retType == 'bool':
theImp = theImp + ' != 0'
if retType == 'wxColour':
theImp = theImp + ';\n return wxColourFromLong(c)'
theImp = theImp + ';\n}'
imps.append(theImp)
return string.join(defs, '\n'), string.join(imps, '\n')
#----------------------------------------------------------------------------
def checkMethodOverride(name, number, docs):
theDef = theImp = None
if methodOverrideMap.has_key(name):
item = methodOverrideMap[name]
if item[0] != 0:
name = item[0]
if item[1] != 0:
theDef = ' ' + (item[1] % name)
if item[2] != 0:
theImp = item[2] % ('wxStyledTextCtrl::'+name, number) + '\n}'
if item[3] != 0:
docs = item[3]
return name, theDef, theImp, docs
#----------------------------------------------------------------------------
def makeArgString(param):
if not param:
return '0'
typ, name = param
if typ == 'string':
return '(long)%s.c_str()' % name
if typ == 'colour':
return 'wxColourAsLong(%s)' % name
return name
#----------------------------------------------------------------------------
def makeParamString(param1, param2):
def doOne(param):
if param:
aType = paramTypeMap.get(param[0], param[0])
return aType + ' ' + param[1]
else:
return ''
st = doOne(param1)
if st and param2:
st = st + ', '
st = st + doOne(param2)
return st
#----------------------------------------------------------------------------
def parseVal(line, values, docs):
name, val = string.split(line, '=')
# remove prefixes such as SCI, etc.
for old, new in valPrefixes:
lo = len(old)
if name[:lo] == old:
if new is None:
return
name = new + name[lo:]
# add it to the list
values.append( ('wxSTC_' + name, val, docs) )
#----------------------------------------------------------------------------
funregex = re.compile(r'\s*([a-zA-Z0-9_]+)' # <ws>return type
'\s+([a-zA-Z0-9_]+)=' # <ws>name=
'([0-9]+)' # number
'\(([ a-zA-Z0-9_]*),' # (param,
'([ a-zA-Z0-9_]*)\)') # param)
def parseFun(line, methods, docs, values):
def parseParam(param):
param = string.strip(param)
if param == '':
param = None
else:
param = tuple(string.split(param))
return param
mo = funregex.match(line)
if mo is None:
print "***** Line doesn't match! : " + line
retType, name, number, param1, param2 = mo.groups()
param1 = parseParam(param1)
param2 = parseParam(param2)
# Special case. For the key command functionss we want a value defined too
num = string.atoi(number)
for v in cmdValues:
if (type(v) == type(()) and v[0] <= num < v[1]) or v == num:
parseVal('CMD_%s=%s' % (string.upper(name), number), values, ())
#if retType == 'void' and not param1 and not param2:
methods.append( (retType, name, number, param1, param2, tuple(docs)) )
#----------------------------------------------------------------------------
def main(args):
# TODO: parse command line args to replace default input/output files???
# Now just do it
processIface(IFACE, H_TEMPLATE, CPP_TEMPLATE, H_DEST, CPP_DEST)
if __name__ == '__main__':
main(sys.argv)
#----------------------------------------------------------------------------

View File

@@ -0,0 +1,92 @@
#
# File: makefile.b32
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright:
#
# Makefile : Builds wxMMedia library for 32-bit BC++
# N.B. use:
# make -f makefile.b32 stc.cfg
# make -f makefile.b32
WXDIR = $(WXWIN)
SCINTILLA=.\scintilla
S=$(SCINTILLA)\src
STCEXTRACPPFLAGS=-D__WX__ -DSCI_LEXER -I$(SCINTILLA)/include -I$(S)
LIBTARGET=$(WXDIR)\contrib\lib\stc.lib
OBJECTS = \
Accessor.obj \
AutoComplete.obj \
CallTip.obj \
CellBuffer.obj \
ContractionState.obj \
Document.obj \
DocumentAccessor.obj \
Editor.obj \
Indicator.obj \
KeyMap.obj \
KeyWords.obj \
LexCPP.obj \
LexHTML.obj \
LexLua.obj \
LexOthers.obj \
LexPerl.obj \
LexPython.obj \
LexSQL.obj \
LexVB.obj \
LineMarker.obj \
PropSet.obj \
PosRegExp.obj \
ScintillaBase.obj \
Style.obj \
UniConversion.obj \
ViewStyle.obj \
WindowAccessor.obj \
\
PlatWX.obj \
ScintillaWX.obj \
stc.obj \
!include $(WXDIR)\src\makelib.b32
CFG = stc.cfg
CPPFLAGS=$(DLL_FLAGS) $(EXTRACPPFLAGS) @$(CFG)
{$(S)}.cxx.obj:
bcc32 $(CPPFLAGS) -P -c {$< }
$(CFG): makefile.b32
copy &&!
-H=$(WXDIR)\src\msw\wx32.csm
-3
-d
-a1 # byte alignment
-R-
-X
-w-par
-w-aus
-w-hid # virtual function A hides virtual function B
-WE
-tWM
-I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/xpm;$(WXDIR)/src/tiff
-I$(WXDIR)\include\wx\msw\gnuwin32
-L$(BCCDIR)\lib
-D__WXWIN__
-D__WXMSW__
-D__WINDOWS__
-DWIN32
$(OPT)
$(DEBUG_FLAGS)
$(WIN95FLAG)
$(STCEXTRACPPFLAGS)
! $(CFG)

View File

@@ -0,0 +1,46 @@
# File: makefile.g95 For stectrl
# Author: Robin Dunn
# Created: 1-Feb-2000
# Updated:
WXDIR = ../../..
SCINTILLA=$(WXDIR)/contrib/src/stc/scintilla
S=$(SCINTILLA)/src
EXTRAINC=-D__WX__ -DSCI_LEXER -I$(SCINTILLA)/include -I$(S) -I. -I$(WXDIR)/contrib/include
OBJECTS = \
$(S)/Accessor.$(OBJSUFF) \
$(S)/AutoComplete.$(OBJSUFF) \
$(S)/CallTip.$(OBJSUFF) \
$(S)/CellBuffer.$(OBJSUFF) \
$(S)/ContractionState.$(OBJSUFF)\
$(S)/Document.$(OBJSUFF) \
$(S)/Editor.$(OBJSUFF) \
$(S)/Indicator.$(OBJSUFF) \
$(S)/KeyMap.$(OBJSUFF) \
$(S)/KeyWords.$(OBJSUFF) \
$(S)/LineMarker.$(OBJSUFF) \
$(S)/PropSet.$(OBJSUFF) \
$(S)/ScintillaBase.$(OBJSUFF) \
$(S)/Style.$(OBJSUFF) \
$(S)/ViewStyle.$(OBJSUFF) \
$(S)/LexCPP.$(OBJSUFF) \
$(S)/LexHTML.$(OBJSUFF) \
$(S)/LexLua.$(OBJSUFF) \
$(S)/LexOthers.$(OBJSUFF) \
$(S)/LexPerl.$(OBJSUFF) \
$(S)/LexPython.$(OBJSUFF) \
$(S)/LexSQL.$(OBJSUFF) \
$(S)/LexVB.$(OBJSUFF) \
$(S)/DocumentAccessor.$(OBJSUFF)\
$(S)/UniConversion.$(OBJSUFF) \
$(S)/WindowAccessor.$(OBJSUFF) \
$(S)/PosRegExp.$(OBJSUFF) \
PlatWX.$(OBJSUFF) \
ScintillaWX.$(OBJSUFF) \
stc.$(OBJSUFF)
LIBTARGET = $(WXDIR)/contrib/lib/libstc.a
include $(WXDIR)/src/makelib.g95

105
contrib/src/stc/makefile.vc Normal file
View File

@@ -0,0 +1,105 @@
# File: makefile.vc For stectrl
# Author: Robin Dunn
# Created: 1-Feb-2000
# Updated:
# Set WXDIR for your system
WXDIR = $(WXWIN)
SCINTILLA=.\scintilla
S=$(SCINTILLA)\src
EXTRAINC=-D__WX__ -DSCI_LEXER -I$(SCINTILLA)/include -I$(S) -I. -I$(WXDIR)\contrib\include
NOPCH=1
!include $(WXDIR)\src\makevc.env
OBJECTS = \
$(D)\AutoComplete.obj \
$(D)\CallTip.obj \
$(D)\CellBuffer.obj \
$(D)\ContractionState.obj\
$(D)\Document.obj \
$(D)\DocumentAccessor.obj\
$(D)\Editor.obj \
$(D)\Indicator.obj \
$(D)\KeyMap.obj \
$(D)\KeyWords.obj \
$(D)\LexCPP.obj \
$(D)\LexHTML.obj \
$(D)\LexLua.obj \
$(D)\LexOthers.obj \
$(D)\LexPerl.obj \
$(D)\LexPython.obj \
$(D)\LexSQL.obj \
$(D)\LexVB.obj \
$(D)\LineMarker.obj \
$(D)\PosRegExp.obj \
$(D)\PropSet.obj \
$(D)\ScintillaBase.obj \
$(D)\Style.obj \
$(D)\UniConversion.obj \
$(D)\ViewStyle.obj \
$(D)\WindowAccessor.obj \
\
$(D)\PlatWX.obj \
$(D)\ScintillaWX.obj \
$(D)\stc.obj \
LIBTARGET = $(WXDIR)\contrib\lib\stc$(LIBEXT).lib
all: $(D) $(LIBTARGET)
$(D) :
mkdir $(D)
wx:
cd $(WXDIR)\src\msw
nmake -f makefile.vc FINAL=$(FINAL)
cd $(THISDIR)
wxclean:
cd $(WXDIR)\src\msw
nmake -f makefile.vc clean
cd $(THISDIR)
$(LIBTARGET): $(OBJECTS)
-erase $(LIBTARGET)
$(implib) @<<
-out:$(LIBTARGET)
-machine:$(CPU)
$(OBJECTS)
<<
{$(S)}.cxx{$(D)}.obj:
$(cc) @<<
$(CPPFLAGS) /c /Fo$@ /Tp $<
<<
{}.cpp{$(D)}.obj:
$(cc) @<<
$(CPPFLAGS) /c /Fo$@ /Tp $<
<<
show:
@echo $(CPPFLAGS)
clean:
-erase $(D)\*.obj
-erase *.sbr
-erase *.exe
-erase *.res
-erase *.map
-erase *.pdb
-erase $(LIBTARGET)

View File

@@ -0,0 +1,7 @@
This directory contains copies of the scintilla/src and
scintilla/include directories from the Scintilla/SCiTE source
distribution. All other code needed to implement Scintilla on top of
wxWindows is located in the directory above this one.
The current version of the Scintilla code is 1.32

View File

@@ -0,0 +1,70 @@
// SciTE - Scintilla based Text Editor
// Accessor.h - rapid easy access to contents of a Scintilla
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
enum { wsSpace = 1, wsTab = 2, wsSpaceTab = 4, wsInconsistent=8};
class Accessor;
typedef bool (*PFNIsCommentLeader)(Accessor &styler, int pos, int len);
// Interface to data in a Scintilla
class Accessor {
protected:
enum {extremePosition=0x7FFFFFFF};
// bufferSize is a trade off between time taken to copy the characters and retrieval overhead
// slopSize positions the buffer before the desired position in case there is some backtracking
enum {bufferSize=4000, slopSize=bufferSize/8};
char buf[bufferSize+1];
int startPos;
int endPos;
int codePage;
virtual bool InternalIsLeadByte(char ch)=0;
virtual void Fill(int position)=0;
public:
Accessor() : startPos(extremePosition), endPos(0), codePage(0) {}
virtual ~Accessor() {}
char operator[](int position) {
if (position < startPos || position >= endPos) {
Fill(position);
}
return buf[position - startPos];
}
char SafeGetCharAt(int position, char chDefault=' ') {
// Safe version of operator[], returning a defined value for invalid position
if (position < startPos || position >= endPos) {
Fill(position);
if (position < startPos || position >= endPos) {
// Position is outside range of document
return chDefault;
}
}
return buf[position - startPos];
}
bool IsLeadByte(char ch) {
return codePage && InternalIsLeadByte(ch);
}
void SetCodePage(int codePage_) { codePage = codePage_; }
virtual char StyleAt(int position)=0;
virtual int GetLine(int position)=0;
virtual int LineStart(int line)=0;
virtual int LevelAt(int line)=0;
virtual int Length()=0;
virtual void Flush()=0;
virtual int GetLineState(int line)=0;
virtual int SetLineState(int line, int state)=0;
virtual int GetPropertyInt(const char *key, int defaultValue=0)=0;
// Style setting
virtual void StartAt(unsigned int start, char chMask=31)=0;
virtual void SetFlags(char chFlags_, char chWhile_)=0;
virtual unsigned int GetStartSegment()=0;
virtual void StartSegment(unsigned int pos)=0;
virtual void ColourTo(unsigned int pos, int chAttr)=0;
virtual void SetLevel(int line, int level)=0;
virtual int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0)=0;
};

View File

@@ -0,0 +1,41 @@
// SciTE - Scintilla based Text Editor
// KeyWords.h - colourise for particular languages
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
typedef void (*LexerFunction)(unsigned int startPos, int lengthDoc, int initStyle,
WordList *keywordlists[], Accessor &styler);
class LexerModule {
static LexerModule *base;
LexerModule *next;
int language;
LexerFunction fn;
public:
LexerModule(int language_, LexerFunction fn_);
static void Colourise(unsigned int startPos, int lengthDoc, int initStyle,
int language, WordList *keywordlists[], Accessor &styler);
};
inline bool iswordchar(char ch) {
return isalnum(ch) || ch == '.' || ch == '_';
}
inline bool iswordstart(char ch) {
return isalnum(ch) || ch == '_';
}
inline bool isoperator(char ch) {
if (isalnum(ch))
return false;
// '.' left out as it is used to make up numbers
if (ch == '%' || ch == '^' || ch == '&' || ch == '*' ||
ch == '(' || ch == ')' || ch == '-' || ch == '+' ||
ch == '=' || ch == '|' || ch == '{' || ch == '}' ||
ch == '[' || ch == ']' || ch == ':' || ch == ';' ||
ch == '<' || ch == '>' || ch == ',' || ch == '/' ||
ch == '?' || ch == '!' || ch == '.' || ch == '~')
return true;
return false;
}

View File

@@ -0,0 +1,411 @@
// Scintilla source code edit control
// Platform.h - interface to platform facilities
// Also includes some basic utilities
// Implemented in PlatGTK.cxx for GTK+/Linux, PlatWin.cxx for Windows, and PlatWX.cxx for wxWindows
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef PLATFORM_H
#define PLATFORM_H
// PLAT_GTK = GTK+ on Linux, PLAT_WIN = Win32 API on Win32 OS
// PLAT_WX is wxWindows on any supported platform
// Could also have PLAT_GTKWIN = GTK+ on Win32 OS in future
#define PLAT_GTK 0
#define PLAT_WIN 0
#define PLAT_WX 0
#if defined(__WX__)
#undef PLAT_WX
#define PLAT_WX 1
#elif defined(GTK)
#undef PLAT_GTK
#define PLAT_GTK 1
#else
#undef PLAT_WIN
#define PLAT_WIN 1
#endif
// Include the main header for each platform
#if PLAT_GTK
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#endif
#if PLAT_WIN
#define _WIN32_WINNT 0x0400 // Otherwise some required stuff gets ifdef'd out
// Vassili Bourdo: shut up annoying Visual C++ warnings:
#ifdef _MSC_VER
#pragma warning(disable: 4800 4244 4309)
#endif
#include <windows.h>
#include <commctrl.h>
#include <richedit.h>
#endif
#if PLAT_WX
#include <wx/wx.h>
#endif
// Underlying the implementation of the platform classes are platform specific types.
// Sometimes these need to be passed around by client code so they are defined here
#if PLAT_GTK
typedef GdkColor ColourID;
typedef GdkFont* FontID;
typedef GdkDrawable* SurfaceID;
typedef GtkWidget* WindowID;
typedef GtkItemFactory* MenuID;
#endif
#if PLAT_WIN
typedef COLORREF ColourID;
typedef HFONT FontID;
typedef HDC SurfaceID;
typedef HWND WindowID;
typedef HMENU MenuID;
#endif
#if PLAT_WX
typedef wxColour ColourID;
typedef wxFont* FontID;
typedef wxDC* SurfaceID;
typedef wxWindow* WindowID;
typedef wxMenu* MenuID;
#endif
// Point is exactly the same as the Win32 POINT and GTK+ GdkPoint so can be used interchangeably
class Point {
public:
int x;
int y;
Point(int x_=0, int y_=0) : x(x_), y(y_) {
}
// Other automatically defined methods (assignment, copy constructor, destructor) are fine
static Point FromLong(long lpoint);
};
// PRectangle is exactly the same as the Win32 RECT so can be used interchangeably
// PRectangles contain their top and left sides, but not their right and bottom sides
class PRectangle {
public:
int left;
int top;
int right;
int bottom;
PRectangle(int left_=0, int top_=0, int right_=0, int bottom_ = 0) :
left(left_), top(top_), right(right_), bottom(bottom_) {
}
// Other automatically defined methods (assignment, copy constructor, destructor) are fine
bool Contains(Point pt) {
return (pt.x >= left) && (pt.x <= right) &&
(pt.y >= top) && (pt.y <= bottom);
}
bool Contains(PRectangle rc) {
return (rc.left >= left) && (rc.right <= right) &&
(rc.top >= top) && (rc.bottom <= bottom);
}
bool Intersects(PRectangle other) {
return (right >= other.left) && (left <= other.right) &&
(bottom >= other.top) && (top <= other.bottom);
}
int Width() { return right - left; }
int Height() { return bottom - top; }
};
#if PLAT_WX
wxRect wxRectFromPRectangle(PRectangle prc);
PRectangle PRectangleFromwxRect(wxRect rc);
#endif
class Colour {
ColourID co;
public:
Colour(long lcol=0);
Colour(unsigned int red, unsigned int green, unsigned int blue);
bool operator==(const Colour &other) const;
long AsLong() const;
unsigned int GetRed();
unsigned int GetGreen();
unsigned int GetBlue();
friend class Surface;
friend class Palette;
};
// Colour pairs hold a desired colour and the colour that the graphics engine
// allocates to approximate the desired colour.
// To make palette management more automatic, ColourPairs could register at
// construction time with a palette management object.
struct ColourPair {
Colour desired;
Colour allocated;
ColourPair(Colour desired_=Colour(0,0,0)) {
desired = desired_;
allocated = desired;
}
};
class Window; // Forward declaration for Palette
class Palette {
int used;
enum {numEntries = 100};
ColourPair entries[numEntries];
#if PLAT_GTK
GdkColor *allocatedPalette;
int allocatedLen;
#elif PLAT_WIN
HPALETTE hpal;
#elif PLAT_WX
// wxPalette* pal; // **** Is this needed?
#endif
public:
bool allowRealization;
Palette();
~Palette();
void Release();
// This method either adds a colour to the list of wanted colours (want==true)
// or retrieves the allocated colour back to the ColourPair.
// This is one method to make it easier to keep the code for wanting and retrieving in sync.
void WantFind(ColourPair &cp, bool want);
void Allocate(Window &w);
friend class Surface;
};
class Font {
protected:
FontID id;
#if PLAT_WX
int ascent;
#endif
// Private so Font objects can not be copied
Font(const Font &) {}
Font &operator=(const Font &) { id=0; return *this; }
public:
Font();
virtual ~Font();
virtual void Create(const char *faceName, int characterSet, int size, bool bold, bool italic);
virtual void Release();
FontID GetID() { return id; }
// Alias another font - caller guarantees not to Release
void SetID(FontID id_) { id = id_; }
friend class Surface;
};
// A surface abstracts a place to draw
class Surface {
private:
bool unicodeMode;
#if PLAT_GTK
GdkDrawable *drawable;
GdkGC *gc;
GdkPixmap *ppixmap;
int x;
int y;
bool inited;
bool createdGC;
#elif PLAT_WIN
HDC hdc;
bool hdcOwned;
HPEN pen;
HPEN penOld;
HBRUSH brush;
HBRUSH brushOld;
HFONT font;
HFONT fontOld;
HBITMAP bitmap;
HBITMAP bitmapOld;
HPALETTE paletteOld;
#elif PLAT_WX
wxDC* hdc;
bool hdcOwned;
wxBitmap* bitmap;
int x;
int y;
#endif
// Private so Surface objects can not be copied
Surface(const Surface &) {}
Surface &operator=(const Surface &) { return *this; }
#if PLAT_WIN || PLAT_WX
void BrushColor(Colour back);
void SetFont(Font &font_);
#endif
public:
Surface();
~Surface();
void Init();
void Init(SurfaceID hdc_);
void InitPixMap(int width, int height, Surface *surface_);
void Release();
bool Initialised();
void PenColour(Colour fore);
int LogPixelsY();
int DeviceHeightFont(int points);
void MoveTo(int x_, int y_);
void LineTo(int x_, int y_);
void Polygon(Point *pts, int npts, Colour fore, Colour back);
void RectangleDraw(PRectangle rc, Colour fore, Colour back);
void FillRectangle(PRectangle rc, Colour back);
void FillRectangle(PRectangle rc, Surface &surfacePattern);
void RoundedRectangle(PRectangle rc, Colour fore, Colour back);
void Ellipse(PRectangle rc, Colour fore, Colour back);
void Copy(PRectangle rc, Point from, Surface &surfaceSource);
void DrawText(PRectangle rc, Font &font_, int ybase, const char *s, int len, Colour fore, Colour back);
void DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, Colour fore, Colour back);
void MeasureWidths(Font &font_, const char *s, int len, int *positions);
int WidthText(Font &font_, const char *s, int len);
int WidthChar(Font &font_, char ch);
int Ascent(Font &font_);
int Descent(Font &font_);
int InternalLeading(Font &font_);
int ExternalLeading(Font &font_);
int Height(Font &font_);
int AverageCharWidth(Font &font_);
int SetPalette(Palette *pal, bool inBackGround);
void SetClip(PRectangle rc);
void FlushCachedState();
void SetUnicodeMode(bool unicodeMode_) {
unicodeMode=unicodeMode_;
}
};
// Class to hide the details of window manipulation
// Does not own the window which will normally have a longer life than this object
class Window {
friend class ListBox;
protected:
WindowID id;
public:
Window() : id(0) {}
Window(const Window &source) : id(source.id) {}
virtual ~Window();
Window &operator=(WindowID id_) {
id = id_;
return *this;
}
WindowID GetID() { return id; }
bool Created() { return id != 0; }
void Destroy();
bool HasFocus();
PRectangle GetPosition();
void SetPosition(PRectangle rc);
void SetPositionRelative(PRectangle rc, Window relativeTo);
PRectangle GetClientPosition();
void Show(bool show=true);
void InvalidateAll();
void InvalidateRectangle(PRectangle rc);
virtual void SetFont(Font &font);
enum Cursor { cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow };
void SetCursor(Cursor curs);
void SetTitle(const char *s);
#if PLAT_WIN
LRESULT SendMessage(UINT msg, WPARAM wParam=0, LPARAM lParam=0);
int GetDlgCtrlID();
HINSTANCE GetInstance();
#endif
};
class ListBox : public Window {
#if PLAT_GTK
WindowID list;
WindowID scroller;
int current;
#endif
int desiredVisibleRows;
unsigned int maxItemCharacters;
unsigned int aveCharWidth;
public:
ListBox();
virtual ~ListBox();
void Create(Window &parent, int ctrlID);
virtual void SetFont(Font &font);
void SetAverageCharWidth(int width);
void SetVisibleRows(int rows);
PRectangle GetDesiredRect();
void Clear();
void Append(char *s);
int Length();
void Select(int n);
int GetSelection();
int Find(const char *prefix);
void GetValue(int n, char *value, int len);
void Sort();
};
class Menu {
MenuID id;
public:
Menu();
MenuID GetID() { return id; }
void CreatePopUp();
void Destroy();
void Show(Point pt, Window &w);
};
// Platform class used to retrieve system wide parameters such as double click speed
// and chrome colour. Not a creatable object, more of a module with several functions.
class Platform {
// Private so Platform objects can not be copied
Platform(const Platform &) {}
Platform &operator=(const Platform &) { return *this; }
public:
// Should be private because no new Platforms are ever created
// but gcc warns about this
Platform() {}
~Platform() {}
static Colour Chrome();
static Colour ChromeHighlight();
static const char *DefaultFont();
static int DefaultFontSize();
static unsigned int DoubleClickTime();
static void DebugDisplay(const char *s);
static bool IsKeyDown(int key);
static long SendScintilla(
WindowID w, unsigned int msg, unsigned long wParam=0, long lParam=0);
// These are utility functions not really tied to a platform
static int Minimum(int a, int b);
static int Maximum(int a, int b);
// Next three assume 16 bit shorts and 32 bit longs
static long LongFromTwoShorts(short a,short b) {
return (a) | ((b) << 16);
}
static short HighShortFromLong(long x) {
return static_cast<short>(x >> 16);
}
static short LowShortFromLong(long x) {
return static_cast<short>(x & 0xffff);
}
static void DebugPrintf(const char *format, ...);
static int Clamp(int val, int minVal, int maxVal);
};
#endif

View File

@@ -0,0 +1,138 @@
#ifndef POSREGEXP_H
#define POSREGEXP_H
#define MatchesNum 0x10
enum EOps
{
ReBlockOps = 0x1000,
ReMul, // *
RePlus, // +
ReQuest, // ?
ReNGMul, // *?
ReNGPlus, // +?
ReNGQuest, // ??
ReRangeN, // {n,}
ReRangeNM, // {n,m}
ReNGRangeN, // {n,}?
ReNGRangeNM, // {n,m}?
ReOr, // |
ReBehind = 0x1100, // ?#n
ReNBehind = 0x1200, // ?~n
ReAhead = 0x1300, // ?=
ReNAhead = 0x1400, // ?!
ReSymbolOps = 0x2000,
ReEmpty,
ReSymb, // a b \W \s ...
ReEnum, // []
ReNEnum, // [^]
ReBrackets, // (...)
ReBkTrace = 0x2100, // \yN
ReBkBrack = 0x2200 // \N
};
enum ESymbols
{
ReAnyChr = 0x4000, // .
ReSoL, // ^
ReEoL, // $
ReDigit, // \d
ReNDigit, // \D
ReWordSymb, // \w
ReNWordSymb, // \W
ReWSpace, // \s
ReNWSpace, // \S
ReUCase, // \u
ReNUCase , // \l
ReWBound, // \b
ReNWBound, // \B
RePreNW, // \c
ReStart, // \m
ReEnd, // \M
ReChr = 0x0 // Char in Lower Byte
};
enum ETempSymb
{
ReTemp = 0x7000,
ReLBrack, ReRBrack,
ReEnumS, ReEnumE, ReNEnumS,
ReRangeS, ReRangeE, ReNGRangeE, ReFrToEnum
};
#define BackSlash '\\'
typedef union SCharData
{
int IArr[8];
char CArr[32];
void SetBit(unsigned char Bit);
void ClearBit(unsigned char Bit);
bool GetBit(unsigned char Bit);
} *PCharData;
typedef struct SRegInfo
{
SRegInfo();
~SRegInfo();
EOps Op;
union{
SRegInfo *Param;
int Symb;
PCharData ChrClass;
}un;
int s,e;
SRegInfo *Parent;
SRegInfo *Next;
} *PRegInfo;
typedef struct SMatches
{
int s[MatchesNum];
int e[MatchesNum];
int CurMatch;
} *PMatches;
typedef class PosRegExp
{
PRegInfo Info;
PMatches BkTrace;
bool NoCase,Extend,NoMoves;
bool Error;
int *Exprn;
int posParse;
int posEnd,posStart;
int posBkStr;
int FirstChar;
bool SetExprLow(const char *Expr);
bool SetStructs(PRegInfo &Info,int st,int end);
void Optimize();
bool CheckSymb(int Symb,bool Inc);
bool LowParse(PRegInfo Re);
bool LowParseRe(PRegInfo &Next);
bool LowCheckNext(PRegInfo Re);
bool ParseRe(int posStr);
bool QuickCheck();
public:
PMatches Matches;
int Ok, CurMatch;
void *param;
char (*CharAt)(int pos, void *param);
PosRegExp();
~PosRegExp();
bool isok();
bool SetNoMoves(bool Moves);
bool SetBkTrace(int posStr,PMatches Trace);
bool SetExpr(const char *Expr);
bool Parse(int posStr, int posStop, PMatches Mtch);
bool Parse(int posStr,int posSol, int posEol, PMatches Mtch, int Moves = -1);
bool Evaluate(char *Expr, int posStr, PMatches Mtch, char **Res);
} *PPosRegExp;
#endif /* POSREGEXP_H */

View File

@@ -0,0 +1,244 @@
// SciTE - Scintilla based Text Editor
// PropSet.h - a java style properties file module
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef PROPSET_H
#define PROPSET_H
bool EqualCaseInsensitive(const char *a, const char *b);
#if PLAT_WIN
#define strcasecmp stricmp
#define strncasecmp strnicmp
#endif
#ifdef __WXMSW__
#define strcasecmp stricmp
#define strncasecmp strnicmp
#endif
// Define another string class.
// While it would be 'better' to use std::string, that doubles the executable size.
inline char *StringDup(const char *s, int len=-1) {
if (!s)
return 0;
if (len == -1)
len = strlen(s);
char *sNew = new char[len + 1];
if (sNew) {
strncpy(sNew, s, len);
sNew[len] = '\0';
}
return sNew;
}
class SString {
char *s;
int ssize;
public:
typedef const char* const_iterator;
typedef int size_type;
static size_type npos;
const char* begin(void) const {
return s;
}
const char* end(void) const {
return &s[ssize];
}
size_type size(void) const {
if (s)
return ssize;
else
return 0;
}
SString &assign(const char* sother, int size_ = -1) {
char *t = s;
s = StringDup(sother,size_);
ssize = (s) ? strlen(s) : 0;
delete []t;
return *this;
}
SString &assign(const SString& sother, int size_ = -1) {
return assign(sother.s,size_);
}
SString &assign(const_iterator ibeg, const_iterator iend) {
return assign(ibeg,iend - ibeg);
}
SString() {
s = 0;
ssize = 0;
}
SString(const SString &source) {
s = StringDup(source.s);
ssize = (s) ? strlen(s) : 0;
}
SString(const char *s_) {
s = StringDup(s_);
ssize = (s) ? strlen(s) : 0;
}
SString(int i) {
char number[100];
sprintf(number, "%0d", i);
s = StringDup(number);
ssize = (s) ? strlen(s) : 0;
}
~SString() {
delete []s;
s = 0;
ssize = 0;
}
SString &operator=(const SString &source) {
if (this != &source) {
delete []s;
s = StringDup(source.s);
ssize = (s) ? strlen(s) : 0;
}
return *this;
}
bool operator==(const SString &other) const {
if ((s == 0) && (other.s == 0))
return true;
if ((s == 0) || (other.s == 0))
return false;
return strcmp(s, other.s) == 0;
}
bool operator!=(const SString &other) const {
return !operator==(other);
}
bool operator==(const char *sother) const {
if ((s == 0) && (sother == 0))
return true;
if ((s == 0) || (sother == 0))
return false;
return strcmp(s, sother) == 0;
}
bool operator!=(const char *sother) const {
return !operator==(sother);
}
const char *c_str() const {
if (s)
return s;
else
return "";
}
int length() const {
if (s)
return strlen(s);
else
return 0;
}
char operator[](int i) const {
if (s)
return s[i];
else
return '\0';
}
SString &operator +=(const char *sother) {
return append(sother,-1);
}
SString &operator +=(const SString &sother) {
return append(sother.s,sother.ssize);
}
SString &operator +=(char ch) {
return append(&ch,1);
}
SString &append(const char* sother, int lenOther) {
int len = length();
if(lenOther < 0)
lenOther = strlen(sother);
char *sNew = new char[len + lenOther + 1];
if (sNew) {
if (s)
memcpy(sNew, s, len);
strncpy(&sNew[len], sother, lenOther);
sNew[len + lenOther] = '\0';
delete []s;
s = sNew;
ssize = (s) ? strlen(s) : 0;
}
return *this;
}
int value() const {
if (s)
return atoi(s);
else
return 0;
}
void substitute(char find, char replace) {
char *t = s;
while (t) {
t = strchr(t, find);
if (t)
*t = replace;
}
}
// I don't think this really belongs here -- Neil
void correctPath() {
#ifdef unix
substitute('\\', '/');
#else
substitute('/', '\\');
#endif
}
};
struct Property {
unsigned int hash;
char *key;
char *val;
Property *next;
Property() : hash(0), key(0), val(0), next(0) {}
};
class PropSet {
private:
enum { hashRoots=31 };
Property *props[hashRoots];
public:
PropSet *superPS;
PropSet();
~PropSet();
void Set(const char *key, const char *val);
void Set(char *keyval);
SString Get(const char *key);
SString GetExpanded(const char *key);
SString Expand(const char *withvars);
int GetInt(const char *key, int defaultValue=0);
SString GetWild(const char *keybase, const char *filename);
SString GetNewExpand(const char *keybase, const char *filename);
void Clear();
void ReadFromMemory(const char *data, int len, const char *directoryForImports=0);
void Read(const char *filename, const char *directoryForImports);
};
class WordList {
public:
// Each word contains at least one character - a empty word acts as sentinal at the end.
char **words;
char **wordsNoCase;
char *list;
int len;
bool onlyLineEnds; // Delimited by any white space or only line ends
bool sorted;
int starts[256];
WordList(bool onlyLineEnds_ = false) :
words(0), wordsNoCase(0), list(0), len(0), onlyLineEnds(onlyLineEnds_), sorted(false) {}
~WordList() { Clear(); }
operator bool() { return words ? true : false; }
const char *operator[](int ind) { return words[ind]; }
void Clear();
void Set(const char *s);
char *Allocate(int size);
void SetFromAllocated();
bool InList(const char *s);
const char *GetNearestWord(const char *wordStart, int searchLen = -1, bool ignoreCase = false);
char *GetNearestWords(const char *wordStart, int searchLen = -1, bool ignoreCase = false);
};
inline bool nonFuncChar(char ch) {
return strchr("\t\n\r !\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~", ch) != NULL;
}
#endif

View File

@@ -0,0 +1,204 @@
// Scintilla source code edit control
// SciLexer - interface to the added lexer functions in the SciLexer version of the edit control
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
// Most of this file is automatically generated from the Scintilla.iface interface definition
// file which contains any comments about the definitions. HFacer.py does the generation.
#ifndef SCILEXER_H
#define SCILEXER_H
// SciLexer features - not in standard Scintilla
//++Autogenerated -- start of section automatically generated from Scintilla.iface
#define SCLEX_CONTAINER 0
#define SCLEX_NULL 1
#define SCLEX_PYTHON 2
#define SCLEX_CPP 3
#define SCLEX_HTML 4
#define SCLEX_XML 5
#define SCLEX_PERL 6
#define SCLEX_SQL 7
#define SCLEX_VB 8
#define SCLEX_PROPERTIES 9
#define SCLEX_ERRORLIST 10
#define SCLEX_MAKEFILE 11
#define SCLEX_BATCH 12
#define SCLEX_XCODE 13
#define SCLEX_LATEX 14
#define SCLEX_LUA 15
#define SCLEX_DIFF 16
#define SCE_P_DEFAULT 0
#define SCE_P_COMMENTLINE 1
#define SCE_P_NUMBER 2
#define SCE_P_STRING 3
#define SCE_P_CHARACTER 4
#define SCE_P_WORD 5
#define SCE_P_TRIPLE 6
#define SCE_P_TRIPLEDOUBLE 7
#define SCE_P_CLASSNAME 8
#define SCE_P_DEFNAME 9
#define SCE_P_OPERATOR 10
#define SCE_P_IDENTIFIER 11
#define SCE_P_COMMENTBLOCK 12
#define SCE_P_STRINGEOL 13
#define SCE_C_DEFAULT 0
#define SCE_C_COMMENT 1
#define SCE_C_COMMENTLINE 2
#define SCE_C_COMMENTDOC 3
#define SCE_C_NUMBER 4
#define SCE_C_WORD 5
#define SCE_C_STRING 6
#define SCE_C_CHARACTER 7
#define SCE_C_UUID 8
#define SCE_C_PREPROCESSOR 9
#define SCE_C_OPERATOR 10
#define SCE_C_IDENTIFIER 11
#define SCE_C_STRINGEOL 12
#define SCE_C_VERBATIM 13
#define SCE_H_DEFAULT 0
#define SCE_H_TAG 1
#define SCE_H_TAGUNKNOWN 2
#define SCE_H_ATTRIBUTE 3
#define SCE_H_ATTRIBUTEUNKNOWN 4
#define SCE_H_NUMBER 5
#define SCE_H_DOUBLESTRING 6
#define SCE_H_SINGLESTRING 7
#define SCE_H_OTHER 8
#define SCE_H_COMMENT 9
#define SCE_H_ENTITY 10
#define SCE_H_TAGEND 11
#define SCE_H_XMLSTART 12
#define SCE_H_XMLEND 13
#define SCE_H_SCRIPT 14
#define SCE_H_ASP 15
#define SCE_H_ASPAT 16
#define SCE_H_CDATA 17
#define SCE_H_QUESTION 18
#define SCE_H_VALUE 19
#define SCE_HJ_START 40
#define SCE_HJ_DEFAULT 41
#define SCE_HJ_COMMENT 42
#define SCE_HJ_COMMENTLINE 43
#define SCE_HJ_COMMENTDOC 44
#define SCE_HJ_NUMBER 45
#define SCE_HJ_WORD 46
#define SCE_HJ_KEYWORD 47
#define SCE_HJ_DOUBLESTRING 48
#define SCE_HJ_SINGLESTRING 49
#define SCE_HJ_SYMBOLS 50
#define SCE_HJ_STRINGEOL 51
#define SCE_HJA_START 55
#define SCE_HJA_DEFAULT 56
#define SCE_HJA_COMMENT 57
#define SCE_HJA_COMMENTLINE 58
#define SCE_HJA_COMMENTDOC 59
#define SCE_HJA_NUMBER 60
#define SCE_HJA_WORD 61
#define SCE_HJA_KEYWORD 62
#define SCE_HJA_DOUBLESTRING 63
#define SCE_HJA_SINGLESTRING 64
#define SCE_HJA_SYMBOLS 65
#define SCE_HJA_STRINGEOL 66
#define SCE_HB_START 70
#define SCE_HB_DEFAULT 71
#define SCE_HB_COMMENTLINE 72
#define SCE_HB_NUMBER 73
#define SCE_HB_WORD 74
#define SCE_HB_STRING 75
#define SCE_HB_IDENTIFIER 76
#define SCE_HB_STRINGEOL 77
#define SCE_HBA_START 80
#define SCE_HBA_DEFAULT 81
#define SCE_HBA_COMMENTLINE 82
#define SCE_HBA_NUMBER 83
#define SCE_HBA_WORD 84
#define SCE_HBA_STRING 85
#define SCE_HBA_IDENTIFIER 86
#define SCE_HBA_STRINGEOL 87
#define SCE_HP_START 90
#define SCE_HP_DEFAULT 91
#define SCE_HP_COMMENTLINE 92
#define SCE_HP_NUMBER 93
#define SCE_HP_STRING 94
#define SCE_HP_CHARACTER 95
#define SCE_HP_WORD 96
#define SCE_HP_TRIPLE 97
#define SCE_HP_TRIPLEDOUBLE 98
#define SCE_HP_CLASSNAME 99
#define SCE_HP_DEFNAME 100
#define SCE_HP_OPERATOR 101
#define SCE_HP_IDENTIFIER 102
#define SCE_HPA_START 105
#define SCE_HPA_DEFAULT 106
#define SCE_HPA_COMMENTLINE 107
#define SCE_HPA_NUMBER 108
#define SCE_HPA_STRING 109
#define SCE_HPA_CHARACTER 110
#define SCE_HPA_WORD 111
#define SCE_HPA_TRIPLE 112
#define SCE_HPA_TRIPLEDOUBLE 113
#define SCE_HPA_CLASSNAME 114
#define SCE_HPA_DEFNAME 115
#define SCE_HPA_OPERATOR 116
#define SCE_HPA_IDENTIFIER 117
#define SCE_HPHP_DEFAULT 118
#define SCE_HPHP_HSTRING 119
#define SCE_HPHP_SIMPLESTRING 120
#define SCE_HPHP_WORD 121
#define SCE_HPHP_NUMBER 122
#define SCE_HPHP_VARIABLE 123
#define SCE_HPHP_COMMENT 124
#define SCE_HPHP_COMMENTLINE 125
#define SCE_HPHP_STRINGEOL 126
#define SCE_PL_DEFAULT 0
#define SCE_PL_HERE 1
#define SCE_PL_COMMENTLINE 2
#define SCE_PL_POD 3
#define SCE_PL_NUMBER 4
#define SCE_PL_WORD 5
#define SCE_PL_STRING 6
#define SCE_PL_CHARACTER 7
#define SCE_PL_PUNCTUATION 8
#define SCE_PL_PREPROCESSOR 9
#define SCE_PL_OPERATOR 10
#define SCE_PL_IDENTIFIER 11
#define SCE_PL_SCALAR 12
#define SCE_PL_ARRAY 13
#define SCE_PL_HASH 14
#define SCE_PL_SYMBOLTABLE 15
#define SCE_PL_REF 16
#define SCE_PL_REGEX 17
#define SCE_PL_REGSUBST 18
#define SCE_PL_LONGQUOTE 19
#define SCE_PL_BACKTICKS 20
#define SCE_PL_DATASECTION 21
#define SCE_L_DEFAULT 0
#define SCE_L_COMMAND 1
#define SCE_L_TAG 2
#define SCE_L_MATH 3
#define SCE_L_COMMENT 4
#define SCE_LUA_DEFAULT 0
#define SCE_LUA_COMMENT 1
#define SCE_LUA_COMMENTLINE 2
#define SCE_LUA_COMMENTDOC 3
#define SCE_LUA_NUMBER 4
#define SCE_LUA_WORD 5
#define SCE_LUA_STRING 6
#define SCE_LUA_CHARACTER 7
#define SCE_LUA_LITERALSTRING 8
#define SCE_LUA_PREPROCESSOR 9
#define SCE_LUA_OPERATOR 10
#define SCE_LUA_IDENTIFIER 11
#define SCE_LUA_STRINGEOL 12
#define SCE_ERR_DEFAULT 0
#define SCE_ERR_PYTHON 1
#define SCE_ERR_GCC 2
#define SCE_ERR_MS 3
#define SCE_ERR_CMD 4
#define SCE_ERR_BORLAND 5
#define SCE_ERR_PERL 6
//--Autogenerated -- end of section automatically generated from Scintilla.iface
#endif

View File

@@ -0,0 +1,508 @@
// Scintilla source code edit control
// Scintilla.h - interface to the edit control
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
// Most of this file is automatically generated from the Scintilla.iface interface definition
// file which contains any comments about the definitions. HFacer.py does the generation.
#ifndef SCINTILLA_H
#define SCINTILLA_H
// Compile-time configuration options
#define MACRO_SUPPORT 1 // Comment out to remove macro hooks
#if PLAT_WIN
#ifdef STATIC_BUILD
void Scintilla_RegisterClasses(HINSTANCE hInstance);
#endif
#endif
typedef long (*SciFnDirect)(long ptr, unsigned int iMessage, unsigned long wParam, long lParam);
//++Autogenerated -- start of section automatically generated from Scintilla.iface
#define INVALID_POSITION -1
#define SCI_START 2000
#define SCI_OPTIONAL_START 3000
#define SCI_LEXER_START 4000
#define SCI_ADDTEXT 2001
#define SCI_ADDSTYLEDTEXT 2002
#define SCI_INSERTTEXT 2003
#define SCI_CLEARALL 2004
#define SCI_CLEARDOCUMENTSTYLE 2005
#define SCI_GETLENGTH 2006
#define SCI_GETCHARAT 2007
#define SCI_GETCURRENTPOS 2008
#define SCI_GETANCHOR 2009
#define SCI_GETSTYLEAT 2010
#define SCI_REDO 2011
#define SCI_SETUNDOCOLLECTION 2012
#define SCI_SELECTALL 2013
#define SCI_SETSAVEPOINT 2014
#define SCI_GETSTYLEDTEXT 2015
#define SCI_CANREDO 2016
#define SCI_MARKERLINEFROMHANDLE 2017
#define SCI_MARKERDELETEHANDLE 2018
#define SCI_GETUNDOCOLLECTION 2019
#define SCWS_INVISIBLE 0
#define SCWS_VISIBLEALWAYS 1
#define SCWS_VISIBLEAFTERINDENT 2
#define SCI_GETVIEWWS 2020
#define SCI_SETVIEWWS 2021
#define SCI_POSITIONFROMPOINT 2022
#define SCI_GOTOLINE 2024
#define SCI_GOTOPOS 2025
#define SCI_SETANCHOR 2026
#define SCI_GETCURLINE 2027
#define SCI_GETENDSTYLED 2028
#define SCI_CONVERTEOLS 2029
#define SC_EOL_CRLF 0
#define SC_EOL_CR 1
#define SC_EOL_LF 2
#define SCI_GETEOLMODE 2030
#define SCI_SETEOLMODE 2031
#define SCI_STARTSTYLING 2032
#define SCI_SETSTYLING 2033
#define SCI_GETBUFFEREDDRAW 2034
#define SCI_SETBUFFEREDDRAW 2035
#define SCI_SETTABWIDTH 2036
#define SCI_GETTABWIDTH 2121
#define SC_CP_UTF8 65001
#define SCI_SETCODEPAGE 2037
#define SCI_SETUSEPALETTE 2039
#define MARKER_MAX 31
#define SC_MARK_CIRCLE 0
#define SC_MARK_ROUNDRECT 1
#define SC_MARK_ARROW 2
#define SC_MARK_SMALLRECT 3
#define SC_MARK_SHORTARROW 4
#define SC_MARK_EMPTY 5
#define SC_MARK_ARROWDOWN 6
#define SC_MARK_MINUS 7
#define SC_MARK_PLUS 8
#define SC_MARKNUM_FOLDER 30
#define SC_MARKNUM_FOLDEROPEN 31
#define SCI_MARKERDEFINE 2040
#define SCI_MARKERSETFORE 2041
#define SCI_MARKERSETBACK 2042
#define SCI_MARKERADD 2043
#define SCI_MARKERDELETE 2044
#define SCI_MARKERDELETEALL 2045
#define SCI_MARKERGET 2046
#define SCI_MARKERNEXT 2047
#define SCI_MARKERPREVIOUS 2048
#define SC_MARGIN_SYMBOL 0
#define SC_MARGIN_NUMBER 1
#define SCI_SETMARGINTYPEN 2240
#define SCI_GETMARGINTYPEN 2241
#define SCI_SETMARGINWIDTHN 2242
#define SCI_GETMARGINWIDTHN 2243
#define SCI_SETMARGINMASKN 2244
#define SCI_GETMARGINMASKN 2245
#define SCI_SETMARGINSENSITIVEN 2246
#define SCI_GETMARGINSENSITIVEN 2247
#define STYLE_DEFAULT 32
#define STYLE_LINENUMBER 33
#define STYLE_BRACELIGHT 34
#define STYLE_BRACEBAD 35
#define STYLE_CONTROLCHAR 36
#define STYLE_INDENTGUIDE 37
#define STYLE_MAX 127
#define SC_CHARSET_ANSI 0
#define SC_CHARSET_DEFAULT 1
#define SC_CHARSET_BALTIC 186
#define SC_CHARSET_CHINESEBIG5 136
#define SC_CHARSET_EASTEUROPE 238
#define SC_CHARSET_GB2312 134
#define SC_CHARSET_GREEK 161
#define SC_CHARSET_HANGUL 129
#define SC_CHARSET_MAC 77
#define SC_CHARSET_OEM 255
#define SC_CHARSET_RUSSIAN 204
#define SC_CHARSET_SHIFTJIS 128
#define SC_CHARSET_SYMBOL 2
#define SC_CHARSET_TURKISH 162
#define SC_CHARSET_JOHAB 130
#define SC_CHARSET_HEBREW 177
#define SC_CHARSET_ARABIC 178
#define SC_CHARSET_VIETNAMESE 163
#define SC_CHARSET_THAI 222
#define SCI_STYLECLEARALL 2050
#define SCI_STYLESETFORE 2051
#define SCI_STYLESETBACK 2052
#define SCI_STYLESETBOLD 2053
#define SCI_STYLESETITALIC 2054
#define SCI_STYLESETSIZE 2055
#define SCI_STYLESETFONT 2056
#define SCI_STYLESETEOLFILLED 2057
#define SCI_STYLERESETDEFAULT 2058
#define SCI_STYLESETUNDERLINE 2059
#define SCI_STYLESETCHARACTERSET 2066
#define SCI_SETSELFORE 2067
#define SCI_SETSELBACK 2068
#define SCI_SETCARETFORE 2069
#define SCI_ASSIGNCMDKEY 2070
#define SCI_CLEARCMDKEY 2071
#define SCI_CLEARALLCMDKEYS 2072
#define SCI_SETSTYLINGEX 2073
#define SCI_STYLESETVISIBLE 2074
#define SCI_GETCARETPERIOD 2075
#define SCI_SETCARETPERIOD 2076
#define SCI_SETWORDCHARS 2077
#define SCI_BEGINUNDOACTION 2078
#define SCI_ENDUNDOACTION 2079
#define INDIC_MAX 7
#define INDIC_PLAIN 0
#define INDIC_SQUIGGLE 1
#define INDIC_TT 2
#define INDIC_DIAGONAL 3
#define INDIC_STRIKE 4
#define INDIC0_MASK 32
#define INDIC1_MASK 64
#define INDIC2_MASK 128
#define INDICS_MASK INDIC0_MASK | INDIC1_MASK | INDIC2_MASK
#define SCI_INDICSETSTYLE 2080
#define SCI_INDICGETSTYLE 2081
#define SCI_INDICSETFORE 2082
#define SCI_INDICGETFORE 2083
#define SCI_SETSTYLEBITS 2090
#define SCI_GETSTYLEBITS 2091
#define SCI_SETLINESTATE 2092
#define SCI_GETLINESTATE 2093
#define SCI_GETMAXLINESTATE 2094
#define SCI_AUTOCSHOW 2100
#define SCI_AUTOCCANCEL 2101
#define SCI_AUTOCACTIVE 2102
#define SCI_AUTOCPOSSTART 2103
#define SCI_AUTOCCOMPLETE 2104
#define SCI_AUTOCSTOPS 2105
#define SCI_AUTOCSETSEPARATOR 2106
#define SCI_AUTOCGETSEPARATOR 2107
#define SCI_AUTOCSELECT 2108
#define SCI_AUTOCSETCANCELATSTART 2110
#define SCI_AUTOCGETCANCELATSTART 2111
#define SCI_AUTOCSETFILLUPS 2112
#define SCI_AUTOCSETCHOOSESINGLE 2113
#define SCI_AUTOCGETCHOOSESINGLE 2114
#define SCI_AUTOCSETIGNORECASE 2115
#define SCI_AUTOCGETIGNORECASE 2116
#define SCI_SETINDENT 2122
#define SCI_GETINDENT 2123
#define SCI_SETUSETABS 2124
#define SCI_GETUSETABS 2125
#define SCI_SETLINEINDENTATION 2126
#define SCI_GETLINEINDENTATION 2127
#define SCI_GETLINEINDENTPOSITION 2128
#define SCI_GETCOLUMN 2129
#define SCI_SETHSCROLLBAR 2130
#define SCI_GETHSCROLLBAR 2131
#define SCI_SETINDENTATIONGUIDES 2132
#define SCI_GETINDENTATIONGUIDES 2133
#define SCI_SETHIGHLIGHTGUIDE 2134
#define SCI_GETHIGHLIGHTGUIDE 2135
#define SCI_GETLINEENDPOSITION 2136
#define SCI_GETCODEPAGE 2137
#define SCI_GETCARETFORE 2138
#define SCI_GETUSEPALETTE 2139
#define SCI_GETREADONLY 2140
#define SCI_SETCURRENTPOS 2141
#define SCI_SETSELECTIONSTART 2142
#define SCI_GETSELECTIONSTART 2143
#define SCI_SETSELECTIONEND 2144
#define SCI_GETSELECTIONEND 2145
#define SCI_SETPRINTMAGNIFICATION 2146
#define SCI_GETPRINTMAGNIFICATION 2147
#define SC_PRINT_NORMAL 0
#define SC_PRINT_INVERTLIGHT 1
#define SC_PRINT_BLACKONWHITE 2
#define SCI_SETPRINTCOLOURMODE 2148
#define SCI_GETPRINTCOLOURMODE 2149
#define SCFIND_DOWN 1
#define SCFIND_WHOLEWORD 2
#define SCFIND_MATCHCASE 4
#define SCFIND_WORDSTART 0x00100000
#define SCFIND_REGEXP 0x00200000
#define SCI_FINDTEXT 2150
#define SCI_FORMATRANGE 2151
#define SCI_GETFIRSTVISIBLELINE 2152
#define SCI_GETLINE 2153
#define SCI_GETLINECOUNT 2154
#define SCI_SETMARGINLEFT 2155
#define SCI_GETMARGINLEFT 2156
#define SCI_SETMARGINRIGHT 2157
#define SCI_GETMARGINRIGHT 2158
#define SCI_GETMODIFY 2159
#define SCI_SETSEL 2160
#define SCI_GETSELTEXT 2161
#define SCI_GETTEXTRANGE 2162
#define SCI_HIDESELECTION 2163
#define SCI_POINTXFROMPOSITION 2164
#define SCI_POINTYFROMPOSITION 2165
#define SCI_LINEFROMPOSITION 2166
#define SCI_POSITIONFROMLINE 2167
#define SCI_LINESCROLL 2168
#define SCI_SCROLLCARET 2169
#define SCI_REPLACESEL 2170
#define SCI_SETREADONLY 2171
#define SCI_NULL 2172
#define SCI_CANPASTE 2173
#define SCI_CANUNDO 2174
#define SCI_EMPTYUNDOBUFFER 2175
#define SCI_UNDO 2176
#define SCI_CUT 2177
#define SCI_COPY 2178
#define SCI_PASTE 2179
#define SCI_CLEAR 2180
#define SCI_SETTEXT 2181
#define SCI_GETTEXT 2182
#define SCI_GETTEXTLENGTH 2183
#define SCI_GETDIRECTFUNCTION 2184
#define SCI_GETDIRECTPOINTER 2185
#define SCI_SETOVERTYPE 2186
#define SCI_GETOVERTYPE 2187
#define SCI_CALLTIPSHOW 2200
#define SCI_CALLTIPCANCEL 2201
#define SCI_CALLTIPACTIVE 2202
#define SCI_CALLTIPPOSSTART 2203
#define SCI_CALLTIPSETHLT 2204
#define SCI_CALLTIPSETBACK 2205
#define SCI_VISIBLEFROMDOCLINE 2220
#define SCI_DOCLINEFROMVISIBLE 2221
#define SC_FOLDLEVELBASE 0x400
#define SC_FOLDLEVELWHITEFLAG 0x1000
#define SC_FOLDLEVELHEADERFLAG 0x2000
#define SC_FOLDLEVELNUMBERMASK 0x0FFF
#define SCI_SETFOLDLEVEL 2222
#define SCI_GETFOLDLEVEL 2223
#define SCI_GETLASTCHILD 2224
#define SCI_GETFOLDPARENT 2225
#define SCI_SHOWLINES 2226
#define SCI_HIDELINES 2227
#define SCI_GETLINEVISIBLE 2228
#define SCI_SETFOLDEXPANDED 2229
#define SCI_GETFOLDEXPANDED 2230
#define SCI_TOGGLEFOLD 2231
#define SCI_ENSUREVISIBLE 2232
#define SCI_SETFOLDFLAGS 2233
#define SCI_LINEDOWN 2300
#define SCI_LINEDOWNEXTEND 2301
#define SCI_LINEUP 2302
#define SCI_LINEUPEXTEND 2303
#define SCI_CHARLEFT 2304
#define SCI_CHARLEFTEXTEND 2305
#define SCI_CHARRIGHT 2306
#define SCI_CHARRIGHTEXTEND 2307
#define SCI_WORDLEFT 2308
#define SCI_WORDLEFTEXTEND 2309
#define SCI_WORDRIGHT 2310
#define SCI_WORDRIGHTEXTEND 2311
#define SCI_HOME 2312
#define SCI_HOMEEXTEND 2313
#define SCI_LINEEND 2314
#define SCI_LINEENDEXTEND 2315
#define SCI_DOCUMENTSTART 2316
#define SCI_DOCUMENTSTARTEXTEND 2317
#define SCI_DOCUMENTEND 2318
#define SCI_DOCUMENTENDEXTEND 2319
#define SCI_PAGEUP 2320
#define SCI_PAGEUPEXTEND 2321
#define SCI_PAGEDOWN 2322
#define SCI_PAGEDOWNEXTEND 2323
#define SCI_EDITTOGGLEOVERTYPE 2324
#define SCI_CANCEL 2325
#define SCI_DELETEBACK 2326
#define SCI_TAB 2327
#define SCI_BACKTAB 2328
#define SCI_NEWLINE 2329
#define SCI_FORMFEED 2330
#define SCI_VCHOME 2331
#define SCI_VCHOMEEXTEND 2332
#define SCI_ZOOMIN 2333
#define SCI_ZOOMOUT 2334
#define SCI_DELWORDLEFT 2335
#define SCI_DELWORDRIGHT 2336
#define SCI_LINECUT 2337
#define SCI_LINEDELETE 2338
#define SCI_LINETRANSPOSE 2339
#define SCI_LOWERCASE 2340
#define SCI_UPPERCASE 2341
#define SCI_LINESCROLLDOWN 2342
#define SCI_LINESCROLLUP 2343
#define SCI_LINELENGTH 2350
#define SCI_BRACEHIGHLIGHT 2351
#define SCI_BRACEBADLIGHT 2352
#define SCI_BRACEMATCH 2353
#define SCI_GETVIEWEOL 2355
#define SCI_SETVIEWEOL 2356
#define SCI_GETDOCPOINTER 2357
#define SCI_SETDOCPOINTER 2358
#define SCI_SETMODEVENTMASK 2359
#define EDGE_NONE 0
#define EDGE_LINE 1
#define EDGE_BACKGROUND 2
#define SCI_GETEDGECOLUMN 2360
#define SCI_SETEDGECOLUMN 2361
#define SCI_GETEDGEMODE 2362
#define SCI_SETEDGEMODE 2363
#define SCI_GETEDGECOLOUR 2364
#define SCI_SETEDGECOLOUR 2365
#define SCI_SEARCHANCHOR 2366
#define SCI_SEARCHNEXT 2367
#define SCI_SEARCHPREV 2368
#define CARET_SLOP 0x01
#define CARET_CENTER 0x02
#define CARET_STRICT 0x04
#define SCI_SETCARETPOLICY 2369
#define SCI_LINESONSCREEN 2370
#define SCI_USEPOPUP 2371
#define SCI_SELECTIONISRECTANGLE 2372
#define SCI_SETZOOM 2373
#define SCI_GETZOOM 2374
#define SCI_CREATEDOCUMENT 2375
#define SCI_ADDREFDOCUMENT 2376
#define SCI_RELEASEDOCUMENT 2377
#define SCI_GETMODEVENTMASK 2378
#define SCI_GRABFOCUS 2400
#define SCI_STARTRECORD 3001
#define SCI_STOPRECORD 3002
#define SCI_SETLEXER 4001
#define SCI_GETLEXER 4002
#define SCI_COLOURISE 4003
#define SCI_SETPROPERTY 4004
#define SCI_SETKEYWORDS 4005
#define SC_MOD_INSERTTEXT 0x1
#define SC_MOD_DELETETEXT 0x2
#define SC_MOD_CHANGESTYLE 0x4
#define SC_MOD_CHANGEFOLD 0x8
#define SC_PERFORMED_USER 0x10
#define SC_PERFORMED_UNDO 0x20
#define SC_PERFORMED_REDO 0x40
#define SC_LASTSTEPINUNDOREDO 0x100
#define SC_MOD_CHANGEMARKER 0x200
#define SC_MOD_BEFOREINSERT 0x400
#define SC_MOD_BEFOREDELETE 0x800
#define SC_MODEVENTMASKALL 0xF77
#define SCEN_CHANGE 768
#define SCEN_SETFOCUS 512
#define SCEN_KILLFOCUS 256
#define SCK_DOWN 300
#define SCK_UP 301
#define SCK_LEFT 302
#define SCK_RIGHT 303
#define SCK_HOME 304
#define SCK_END 305
#define SCK_PRIOR 306
#define SCK_NEXT 307
#define SCK_DELETE 308
#define SCK_INSERT 309
#define SCK_ESCAPE 7
#define SCK_BACK 8
#define SCK_TAB 9
#define SCK_RETURN 13
#define SCK_ADD 310
#define SCK_SUBTRACT 311
#define SCK_DIVIDE 312
#define SCMOD_SHIFT 1
#define SCMOD_CTRL 2
#define SCMOD_ALT 4
#define SCN_STYLENEEDED 2000
#define SCN_CHARADDED 2001
#define SCN_SAVEPOINTREACHED 2002
#define SCN_SAVEPOINTLEFT 2003
#define SCN_MODIFYATTEMPTRO 2004
#define SCN_KEY 2005
#define SCN_DOUBLECLICK 2006
#define SCN_UPDATEUI 2007
#define SCN_CHECKBRACE 2007
#define SCN_MODIFIED 2008
#define SCN_MACRORECORD 2009
#define SCN_MARGINCLICK 2010
#define SCN_NEEDSHOWN 2011
#define SCN_POSCHANGED 2012
//--Autogenerated -- end of section automatically generated from Scintilla.iface
// Optional module for macro recording
#ifdef MACRO_SUPPORT
typedef void (tMacroRecorder)(unsigned int iMessage, unsigned long wParam,
long lParam, void *userData);
#endif
// These structures are defined to be exactly the same shape as the Win32
// CHARRANGE, TEXTRANGE, FINDTEXTEX, FORMATRANGE, and NMHDR structs.
// So older code that treats Scintilla as a RichEdit will work.
struct CharacterRange {
long cpMin;
long cpMax;
};
struct TextRange {
CharacterRange chrg;
char *lpstrText;
};
struct TextToFind {
CharacterRange chrg;
char *lpstrText;
CharacterRange chrgText;
};
#ifdef PLATFORM_H
// This structure is used in printing and requires some of the graphics types
// from Platform.h. Not needed by most client code.
struct RangeToFormat {
SurfaceID hdc;
SurfaceID hdcTarget;
PRectangle rc;
PRectangle rcPage;
CharacterRange chrg;
};
#endif
struct NotifyHeader {
// hwndFrom is really an environment specifc window handle or pointer
// but most clients of Scintilla.h do not have this type visible.
//WindowID hwndFrom;
void *hwndFrom;
unsigned int idFrom;
unsigned int code;
};
struct SCNotification {
NotifyHeader nmhdr;
int position; // SCN_STYLENEEDED, SCN_MODIFIED
int ch; // SCN_CHARADDED, SCN_KEY
int modifiers; // SCN_KEY
int modificationType; // SCN_MODIFIED
const char *text; // SCN_MODIFIED
int length; // SCN_MODIFIED
int linesAdded; // SCN_MODIFIED
#ifdef MACRO_SUPPORT
int message; // SCN_MACRORECORD
int wParam; // SCN_MACRORECORD
int lParam; // SCN_MACRORECORD
#endif
int line; // SCN_MODIFIED
int foldLevelNow; // SCN_MODIFIED
int foldLevelPrev; // SCN_MODIFIED
int margin; // SCN_MARGINCLICK
};
#define SC_MASK_FOLDERS ((1<<SC_MARKNUM_FOLDER) | (1<<SC_MARKNUM_FOLDEROPEN))
// Deprecation section listing all API features that are deprecated and will
// will be removed completely in a future version.
// To enable these features define INCLUDE_DEPRECATED_FEATURES
#ifdef INCLUDE_DEPRECATED_FEATURES
// Deprecated in 1.27
#define SC_UNDOCOLLECT_NONE 0
#define SC_UNDOCOLLECT_AUTOSTART 1
#endif
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,46 @@
// Scintilla source code edit control
// ScintillaWidget.h - definition of Scintilla widget for GTK+
// Only needed by GTK+ code but is harmless on other platforms.
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef SCINTILLAWIDGET_H
#define SCINTILLAWIDGET_H
#if PLAT_GTK
#ifdef __cplusplus
extern "C" {
#endif
#define SCINTILLA(obj) GTK_CHECK_CAST (obj, scintilla_get_type (), ScintillaObject)
#define SCINTILLA_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, scintilla_get_type (), ScintillaClass)
#define IS_SCINTILLA(obj) GTK_CHECK_TYPE (obj, scintilla_get_type ())
typedef struct _ScintillaObject ScintillaObject;
typedef struct _ScintillaClass ScintillaClass;
struct _ScintillaObject {
GtkFixed vbox;
void *pscin;
};
struct _ScintillaClass {
GtkFixedClass parent_class;
void (* command) (ScintillaObject *ttt);
void (* notify) (ScintillaObject *ttt);
};
guint scintilla_get_type (void);
GtkWidget* scintilla_new (void);
void scintilla_set_id (ScintillaObject *sci,int id);
long scintilla_send_message (ScintillaObject *sci,int iMessage,int wParam,int lParam);
#ifdef __cplusplus
}
#endif
#endif
#endif

View File

@@ -0,0 +1,183 @@
// Scintilla source code edit control
// WinDefs.h - the subset of definitions from Windows needed by Scintilla for GTK+
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef WINDEFS_H
#define WINDEFS_H
#define WORD short
#define WPARAM unsigned long
#define LPARAM long
#define LRESULT long
#define DWORD long
#define UINT unsigned int
#define LPSTR char *
#define LONG long
//#if 0
/* RTF control */
#define EM_CANPASTE (1074)
#define EM_CANUNDO (198)
#define EM_CHARFROMPOS (215)
#define EM_EMPTYUNDOBUFFER (205)
#define EM_EXGETSEL (1076)
#define EM_EXLINEFROMCHAR (1078)
#define EM_EXSETSEL (1079)
#define EM_FINDTEXT (1080)
#define EM_FINDTEXTEX (1103)
#define EM_FORMATRANGE (1081)
#define EM_GETFIRSTVISIBLELINE (206)
#define EM_GETLINE (196)
#define EM_GETLINECOUNT (186)
#define EM_GETMARGINS (212)
#define EM_GETMODIFY (184)
#define EM_GETRECT (178)
#define EM_GETSEL (176)
#define EM_GETSELTEXT (1086)
#define EM_GETTEXTRANGE (1099)
#define EM_HIDESELECTION (1087)
#define EM_LINEFROMCHAR (201)
#define EM_LINEINDEX (187)
#define EM_LINELENGTH (193)
#define EM_LINESCROLL (182)
#define EM_POSFROMCHAR (214)
#define EM_REPLACESEL (194)
#define EM_SCROLLCARET (183)
#define EM_SELECTIONTYPE (1090)
#define EM_SETMARGINS (211)
#define EM_SETREADONLY (207)
#define EM_SETSEL (177)
#define EM_UNDO (199)
#define WM_NULL (0)
#define WM_CLEAR (771)
#define WM_COPY (769)
#define WM_CUT (768)
#define WM_GETTEXT (13)
#define WM_GETTEXTLENGTH (14)
#define WM_PASTE (770)
#define WM_SETTEXT (12)
#define WM_UNDO (772)
#define EN_CHANGE (768)
#define EN_KILLFOCUS (512)
#define EN_SETFOCUS (256)
#define EC_LEFTMARGIN 1
#define EC_RIGHTMARGIN 2
#define EC_USEFONTINFO 0xffff
//#endif
#if 0
#if PLAT_GTK
#define VK_DOWN GDK_Down
#define VK_UP GDK_Up
#define VK_LEFT GDK_Left
#define VK_RIGHT GDK_Right
#define VK_HOME GDK_Home
#define VK_END GDK_End
#define VK_PRIOR GDK_Page_Up
#define VK_NEXT GDK_Page_Down
#define VK_DELETE GDK_Delete
#define VK_INSERT GDK_Insert
#define VK_ESCAPE GDK_Escape
#define VK_BACK GDK_BackSpace
#define VK_TAB GDK_Tab
#define VK_RETURN GDK_Return
#define VK_ADD GDK_KP_Add
#define VK_SUBTRACT GDK_KP_Subtract
#define VK_DIVIDE GDK_KP_Divide
#endif
#if PLAT_WX
#define VK_DOWN WXK_DOWN
#define VK_UP WXK_UP
#define VK_LEFT WXK_LEFT
#define VK_RIGHT WXK_RIGHT
#define VK_HOME WXK_HOME
#define VK_END WXK_END
#define VK_PRIOR WXK_PRIOR
#define VK_NEXT WXK_NEXT
#define VK_DELETE WXK_DELETE
#define VK_INSERT WXK_INSERT
#define VK_ESCAPE WXK_ESCAPE
#define VK_BACK WXK_BACK
#define VK_TAB WXK_TAB
#define VK_RETURN WXK_RETURN
#define VK_ADD WXK_ADD
#define VK_SUBTRACT WXK_SUBTRACT
//TODO:
#define VK_DIVIDE WXK_DIVIDE
#endif
#define SHIFT_PRESSED 1
#define LEFT_CTRL_PRESSED 2
#define LEFT_ALT_PRESSED 4
// Are these needed any more
#define LPSTR char *
#define LONG long
#define LPDWORD (long *)
/* SELCHANGE structure */
#define SEL_EMPTY (0)
#define SEL_TEXT (1)
#define SEL_OBJECT (2)
#define SEL_MULTICHAR (4)
#define SEL_MULTIOBJECT (8)
struct RECT {
LONG left;
LONG top;
LONG right;
LONG bottom;
};
/* FINDREPLACE structure */
#define FR_MATCHCASE (0x4)
#define FR_WHOLEWORD (0x2)
#define FR_DOWN (0x1)
#endif
#if 0
struct CHARRANGE {
LONG cpMin;
LONG cpMax;
};
struct TEXTRANGE {
CHARRANGE chrg;
LPSTR lpstrText;
};
struct FINDTEXTEX {
CHARRANGE chrg;
LPSTR lpstrText;
CHARRANGE chrgText;
};
struct NMHDR {
WindowID hwndFrom;
UINT idFrom;
UINT code;
};
struct FORMATRANGE {
SurfaceID hdc;
SurfaceID hdcTarget;
RECT rc;
RECT rcPage;
CHARRANGE chrg;
};
#endif
//#define MAKELONG(a, b) ((a) | ((b) << 16))
//#define LOWORD(x) (x & 0xffff)
//#define HIWORD(x) (x >> 16)
#endif

View File

@@ -0,0 +1,47 @@
// WindowAccessor.h - implementation of BufferAccess and StylingAccess on a Scintilla rapid easy access to contents of a Scintilla
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
class WindowAccessor : public Accessor {
// Private so WindowAccessor objects can not be copied
WindowAccessor(const WindowAccessor &source) : Accessor(), props(source.props) {}
WindowAccessor &operator=(const WindowAccessor &) { return *this; }
protected:
WindowID id;
PropSet &props;
int lenDoc;
char styleBuf[bufferSize];
int validLen;
char chFlags;
char chWhile;
unsigned int startSeg;
bool InternalIsLeadByte(char ch);
void Fill(int position);
public:
WindowAccessor(WindowID id_, PropSet &props_) :
Accessor(), id(id_), props(props_),
lenDoc(-1), validLen(0), chFlags(0), chWhile(0) {
}
~WindowAccessor();
char StyleAt(int position);
int GetLine(int position);
int LineStart(int line);
int LevelAt(int line);
int Length();
void Flush();
int GetLineState(int line);
int SetLineState(int line, int state);
int GetPropertyInt(const char *key, int defaultValue=0) {
return props.GetInt(key, defaultValue);
}
void StartAt(unsigned int start, char chMask=31);
void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; };
unsigned int GetStartSegment() { return startSeg; }
void StartSegment(unsigned int pos);
void ColourTo(unsigned int pos, int chAttr);
void SetLevel(int line, int level);
int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0);
};

View File

@@ -0,0 +1,121 @@
// Scintilla source code edit control
// AutoComplete.cxx - defines the auto completion list box
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <stdlib.h>
#include <string.h>
#include "Platform.h"
#include "AutoComplete.h"
AutoComplete::AutoComplete() :
active(false),
separator(' '),
ignoreCase(false),
chooseSingle(false),
posStart(0),
startLen(0),
cancelAtStartPos(true) {
stopChars[0] = '\0';
fillUpChars[0] = '\0';
}
AutoComplete::~AutoComplete() {
lb.Destroy();
}
bool AutoComplete::Active() {
return active;
}
void AutoComplete::Start(Window &parent, int ctrlID, int position, int startLen_) {
if (!lb.Created()) {
lb.Create(parent, ctrlID);
}
lb.Clear();
active = true;
startLen = startLen_;
posStart = position;
}
void AutoComplete::SetStopChars(const char *stopChars_) {
strncpy(stopChars, stopChars_, sizeof(stopChars));
stopChars[sizeof(stopChars) - 1] = '\0';
}
bool AutoComplete::IsStopChar(char ch) {
return ch && strchr(stopChars, ch);
}
void AutoComplete::SetFillUpChars(const char *fillUpChars_) {
strncpy(fillUpChars, fillUpChars_, sizeof(fillUpChars));
fillUpChars[sizeof(fillUpChars) - 1] = '\0';
}
bool AutoComplete::IsFillUpChar(char ch) {
return ch && strchr(fillUpChars, ch);
}
void AutoComplete::SetSeparator(char separator_) {
separator = separator_;
}
char AutoComplete::GetSeparator() {
return separator;
}
void AutoComplete::SetList(const char *list) {
lb.Clear();
char *words = new char[strlen(list) + 1];
if (words) {
strcpy(words, list);
char *startword = words;
int i = 0;
for (; words && words[i]; i++) {
if (words[i] == separator) {
words[i] = '\0';
lb.Append(startword);
startword = words + i + 1;
}
}
if (startword) {
lb.Append(startword);
}
delete []words;
}
lb.Sort();
}
void AutoComplete::Show() {
lb.Show();
lb.Select(0);
}
void AutoComplete::Cancel() {
if (lb.Created()) {
lb.Destroy();
active = false;
}
}
void AutoComplete::Move(int delta) {
int count = lb.Length();
int current = lb.GetSelection();
current += delta;
if (current >= count)
current = count - 1;
if (current < 0)
current = 0;
lb.Select(current);
}
void AutoComplete::Select(const char *word) {
int pos = lb.Find(word);
//Platform::DebugPrintf("Autocompleting at <%s> %d\n", wordCurrent, pos);
if (pos != -1)
lb.Select(pos);
}

View File

@@ -0,0 +1,57 @@
// Scintilla source code edit control
// AutoComplete.h - defines the auto completion list box
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef AUTOCOMPLETE_H
#define AUTOCOMPLETE_H
class AutoComplete {
bool active;
char stopChars[256];
char fillUpChars[256];
char separator;
public:
bool ignoreCase;
bool chooseSingle;
ListBox lb;
int posStart;
int startLen;
// Should autocompletion be canceled if editor's currentPos <= startPos?
bool cancelAtStartPos;
AutoComplete();
~AutoComplete();
// Is the auto completion list displayed?
bool Active();
// Display the auto completion list positioned to be near a character position
void Start(Window &parent, int ctrlID, int position, int startLen_);
// The stop chars are characters which, when typed, cause the auto completion list to disappear
void SetStopChars(const char *stopChars_);
bool IsStopChar(char ch);
// The fillup chars are characters which, when typed, fill up the selected word
void SetFillUpChars(const char *fillUpChars_);
bool IsFillUpChar(char ch);
// The separator character is used when interpreting the list in SetList
void SetSeparator(char separator_);
char GetSeparator();
// The list string contains a sequence of words separated by the separator character
void SetList(const char *list);
void Show();
void Cancel();
// Move the current list element by delta, scrolling appropriately
void Move(int delta);
// Select a list element that starts with word as the current element
void Select(const char *word);
};
#endif

View File

@@ -0,0 +1,169 @@
// Scintilla source code edit control
// CallTip.cxx - code for displaying call tips
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <stdlib.h>
#include <string.h>
#include "Platform.h"
#include "Scintilla.h"
#include "CallTip.h"
CallTip::CallTip() {
wCallTip = 0;
inCallTipMode = false;
posStartCallTip = 0;
val = 0;
startHighlight = 0;
endHighlight = 0;
colourBG.desired = Colour(0xff, 0xff, 0xff);
colourUnSel.desired = Colour(0x80, 0x80, 0x80);
colourSel.desired = Colour(0, 0, 0x80);
colourShade.desired = Colour(0, 0, 0);
colourLight.desired = Colour(0xc0, 0xc0, 0xc0);
}
CallTip::~CallTip() {
wCallTip.Destroy();
delete []val;
val = 0;
}
void CallTip::RefreshColourPalette(Palette &pal, bool want) {
pal.WantFind(colourBG, want);
pal.WantFind(colourUnSel, want);
pal.WantFind(colourSel, want);
pal.WantFind(colourShade, want);
pal.WantFind(colourLight, want);
}
void CallTip::PaintCT(Surface *surfaceWindow) {
if (!val)
return;
PRectangle rcClientPos = wCallTip.GetClientPosition();
PRectangle rcClientSize(0, 0, rcClientPos.right - rcClientPos.left,
rcClientPos.bottom - rcClientPos.top);
PRectangle rcClient(1, 1, rcClientSize.right - 1, rcClientSize.bottom - 1);
surfaceWindow->FillRectangle(rcClient, colourBG.allocated);
// To make a nice small call tip window, it is only sized to fit most normal characters without accents
int lineHeight = surfaceWindow->Height(font);
int ascent = surfaceWindow->Ascent(font) - surfaceWindow->InternalLeading(font);
// For each line...
// Draw the definition in three parts: before highlight, highlighted, after highlight
int ytext = rcClient.top + ascent + 1;
char *chunkVal = val;
bool moreChunks = true;
while (moreChunks) {
char *chunkEnd = strchr(chunkVal, '\n');
if (chunkEnd == NULL) {
chunkEnd = chunkVal + strlen(chunkVal);
moreChunks = false;
}
int chunkOffset = chunkVal - val;
int chunkLength = chunkEnd - chunkVal;
int chunkEndOffset = chunkOffset + chunkLength;
int thisStartHighlight = Platform::Maximum(startHighlight, chunkOffset);
thisStartHighlight = Platform::Minimum(thisStartHighlight, chunkEndOffset);
thisStartHighlight -= chunkOffset;
int thisEndHighlight = Platform::Maximum(endHighlight, chunkOffset);
thisEndHighlight = Platform::Minimum(thisEndHighlight, chunkEndOffset);
thisEndHighlight -= chunkOffset;
int x = 5;
int xEnd = x + surfaceWindow->WidthText(font, chunkVal, thisStartHighlight);
rcClient.left = x;
rcClient.top = ytext - ascent - 1;
rcClient.right = xEnd;
surfaceWindow->DrawText(rcClient, font, ytext,
chunkVal, thisStartHighlight,
colourUnSel.allocated, colourBG.allocated);
x = xEnd;
xEnd = x + surfaceWindow->WidthText(font, chunkVal + thisStartHighlight,
thisEndHighlight - thisStartHighlight);
rcClient.top = ytext;
rcClient.left = x;
rcClient.right = xEnd;
surfaceWindow->DrawText(rcClient, font, ytext,
chunkVal + thisStartHighlight, thisEndHighlight - thisStartHighlight,
colourSel.allocated, colourBG.allocated);
x = xEnd;
xEnd = x + surfaceWindow->WidthText(font, chunkVal + thisEndHighlight,
chunkLength - thisEndHighlight);
rcClient.left = x;
rcClient.right = xEnd;
surfaceWindow->DrawText(rcClient, font, ytext,
chunkVal + thisEndHighlight, chunkLength - thisEndHighlight,
colourUnSel.allocated, colourBG.allocated);
chunkVal = chunkEnd + 1;
ytext += lineHeight;
}
// Draw a raised border around the edges of the window
surfaceWindow->MoveTo(0, rcClientSize.bottom - 1);
surfaceWindow->PenColour(colourShade.allocated);
surfaceWindow->LineTo(rcClientSize.right - 1, rcClientSize.bottom - 1);
surfaceWindow->LineTo(rcClientSize.right - 1, 0);
surfaceWindow->PenColour(colourLight.allocated);
surfaceWindow->LineTo(0, 0);
surfaceWindow->LineTo(0, rcClientSize.bottom - 1);
}
PRectangle CallTip::CallTipStart(int pos, Point pt, const char *defn,
const char *faceName, int size) {
Surface surfaceMeasure;
surfaceMeasure.Init();
int deviceHeight = (size * surfaceMeasure.LogPixelsY()) / 72;
font.Create(faceName, SC_CHARSET_DEFAULT, deviceHeight, false, false);
if (val)
delete []val;
val = new char[strlen(defn) + 1];
if (!val)
return PRectangle();
strcpy(val, defn);
startHighlight = 0;
endHighlight = 0;
inCallTipMode = true;
posStartCallTip = pos;
// Look for multiple lines in the text
// Only support \n here - simply means container must avoid \r!
int width = 0;
int numLines = 1;
const char *newline;
const char *look = val;
while ((newline = strchr(look, '\n')) != NULL) {
int thisWidth = surfaceMeasure.WidthText(font, look, newline - look);
width = Platform::Maximum(width, thisWidth);
look = newline + 1;
numLines++;
}
int lastWidth = surfaceMeasure.WidthText(font, look, strlen(look));
width = Platform::Maximum(width, lastWidth) + 10;
int lineHeight = surfaceMeasure.Height(font);
// Extra line for border and an empty line at top and bottom
int height = lineHeight * numLines - surfaceMeasure.InternalLeading(font) + 2 + 2;
return PRectangle(pt.x -5, pt.y + lineHeight + 1, pt.x + width - 5, pt.y + lineHeight + 1 + height);
}
void CallTip::CallTipCancel() {
inCallTipMode = false;
if (wCallTip.Created()) {
wCallTip.Destroy();
}
}
void CallTip::SetHighlight(int start, int end) {
// Avoid flashing by checking something has really changed
if ((start != startHighlight) || (end != endHighlight)) {
startHighlight = start;
endHighlight = end;
if (wCallTip.Created()) {
wCallTip.InvalidateAll();
}
}
}

View File

@@ -0,0 +1,47 @@
// Scintilla source code edit control
// CallTip.h - interface to the call tip control
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef CALLTIP_H
#define CALLTIP_H
class CallTip {
int startHighlight;
int endHighlight;
char *val;
Font font;
// Private so CallTip objects can not be copied
CallTip(const CallTip &) {}
CallTip &operator=(const CallTip &) { return *this; }
public:
Window wCallTip;
Window wDraw;
bool inCallTipMode;
int posStartCallTip;
ColourPair colourBG;
ColourPair colourUnSel;
ColourPair colourSel;
ColourPair colourShade;
ColourPair colourLight;
CallTip();
~CallTip();
// Claim or accept palette entries for the colours required to paint a calltip
void RefreshColourPalette(Palette &pal, bool want);
void PaintCT(Surface *surfaceWindow);
// Setup the calltip and return a rectangle of the area required
PRectangle CallTipStart(int pos, Point pt, const char *defn,
const char *faceName, int size);
void CallTipCancel();
// Set a range of characters to be displayed in a highlight style.
// Commonly used to highlight the current parameter.
void SetHighlight(int start, int end);
};
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,229 @@
// Scintilla source code edit control
// CellBuffer.h - manages the text of the document
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef CELLBUFFER_H
#define CELLBUFFER_H
// This holds the marker identifier and the marker type to display.
// MarkerHandleNumbers are members of lists.
struct MarkerHandleNumber {
int handle;
int number;
MarkerHandleNumber *next;
};
// A marker handle set contains any number of MarkerHandleNumbers
class MarkerHandleSet {
MarkerHandleNumber *root;
public:
MarkerHandleSet();
~MarkerHandleSet();
int Length();
int NumberFromHandle(int handle);
int MarkValue(); // Bit set of marker numbers
bool Contains(int handle);
bool InsertHandle(int handle, int markerNum);
void RemoveHandle(int handle);
void RemoveNumber(int markerNum);
void CombineWith(MarkerHandleSet *other);
};
// Each line stores the starting position of the first character of the line in the cell buffer
// and potentially a marker handle set. Often a line will not have any attached markers.
struct LineData {
int startPosition;
MarkerHandleSet *handleSet;
LineData() : startPosition(0), handleSet(0) {
}
};
// The line vector contains information about each of the lines in a cell buffer.
class LineVector {
public:
enum { growSize = 4000 };
int lines;
LineData *linesData;
int size;
int *levels;
int sizeLevels;
// Handles are allocated sequentially and should never have to be reused as 32 bit ints are very big.
int handleCurrent;
LineVector();
~LineVector();
void Init();
void Expand(int sizeNew);
void ExpandLevels(int sizeNew=-1);
void ClearLevels();
void InsertValue(int pos, int value);
void SetValue(int pos, int value);
void Remove(int pos);
int LineFromPosition(int pos);
int AddMark(int line, int marker);
void MergeMarkers(int pos);
void DeleteMark(int line, int markerNum);
void DeleteMarkFromHandle(int markerHandle);
int LineFromHandle(int markerHandle);
};
// Actions are used to store all the information required to perform one undo/redo step.
enum actionType { insertAction, removeAction, startAction };
class Action {
public:
actionType at;
int position;
char *data;
int lenData;
bool mayCoalesce;
Action();
~Action();
void Create(actionType at_, int position_=0, char *data_=0, int lenData_=0, bool mayCoalesce_=true);
void Destroy();
void Grab(Action *source);
};
class UndoHistory {
Action *actions;
int lenActions;
int maxAction;
int currentAction;
int undoSequenceDepth;
int savePoint;
void EnsureUndoRoom();
public:
UndoHistory();
~UndoHistory();
void AppendAction(actionType at, int position, char *data, int length);
void BeginUndoAction();
void EndUndoAction();
void DropUndoSequence();
void DeleteUndoHistory();
// The save point is a marker in the undo stack where the container has stated that
// the buffer was saved. Undo and redo can move over the save point.
void SetSavePoint();
bool IsSavePoint() const;
// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is
// called that many times. Similarly for redo.
bool CanUndo() const;
int StartUndo();
const Action &GetUndoStep() const;
void CompletedUndoStep();
bool CanRedo() const;
int StartRedo();
const Action &GetRedoStep() const;
void CompletedRedoStep();
};
// Holder for an expandable array of characters that supports undo and line markers
// Based on article "Data Structures in a Bit-Mapped Text Editor"
// by Wilfred J. Hansen, Byte January 1987, page 183
class CellBuffer {
private:
char *body;
int size;
int length;
int part1len;
int gaplen;
char *part2body;
bool readOnly;
bool collectingUndo;
UndoHistory uh;
LineVector lv;
SVector lineStates;
void GapTo(int position);
void RoomFor(int insertionLength);
inline char ByteAt(int position);
void SetByteAt(int position, char ch);
public:
CellBuffer(int initialLength = 4000);
~CellBuffer();
// Retrieving positions outside the range of the buffer works and returns 0
char CharAt(int position);
void GetCharRange(char *buffer, int position, int lengthRetrieve);
char StyleAt(int position);
int ByteLength();
int Length();
int Lines();
int LineStart(int line);
int LineFromPosition(int pos) { return lv.LineFromPosition(pos); }
const char *InsertString(int position, char *s, int insertLength);
void InsertCharStyle(int position, char ch, char style);
// Setting styles for positions outside the range of the buffer is safe and has no effect.
// True is returned if the style of a character changed.
bool SetStyleAt(int position, char style, char mask='\377');
bool SetStyleFor(int position, int length, char style, char mask);
const char *DeleteChars(int position, int deleteLength);
bool IsReadOnly();
void SetReadOnly(bool set);
// The save point is a marker in the undo stack where the container has stated that
// the buffer was saved. Undo and redo can move over the save point.
void SetSavePoint();
bool IsSavePoint();
// Line marker functions
int AddMark(int line, int markerNum);
void DeleteMark(int line, int markerNum);
void DeleteMarkFromHandle(int markerHandle);
int GetMark(int line);
void DeleteAllMarks(int markerNum);
int LineFromHandle(int markerHandle);
// Without undo
void BasicInsertString(int position, char *s, int insertLength);
void BasicDeleteChars(int position, int deleteLength);
bool SetUndoCollection(bool collectUndo);
bool IsCollectingUndo();
void BeginUndoAction();
void EndUndoAction();
void DeleteUndoHistory();
// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is
// called that many times. Similarly for redo.
bool CanUndo();
int StartUndo();
const Action &GetUndoStep() const;
void PerformUndoStep();
bool CanRedo();
int StartRedo();
const Action &GetRedoStep() const;
void PerformRedoStep();
int SetLineState(int line, int state);
int GetLineState(int line);
int GetMaxLineState();
int SetLevel(int line, int level);
int GetLevel(int line);
void ClearLevels();
};
#define CELL_SIZE 2
#endif

View File

@@ -0,0 +1,208 @@
// Scintilla source code edit control
// ContractionState.cxx - manages visibility of lines for folding
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include "Platform.h"
#include "ContractionState.h"
OneLine::OneLine() {
displayLine = 0;
docLine = 0;
visible = true;
expanded = true;
}
ContractionState::ContractionState() {
lines = 0;
size = 0;
linesInDoc = 1;
linesInDisplay = 1;
valid = false;
}
ContractionState::~ContractionState() {
Clear();
}
void ContractionState::MakeValid() const {
if (!valid) {
// Could be cleverer by keeping the index of the last still valid entry
// rather than invalidating all.
int lineDisplay = 0;
for (int line=0; line<linesInDoc; line++) {
lines[line].displayLine = lineDisplay;
if (lines[line].visible) {
lines[lineDisplay].docLine = line;
lineDisplay++;
}
}
valid = true;
}
}
void ContractionState::Clear() {
delete []lines;
lines = 0;
size = 0;
linesInDoc = 1;
linesInDisplay = 1;
}
int ContractionState::LinesInDoc() const {
return linesInDoc;
}
int ContractionState::LinesDisplayed() const {
return linesInDisplay;
}
int ContractionState::DisplayFromDoc(int lineDoc) const {
if (size == 0) {
return lineDoc;
}
MakeValid();
if ((lineDoc >= 0) && (lineDoc < linesInDoc)) {
return lines[lineDoc].displayLine;
}
return -1;
}
int ContractionState::DocFromDisplay(int lineDisplay) const {
if (lineDisplay <= 0)
return 0;
if (lineDisplay >= linesInDisplay)
return linesInDoc-1;
if (size == 0)
return lineDisplay;
MakeValid();
return lines[lineDisplay].docLine;
}
void ContractionState::Grow(int sizeNew) {
OneLine *linesNew = new OneLine[sizeNew];
if (linesNew) {
int i = 0;
for (; i < size; i++) {
linesNew[i] = lines[i];
}
for (; i < sizeNew; i++) {
linesNew[i].displayLine = i;
}
delete []lines;
lines = linesNew;
size = sizeNew;
valid = false;
} else {
Platform::DebugPrintf("No memory available\n");
// TODO: Blow up
}
}
void ContractionState::InsertLines(int lineDoc, int lineCount) {
if (size == 0) {
linesInDoc += lineCount;
linesInDisplay += lineCount;
return;
}
//Platform::DebugPrintf("InsertLine[%d] = %d\n", lineDoc);
if ((linesInDoc + lineCount + 2) >= size) {
Grow(linesInDoc + lineCount + growSize);
}
linesInDoc += lineCount;
linesInDisplay += lineCount;
for (int i = linesInDoc; i >= lineDoc + lineCount; i--) {
lines[i].visible = lines[i - lineCount].visible;
lines[i].expanded = lines[i - lineCount].expanded;
}
for (int d=0;d<lineCount;d++) {
lines[lineDoc+d].visible = true; // Should inherit visibility from context ?
lines[lineDoc+d].expanded = true;
}
valid = false;
}
void ContractionState::DeleteLines(int lineDoc, int lineCount) {
if (size == 0) {
linesInDoc -= lineCount;
linesInDisplay -= lineCount;
return;
}
int deltaDisplayed = 0;
for (int d=0;d<lineCount;d++) {
if (lines[lineDoc+d].visible)
deltaDisplayed--;
}
for (int i = lineDoc; i < linesInDoc-lineCount; i++) {
if (i != 0) // Line zero is always visible
lines[i].visible = lines[i + lineCount].visible;
lines[i].expanded = lines[i + lineCount].expanded;
}
linesInDoc -= lineCount;
linesInDisplay += deltaDisplayed;
valid = false;
}
bool ContractionState::GetVisible(int lineDoc) const {
if (size == 0)
return true;
if ((lineDoc >= 0) && (lineDoc < linesInDoc)) {
return lines[lineDoc].visible;
} else {
return false;
}
}
bool ContractionState::SetVisible(int lineDocStart, int lineDocEnd, bool visible) {
if (lineDocStart == 0)
lineDocStart++;
if (lineDocStart > lineDocEnd)
return false;
if (size == 0) {
Grow(linesInDoc + growSize);
}
// TODO: modify docLine members to mirror displayLine
int delta = 0;
// Change lineDocs
if ((lineDocStart <= lineDocEnd) && (lineDocStart >= 0) && (lineDocEnd < linesInDoc)) {
for (int line=lineDocStart; line <= lineDocEnd; line++) {
if (lines[line].visible != visible) {
delta += visible ? 1 : -1;
lines[line].visible = visible;
}
}
}
linesInDisplay += delta;
valid = false;
return delta != 0;
}
bool ContractionState::GetExpanded(int lineDoc) const {
if (size == 0)
return true;
if ((lineDoc >= 0) && (lineDoc < linesInDoc)) {
return lines[lineDoc].expanded;
} else {
return false;
}
}
bool ContractionState::SetExpanded(int lineDoc, bool expanded) {
if (size == 0) {
Grow(linesInDoc + growSize);
}
if ((lineDoc >= 0) && (lineDoc < linesInDoc)) {
if (lines[lineDoc].expanded != expanded) {
lines[lineDoc].expanded = expanded;
return true;
}
}
return false;
}
void ContractionState::ShowAll() {
delete []lines;
lines = 0;
size = 0;
}

View File

@@ -0,0 +1,52 @@
// Scintilla source code edit control
// ContractionState.h - manages visibility of lines for folding
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef CONTRACTIONSTATE_H
#define CONTRACTIONSTATE_H
class OneLine {
public:
int displayLine; // position within set of visible lines
int docLine; // inverse of displayLine
bool visible;
bool expanded;
OneLine();
virtual ~OneLine() {}
};
class ContractionState {
void Grow(int sizeNew);
enum { growSize = 4000 };
int linesInDoc;
int linesInDisplay;
mutable OneLine *lines;
int size;
mutable bool valid;
void MakeValid() const;
public:
ContractionState();
virtual ~ContractionState();
void Clear();
int LinesInDoc() const;
int LinesDisplayed() const;
int DisplayFromDoc(int lineDoc) const;
int DocFromDisplay(int lineDisplay) const;
void InsertLines(int lineDoc, int lineCount);
void DeleteLines(int lineDoc, int lineCount);
bool GetVisible(int lineDoc) const;
bool SetVisible(int lineDocStart, int lineDocEnd, bool visible);
bool GetExpanded(int lineDoc) const;
bool SetExpanded(int lineDoc, bool expanded);
void ShowAll();
};
#endif

View File

@@ -0,0 +1,960 @@
// Scintilla source code edit control
// Document.cxx - text document that handles notifications, DBCS, styling, words and end of line
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include "Platform.h"
#include "Scintilla.h"
#include "SVector.h"
#include "CellBuffer.h"
#include "Document.h"
Document::Document() {
refCount = 0;
#ifdef unix
eolMode = SC_EOL_LF;
#else
eolMode = SC_EOL_CRLF;
#endif
dbcsCodePage = 0;
stylingBits = 5;
stylingBitsMask = 0x1F;
stylingPos = 0;
stylingMask = 0;
for (int ch = 0; ch < 256; ch++) {
wordchars[ch] = isalnum(ch) || ch == '_';
}
endStyled = 0;
enteredCount = 0;
enteredReadOnlyCount = 0;
tabInChars = 8;
indentInChars = 0;
useTabs = true;
watchers = 0;
lenWatchers = 0;
}
Document::~Document() {
for (int i = 0; i < lenWatchers; i++) {
watchers[i].watcher->NotifyDeleted(this, watchers[i].userData);
}
delete []watchers;
watchers = 0;
lenWatchers = 0;
}
// Increase reference count and return its previous value.
int Document::AddRef() {
return refCount++;
}
// Decrease reference count and return its previous value.
// Delete the document if reference count reaches zero.
int Document::Release() {
int curRefCount = --refCount;
if (curRefCount == 0)
delete this;
return curRefCount;
}
void Document::SetSavePoint() {
cb.SetSavePoint();
NotifySavePoint(true);
}
int Document::AddMark(int line, int markerNum) {
int prev = cb.AddMark(line, markerNum);
DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, 0);
NotifyModified(mh);
return prev;
}
void Document::DeleteMark(int line, int markerNum) {
cb.DeleteMark(line, markerNum);
DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, 0);
NotifyModified(mh);
}
void Document::DeleteMarkFromHandle(int markerHandle) {
cb.DeleteMarkFromHandle(markerHandle);
DocModification mh(SC_MOD_CHANGEMARKER, 0, 0, 0, 0);
NotifyModified(mh);
}
void Document::DeleteAllMarks(int markerNum) {
cb.DeleteAllMarks(markerNum);
DocModification mh(SC_MOD_CHANGEMARKER, 0, 0, 0, 0);
NotifyModified(mh);
}
int Document::LineStart(int line) {
return cb.LineStart(line);
}
int Document::LineEnd(int line) {
if (line == LinesTotal() - 1) {
return LineStart(line + 1);
} else {
int position = LineStart(line + 1) - 1;
// When line terminator is CR+LF, may need to go back one more
if ((position > LineStart(line)) && (cb.CharAt(position - 1) == '\r')) {
position--;
}
return position;
}
}
int Document::LineFromPosition(int pos) {
return cb.LineFromPosition(pos);
}
int Document::LineEndPosition(int position) {
return LineEnd(LineFromPosition(position));
}
int Document::VCHomePosition(int position) {
int line = LineFromPosition(position);
int startPosition = LineStart(line);
int endLine = LineStart(line + 1) - 1;
int startText = startPosition;
while (startText < endLine && (cb.CharAt(startText) == ' ' || cb.CharAt(startText) == '\t' ) )
startText++;
if (position == startText)
return startPosition;
else
return startText;
}
int Document::SetLevel(int line, int level) {
int prev = cb.SetLevel(line, level);
if (prev != level) {
DocModification mh(SC_MOD_CHANGEFOLD, LineStart(line), 0, 0, 0);
mh.line = line;
mh.foldLevelNow = level;
mh.foldLevelPrev = prev;
NotifyModified(mh);
}
return prev;
}
static bool IsSubordinate(int levelStart, int levelTry) {
if (levelTry & SC_FOLDLEVELWHITEFLAG)
return true;
else
return (levelStart & SC_FOLDLEVELNUMBERMASK) < (levelTry & SC_FOLDLEVELNUMBERMASK);
}
int Document::GetLastChild(int lineParent, int level) {
if (level == -1)
level = GetLevel(lineParent) & SC_FOLDLEVELNUMBERMASK;
int maxLine = LinesTotal();
int lineMaxSubord = lineParent;
while (lineMaxSubord < maxLine-1) {
EnsureStyledTo(LineStart(lineMaxSubord+2));
if (!IsSubordinate(level, GetLevel(lineMaxSubord+1)))
break;
lineMaxSubord++;
}
if (lineMaxSubord > lineParent) {
if (level > (GetLevel(lineMaxSubord+1) & SC_FOLDLEVELNUMBERMASK)) {
// Have chewed up some whitespace that belongs to a parent so seek back
if ((lineMaxSubord > lineParent) && (GetLevel(lineMaxSubord) & SC_FOLDLEVELWHITEFLAG)) {
lineMaxSubord--;
}
}
}
return lineMaxSubord;
}
int Document::GetFoldParent(int line) {
int level = GetLevel(line);
int lineLook = line-1;
while ((lineLook > 0) && (
(!(GetLevel(lineLook) & SC_FOLDLEVELHEADERFLAG)) ||
((GetLevel(lineLook) & SC_FOLDLEVELNUMBERMASK) >= level))
) {
lineLook--;
}
if ((GetLevel(lineLook) & SC_FOLDLEVELHEADERFLAG) &&
((GetLevel(lineLook) & SC_FOLDLEVELNUMBERMASK) < level)) {
return lineLook;
} else {
return -1;
}
}
int Document::ClampPositionIntoDocument(int pos) {
return Platform::Clamp(pos, 0, Length());
}
bool Document::IsCrLf(int pos) {
if (pos < 0)
return false;
if (pos >= (Length() - 1))
return false;
return (cb.CharAt(pos) == '\r') && (cb.CharAt(pos + 1) == '\n');
}
#if PLAT_WIN
bool Document::IsDBCS(int pos) {
if (dbcsCodePage) {
if (SC_CP_UTF8 == dbcsCodePage) {
unsigned char ch = static_cast<unsigned char>(cb.CharAt(pos));
return ch >= 0x80;
} else {
// Anchor DBCS calculations at start of line because start of line can
// not be a DBCS trail byte.
int startLine = pos;
while (startLine > 0 && cb.CharAt(startLine) != '\r' && cb.CharAt(startLine) != '\n')
startLine--;
while (startLine <= pos) {
if (IsDBCSLeadByteEx(dbcsCodePage, cb.CharAt(startLine))) {
startLine++;
if (startLine >= pos)
return true;
}
startLine++;
}
}
}
return false;
}
#else
// PLAT_GTK or PLAT_WX
// TODO: support DBCS under GTK+ and WX
bool Document::IsDBCS(int) {
return false;
}
#endif
int Document::LenChar(int pos) {
if (IsCrLf(pos)) {
return 2;
} else if (SC_CP_UTF8 == dbcsCodePage) {
unsigned char ch = static_cast<unsigned char>(cb.CharAt(pos));
if (ch < 0x80)
return 1;
int len = 2;
if (ch >= (0x80+0x40+0x20))
len = 3;
int lengthDoc = Length();
if ((pos + len) > lengthDoc)
return lengthDoc-pos;
else
return len;
} else if (IsDBCS(pos)) {
return 2;
} else {
return 1;
}
}
// Normalise a position so that it is not halfway through a two byte character.
// This can occur in two situations -
// When lines are terminated with \r\n pairs which should be treated as one character.
// When displaying DBCS text such as Japanese.
// If moving, move the position in the indicated direction.
int Document::MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd) {
//Platform::DebugPrintf("NoCRLF %d %d\n", pos, moveDir);
// If out of range, just return value - should be fixed up after
if (pos < 0)
return pos;
if (pos > Length())
return pos;
// Position 0 and Length() can not be between any two characters
if (pos == 0)
return pos;
if (pos == Length())
return pos;
// assert pos > 0 && pos < Length()
if (checkLineEnd && IsCrLf(pos - 1)) {
if (moveDir > 0)
return pos + 1;
else
return pos - 1;
}
// Not between CR and LF
#if PLAT_WIN
if (dbcsCodePage) {
if (SC_CP_UTF8 == dbcsCodePage) {
unsigned char ch = static_cast<unsigned char>(cb.CharAt(pos));
while ((pos > 0) && (pos < Length()) && (ch >= 0x80) && (ch < (0x80 + 0x40))) {
// ch is a trail byte
if (moveDir > 0)
pos++;
else
pos--;
ch = static_cast<unsigned char>(cb.CharAt(pos));
}
} else {
// Anchor DBCS calculations at start of line because start of line can
// not be a DBCS trail byte.
int startLine = pos;
while (startLine > 0 && cb.CharAt(startLine) != '\r' && cb.CharAt(startLine) != '\n')
startLine--;
bool atLeadByte = false;
while (startLine < pos) {
if (atLeadByte)
atLeadByte = false;
else if (IsDBCSLeadByteEx(dbcsCodePage, cb.CharAt(startLine)))
atLeadByte = true;
else
atLeadByte = false;
startLine++;
//Platform::DebugPrintf("DBCS %s\n", atlead ? "D" : "-");
}
if (atLeadByte) {
// Position is between a lead byte and a trail byte
if (moveDir > 0)
return pos + 1;
else
return pos - 1;
}
}
}
#endif
return pos;
}
void Document::ModifiedAt(int pos) {
if (endStyled > pos)
endStyled = pos;
}
// Document only modified by gateways DeleteChars, InsertStyledString, Undo, Redo, and SetStyleAt.
// SetStyleAt does not change the persistent state of a document
// Unlike Undo, Redo, and InsertStyledString, the pos argument is a cell number not a char number
void Document::DeleteChars(int pos, int len) {
if ((pos + len) > Length())
return;
if (cb.IsReadOnly() && enteredReadOnlyCount==0) {
enteredReadOnlyCount++;
NotifyModifyAttempt();
enteredReadOnlyCount--;
}
if (enteredCount == 0) {
enteredCount++;
if (!cb.IsReadOnly()) {
NotifyModified(
DocModification(
SC_MOD_BEFOREDELETE | SC_PERFORMED_USER,
pos, len,
0, 0));
int prevLinesTotal = LinesTotal();
bool startSavePoint = cb.IsSavePoint();
const char *text = cb.DeleteChars(pos*2, len * 2);
if (startSavePoint && cb.IsCollectingUndo())
NotifySavePoint(!startSavePoint);
ModifiedAt(pos);
NotifyModified(
DocModification(
SC_MOD_DELETETEXT | SC_PERFORMED_USER,
pos, len,
LinesTotal() - prevLinesTotal, text));
}
enteredCount--;
}
}
void Document::InsertStyledString(int position, char *s, int insertLength) {
if (cb.IsReadOnly() && enteredReadOnlyCount==0) {
enteredReadOnlyCount++;
NotifyModifyAttempt();
enteredReadOnlyCount--;
}
if (enteredCount == 0) {
enteredCount++;
if (!cb.IsReadOnly()) {
NotifyModified(
DocModification(
SC_MOD_BEFOREINSERT | SC_PERFORMED_USER,
position / 2, insertLength / 2,
0, 0));
int prevLinesTotal = LinesTotal();
bool startSavePoint = cb.IsSavePoint();
const char *text = cb.InsertString(position, s, insertLength);
if (startSavePoint && cb.IsCollectingUndo())
NotifySavePoint(!startSavePoint);
ModifiedAt(position / 2);
NotifyModified(
DocModification(
SC_MOD_INSERTTEXT | SC_PERFORMED_USER,
position / 2, insertLength / 2,
LinesTotal() - prevLinesTotal, text));
}
enteredCount--;
}
}
int Document::Undo() {
int newPos = 0;
if (enteredCount == 0) {
enteredCount++;
bool startSavePoint = cb.IsSavePoint();
int steps = cb.StartUndo();
//Platform::DebugPrintf("Steps=%d\n", steps);
for (int step=0; step<steps; step++) {
int prevLinesTotal = LinesTotal();
const Action &action = cb.GetUndoStep();
if (action.at == removeAction) {
NotifyModified(DocModification(
SC_MOD_BEFOREINSERT | SC_PERFORMED_UNDO, action));
} else {
NotifyModified(DocModification(
SC_MOD_BEFOREDELETE | SC_PERFORMED_UNDO, action));
}
cb.PerformUndoStep();
int cellPosition = action.position / 2;
ModifiedAt(cellPosition);
newPos = cellPosition;
int modFlags = SC_PERFORMED_UNDO;
// With undo, an insertion action becomes a deletion notification
if (action.at == removeAction) {
newPos += action.lenData;
modFlags |= SC_MOD_INSERTTEXT;
} else {
modFlags |= SC_MOD_DELETETEXT;
}
if (step == steps-1)
modFlags |= SC_LASTSTEPINUNDOREDO;
NotifyModified(DocModification(modFlags, cellPosition, action.lenData,
LinesTotal() - prevLinesTotal, action.data));
}
bool endSavePoint = cb.IsSavePoint();
if (startSavePoint != endSavePoint)
NotifySavePoint(endSavePoint);
enteredCount--;
}
return newPos;
}
int Document::Redo() {
int newPos = 0;
if (enteredCount == 0) {
enteredCount++;
bool startSavePoint = cb.IsSavePoint();
int steps = cb.StartRedo();
for (int step=0; step<steps; step++) {
int prevLinesTotal = LinesTotal();
const Action &action = cb.GetRedoStep();
if (action.at == insertAction) {
NotifyModified(DocModification(
SC_MOD_BEFOREINSERT | SC_PERFORMED_REDO, action));
} else {
NotifyModified(DocModification(
SC_MOD_BEFOREDELETE | SC_PERFORMED_REDO, action));
}
cb.PerformRedoStep();
ModifiedAt(action.position / 2);
newPos = action.position / 2;
int modFlags = SC_PERFORMED_REDO;
if (action.at == insertAction) {
newPos += action.lenData;
modFlags |= SC_MOD_INSERTTEXT;
} else {
modFlags |= SC_MOD_DELETETEXT;
}
if (step == steps-1)
modFlags |= SC_LASTSTEPINUNDOREDO;
NotifyModified(
DocModification(modFlags, action.position / 2, action.lenData,
LinesTotal() - prevLinesTotal, action.data));
}
bool endSavePoint = cb.IsSavePoint();
if (startSavePoint != endSavePoint)
NotifySavePoint(endSavePoint);
enteredCount--;
}
return newPos;
}
void Document::InsertChar(int pos, char ch) {
char chs[2];
chs[0] = ch;
chs[1] = 0;
InsertStyledString(pos*2, chs, 2);
}
// Insert a null terminated string
void Document::InsertString(int position, const char *s) {
InsertString(position, s, strlen(s));
}
// Insert a string with a length
void Document::InsertString(int position, const char *s, int insertLength) {
char *sWithStyle = new char[insertLength * 2];
if (sWithStyle) {
for (int i = 0; i < insertLength; i++) {
sWithStyle[i*2] = s[i];
sWithStyle[i*2 + 1] = 0;
}
InsertStyledString(position*2, sWithStyle, insertLength*2);
delete []sWithStyle;
}
}
void Document::ChangeChar(int pos, char ch) {
DeleteChars(pos, 1);
InsertChar(pos, ch);
}
void Document::DelChar(int pos) {
DeleteChars(pos, LenChar(pos));
}
int Document::DelCharBack(int pos) {
if (pos <= 0) {
return pos;
} else if (IsCrLf(pos - 2)) {
DeleteChars(pos - 2, 2);
return pos - 2;
} else if (SC_CP_UTF8 == dbcsCodePage) {
int startChar = MovePositionOutsideChar(pos-1, -1, false);
DeleteChars(startChar, pos - startChar);
return startChar;
} else if (IsDBCS(pos - 1)) {
DeleteChars(pos - 2, 2);
return pos - 2;
} else {
DeleteChars(pos - 1, 1);
return pos - 1;
}
}
static bool isindentchar(char ch) {
return (ch == ' ') || (ch == '\t');
}
static int NextTab(int pos, int tabSize) {
return ((pos / tabSize) + 1) * tabSize;
}
static void CreateIndentation(char *linebuf, int length, int indent, int tabSize, bool insertSpaces) {
length--; // ensure space for \0
if (!insertSpaces) {
while ((indent >= tabSize) && (length > 0)) {
*linebuf++ = '\t';
indent -= tabSize;
length--;
}
}
while ((indent > 0) && (length > 0)) {
*linebuf++ = ' ';
indent--;
length--;
}
*linebuf = '\0';
}
int Document::GetLineIndentation(int line) {
int indent = 0;
if ((line >= 0) && (line < LinesTotal())) {
int lineStart = LineStart(line);
int length = Length();
for (int i=lineStart;i<length;i++) {
char ch = cb.CharAt(i);
if (ch == ' ')
indent++;
else if (ch == '\t')
indent = NextTab(indent, tabInChars);
else
return indent;
}
}
return indent;
}
void Document::SetLineIndentation(int line, int indent) {
int indentOfLine = GetLineIndentation(line);
if (indent < 0)
indent = 0;
if (indent != indentOfLine) {
char linebuf[1000];
CreateIndentation(linebuf, sizeof(linebuf), indent, tabInChars, !useTabs);
int thisLineStart = LineStart(line);
int indentPos = GetLineIndentPosition(line);
DeleteChars(thisLineStart, indentPos - thisLineStart);
InsertString(thisLineStart, linebuf);
}
}
int Document::GetLineIndentPosition(int line) {
if (line < 0)
return 0;
int pos = LineStart(line);
int length = Length();
while ((pos < length) && isindentchar(cb.CharAt(pos))) {
pos++;
}
return pos;
}
int Document::GetColumn(int pos) {
int column = 0;
int line = LineFromPosition(pos);
if ((line >= 0) && (line < LinesTotal())) {
for (int i=LineStart(line);i<pos;i++) {
char ch = cb.CharAt(i);
if (ch == '\t')
column = NextTab(column, tabInChars);
else if (ch == '\r')
return column;
else if (ch == '\n')
return column;
else
column++;
}
}
return column;
}
void Document::Indent(bool forwards, int lineBottom, int lineTop) {
// Dedent - suck white space off the front of the line to dedent by equivalent of a tab
for (int line = lineBottom; line >= lineTop; line--) {
int indentOfLine = GetLineIndentation(line);
if (forwards)
SetLineIndentation(line, indentOfLine + IndentSize());
else
SetLineIndentation(line, indentOfLine - IndentSize());
}
}
void Document::ConvertLineEnds(int eolModeSet) {
BeginUndoAction();
for (int pos = 0; pos < Length(); pos++) {
if (cb.CharAt(pos) == '\r') {
if (cb.CharAt(pos+1) == '\n') {
if (eolModeSet != SC_EOL_CRLF) {
DeleteChars(pos, 2);
if (eolModeSet == SC_EOL_CR)
InsertString(pos, "\r", 1);
else
InsertString(pos, "\n", 1);
} else {
pos++;
}
} else {
if (eolModeSet != SC_EOL_CR) {
DeleteChars(pos, 1);
if (eolModeSet == SC_EOL_CRLF) {
InsertString(pos, "\r\n", 2);
pos++;
} else {
InsertString(pos, "\n", 1);
}
}
}
} else if (cb.CharAt(pos) == '\n') {
if (eolModeSet != SC_EOL_LF) {
DeleteChars(pos, 1);
if (eolModeSet == SC_EOL_CRLF) {
InsertString(pos, "\r\n", 2);
pos++;
} else {
InsertString(pos, "\r", 1);
}
}
}
}
EndUndoAction();
}
bool Document::IsWordChar(unsigned char ch) {
if ((SC_CP_UTF8 == dbcsCodePage) && (ch >0x80))
return true;
return wordchars[ch];
}
int Document::ExtendWordSelect(int pos, int delta) {
if (delta < 0) {
while (pos > 0 && IsWordChar(cb.CharAt(pos - 1)))
pos--;
} else {
while (pos < (Length()) && IsWordChar(cb.CharAt(pos)))
pos++;
}
return pos;
}
int Document::NextWordStart(int pos, int delta) {
if (delta < 0) {
while (pos > 0 && (cb.CharAt(pos - 1) == ' ' || cb.CharAt(pos - 1) == '\t'))
pos--;
if (isspace(cb.CharAt(pos - 1))) { // Back up to previous line
while (pos > 0 && isspace(cb.CharAt(pos - 1)))
pos--;
} else {
bool startAtWordChar = IsWordChar(cb.CharAt(pos - 1));
while (pos > 0 && !isspace(cb.CharAt(pos - 1)) && (startAtWordChar == IsWordChar(cb.CharAt(pos - 1))))
pos--;
}
} else {
bool startAtWordChar = IsWordChar(cb.CharAt(pos));
while (pos < (Length()) && isspace(cb.CharAt(pos)))
pos++;
while (pos < (Length()) && !isspace(cb.CharAt(pos)) && (startAtWordChar == IsWordChar(cb.CharAt(pos))))
pos++;
while (pos < (Length()) && (cb.CharAt(pos) == ' ' || cb.CharAt(pos) == '\t'))
pos++;
}
return pos;
}
bool Document::IsWordStartAt(int pos) {
if (pos > 0) {
return !IsWordChar(CharAt(pos - 1));
}
return true;
}
bool Document::IsWordEndAt(int pos) {
if (pos < Length() - 1) {
return !IsWordChar(CharAt(pos));
}
return true;
}
bool Document::IsWordAt(int start, int end) {
return IsWordStartAt(start) && IsWordEndAt(end);
}
// Find text in document, supporting both forward and backward
// searches (just pass minPos > maxPos to do a backward search)
// Has not been tested with backwards DBCS searches yet.
long Document::FindText(int minPos, int maxPos, const char *s,
bool caseSensitive, bool word, bool wordStart) {
bool forward = minPos <= maxPos;
int increment = forward ? 1 : -1;
// Range endpoints should not be inside DBCS characters, but just in case, move them.
int startPos = MovePositionOutsideChar(minPos, increment, false);
int endPos = MovePositionOutsideChar(maxPos, increment, false);
// Compute actual search ranges needed
int lengthFind = strlen(s);
int endSearch = endPos;
if (startPos <= endPos) {
endSearch = endPos - lengthFind + 1;
}
//Platform::DebugPrintf("Find %d %d %s %d\n", startPos, endPos, ft->lpstrText, lengthFind);
char firstChar = s[0];
if (!caseSensitive)
firstChar = static_cast<char>(toupper(firstChar));
int pos = startPos;
while (forward ? (pos < endSearch) : (pos >= endSearch)) {
char ch = CharAt(pos);
if (caseSensitive) {
if (ch == firstChar) {
bool found = true;
for (int posMatch = 1; posMatch < lengthFind && found; posMatch++) {
ch = CharAt(pos + posMatch);
if (ch != s[posMatch])
found = false;
}
if (found) {
if ((!word && !wordStart) ||
word && IsWordAt(pos, pos + lengthFind) ||
wordStart && IsWordStartAt(pos))
return pos;
}
}
} else {
if (toupper(ch) == firstChar) {
bool found = true;
for (int posMatch = 1; posMatch < lengthFind && found; posMatch++) {
ch = CharAt(pos + posMatch);
if (toupper(ch) != toupper(s[posMatch]))
found = false;
}
if (found) {
if (!(word && wordStart) ||
word && IsWordAt(pos, pos + lengthFind) ||
wordStart && IsWordStartAt(pos))
return pos;
}
}
}
pos += increment;
if (dbcsCodePage) {
// Ensure trying to match from start of character
pos = MovePositionOutsideChar(pos, increment, false);
}
}
//Platform::DebugPrintf("Not found\n");
return - 1;
}
int Document::LinesTotal() {
return cb.Lines();
}
void Document::ChangeCase(Range r, bool makeUpperCase) {
for (int pos=r.start; pos<r.end; pos++) {
char ch = CharAt(pos);
if (dbcsCodePage && IsDBCS(pos)) {
pos += LenChar(pos);
} else {
if (makeUpperCase) {
if (islower(ch)) {
ChangeChar(pos, static_cast<char>(toupper(ch)));
}
} else {
if (isupper(ch)) {
ChangeChar(pos, static_cast<char>(tolower(ch)));
}
}
}
}
}
void Document::SetWordChars(unsigned char *chars) {
int ch;
for (ch = 0; ch < 256; ch++) {
wordchars[ch] = false;
}
if (chars) {
while (*chars) {
wordchars[*chars] = true;
chars++;
}
} else {
for (ch = 0; ch < 256; ch++) {
wordchars[ch] = isalnum(ch) || ch == '_';
}
}
}
void Document::SetStylingBits(int bits) {
stylingBits = bits;
stylingBitsMask = 0;
for (int bit=0; bit<stylingBits; bit++) {
stylingBitsMask <<= 1;
stylingBitsMask |= 1;
}
}
void Document::StartStyling(int position, char mask) {
stylingPos = position;
stylingMask = mask;
}
void Document::SetStyleFor(int length, char style) {
if (enteredCount == 0) {
enteredCount++;
int prevEndStyled = endStyled;
if (cb.SetStyleFor(stylingPos, length, style, stylingMask)) {
DocModification mh(SC_MOD_CHANGESTYLE | SC_PERFORMED_USER,
prevEndStyled, length);
NotifyModified(mh);
}
stylingPos += length;
endStyled = stylingPos;
enteredCount--;
}
}
void Document::SetStyles(int length, char *styles) {
if (enteredCount == 0) {
enteredCount++;
int prevEndStyled = endStyled;
bool didChange = false;
for (int iPos = 0; iPos < length; iPos++, stylingPos++) {
if (cb.SetStyleAt(stylingPos, styles[iPos], stylingMask)) {
didChange = true;
}
}
endStyled = stylingPos;
if (didChange) {
DocModification mh(SC_MOD_CHANGESTYLE | SC_PERFORMED_USER,
prevEndStyled, endStyled - prevEndStyled);
NotifyModified(mh);
}
enteredCount--;
}
}
bool Document::EnsureStyledTo(int pos) {
// Ask the watchers to style, and stop as soon as one responds.
for (int i = 0; pos > GetEndStyled() && i < lenWatchers; i++)
watchers[i].watcher->NotifyStyleNeeded(this, watchers[i].userData, pos);
return pos <= GetEndStyled();
}
bool Document::AddWatcher(DocWatcher *watcher, void *userData) {
for (int i = 0; i < lenWatchers; i++) {
if ((watchers[i].watcher == watcher) &&
(watchers[i].userData == userData))
return false;
}
WatcherWithUserData *pwNew = new WatcherWithUserData[lenWatchers + 1];
if (!pwNew)
return false;
for (int j = 0; j < lenWatchers; j++)
pwNew[j] = watchers[j];
pwNew[lenWatchers].watcher = watcher;
pwNew[lenWatchers].userData = userData;
delete []watchers;
watchers = pwNew;
lenWatchers++;
return true;
}
bool Document::RemoveWatcher(DocWatcher *watcher, void *userData) {
for (int i = 0; i < lenWatchers; i++) {
if ((watchers[i].watcher == watcher) &&
(watchers[i].userData == userData)) {
if (lenWatchers == 1) {
delete []watchers;
watchers = 0;
lenWatchers = 0;
} else {
WatcherWithUserData *pwNew = new WatcherWithUserData[lenWatchers];
if (!pwNew)
return false;
for (int j = 0; j < lenWatchers - 1; j++) {
pwNew[j] = (j < i) ? watchers[j] : watchers[j + 1];
}
delete []watchers;
watchers = pwNew;
lenWatchers--;
}
return true;
}
}
return false;
}
void Document::NotifyModifyAttempt() {
for (int i = 0; i < lenWatchers; i++) {
watchers[i].watcher->NotifyModifyAttempt(this, watchers[i].userData);
}
}
void Document::NotifySavePoint(bool atSavePoint) {
for (int i = 0; i < lenWatchers; i++) {
watchers[i].watcher->NotifySavePoint(this, watchers[i].userData, atSavePoint);
}
}
void Document::NotifyModified(DocModification mh) {
for (int i = 0; i < lenWatchers; i++) {
watchers[i].watcher->NotifyModified(this, mh, watchers[i].userData);
}
}

View File

@@ -0,0 +1,255 @@
// Scintilla source code edit control
// Document.h - text document that handles notifications, DBCS, styling, words and end of line
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef DOCUMENT_H
#define DOCUMENT_H
// A Position is a position within a document between two characters or at the beginning or end.
// Sometimes used as a character index where it identifies the character after the position.
typedef int Position;
const Position invalidPosition = -1;
// The range class represents a range of text in a document.
// The two values are not sorted as one end may be more significant than the other
// as is the case for the selection where the end position is the position of the caret.
// If either position is invalidPosition then the range is invalid and most operations will fail.
class Range {
public:
Position start;
Position end;
Range(Position pos=0) :
start(pos), end(pos) {
};
Range(Position start_, Position end_) :
start(start_), end(end_) {
};
bool Valid() const {
return (start != invalidPosition) && (end != invalidPosition);
}
bool Contains(Position pos) const {
if (start < end) {
return (pos >= start && pos <= end);
} else {
return (pos <= start && pos >= end);
}
}
bool Contains(Range other) const {
return Contains(other.start) && Contains(other.end);
}
bool Overlaps(Range other) const {
return
Contains(other.start) ||
Contains(other.end) ||
other.Contains(start) ||
other.Contains(end);
}
};
class DocWatcher;
class DocModification;
class Document {
public:
// Used to pair watcher pointer with user data
class WatcherWithUserData {
public:
DocWatcher *watcher;
void *userData;
WatcherWithUserData() {
watcher = 0;
userData = 0;
}
};
private:
int refCount;
CellBuffer cb;
bool wordchars[256];
int stylingPos;
char stylingMask;
int endStyled;
int enteredCount;
int enteredReadOnlyCount;
WatcherWithUserData *watchers;
int lenWatchers;
public:
int stylingBits;
int stylingBitsMask;
int eolMode;
// dbcsCodePage can also be SC_CP_UTF8 to enable UTF-8 mode
int dbcsCodePage;
int tabInChars;
int indentInChars;
bool useTabs;
Document();
virtual ~Document();
int AddRef();
int Release();
int LineFromPosition(int pos);
int ClampPositionIntoDocument(int pos);
bool IsCrLf(int pos);
int LenChar(int pos);
int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true);
// Gateways to modifying document
void DeleteChars(int pos, int len);
void InsertStyledString(int position, char *s, int insertLength);
int Undo();
int Redo();
bool CanUndo() { return cb.CanUndo(); }
bool CanRedo() { return cb.CanRedo(); }
void DeleteUndoHistory() { cb.DeleteUndoHistory(); }
bool SetUndoCollection(bool collectUndo) {
return cb.SetUndoCollection(collectUndo);
}
bool IsCollectingUndo() { return cb.IsCollectingUndo(); }
void BeginUndoAction() { cb.BeginUndoAction(); }
void EndUndoAction() { cb.EndUndoAction(); }
void SetSavePoint();
bool IsSavePoint() { return cb.IsSavePoint(); }
int GetLineIndentation(int line);
void SetLineIndentation(int line, int indent);
int GetLineIndentPosition(int line);
int GetColumn(int position);
void Indent(bool forwards, int lineBottom, int lineTop);
void ConvertLineEnds(int eolModeSet);
void SetReadOnly(bool set) { cb.SetReadOnly(set); }
bool IsReadOnly() { return cb.IsReadOnly(); }
void InsertChar(int pos, char ch);
void InsertString(int position, const char *s);
void InsertString(int position, const char *s, int insertLength);
void ChangeChar(int pos, char ch);
void DelChar(int pos);
int DelCharBack(int pos);
char CharAt(int position) { return cb.CharAt(position); }
void GetCharRange(char *buffer, int position, int lengthRetrieve) {
cb.GetCharRange(buffer, position, lengthRetrieve);
}
char StyleAt(int position) { return cb.StyleAt(position); }
int GetMark(int line) { return cb.GetMark(line); }
int AddMark(int line, int markerNum);
void DeleteMark(int line, int markerNum);
void DeleteMarkFromHandle(int markerHandle);
void DeleteAllMarks(int markerNum);
int LineFromHandle(int markerHandle) { return cb.LineFromHandle(markerHandle); }
int LineStart(int line);
int LineEnd(int line);
int LineEndPosition(int position);
int VCHomePosition(int position);
int SetLevel(int line, int level);
int GetLevel(int line) { return cb.GetLevel(line); }
void ClearLevels() { cb.ClearLevels(); }
int GetLastChild(int lineParent, int level=-1);
int GetFoldParent(int line);
void Indent(bool forwards);
int ExtendWordSelect(int pos, int delta);
int NextWordStart(int pos, int delta);
int Length() { return cb.Length(); }
long FindText(int minPos, int maxPos, const char *s,
bool caseSensitive, bool word, bool wordStart);
long FindText(int iMessage, unsigned long wParam, long lParam);
int LinesTotal();
void ChangeCase(Range r, bool makeUpperCase);
void SetWordChars(unsigned char *chars);
void SetStylingBits(int bits);
void StartStyling(int position, char mask);
void SetStyleFor(int length, char style);
void SetStyles(int length, char *styles);
int GetEndStyled() { return endStyled; }
bool EnsureStyledTo(int pos);
int SetLineState(int line, int state) { return cb.SetLineState(line, state); }
int GetLineState(int line) { return cb.GetLineState(line); }
int GetMaxLineState() { return cb.GetMaxLineState(); }
bool AddWatcher(DocWatcher *watcher, void *userData);
bool RemoveWatcher(DocWatcher *watcher, void *userData);
const WatcherWithUserData *GetWatchers() const { return watchers; }
int GetLenWatchers() const { return lenWatchers; }
private:
bool IsDBCS(int pos);
bool IsWordChar(unsigned char ch);
bool IsWordStartAt(int pos);
bool IsWordEndAt(int pos);
bool IsWordAt(int start, int end);
void ModifiedAt(int pos);
void NotifyModifyAttempt();
void NotifySavePoint(bool atSavePoint);
void NotifyModified(DocModification mh);
int IndentSize() { return indentInChars ? indentInChars : tabInChars; }
};
// To optimise processing of document modifications by DocWatchers, a hint is passed indicating the
// scope of the change.
// If the DocWatcher is a document view then this can be used to optimise screen updating.
class DocModification {
public:
int modificationType;
int position;
int length;
int linesAdded; // Negative if lines deleted
const char *text; // Only valid for changes to text, not for changes to style
int line;
int foldLevelNow;
int foldLevelPrev;
DocModification(int modificationType_, int position_=0, int length_=0,
int linesAdded_=0, const char *text_=0) :
modificationType(modificationType_),
position(position_),
length(length_),
linesAdded(linesAdded_),
text(text_),
line(0),
foldLevelNow(0),
foldLevelPrev(0) {}
DocModification(int modificationType_, const Action &act, int linesAdded_=0) :
modificationType(modificationType_),
position(act.position / 2),
length(act.lenData),
linesAdded(linesAdded_),
text(act.data),
line(0),
foldLevelNow(0),
foldLevelPrev(0) {}
};
// A class that wants to receive notifications from a Document must be derived from DocWatcher
// and implement the notification methods. It can then be added to the watcher list with AddWatcher.
class DocWatcher {
public:
virtual ~DocWatcher() {}
virtual void NotifyModifyAttempt(Document *doc, void *userData) = 0;
virtual void NotifySavePoint(Document *doc, void *userData, bool atSavePoint) = 0;
virtual void NotifyModified(Document *doc, DocModification mh, void *userData) = 0;
virtual void NotifyDeleted(Document *doc, void *userData) = 0;
virtual void NotifyStyleNeeded(Document *doc, void *userData, int endPos) = 0;
};
#endif

View File

@@ -0,0 +1,176 @@
// SciTE - Scintilla based Text Editor
// Accessor.cxx - rapid easy access to contents of a Scintilla
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
#include "Platform.h"
#include "PropSet.h"
#include "SVector.h"
#include "Accessor.h"
#include "DocumentAccessor.h"
#include "CellBuffer.h"
#include "Scintilla.h"
#include "Document.h"
DocumentAccessor::~DocumentAccessor() {
}
#if PLAT_WIN
bool DocumentAccessor::InternalIsLeadByte(char ch) {
if (SC_CP_UTF8 == codePage)
// For lexing, all characters >= 0x80 are treated the
// same so none is considered a lead byte.
return false;
else
return IsDBCSLeadByteEx(codePage, ch);
}
#else
// PLAT_GTK or PLAT_WX
// TODO: support DBCS under GTK+ and WX
bool DocumentAccessor::InternalIsLeadByte(char) {
return false;
}
#endif
void DocumentAccessor::Fill(int position) {
if (lenDoc == -1)
lenDoc = pdoc->Length();
startPos = position - slopSize;
if (startPos + bufferSize > lenDoc)
startPos = lenDoc - bufferSize;
if (startPos < 0)
startPos = 0;
endPos = startPos + bufferSize;
if (endPos > lenDoc)
endPos = lenDoc;
pdoc->GetCharRange(buf, startPos, endPos-startPos);
buf[endPos-startPos] = '\0';
}
char DocumentAccessor::StyleAt(int position) {
return pdoc->StyleAt(position);
}
int DocumentAccessor::GetLine(int position) {
return pdoc->LineFromPosition(position);
}
int DocumentAccessor::LineStart(int line) {
return pdoc->LineStart(line);
}
int DocumentAccessor::LevelAt(int line) {
return pdoc->GetLevel(line);
}
int DocumentAccessor::Length() {
if (lenDoc == -1)
lenDoc = pdoc->Length();
return lenDoc;
}
int DocumentAccessor::GetLineState(int line) {
return pdoc->GetLineState(line);
}
int DocumentAccessor::SetLineState(int line, int state) {
return pdoc->SetLineState(line, state);
}
void DocumentAccessor::StartAt(unsigned int start, char chMask) {
pdoc->StartStyling(start, chMask);
}
void DocumentAccessor::StartSegment(unsigned int pos) {
startSeg = pos;
}
void DocumentAccessor::ColourTo(unsigned int pos, int chAttr) {
// Only perform styling if non empty range
if (pos != startSeg - 1) {
if (pos < startSeg) {
Platform::DebugPrintf("Bad colour positions %d - %d\n", startSeg, pos);
}
if (validLen + (pos - startSeg + 1) >= bufferSize)
Flush();
if (validLen + (pos - startSeg + 1) >= bufferSize) {
// Too big for buffer so send directly
pdoc->SetStyleFor(pos - startSeg + 1, static_cast<char>(chAttr));
} else {
if (chAttr != chWhile)
chFlags = 0;
chAttr |= chFlags;
for (unsigned int i = startSeg; i <= pos; i++) {
styleBuf[validLen++] = static_cast<char>(chAttr);
}
}
}
startSeg = pos+1;
}
void DocumentAccessor::SetLevel(int line, int level) {
pdoc->SetLevel(line, level);
}
void DocumentAccessor::Flush() {
startPos = extremePosition;
lenDoc = -1;
if (validLen > 0) {
pdoc->SetStyles(validLen, styleBuf);
validLen = 0;
}
}
int DocumentAccessor::IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader) {
int end = Length();
int spaceFlags = 0;
// Determines the indentation level of the current line and also checks for consistent
// indentation compared to the previous line.
// Indentation is judged consistent when the indentation whitespace of each line lines
// the same or the indentation of one line is a prefix of the other.
int pos = LineStart(line);
char ch = (*this)[pos];
int indent = 0;
bool inPrevPrefix = line > 0;
int posPrev = inPrevPrefix ? LineStart(line-1) : 0;
while ((ch == ' ' || ch == '\t') && (pos < end)) {
if (inPrevPrefix) {
char chPrev = (*this)[posPrev++];
if (chPrev == ' ' || chPrev == '\t') {
if (chPrev != ch)
spaceFlags |= wsInconsistent;
} else {
inPrevPrefix = false;
}
}
if (ch == ' ') {
spaceFlags |= wsSpace;
indent++;
} else { // Tab
spaceFlags |= wsTab;
if (spaceFlags & wsSpace)
spaceFlags |= wsSpaceTab;
indent = (indent / 8 + 1) * 8;
}
ch = (*this)[++pos];
}
*flags = spaceFlags;
indent += SC_FOLDLEVELBASE;
// if completely empty line or the start of a comment...
if (isspace(ch) || (pfnIsCommentLeader && (*pfnIsCommentLeader)(*this, pos, end-pos)) )
return indent | SC_FOLDLEVELWHITEFLAG;
else
return indent;
}

View File

@@ -0,0 +1,49 @@
// DocumentAccessor.h - implementation of BufferAccess and StylingAccess on a Scintilla rapid easy access to contents of a Scintilla
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
class Document;
class DocumentAccessor : public Accessor {
// Private so DocumentAccessor objects can not be copied
DocumentAccessor(const DocumentAccessor &source) : Accessor(), props(source.props) {}
DocumentAccessor &operator=(const DocumentAccessor &) { return *this; }
protected:
Document *pdoc;
PropSet &props;
int lenDoc;
char styleBuf[bufferSize];
int validLen;
char chFlags;
char chWhile;
unsigned int startSeg;
bool InternalIsLeadByte(char ch);
void Fill(int position);
public:
DocumentAccessor(Document *pdoc_, PropSet &props_) :
Accessor(), pdoc(pdoc_), props(props_),
lenDoc(-1), validLen(0), chFlags(0), chWhile(0) {
}
~DocumentAccessor();
char StyleAt(int position);
int GetLine(int position);
int LineStart(int line);
int LevelAt(int line);
int Length();
void Flush();
int GetLineState(int line);
int SetLineState(int line, int state);
int GetPropertyInt(const char *key, int defaultValue=0) {
return props.GetInt(key, defaultValue);
}
void StartAt(unsigned int start, char chMask=31);
void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; };
unsigned int GetStartSegment() { return startSeg; }
void StartSegment(unsigned int pos);
void ColourTo(unsigned int pos, int chAttr);
void SetLevel(int line, int level);
int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0);
};

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,308 @@
// Scintilla source code edit control
// Editor.h - defines the main editor class
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef EDITOR_H
#define EDITOR_H
class Caret {
public:
bool active;
bool on;
int period;
Caret();
};
class Timer {
public:
bool ticking;
int ticksToWait;
enum {tickSize = 100};
int tickerID;
Timer();
};
class LineLayout {
public:
// Drawing is only performed for maxLineLength characters on each line.
enum {maxLineLength = 4000};
int numCharsInLine;
int xHighlightGuide;
bool highlightColumn;
int selStart;
int selEnd;
int edgeColumn;
char chars[maxLineLength+1];
char styles[maxLineLength+1];
char indicators[maxLineLength+1];
int positions[maxLineLength+1];
};
class Editor : public DocWatcher {
// Private so Editor objects can not be copied
Editor(const Editor &) : DocWatcher() {}
Editor &operator=(const Editor &) { return *this; }
protected: // ScintillaBase subclass needs access to much of Editor
// On GTK+, Scintilla is a container widget holding two scroll bars and a drawing area
// whereas on Windows there is just one window with both scroll bars turned on.
// Therefore, on GTK+ the following are separate windows but only one window on Windows.
Window wMain; // The Scintilla parent window
Window wDraw; // The text drawing area
// Style resources may be expensive to allocate so are cached between uses.
// When a style attribute is changed, this cache is flushed.
bool stylesValid;
ViewStyle vs;
Palette palette;
int printMagnification;
int printColourMode;
bool hideSelection;
bool inOverstrike;
// In bufferedDraw mode, graphics operations are drawn to a pixmap and then copied to
// the screen. This avoids flashing but is about 30% slower.
bool bufferedDraw;
int xOffset; // Horizontal scrolled amount in pixels
int xCaretMargin; // Ensure this many pixels visible on both sides of caret
bool horizontalScrollBarVisible;
Surface pixmapLine;
Surface pixmapSelMargin;
Surface pixmapSelPattern;
Surface pixmapIndentGuide;
Surface pixmapIndentGuideHighlight;
// Intellimouse support - currently only implemented for Windows
unsigned int ucWheelScrollLines;
int cWheelDelta; //wheel delta from roll
KeyMap kmap;
Caret caret;
Timer timer;
Point lastClick;
unsigned int lastClickTime;
enum { selChar, selWord, selLine } selectionType;
Point ptMouseLast;
bool firstExpose;
bool inDragDrop;
bool dropWentOutside;
int posDrag;
int posDrop;
int lastXChosen;
int lineAnchor;
int originalAnchorPos;
int currentPos;
int anchor;
int topLine;
int posTopLine;
bool needUpdateUI;
Position braces[2];
int bracesMatchStyle;
int highlightGuideColumn;
int theEdge;
enum { notPainting, painting, paintAbandoned } paintState;
PRectangle rcPaint;
bool paintingAllText;
int modEventMask;
char *dragChars;
int lenDrag;
bool dragIsRectangle;
enum { selStream, selRectangle, selRectangleFixed } selType;
int xStartSelect;
int xEndSelect;
bool primarySelection;
int caretPolicy;
int caretSlop;
int searchAnchor;
int displayPopupMenu;
#ifdef MACRO_SUPPORT
int recordingMacro;
#endif
int foldFlags;
ContractionState cs;
Document *pdoc;
Editor();
virtual ~Editor();
virtual void Initialise() = 0;
virtual void Finalise();
void InvalidateStyleData();
void InvalidateStyleRedraw();
virtual void RefreshColourPalette(Palette &pal, bool want);
void RefreshStyleData();
void DropGraphics();
PRectangle GetClientRectangle();
PRectangle GetTextRectangle();
int LinesOnScreen();
int LinesToScroll();
int MaxScrollPos();
Point LocationFromPosition(unsigned int pos);
int XFromPosition(unsigned int pos);
int PositionFromLocation(Point pt);
int PositionFromLineX(int line, int x);
int LineFromLocation(Point pt);
void SetTopLine(int topLineNew);
void RedrawRect(PRectangle rc);
void Redraw();
void RedrawSelMargin();
PRectangle RectangleFromRange(int start, int end);
void InvalidateRange(int start, int end);
int CurrentPosition();
bool SelectionEmpty();
int SelectionStart(int line=-1);
int SelectionEnd(int line=-1);
void SetSelection(int currentPos_, int anchor_);
void SetSelection(int currentPos_);
void SetEmptySelection(int currentPos_);
int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true);
int MovePositionTo(int newPos, bool extend = false);
int MovePositionSoVisible(int pos, int moveDir);
void SetLastXChosen();
void ScrollTo(int line);
virtual void ScrollText(int linesToMove);
void HorizontalScrollTo(int xPos);
void MoveCaretInsideView();
void EnsureCaretVisible(bool useMargin=true);
void ShowCaretAtCurrentPosition();
void DropCaret();
void InvalidateCaret();
void PaintSelMargin(Surface *surface, PRectangle &rc);
void LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayout &ll);
void DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVisible, int xStart,
PRectangle rcLine, LineLayout &ll);
void Paint(Surface *surfaceWindow, PRectangle rcArea);
long FormatRange(bool draw, RangeToFormat *pfr);
virtual void SetVerticalScrollPos() = 0;
virtual void SetHorizontalScrollPos() = 0;
virtual bool ModifyScrollBars(int nMax, int nPage) = 0;
virtual void ReconfigureScrollBars();
void SetScrollBarsTo(PRectangle rsClient);
void SetScrollBars();
void AddChar(char ch);
virtual void AddCharUTF(char *s, unsigned int len);
void ClearSelection();
void ClearAll();
void ClearDocumentStyle();
void Cut();
void PasteRectangular(int pos, const char *ptr, int len);
virtual void Copy() = 0;
virtual void Paste() = 0;
void Clear();
void SelectAll();
void Undo();
void Redo();
void DelChar();
void DelCharBack();
virtual void ClaimSelection() = 0;
virtual void NotifyChange() = 0;
virtual void NotifyFocus(bool focus);
virtual void NotifyParent(SCNotification scn) = 0;
virtual void NotifyStyleToNeeded(int endStyleNeeded);
void NotifyChar(char ch);
void NotifyMove(int position);
void NotifySavePoint(bool isSavePoint);
void NotifyModifyAttempt();
virtual void NotifyDoubleClick(Point pt, bool shift);
void NotifyUpdateUI();
bool NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt);
void NotifyNeedShown(int pos, int len);
void NotifyModifyAttempt(Document *document, void *userData);
void NotifySavePoint(Document *document, void *userData, bool atSavePoint);
void NotifyModified(Document *document, DocModification mh, void *userData);
void NotifyDeleted(Document *document, void *userData);
void NotifyStyleNeeded(Document *doc, void *userData, int endPos);
#ifdef MACRO_SUPPORT
void NotifyMacroRecord(unsigned int iMessage, unsigned long wParam, long lParam);
#endif
void PageMove(int direction, bool extend=false);
void ChangeCaseOfSelection(bool makeUpperCase);
void LineTranspose();
virtual void CancelModes();
virtual int KeyCommand(unsigned int iMessage);
virtual int KeyDefault(int /* key */, int /*modifiers*/);
int KeyDown(int key, bool shift, bool ctrl, bool alt);
int GetWhitespaceVisible();
void SetWhitespaceVisible(int view);
void Indent(bool forwards);
long FindText(unsigned int iMessage, unsigned long wParam, long lParam);
void SearchAnchor();
long SearchText(unsigned int iMessage, unsigned long wParam, long lParam);
void GoToLine(int lineNo);
char *CopyRange(int start, int end);
int SelectionRangeLength();
char *CopySelectionRange();
void CopySelectionIntoDrag();
void SetDragPosition(int newPos);
virtual void StartDrag();
void DropAt(int position, const char *value, bool moving, bool rectangular);
// PositionInSelection returns 0 if position in selection, -1 if position before selection, and 1 if after.
// Before means either before any line of selection or before selection on its line, with a similar meaning to after
int PositionInSelection(int pos);
bool PointInSelection(Point pt);
bool PointInSelMargin(Point pt);
virtual void ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt);
void ButtonMove(Point pt);
void ButtonUp(Point pt, unsigned int curTime, bool ctrl);
void Tick();
virtual void SetTicking(bool on) = 0;
virtual void SetMouseCapture(bool on) = 0;
virtual bool HaveMouseCapture() = 0;
void CheckForChangeOutsidePaint(Range r);
int BraceMatch(int position, int maxReStyle);
void SetBraceHighlight(Position pos0, Position pos1, int matchStyle);
void SetDocPointer(Document *document);
void Expand(int &line, bool doExpand);
void ToggleContraction(int line);
void EnsureLineVisible(int line);
virtual long DefWndProc(unsigned int iMessage, unsigned long wParam, long lParam) = 0;
public:
// Public so scintilla_send_message can use it
virtual long WndProc(unsigned int iMessage, unsigned long wParam, long lParam);
// Public so scintilla_set_id can use it
int ctrlID;
};
#endif

View File

@@ -0,0 +1,61 @@
// Scintilla source code edit control
// Indicator.cxx - defines the style of indicators which are text decorations such as underlining
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include "Platform.h"
#include "Scintilla.h"
#include "Indicator.h"
void Indicator::Draw(Surface *surface, PRectangle &rc) {
surface->PenColour(fore.allocated);
int ymid = (rc.bottom + rc.top) / 2;
if (style == INDIC_SQUIGGLE) {
surface->MoveTo(rc.left, rc.top);
int x = rc.left + 2;
int y = 2;
while (x < rc.right) {
surface->LineTo(x, rc.top + y);
x += 2;
y = 2 - y;
}
surface->LineTo(rc.right, rc.top + y); // Finish the line
} else if (style == INDIC_TT) {
surface->MoveTo(rc.left, ymid);
int x = rc.left + 5;
while (x < rc.right) {
surface->LineTo(x, ymid);
surface->MoveTo(x-3, ymid);
surface->LineTo(x-3, ymid+2);
x++;
surface->MoveTo(x, ymid);
x += 5;
}
surface->LineTo(rc.right, ymid); // Finish the line
if (x - 3 <= rc.right) {
surface->MoveTo(x-3, ymid);
surface->LineTo(x-3, ymid+2);
}
} else if (style == INDIC_DIAGONAL) {
int x = rc.left;
while (x < rc.right) {
surface->MoveTo(x, rc.top+2);
int endX = x+3;
int endY = rc.top - 1;
if (endX > rc.right) {
endY += endX - rc.right;
endX = rc.right;
}
surface->LineTo(endX, endY);
x += 4;
}
} else if (style == INDIC_STRIKE) {
surface->MoveTo(rc.left, rc.top - 4);
surface->LineTo(rc.right, rc.top - 4);
} else { // Either INDIC_PLAIN or unknown
surface->MoveTo(rc.left, ymid);
surface->LineTo(rc.right, ymid);
}
}

View File

@@ -0,0 +1,18 @@
// Scintilla source code edit control
// Indicator.h - defines the style of indicators which are text decorations such as underlining
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef INDICATOR_H
#define INDICATOR_H
class Indicator {
public:
int style;
ColourPair fore;
Indicator() : style(INDIC_PLAIN), fore(Colour(0,0,0)) {
}
void Draw(Surface *surface, PRectangle &rc);
};
#endif

View File

@@ -0,0 +1,121 @@
// Scintilla source code edit control
// KeyMap.cxx - defines a mapping between keystrokes and commands
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include "Platform.h"
#include "Scintilla.h"
#include "KeyMap.h"
KeyMap::KeyMap() : kmap(0), len(0), alloc(0) {
for (int i = 0; MapDefault[i].key; i++) {
AssignCmdKey(MapDefault[i].key,
MapDefault[i].modifiers,
MapDefault[i].msg);
}
}
KeyMap::~KeyMap() {
Clear();
}
void KeyMap::Clear() {
delete []kmap;
kmap = 0;
len = 0;
alloc = 0;
}
void KeyMap::AssignCmdKey(int key, int modifiers, unsigned int msg) {
if ((len+1) >= alloc) {
KeyToCommand *ktcNew = new KeyToCommand[alloc + 5];
if (!ktcNew)
return;
for (int k=0;k<len;k++)
ktcNew[k] = kmap[k];
alloc += 5;
delete []kmap;
kmap = ktcNew;
}
for (int keyIndex = 0; keyIndex < len; keyIndex++) {
if ((key == kmap[keyIndex].key) && (modifiers == kmap[keyIndex].modifiers)) {
kmap[keyIndex].msg = msg;
return;
}
}
kmap[len].key = key;
kmap[len].modifiers = modifiers;
kmap[len].msg = msg;
len++;
}
unsigned int KeyMap::Find(int key, int modifiers) {
for (int i=0; i < len; i++) {
if ((key == kmap[i].key) && (modifiers == kmap[i].modifiers)) {
return kmap[i].msg;
}
}
return 0;
}
KeyToCommand KeyMap::MapDefault[] = {
{SCK_DOWN, SCI_NORM, SCI_LINEDOWN},
{SCK_DOWN, SCI_SHIFT, SCI_LINEDOWNEXTEND},
{SCK_DOWN, SCI_CTRL, SCI_LINESCROLLDOWN},
{SCK_UP, SCI_NORM, SCI_LINEUP},
{SCK_UP, SCI_SHIFT, SCI_LINEUPEXTEND},
{SCK_UP, SCI_CTRL, SCI_LINESCROLLUP},
{SCK_LEFT, SCI_NORM, SCI_CHARLEFT},
{SCK_LEFT, SCI_SHIFT, SCI_CHARLEFTEXTEND},
{SCK_LEFT, SCI_CTRL, SCI_WORDLEFT},
{SCK_LEFT, SCI_CSHIFT, SCI_WORDLEFTEXTEND},
{SCK_RIGHT, SCI_NORM, SCI_CHARRIGHT},
{SCK_RIGHT, SCI_SHIFT, SCI_CHARRIGHTEXTEND},
{SCK_RIGHT, SCI_CTRL, SCI_WORDRIGHT},
{SCK_RIGHT, SCI_CSHIFT, SCI_WORDRIGHTEXTEND},
{SCK_HOME, SCI_NORM, SCI_VCHOME},
{SCK_HOME, SCI_SHIFT, SCI_VCHOMEEXTEND},
{SCK_HOME, SCI_CTRL, SCI_DOCUMENTSTART},
{SCK_HOME, SCI_CSHIFT, SCI_DOCUMENTSTARTEXTEND},
{SCK_END, SCI_NORM, SCI_LINEEND},
{SCK_END, SCI_SHIFT, SCI_LINEENDEXTEND},
{SCK_END, SCI_CTRL, SCI_DOCUMENTEND},
{SCK_END, SCI_CSHIFT, SCI_DOCUMENTENDEXTEND},
{SCK_PRIOR, SCI_NORM, SCI_PAGEUP},
{SCK_PRIOR, SCI_SHIFT, SCI_PAGEUPEXTEND},
{SCK_NEXT, SCI_NORM, SCI_PAGEDOWN},
{SCK_NEXT, SCI_SHIFT, SCI_PAGEDOWNEXTEND},
{SCK_DELETE, SCI_NORM, SCI_CLEAR},
{SCK_DELETE, SCI_SHIFT, SCI_CUT},
{SCK_DELETE, SCI_CTRL, SCI_DELWORDRIGHT},
{SCK_INSERT, SCI_NORM, SCI_EDITTOGGLEOVERTYPE},
{SCK_INSERT, SCI_SHIFT, SCI_PASTE},
{SCK_INSERT, SCI_CTRL, SCI_COPY},
{SCK_ESCAPE, SCI_NORM, SCI_CANCEL},
{SCK_BACK, SCI_NORM, SCI_DELETEBACK},
{SCK_BACK, SCI_SHIFT, SCI_DELETEBACK},
{SCK_BACK, SCI_CTRL, SCI_DELWORDLEFT},
{SCK_BACK, SCI_ALT, SCI_UNDO},
{'Z', SCI_CTRL, SCI_UNDO},
{'Y', SCI_CTRL, SCI_REDO},
{'X', SCI_CTRL, SCI_CUT},
{'C', SCI_CTRL, SCI_COPY},
{'V', SCI_CTRL, SCI_PASTE},
{'A', SCI_CTRL, SCI_SELECTALL},
{SCK_TAB, SCI_NORM, SCI_TAB},
{SCK_TAB, SCI_SHIFT, SCI_BACKTAB},
{SCK_RETURN, SCI_NORM, SCI_NEWLINE},
{SCK_ADD, SCI_CTRL, SCI_ZOOMIN},
{SCK_SUBTRACT, SCI_CTRL, SCI_ZOOMOUT},
{SCK_DIVIDE, SCI_CTRL, SCI_SETZOOM},
//'L', SCI_CTRL, SCI_FORMFEED,
{'L', SCI_CTRL, SCI_LINECUT},
{'L', SCI_CSHIFT, SCI_LINEDELETE},
{'T', SCI_CTRL, SCI_LINETRANSPOSE},
{'U', SCI_CTRL, SCI_LOWERCASE},
{'U', SCI_CSHIFT, SCI_UPPERCASE},
{0,0,0},
};

View File

@@ -0,0 +1,36 @@
// Scintilla source code edit control
// KeyMap.h - defines a mapping between keystrokes and commands
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef KEYTOCOMMAND_H
#define KEYTOCOMMAND_H
#define SCI_NORM 0
#define SCI_SHIFT SCMOD_SHIFT
#define SCI_CTRL SCMOD_CTRL
#define SCI_ALT SCMOD_ALT
#define SCI_CSHIFT (SCI_CTRL | SCI_SHIFT)
#define SCI_ASHIFT (SCI_ALT | SCI_SHIFT)
class KeyToCommand {
public:
int key;
int modifiers;
unsigned int msg;
};
class KeyMap {
KeyToCommand *kmap;
int len;
int alloc;
static KeyToCommand MapDefault[];
public:
KeyMap();
~KeyMap();
void Clear();
void AssignCmdKey(int key, int modifiers, unsigned int msg);
unsigned int Find(int key, int modifiers); // 0 returned on failure
};
#endif

View File

@@ -0,0 +1,45 @@
// SciTE - Scintilla based Text Editor
// KeyWords.cxx - colourise for particular languages
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
#include <stdarg.h>
#include "Platform.h"
#include "PropSet.h"
#include "Accessor.h"
#include "KeyWords.h"
#include "Scintilla.h"
#include "SciLexer.h"
LexerModule *LexerModule::base = 0;
LexerModule::LexerModule(int language_, LexerFunction fn_) :
language(language_), fn(fn_) {
next = base;
base = this;
}
void LexerModule::Colourise(unsigned int startPos, int lengthDoc, int initStyle,
int language, WordList *keywordlists[], Accessor &styler) {
LexerModule *lm = base;
while (lm) {
if (lm->language == language) {
lm->fn(startPos, lengthDoc, initStyle, keywordlists, styler);
return;
}
lm = lm->next;
}
// Unknown language
// Null language means all style bytes are 0 so just mark the end - no need to fill in.
if (lengthDoc > 0) {
styler.StartAt(startPos + lengthDoc - 1);
styler.StartSegment(startPos + lengthDoc - 1);
styler.ColourTo(startPos + lengthDoc - 1, 0);
}
}

View File

@@ -0,0 +1,262 @@
// SciTE - Scintilla based Text Editor
// LexCPP.cxx - lexer for C++, C, Java, and Javascript
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
#include <stdarg.h>
#include "Platform.h"
#include "PropSet.h"
#include "Accessor.h"
#include "KeyWords.h"
#include "Scintilla.h"
#include "SciLexer.h"
static bool classifyWordCpp(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
char s[100];
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
s[i] = styler[start + i];
s[i + 1] = '\0';
}
bool wordIsUUID = false;
char chAttr = SCE_C_IDENTIFIER;
if (isdigit(s[0]) || (s[0] == '.'))
chAttr = SCE_C_NUMBER;
else {
if (keywords.InList(s)) {
chAttr = SCE_C_WORD;
wordIsUUID = strcmp(s, "uuid") == 0;
}
}
styler.ColourTo(end, chAttr);
return wordIsUUID;
}
static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],
Accessor &styler) {
WordList &keywords = *keywordlists[0];
styler.StartAt(startPos);
bool fold = styler.GetPropertyInt("fold");
bool stylingWithinPreprocessor = styler.GetPropertyInt("styling.within.preprocessor");
int lineCurrent = styler.GetLine(startPos);
int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;
int levelCurrent = levelPrev;
int state = initStyle;
if (state == SCE_C_STRINGEOL) // Does not leak onto next line
state = SCE_C_DEFAULT;
char chPrev = ' ';
char chNext = styler[startPos];
unsigned int lengthDoc = startPos + length;
int visibleChars = 0;
styler.StartSegment(startPos);
bool lastWordWasUUID = false;
for (unsigned int i = startPos; i < lengthDoc; i++) {
char ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
if ((ch == '\r' && chNext != '\n') || (ch == '\n')) {
// Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) or on LF alone (Unix)
// Avoid triggering two times on Dos/Win
// End of line
if (state == SCE_C_STRINGEOL) {
styler.ColourTo(i, state);
state = SCE_C_DEFAULT;
}
if (fold) {
int lev = levelPrev;
if (visibleChars == 0)
lev |= SC_FOLDLEVELWHITEFLAG;
if ((levelCurrent > levelPrev) && (visibleChars > 0))
lev |= SC_FOLDLEVELHEADERFLAG;
styler.SetLevel(lineCurrent, lev);
lineCurrent++;
levelPrev = levelCurrent;
}
visibleChars = 0;
}
if (!isspace(ch))
visibleChars++;
if (styler.IsLeadByte(ch)) {
chNext = styler.SafeGetCharAt(i + 2);
chPrev = ' ';
i += 1;
continue;
}
if (state == SCE_C_DEFAULT) {
if (ch == '@' && chNext == '\"') {
styler.ColourTo(i-1, state);
state = SCE_C_VERBATIM;
i++;
ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
} else if (iswordstart(ch) || (ch == '@')) {
styler.ColourTo(i-1, state);
if (lastWordWasUUID) {
state = SCE_C_UUID;
lastWordWasUUID = false;
} else {
state = SCE_C_IDENTIFIER;
}
} else if (ch == '/' && chNext == '*') {
styler.ColourTo(i-1, state);
if (styler.SafeGetCharAt(i + 2) == '*')
state = SCE_C_COMMENTDOC;
else
state = SCE_C_COMMENT;
} else if (ch == '/' && chNext == '/') {
styler.ColourTo(i-1, state);
state = SCE_C_COMMENTLINE;
} else if (ch == '\"') {
styler.ColourTo(i-1, state);
state = SCE_C_STRING;
} else if (ch == '\'') {
styler.ColourTo(i-1, state);
state = SCE_C_CHARACTER;
} else if (ch == '#' && visibleChars == 1) {
// Preprocessor commands are alone on their line
styler.ColourTo(i-1, state);
state = SCE_C_PREPROCESSOR;
// Skip whitespace between # and preprocessor word
do {
i++;
ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
} while (isspace(ch) && (i < lengthDoc));
} else if (isoperator(ch)) {
styler.ColourTo(i-1, state);
styler.ColourTo(i, SCE_C_OPERATOR);
if ((ch == '{') || (ch == '}')) {
levelCurrent += (ch == '{') ? 1 : -1;
}
}
} else if (state == SCE_C_IDENTIFIER) {
if (!iswordchar(ch)) {
lastWordWasUUID = classifyWordCpp(styler.GetStartSegment(), i - 1, keywords, styler);
state = SCE_C_DEFAULT;
if (ch == '/' && chNext == '*') {
if (styler.SafeGetCharAt(i + 2) == '*')
state = SCE_C_COMMENTDOC;
else
state = SCE_C_COMMENT;
} else if (ch == '/' && chNext == '/') {
state = SCE_C_COMMENTLINE;
} else if (ch == '\"') {
state = SCE_C_STRING;
} else if (ch == '\'') {
state = SCE_C_CHARACTER;
} else if (isoperator(ch)) {
styler.ColourTo(i, SCE_C_OPERATOR);
if ((ch == '{') || (ch == '}')) {
levelCurrent += (ch == '{') ? 1 : -1;
}
}
}
} else {
if (state == SCE_C_PREPROCESSOR) {
if (stylingWithinPreprocessor) {
if (isspace(ch)) {
styler.ColourTo(i-1, state);
state = SCE_C_DEFAULT;
}
} else {
if ((ch == '\r' || ch == '\n') && !(chPrev == '\\' || chPrev == '\r')) {
styler.ColourTo(i-1, state);
state = SCE_C_DEFAULT;
}
}
} else if (state == SCE_C_COMMENT) {
if (ch == '/' && chPrev == '*') {
if (((i > styler.GetStartSegment() + 2) || (
(initStyle == SCE_C_COMMENT) &&
(styler.GetStartSegment() == static_cast<unsigned int>(startPos))))) {
styler.ColourTo(i, state);
state = SCE_C_DEFAULT;
}
}
} else if (state == SCE_C_COMMENTDOC) {
if (ch == '/' && chPrev == '*') {
if (((i > styler.GetStartSegment() + 2) || (
(initStyle == SCE_C_COMMENTDOC) &&
(styler.GetStartSegment() == static_cast<unsigned int>(startPos))))) {
styler.ColourTo(i, state);
state = SCE_C_DEFAULT;
}
}
} else if (state == SCE_C_COMMENTLINE) {
if (ch == '\r' || ch == '\n') {
styler.ColourTo(i-1, state);
state = SCE_C_DEFAULT;
}
} else if (state == SCE_C_STRING) {
if (ch == '\\') {
if (chNext == '\"' || chNext == '\'' || chNext == '\\') {
i++;
ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
}
} else if (ch == '\"') {
styler.ColourTo(i, state);
state = SCE_C_DEFAULT;
} else if (chNext == '\r' || chNext == '\n') {
styler.ColourTo(i-1, SCE_C_STRINGEOL);
state = SCE_C_STRINGEOL;
}
} else if (state == SCE_C_CHARACTER) {
if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) {
styler.ColourTo(i-1, SCE_C_STRINGEOL);
state = SCE_C_STRINGEOL;
} else if (ch == '\\') {
if (chNext == '\"' || chNext == '\'' || chNext == '\\') {
i++;
ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
}
} else if (ch == '\'') {
styler.ColourTo(i, state);
state = SCE_C_DEFAULT;
}
} else if (state == SCE_C_VERBATIM) {
if (ch == '\"') {
if (chNext == '\"') {
i++;
ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
} else {
styler.ColourTo(i, state);
state = SCE_C_DEFAULT;
}
}
} else if (state == SCE_C_UUID) {
if (ch == '\r' || ch == '\n' || ch == ')') {
styler.ColourTo(i-1, state);
if (ch == ')')
styler.ColourTo(i, SCE_C_OPERATOR);
state = SCE_C_DEFAULT;
}
}
}
chPrev = ch;
}
styler.ColourTo(lengthDoc - 1, state);
// Fill in the real level of the next line, keeping the current flags as they will be filled in later
if (fold) {
int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;
//styler.SetLevel(lineCurrent, levelCurrent | flagsNext);
styler.SetLevel(lineCurrent, levelPrev | flagsNext);
}
}
LexerModule lmCPP(SCLEX_CPP, ColouriseCppDoc);

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,298 @@
// LexLua.cxx - lexer for Lua language
// Written by Paul Winwood
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdarg.h>
#include <stdio.h>
#include <fcntl.h>
#include "Platform.h"
#include "PropSet.h"
#include "Accessor.h"
#include "KeyWords.h"
#include "Scintilla.h"
#include "SciLexer.h"
static void classifyWordLua(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler)
{
char s[100];
bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.');
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++)
{
s[i] = styler[start + i];
s[i + 1] = '\0';
}
char chAttr = SCE_LUA_IDENTIFIER;
if (wordIsNumber)
chAttr = SCE_LUA_NUMBER;
else
{
if (keywords.InList(s))
{
chAttr = SCE_LUA_WORD;
}
}
styler.ColourTo(end, chAttr);
}
static void ColouriseLuaDoc(unsigned int startPos,
int length,
int initStyle,
WordList *keywordlists[],
Accessor &styler)
{
WordList &keywords = *keywordlists[0];
styler.StartAt(startPos);
styler.GetLine(startPos);
int state = initStyle;
char chPrev = ' ';
char chNext = styler[startPos];
unsigned int lengthDoc = startPos + length;
bool firstChar = true;
int literalString = 0;
styler.StartSegment(startPos);
for (unsigned int i = startPos; i <= lengthDoc; i++)
{
char ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
if (styler.IsLeadByte(ch))
{
chNext = styler.SafeGetCharAt(i + 2);
chPrev = ' ';
i += 1;
continue;
}
if (state == SCE_LUA_STRINGEOL)
{
if (ch != '\r' && ch != '\n')
{
styler.ColourTo(i-1, state);
state = SCE_LUA_DEFAULT;
}
}
if (state == SCE_LUA_LITERALSTRING && ch == '[' && chNext == '[')
{
literalString++;
}
else
if (state == SCE_LUA_DEFAULT)
{
if (ch == '-' && chNext == '-')
{
styler.ColourTo(i-1, state);
state = SCE_LUA_COMMENTLINE;
}
else
if (ch == '[' && chNext == '[')
{
state = SCE_LUA_LITERALSTRING;
literalString = 1;
}
else
if (iswordstart(ch))
{
styler.ColourTo(i-1, state);
state = SCE_LUA_WORD;
}
else
if (ch == '\"')
{
styler.ColourTo(i-1, state);
state = SCE_LUA_STRING;
}
else
if (ch == '\'')
{
styler.ColourTo(i-1, state);
state = SCE_LUA_CHARACTER;
}
else
if (ch == '$' && firstChar)
{
styler.ColourTo(i-1, state);
state = SCE_LUA_PREPROCESSOR;
}
else
if (isoperator(ch))
{
styler.ColourTo(i-1, state);
styler.ColourTo(i, SCE_LUA_OPERATOR);
}
}
else
if (state == SCE_LUA_WORD)
{
if (!iswordchar(ch))
{
classifyWordLua(styler.GetStartSegment(), i - 1, keywords, styler);
state = SCE_LUA_DEFAULT;
if (ch == '[' && chNext == '[')
{
literalString = 1;
state = SCE_LUA_LITERALSTRING;
}
else
if (ch == '-' && chNext == '-')
{
state = SCE_LUA_COMMENTLINE;
}
else
if (ch == '\"')
{
state = SCE_LUA_STRING;
}
else
if (ch == '\'')
{
state = SCE_LUA_CHARACTER;
}
else
if (ch == '$' && firstChar)
{
state = SCE_LUA_PREPROCESSOR;
}
else
if (isoperator(ch))
{
styler.ColourTo(i, SCE_LUA_OPERATOR);
}
}
}
else
{
if (state == SCE_LUA_LITERALSTRING)
{
if (ch == ']' && (chPrev == ']') && (--literalString == 0))
{
styler.ColourTo(i, state);
state = SCE_LUA_DEFAULT;
}
}
else
if (state == SCE_LUA_PREPROCESSOR)
{
if ((ch == '\r' || ch == '\n') && (chPrev != '\\'))
{
styler.ColourTo(i-1, state);
state = SCE_LUA_DEFAULT;
}
}
else
if (state == SCE_LUA_COMMENTLINE)
{
if (ch == '\r' || ch == '\n')
{
styler.ColourTo(i-1, state);
state = SCE_LUA_DEFAULT;
}
}
else
if (state == SCE_LUA_STRING)
{
if ((ch == '\r' || ch == '\n') && (chPrev != '\\'))
{
styler.ColourTo(i-1, state);
state = SCE_LUA_STRINGEOL;
}
else
if (ch == '\\')
{
if (chNext == '\"' || chNext == '\\')
{
i++;
ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
}
}
else
if (ch == '\"')
{
styler.ColourTo(i, state);
state = SCE_LUA_DEFAULT;
i++;
ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
}
}
else
if (state == SCE_LUA_CHARACTER)
{
if ((ch == '\r' || ch == '\n') && (chPrev != '\\'))
{
styler.ColourTo(i-1, state);
state = SCE_LUA_STRINGEOL;
}
else
if (ch == '\\')
{
if (chNext == '\'' || chNext == '\\')
{
i++;
ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
}
}
else
if (ch == '\'')
{
styler.ColourTo(i, state);
state = SCE_LUA_DEFAULT;
i++;
ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
}
}
if (state == SCE_LUA_DEFAULT)
{
if (ch == '-' && chNext == '-')
{
state = SCE_LUA_COMMENTLINE;
}
else
if (ch == '\"')
{
state = SCE_LUA_STRING;
}
else
if (ch == '\'')
{
state = SCE_LUA_CHARACTER;
}
else
if (ch == '$' && firstChar)
{
state = SCE_LUA_PREPROCESSOR;
}
else
if (iswordstart(ch))
{
state = SCE_LUA_WORD;
}
else
if (isoperator(ch))
{
styler.ColourTo(i, SCE_LUA_OPERATOR);
}
}
}
chPrev = ch;
firstChar = (ch == '\r' || ch == '\n');
}
styler.ColourTo(lengthDoc - 1, state);
}
LexerModule lmLua(SCLEX_LUA, ColouriseLuaDoc);

View File

@@ -0,0 +1,351 @@
// SciTE - Scintilla based Text Editor
// LexOthers.cxx - lexers for properties files, batch files, make files and error lists
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
#include <stdarg.h>
#include "Platform.h"
#include "PropSet.h"
#include "Accessor.h"
#include "KeyWords.h"
#include "Scintilla.h"
#include "SciLexer.h"
static void ColouriseBatchLine(char *lineBuffer, int endLine, Accessor &styler) {
if (0 == strncmp(lineBuffer, "REM", 3)) {
styler.ColourTo(endLine, 1);
} else if (0 == strncmp(lineBuffer, "rem", 3)) {
styler.ColourTo(endLine, 1);
} else if (0 == strncmp(lineBuffer, "SET", 3)) {
styler.ColourTo(endLine, 2);
} else if (0 == strncmp(lineBuffer, "set", 3)) {
styler.ColourTo(endLine, 2);
} else if (lineBuffer[0] == ':') {
styler.ColourTo(endLine, 3);
} else {
styler.ColourTo(endLine, 0);
}
}
static void ColouriseBatchDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) {
char lineBuffer[1024];
styler.StartAt(startPos);
styler.StartSegment(startPos);
unsigned int linePos = 0;
for (unsigned int i = startPos; i < startPos + length; i++) {
lineBuffer[linePos++] = styler[i];
if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) {
ColouriseBatchLine(lineBuffer, i, styler);
linePos = 0;
}
}
if (linePos > 0)
ColouriseBatchLine(lineBuffer, startPos + length, styler);
}
static void ColouriseDiffLine(char *lineBuffer, int endLine, Accessor &styler) {
// It is needed to remember the current state to recognize starting
// comment lines before the first "diff " or "--- ". If a real
// difference starts then each line starting with ' ' is a whitespace
// otherwise it is considered a comment (Only in..., Binary file...)
if (0 == strncmp(lineBuffer, "diff ", 3)) {
styler.ColourTo(endLine, 2);
} else if (0 == strncmp(lineBuffer, "--- ", 3)) {
styler.ColourTo(endLine, 3);
} else if (0 == strncmp(lineBuffer, "+++ ", 3)) {
styler.ColourTo(endLine, 3);
} else if (lineBuffer[0] == '@') {
styler.ColourTo(endLine, 4);
} else if (lineBuffer[0] == '-') {
styler.ColourTo(endLine, 5);
} else if (lineBuffer[0] == '+') {
styler.ColourTo(endLine, 6);
} else if (lineBuffer[0] != ' ') {
styler.ColourTo(endLine, 1);
} else {
styler.ColourTo(endLine, 0);
}
}
static void ColouriseDiffDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) {
char lineBuffer[1024];
styler.StartAt(startPos);
styler.StartSegment(startPos);
unsigned int linePos = 0;
for (unsigned int i = startPos; i < startPos + length; i++) {
lineBuffer[linePos++] = styler[i];
if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) {
ColouriseDiffLine(lineBuffer, i, styler);
linePos = 0;
}
}
if (linePos > 0)
ColouriseDiffLine(lineBuffer, startPos + length, styler);
}
static void ColourisePropsLine(char *lineBuffer, int lengthLine, int startLine, int endPos, Accessor &styler) {
int i = 0;
while (isspace(lineBuffer[i]) && (i < lengthLine)) // Skip initial spaces
i++;
if (lineBuffer[i] == '#' || lineBuffer[i] == '!' || lineBuffer[i] == ';') {
styler.ColourTo(endPos, 1);
} else if (lineBuffer[i] == '[') {
styler.ColourTo(endPos, 2);
} else if (lineBuffer[i] == '@') {
styler.ColourTo(startLine+i, 4);
if (lineBuffer[++i] == '=')
styler.ColourTo(startLine+i, 3);
styler.ColourTo(endPos, 0);
} else {
while (lineBuffer[i] != '=' && (i < lengthLine)) // Search the '=' character
i++;
if (lineBuffer[i] == '=') {
styler.ColourTo(startLine+i-1, 0);
styler.ColourTo(startLine+i, 3);
styler.ColourTo(endPos, 0);
} else {
styler.ColourTo(endPos, 0);
}
}
}
static void ColourisePropsDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) {
char lineBuffer[1024];
styler.StartAt(startPos);
styler.StartSegment(startPos);
unsigned int linePos = 0;
int startLine = startPos;
for (unsigned int i = startPos; i <= startPos + length; i++) {
lineBuffer[linePos++] = styler[i];
if ((styler[i] == '\r' && styler.SafeGetCharAt(i+1) != '\n') ||
styler[i] == '\n' ||
(linePos >= sizeof(lineBuffer) - 1)) {
lineBuffer[linePos] = '\0';
ColourisePropsLine(lineBuffer, linePos, startLine, i, styler);
linePos = 0;
startLine = i+1;
}
}
if (linePos > 0)
ColourisePropsLine(lineBuffer, linePos, startLine, startPos + length, styler);
}
static void ColouriseMakeLine(char *lineBuffer, int lengthLine, int endPos, Accessor &styler) {
int i = 0;
while (isspace(lineBuffer[i]) && (i < lengthLine))
i++;
if (lineBuffer[i] == '#' || lineBuffer[i] == '!') {
styler.ColourTo(endPos, 1);
} else {
styler.ColourTo(endPos, 0);
}
}
static void ColouriseMakeDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) {
char lineBuffer[1024];
styler.StartAt(startPos);
styler.StartSegment(startPos);
unsigned int linePos = 0;
for (unsigned int i = startPos; i <= startPos + length; i++) {
lineBuffer[linePos++] = styler[i];
if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) {
ColouriseMakeLine(lineBuffer, linePos, i, styler);
linePos = 0;
}
}
if (linePos > 0)
ColouriseMakeLine(lineBuffer, linePos, startPos + length, styler);
}
static void ColouriseErrorListLine(char *lineBuffer, int lengthLine, int endPos, Accessor &styler) {
if (lineBuffer[0] == '>') {
// Command or return status
styler.ColourTo(endPos, SCE_ERR_CMD);
} else if (strstr(lineBuffer, "File \"") && strstr(lineBuffer, ", line ")) {
styler.ColourTo(endPos, SCE_ERR_PYTHON);
} else if (0 == strncmp(lineBuffer, "Error ", strlen("Error "))) {
// Borland error message
styler.ColourTo(endPos, SCE_ERR_BORLAND);
} else if (0 == strncmp(lineBuffer, "Warning ", strlen("Warning "))) {
// Borland warning message
styler.ColourTo(endPos, SCE_ERR_BORLAND);
} else if (strstr(lineBuffer, " at " ) &&
strstr(lineBuffer, " at " ) < lineBuffer+lengthLine &&
strstr(lineBuffer, " line ") &&
strstr(lineBuffer, " line ") < lineBuffer+lengthLine) {
// perl error message
styler.ColourTo(endPos, SCE_ERR_PERL);
} else {
// Look for <filename>:<line>:message
// Look for <filename>(line)message
// Look for <filename>(line,pos)message
int state = 0;
for (int i = 0; i < lengthLine; i++) {
if (state == 0 && lineBuffer[i] == ':' && isdigit(lineBuffer[i + 1])) {
state = 1;
} else if (state == 0 && lineBuffer[i] == '(') {
state = 10;
} else if (state == 1 && isdigit(lineBuffer[i])) {
state = 2;
} else if (state == 2 && lineBuffer[i] == ':') {
state = 3;
break;
} else if (state == 2 && !isdigit(lineBuffer[i])) {
state = 99;
} else if (state == 10 && isdigit(lineBuffer[i])) {
state = 11;
} else if (state == 11 && lineBuffer[i] == ',') {
state = 14;
} else if (state == 11 && lineBuffer[i] == ')') {
state = 12;
} else if (state == 12 && lineBuffer[i] == ':') {
state = 13;
} else if (state == 14 && lineBuffer[i] == ')') {
state = 15;
break;
} else if (((state == 11) || (state == 14)) && !((lineBuffer[i] == ' ') || isdigit(lineBuffer[i]))) {
state = 99;
}
}
if (state == 3) {
styler.ColourTo(endPos, SCE_ERR_GCC);
} else if ((state == 13) || (state == 14) || (state == 15)) {
styler.ColourTo(endPos, SCE_ERR_MS);
} else {
styler.ColourTo(endPos, SCE_ERR_DEFAULT);
}
}
}
static void ColouriseErrorListDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) {
char lineBuffer[1024];
styler.StartAt(startPos);
styler.StartSegment(startPos);
unsigned int linePos = 0;
for (unsigned int i = startPos; i <= startPos + length; i++) {
lineBuffer[linePos++] = styler[i];
if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) {
ColouriseErrorListLine(lineBuffer, linePos, i, styler);
linePos = 0;
}
}
if (linePos > 0)
ColouriseErrorListLine(lineBuffer, linePos, startPos + length, styler);
}
static int isSpecial(char s) {
return (s == '\\') || (s == ',') || (s == ';') || (s == '\'') || (s == ' ') ||
(s == '\"') || (s == '`') || (s == '^') || (s == '~');
}
static int isTag(int start, Accessor &styler) {
char s[6];
unsigned int i = 0, e=1;
while (i < 5 && e) {
s[i] = styler[start + i];
i++;
e = styler[start + i] != '{';
}
s[i] = '\0';
return (strcmp(s, "begin") == 0) || (strcmp(s, "end") == 0);
}
static void ColouriseLatexDoc(unsigned int startPos, int length, int initStyle,
WordList *[], Accessor &styler) {
styler.StartAt(startPos);
int state = initStyle;
char chNext = styler[startPos];
styler.StartSegment(startPos);
int lengthDoc = startPos + length;
for (int i = startPos; i < lengthDoc; i++) {
char ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
if (styler.IsLeadByte(ch)) {
chNext = styler.SafeGetCharAt(i + 2);
i++;
continue;
}
switch(state) {
case SCE_L_DEFAULT :
switch(ch) {
case '\\' :
styler.ColourTo(i - 1, state);
if (isSpecial(styler[i + 1])) {
styler.ColourTo(i + 1, SCE_L_COMMAND);
i++;
chNext = styler.SafeGetCharAt(i + 1);
}
else {
if (isTag(i+1, styler))
state = SCE_L_TAG;
else
state = SCE_L_COMMAND;
}
break;
case '$' :
styler.ColourTo(i - 1, state);
state = SCE_L_MATH;
if (chNext == '$') {
i++;
chNext = styler.SafeGetCharAt(i + 1);
}
break;
case '%' :
styler.ColourTo(i - 1, state);
state = SCE_L_COMMENT;
break;
}
break;
case SCE_L_COMMAND :
if (chNext == '[' || chNext == '{' || chNext == '}' ||
chNext == ' ' || chNext == '\r' || chNext == '\n') {
styler.ColourTo(i, state);
state = SCE_L_DEFAULT;
i++;
chNext = styler.SafeGetCharAt(i + 1);
}
break;
case SCE_L_TAG :
if (ch == '}') {
styler.ColourTo(i, state);
state = SCE_L_DEFAULT;
}
break;
case SCE_L_MATH :
if (ch == '$') {
if (chNext == '$') {
i++;
chNext = styler.SafeGetCharAt(i + 1);
}
styler.ColourTo(i, state);
state = SCE_L_DEFAULT;
}
break;
case SCE_L_COMMENT :
if (ch == '\r' || ch == '\n') {
styler.ColourTo(i - 1, state);
state = SCE_L_DEFAULT;
}
}
}
styler.ColourTo(lengthDoc, state);
}
LexerModule lmBatch(SCLEX_BATCH, ColouriseBatchDoc);
LexerModule lmDiff(SCLEX_DIFF, ColouriseDiffDoc);
LexerModule lmProps(SCLEX_PROPERTIES, ColourisePropsDoc);
LexerModule lmMake(SCLEX_MAKEFILE, ColouriseMakeDoc);
LexerModule lmErrorList(SCLEX_ERRORLIST, ColouriseErrorListDoc);
LexerModule lmLatex(SCLEX_LATEX, ColouriseLatexDoc);

View File

@@ -0,0 +1,508 @@
// SciTE - Scintilla based Text Editor
// LexPerl.cxx - lexer for subset of Perl
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
#include <stdarg.h>
#include "Platform.h"
#include "PropSet.h"
#include "Accessor.h"
#include "KeyWords.h"
#include "Scintilla.h"
#include "SciLexer.h"
inline bool isPerlOperator(char ch) {
if (isalnum(ch))
return false;
// '.' left out as it is used to make up numbers
if (ch == '%' || ch == '^' || ch == '&' || ch == '*' || ch == '\\' ||
ch == '(' || ch == ')' || ch == '-' || ch == '+' ||
ch == '=' || ch == '|' || ch == '{' || ch == '}' ||
ch == '[' || ch == ']' || ch == ':' || ch == ';' ||
ch == '<' || ch == '>' || ch == ',' || ch == '/' ||
ch == '?' || ch == '!' || ch == '.' || ch == '~')
return true;
return false;
}
static int classifyWordPerl(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
char s[100];
bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.');
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
s[i] = styler[start + i];
s[i + 1] = '\0';
}
char chAttr = SCE_PL_IDENTIFIER;
if (wordIsNumber)
chAttr = SCE_PL_NUMBER;
else {
if (keywords.InList(s))
chAttr = SCE_PL_WORD;
}
styler.ColourTo(end, chAttr);
return chAttr;
}
static bool isEndVar(char ch) {
return !isalnum(ch) && ch != '#' && ch != '$' &&
ch != '_' && ch != '\'';
}
static bool isMatch(Accessor &styler, int lengthDoc, int pos, const char *val) {
if ((pos + static_cast<int>(strlen(val))) >= lengthDoc) {
return false;
}
while (*val) {
if (*val != styler[pos++]) {
return false;
}
val++;
}
return true;
}
static char opposite(char ch) {
if (ch == '(')
return ')';
if (ch == '[')
return ']';
if (ch == '{')
return '}';
if (ch == '<')
return '>';
return ch;
}
static void ColourisePerlDoc(unsigned int startPos, int length, int initStyle,
WordList *keywordlists[], Accessor &styler) {
// Lexer for perl often has to backtrack to start of current style to determine
// which characters are being used as quotes, how deeply nested is the
// start position and what the termination string is for here documents
WordList &keywords = *keywordlists[0];
char sooked[100];
int quotes = 0;
char quoteDown = 'd';
char quoteUp = 'd';
int quoteRep = 1;
int sookedpos = 0;
bool preferRE = true;
sooked[sookedpos] = '\0';
int state = initStyle;
int lengthDoc = startPos + length;
// If in a long distance lexical state, seek to the beginning to find quote characters
if (state == SCE_PL_HERE || state == SCE_PL_REGEX ||
state == SCE_PL_REGSUBST || state == SCE_PL_LONGQUOTE) {
while ((startPos > 1) && (styler.StyleAt(startPos - 1) == state)) {
startPos--;
}
state = SCE_PL_DEFAULT;
}
styler.StartAt(startPos);
char chPrev = styler.SafeGetCharAt(startPos - 1);
char chNext = styler[startPos];
styler.StartSegment(startPos);
for (int i = startPos; i < lengthDoc; i++) {
char ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
char chNext2 = styler.SafeGetCharAt(i + 2);
if (styler.IsLeadByte(ch)) {
chNext = styler.SafeGetCharAt(i + 2);
chPrev = ' ';
i += 1;
continue;
}
if (state == SCE_PL_DEFAULT) {
if (iswordstart(ch)) {
styler.ColourTo(i - 1, state);
if (ch == 's' && !isalnum(chNext)) {
state = SCE_PL_REGSUBST;
quotes = 0;
quoteUp = '\0';
quoteDown = '\0';
quoteRep = 2;
} else if (ch == 'm' && !isalnum(chNext)) {
state = SCE_PL_REGEX;
quotes = 0;
quoteUp = '\0';
quoteDown = '\0';
quoteRep = 1;
} else if (ch == 't' && chNext == 'r' && !isalnum(chNext2)) {
state = SCE_PL_REGSUBST;
quotes = 0;
quoteUp = '\0';
quoteDown = '\0';
quoteRep = 2;
i++;
chNext = chNext2;
} else if (ch == 'q' && (chNext == 'q' || chNext == 'r' || chNext == 'w' || chNext == 'x') && !isalnum(chNext2)) {
state = SCE_PL_LONGQUOTE;
i++;
chNext = chNext2;
quotes = 0;
quoteUp = '\0';
quoteDown = '\0';
quoteRep = 1;
} else {
state = SCE_PL_WORD;
preferRE = false;
}
} else if (ch == '#') {
styler.ColourTo(i - 1, state);
state = SCE_PL_COMMENTLINE;
} else if (ch == '\"') {
styler.ColourTo(i - 1, state);
state = SCE_PL_STRING;
} else if (ch == '\'') {
if (chPrev == '&') {
// Archaic call
styler.ColourTo(i, state);
} else {
styler.ColourTo(i - 1, state);
state = SCE_PL_CHARACTER;
}
} else if (ch == '`') {
styler.ColourTo(i - 1, state);
state = SCE_PL_BACKTICKS;
} else if (ch == '$') {
preferRE = false;
styler.ColourTo(i - 1, state);
if (isalnum(chNext) || chNext == '#' || chNext == '$' || chNext == '_') {
state = SCE_PL_SCALAR;
} else if (chNext != '{' && chNext != '[') {
styler.ColourTo(i, SCE_PL_SCALAR);
i++;
ch = ' ';
chNext = ' ';
} else {
styler.ColourTo(i, SCE_PL_SCALAR);
}
} else if (ch == '@') {
preferRE = false;
styler.ColourTo(i - 1, state);
if (isalpha(chNext) || chNext == '#' || chNext == '$' || chNext == '_') {
state = SCE_PL_ARRAY;
} else if (chNext != '{' && chNext != '[') {
styler.ColourTo(i, SCE_PL_ARRAY);
i++;
ch = ' ';
} else {
styler.ColourTo(i, SCE_PL_ARRAY);
}
} else if (ch == '%') {
preferRE = false;
styler.ColourTo(i - 1, state);
if (isalpha(chNext) || chNext == '#' || chNext == '$' || chNext == '_') {
state = SCE_PL_HASH;
} else if (chNext != '{' && chNext != '[') {
styler.ColourTo(i, SCE_PL_HASH);
i++;
ch = ' ';
} else {
styler.ColourTo(i, SCE_PL_HASH);
}
} else if (ch == '*') {
styler.ColourTo(i - 1, state);
state = SCE_PL_SYMBOLTABLE;
} else if (ch == '/' && preferRE) {
styler.ColourTo(i - 1, state);
state = SCE_PL_REGEX;
quoteUp = '/';
quoteDown = '/';
quotes = 1;
quoteRep = 1;
} else if (ch == '<' && chNext == '<') {
styler.ColourTo(i - 1, state);
state = SCE_PL_HERE;
i++;
ch = chNext;
chNext = chNext2;
quotes = 0;
sookedpos = 0;
sooked[sookedpos] = '\0';
} else if (ch == '=' && (chPrev == '\r' || chPrev == '\n') && isalpha(chNext)) {
styler.ColourTo(i - 1, state);
state = SCE_PL_POD;
quotes = 0;
sookedpos = 0;
sooked[sookedpos] = '\0';
} else if (isPerlOperator(ch)) {
if (ch == ')' || ch == ']')
preferRE = false;
else
preferRE = true;
styler.ColourTo(i - 1, state);
styler.ColourTo(i, SCE_PL_OPERATOR);
}
} else if (state == SCE_PL_WORD) {
if (!iswordchar(ch) && ch != '\'') { // Archaic Perl has quotes inside names
if (isMatch(styler, lengthDoc, styler.GetStartSegment(), "__DATA__")) {
styler.ColourTo(i, SCE_PL_DATASECTION);
state = SCE_PL_DATASECTION;
} else if (isMatch(styler, lengthDoc, styler.GetStartSegment(), "__END__")) {
styler.ColourTo(i, SCE_PL_DATASECTION);
state = SCE_PL_DATASECTION;
} else {
if (classifyWordPerl(styler.GetStartSegment(), i - 1, keywords, styler) == SCE_PL_WORD)
preferRE = true;
state = SCE_PL_DEFAULT;
if (ch == '#') {
state = SCE_PL_COMMENTLINE;
} else if (ch == '\"') {
state = SCE_PL_STRING;
} else if (ch == '\'') {
state = SCE_PL_CHARACTER;
} else if (ch == '<' && chNext == '<') {
state = SCE_PL_HERE;
quotes = 0;
sookedpos = 0;
sooked[sookedpos] = '\0';
} else if (isPerlOperator(ch)) {
if (ch == ')' || ch == ']')
preferRE = false;
else
preferRE = true;
styler.ColourTo(i, SCE_PL_OPERATOR);
state = SCE_PL_DEFAULT;
}
}
}
} else {
if (state == SCE_PL_COMMENTLINE) {
if (ch == '\r' || ch == '\n') {
styler.ColourTo(i - 1, state);
state = SCE_PL_DEFAULT;
}
} else if (state == SCE_PL_HERE) {
if ((isalnum(ch) || ch == '_') && quotes < 2) {
sooked[sookedpos++] = ch;
sooked[sookedpos] = '\0';
if (quotes == 0)
quotes = 1;
} else {
quotes++;
}
if ((quotes > 1) &&
(chPrev == '\n' || chPrev == '\r') &&
isMatch(styler, lengthDoc, i, sooked)) {
i += sookedpos;
chNext = styler.SafeGetCharAt(i);
if (chNext == '\n' || chNext == '\r') {
styler.ColourTo(i - 1, SCE_PL_HERE);
state = SCE_PL_DEFAULT;
}
ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
}
} else if (state == SCE_PL_STRING) {
if (ch == '\\') {
if (chNext == '\"' || chNext == '\'' || chNext == '\\') {
i++;
ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
}
} else if (ch == '\"') {
styler.ColourTo(i, state);
state = SCE_PL_DEFAULT;
i++;
ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
}
} else if (state == SCE_PL_CHARACTER) {
if (ch == '\\') {
if (chNext == '\"' || chNext == '\'' || chNext == '\\') {
i++;
ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
}
} else if (ch == '\'') {
styler.ColourTo(i, state);
state = SCE_PL_DEFAULT;
i++;
ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
}
} else if (state == SCE_PL_BACKTICKS) {
if (ch == '`') {
styler.ColourTo(i, state);
state = SCE_PL_DEFAULT;
i++;
ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
}
} else if (state == SCE_PL_POD) {
if (ch == '=' && (chPrev == '\r' || chPrev == '\n')) {
if (isMatch(styler, lengthDoc, i, "=cut")) {
styler.ColourTo(i - 1 + 4, state);
i += 4;
state = SCE_PL_DEFAULT;
ch = styler.SafeGetCharAt(i);
chNext = styler.SafeGetCharAt(i + 1);
}
}
} else if (state == SCE_PL_SCALAR) {
if (isEndVar(ch)) {
styler.ColourTo(i - 1, state);
state = SCE_PL_DEFAULT;
}
} else if (state == SCE_PL_ARRAY) {
if (isEndVar(ch)) {
styler.ColourTo(i - 1, state);
state = SCE_PL_DEFAULT;
}
} else if (state == SCE_PL_HASH) {
if (isEndVar(ch)) {
styler.ColourTo(i - 1, state);
state = SCE_PL_DEFAULT;
}
} else if (state == SCE_PL_SYMBOLTABLE) {
if (isEndVar(ch)) {
styler.ColourTo(i - 1, state);
state = SCE_PL_DEFAULT;
}
} else if (state == SCE_PL_REF) {
if (isEndVar(ch)) {
styler.ColourTo(i - 1, state);
state = SCE_PL_DEFAULT;
}
} else if (state == SCE_PL_REGEX) {
if (!quoteUp && !isspace(ch)) {
quoteUp = ch;
quoteDown = opposite(ch);
quotes++;
} else {
if (ch == quoteDown && chPrev != '\\') {
quotes--;
if (quotes == 0) {
quoteRep--;
if (quoteUp == quoteDown) {
quotes++;
}
}
if (!isalpha(chNext)) {
if (quoteRep <= 0) {
styler.ColourTo(i, state);
state = SCE_PL_DEFAULT;
ch = ' ';
}
}
} else if (ch == quoteUp && chPrev != '\\') {
quotes++;
} else if (!isalpha(chNext)) {
if (quoteRep <= 0) {
styler.ColourTo(i, state);
state = SCE_PL_DEFAULT;
ch = ' ';
}
}
}
} else if (state == SCE_PL_REGSUBST) {
if (!quoteUp && !isspace(ch)) {
quoteUp = ch;
quoteDown = opposite(ch);
quotes++;
} else {
if (quotes == 0 && quoteRep == 1) {
/* We matched something like s(...) or tr{...}
* and are looking for the next matcher characters,
* which could be either bracketed ({...}) or non-bracketed
* (/.../).
*
* Number-signs are problematic. If they occur after
* the close of the first part, treat them like
* a quoteUp char, even if they actually start comments.
*
* If we find an alnum, we end the regsubst, and punt.
*
* Eric Promislow ericp@activestate.com Aug 9,2000
*/
if (isspace(ch)) {
// Keep going
} else if (isalnum(ch)) {
styler.ColourTo(i, state);
state = SCE_PL_DEFAULT;
ch = ' ';
} else {
quoteUp = ch;
quoteDown = opposite(ch);
quotes++;
}
} else if (ch == quoteDown && chPrev != '\\') {
quotes--;
if (quotes == 0) {
quoteRep--;
}
if (!isalpha(chNext)) {
if (quoteRep <= 0) {
styler.ColourTo(i, state);
state = SCE_PL_DEFAULT;
ch = ' ';
}
}
if (quoteUp == quoteDown) {
quotes++;
}
} else if (ch == quoteUp && chPrev != '\\') {
quotes++;
} else if (!isalpha(chNext)) {
if (quoteRep <= 0) {
styler.ColourTo(i, state);
state = SCE_PL_DEFAULT;
ch = ' ';
}
}
}
} else if (state == SCE_PL_LONGQUOTE) {
if (!quoteDown && !isspace(ch)) {
quoteUp = ch;
quoteDown = opposite(quoteUp);
quotes++;
} else if (ch == quoteDown) {
quotes--;
if (quotes == 0) {
quoteRep--;
if (quoteRep <= 0) {
styler.ColourTo(i, state);
state = SCE_PL_DEFAULT;
ch = ' ';
}
if (quoteUp == quoteDown) {
quotes++;
}
}
} else if (ch == quoteUp) {
quotes++;
}
}
if (state == SCE_PL_DEFAULT) { // One of the above succeeded
if (ch == '#') {
state = SCE_PL_COMMENTLINE;
} else if (ch == '\"') {
state = SCE_PL_STRING;
} else if (ch == '\'') {
state = SCE_PL_CHARACTER;
} else if (iswordstart(ch)) {
state = SCE_PL_WORD;
preferRE = false;
} else if (isoperator(ch)) {
styler.ColourTo(i, SCE_PL_OPERATOR);
}
}
}
chPrev = ch;
}
styler.ColourTo(lengthDoc, state);
}
LexerModule lmPerl(SCLEX_PERL, ColourisePerlDoc);

View File

@@ -0,0 +1,281 @@
// SciTE - Scintilla based Text Editor
// LexPython.cxx - lexer for Python
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
#include <stdarg.h>
#include "Platform.h"
#include "PropSet.h"
#include "Accessor.h"
#include "KeyWords.h"
#include "Scintilla.h"
#include "SciLexer.h"
static void ClassifyWordPy(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler, char *prevWord) {
char s[100];
bool wordIsNumber = isdigit(styler[start]);
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
s[i] = styler[start + i];
s[i + 1] = '\0';
}
char chAttr = SCE_P_IDENTIFIER;
if (0 == strcmp(prevWord, "class"))
chAttr = SCE_P_CLASSNAME;
else if (0 == strcmp(prevWord, "def"))
chAttr = SCE_P_DEFNAME;
else if (wordIsNumber)
chAttr = SCE_P_NUMBER;
else if (keywords.InList(s))
chAttr = SCE_P_WORD;
// make sure that dot-qualifiers inside the word are lexed correct
else for (unsigned int i = 0; i < end - start + 1; i++) {
if (styler[start + i] == '.') {
styler.ColourTo(start + i - 1, chAttr);
styler.ColourTo(start + i, SCE_P_OPERATOR);
}
}
styler.ColourTo(end, chAttr);
strcpy(prevWord, s);
}
static bool IsPyComment(Accessor &styler, int pos, int len) {
return len>0 && styler[pos]=='#';
}
static void ColourisePyDoc(unsigned int startPos, int length, int initStyle,
WordList *keywordlists[], Accessor &styler) {
int lengthDoc = startPos + length;
// Backtrack to previous line in case need to fix its fold status or tab whinging
int lineCurrent = styler.GetLine(startPos);
if (startPos > 0) {
if (lineCurrent > 0) {
lineCurrent--;
startPos = styler.LineStart(lineCurrent);
if (startPos == 0)
initStyle = SCE_P_DEFAULT;
else
initStyle = styler.StyleAt(startPos-1);
}
}
// Python uses a different mask because bad indentation is marked by oring with 32
styler.StartAt(startPos, 127);
WordList &keywords = *keywordlists[0];
bool fold = styler.GetPropertyInt("fold");
int whingeLevel = styler.GetPropertyInt("tab.timmy.whinge.level");
char prevWord[200];
prevWord[0] = '\0';
if (length == 0)
return ;
int spaceFlags = 0;
int state = initStyle & 31;
int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, IsPyComment);
if ((state == SCE_P_TRIPLE) || (state == SCE_P_TRIPLEDOUBLE))
indentCurrent |= SC_FOLDLEVELWHITEFLAG;
char chPrev = ' ';
char chPrev2 = ' ';
char chNext = styler[startPos];
styler.StartSegment(startPos);
bool atStartLine = true;
for (int i = startPos; i < lengthDoc; i++) {
if (atStartLine) {
char chBad = static_cast<char>(64);
char chGood = static_cast<char>(0);
char chFlags = chGood;
if (whingeLevel == 1) {
chFlags = (spaceFlags & wsInconsistent) ? chBad : chGood;
} else if (whingeLevel == 2) {
chFlags = (spaceFlags & wsSpaceTab) ? chBad : chGood;
} else if (whingeLevel == 3) {
chFlags = (spaceFlags & wsSpace) ? chBad : chGood;
} else if (whingeLevel == 4) {
chFlags = (spaceFlags & wsTab) ? chBad : chGood;
}
styler.SetFlags(chFlags, static_cast<char>(state));
atStartLine = false;
}
char ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
char chNext2 = styler.SafeGetCharAt(i + 2);
if ((ch == '\r' && chNext != '\n') || (ch == '\n') || (i == lengthDoc)) {
if ((state == SCE_P_DEFAULT) || (state == SCE_P_TRIPLE) || (state == SCE_P_TRIPLEDOUBLE)) {
// Perform colourisation of white space and triple quoted strings at end of each line to allow
// tab marking to work inside white space and triple quoted strings
styler.ColourTo(i, state);
}
int lev = indentCurrent;
int indentNext = styler.IndentAmount(lineCurrent + 1, &spaceFlags, IsPyComment);
if ((state == SCE_P_TRIPLE) || (state == SCE_P_TRIPLEDOUBLE))
indentNext |= SC_FOLDLEVELWHITEFLAG;
if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) {
// Only non whitespace lines can be headers
if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK)) {
lev |= SC_FOLDLEVELHEADERFLAG;
} else if (indentNext & SC_FOLDLEVELWHITEFLAG) {
// Line after is blank so check the next - maybe should continue further?
int spaceFlags2 = 0;
int indentNext2 = styler.IndentAmount(lineCurrent + 2, &spaceFlags2, IsPyComment);
if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext2 & SC_FOLDLEVELNUMBERMASK)) {
lev |= SC_FOLDLEVELHEADERFLAG;
}
}
}
indentCurrent = indentNext;
if (fold) {
styler.SetLevel(lineCurrent, lev);
}
lineCurrent++;
atStartLine = true;
}
if (styler.IsLeadByte(ch)) {
chNext = styler.SafeGetCharAt(i + 2);
chPrev = ' ';
chPrev2 = ' ';
i += 1;
continue;
}
if (state == SCE_P_STRINGEOL) {
if (ch != '\r' && ch != '\n') {
styler.ColourTo(i - 1, state);
state = SCE_P_DEFAULT;
}
}
if (state == SCE_P_DEFAULT) {
if (iswordstart(ch)) {
styler.ColourTo(i - 1, state);
state = SCE_P_WORD;
} else if (ch == '#') {
styler.ColourTo(i - 1, state);
state = chNext == '#' ? SCE_P_COMMENTBLOCK : SCE_P_COMMENTLINE;
} else if (ch == '\"') {
styler.ColourTo(i - 1, state);
if (chNext == '\"' && chNext2 == '\"') {
i += 2;
state = SCE_P_TRIPLEDOUBLE;
ch = ' ';
chPrev = ' ';
chNext = styler.SafeGetCharAt(i + 1);
} else {
state = SCE_P_STRING;
}
} else if (ch == '\'') {
styler.ColourTo(i - 1, state);
if (chNext == '\'' && chNext2 == '\'') {
i += 2;
state = SCE_P_TRIPLE;
ch = ' ';
chPrev = ' ';
chNext = styler.SafeGetCharAt(i + 1);
} else {
state = SCE_P_CHARACTER;
}
} else if (isoperator(ch)) {
styler.ColourTo(i - 1, state);
styler.ColourTo(i, SCE_P_OPERATOR);
}
} else if (state == SCE_P_WORD) {
if (!iswordchar(ch)) {
ClassifyWordPy(styler.GetStartSegment(), i - 1, keywords, styler, prevWord);
state = SCE_P_DEFAULT;
if (ch == '#') {
state = chNext == '#' ? SCE_P_COMMENTBLOCK : SCE_P_COMMENTLINE;
} else if (ch == '\"') {
if (chNext == '\"' && chNext2 == '\"') {
i += 2;
state = SCE_P_TRIPLEDOUBLE;
ch = ' ';
chPrev = ' ';
chNext = styler.SafeGetCharAt(i + 1);
} else {
state = SCE_P_STRING;
}
} else if (ch == '\'') {
if (chNext == '\'' && chNext2 == '\'') {
i += 2;
state = SCE_P_TRIPLE;
ch = ' ';
chPrev = ' ';
chNext = styler.SafeGetCharAt(i + 1);
} else {
state = SCE_P_CHARACTER;
}
} else if (isoperator(ch)) {
styler.ColourTo(i, SCE_P_OPERATOR);
}
}
} else {
if (state == SCE_P_COMMENTLINE || state == SCE_P_COMMENTBLOCK) {
if (ch == '\r' || ch == '\n') {
styler.ColourTo(i - 1, state);
state = SCE_P_DEFAULT;
}
} else if (state == SCE_P_STRING) {
if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) {
styler.ColourTo(i - 1, state);
state = SCE_P_STRINGEOL;
} else if (ch == '\\') {
if (chNext == '\"' || chNext == '\'' || chNext == '\\') {
i++;
ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
}
} else if (ch == '\"') {
styler.ColourTo(i, state);
state = SCE_P_DEFAULT;
}
} else if (state == SCE_P_CHARACTER) {
if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) {
styler.ColourTo(i - 1, state);
state = SCE_P_STRINGEOL;
} else if (ch == '\\') {
if (chNext == '\"' || chNext == '\'' || chNext == '\\') {
i++;
ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
}
} else if (ch == '\'') {
styler.ColourTo(i, state);
state = SCE_P_DEFAULT;
}
} else if (state == SCE_P_TRIPLE) {
if (ch == '\'' && chPrev == '\'' && chPrev2 == '\'') {
styler.ColourTo(i, state);
state = SCE_P_DEFAULT;
}
} else if (state == SCE_P_TRIPLEDOUBLE) {
if (ch == '\"' && chPrev == '\"' && chPrev2 == '\"') {
styler.ColourTo(i, state);
state = SCE_P_DEFAULT;
}
}
}
chPrev2 = chPrev;
chPrev = ch;
}
if (state == SCE_P_WORD) {
ClassifyWordPy(styler.GetStartSegment(), lengthDoc, keywords, styler, prevWord);
} else {
styler.ColourTo(lengthDoc, state);
}
}
LexerModule lmPython(SCLEX_PYTHON, ColourisePyDoc);

View File

@@ -0,0 +1,156 @@
// SciTE - Scintilla based Text Editor
// LexSQL.cxx - lexer for SQL
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
#include <stdarg.h>
#include "Platform.h"
#include "PropSet.h"
#include "Accessor.h"
#include "KeyWords.h"
#include "Scintilla.h"
#include "SciLexer.h"
static void classifyWordSQL(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
char s[100];
bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.');
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
s[i] = static_cast<char>(toupper(styler[start + i]));
s[i + 1] = '\0';
}
char chAttr = SCE_C_IDENTIFIER;
if (wordIsNumber)
chAttr = SCE_C_NUMBER;
else {
if (keywords.InList(s))
chAttr = SCE_C_WORD;
}
styler.ColourTo(end, chAttr);
}
static void ColouriseSQLDoc(unsigned int startPos, int length,
int initStyle, WordList *keywordlists[], Accessor &styler) {
WordList &keywords = *keywordlists[0];
styler.StartAt(startPos);
bool fold = styler.GetPropertyInt("fold");
int lineCurrent = styler.GetLine(startPos);
int spaceFlags = 0;
int state = initStyle;
char chPrev = ' ';
char chNext = styler[startPos];
styler.StartSegment(startPos);
unsigned int lengthDoc = startPos + length;
for (unsigned int i = startPos; i < lengthDoc; i++) {
char ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
if ((ch == '\r' && chNext != '\n') || (ch == '\n')) {
int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags);
int lev = indentCurrent;
if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) {
// Only non whitespace lines can be headers
int indentNext = styler.IndentAmount(lineCurrent + 1, &spaceFlags);
if (indentCurrent < (indentNext & ~SC_FOLDLEVELWHITEFLAG)) {
lev |= SC_FOLDLEVELHEADERFLAG;
}
}
if (fold) {
styler.SetLevel(lineCurrent, lev);
}
}
if (styler.IsLeadByte(ch)) {
chNext = styler.SafeGetCharAt(i + 2);
chPrev = ' ';
i += 1;
continue;
}
if (state == SCE_C_DEFAULT) {
if (iswordstart(ch)) {
styler.ColourTo(i - 1, state);
state = SCE_C_WORD;
} else if (ch == '/' && chNext == '*') {
styler.ColourTo(i - 1, state);
state = SCE_C_COMMENT;
} else if (ch == '-' && chNext == '-') {
styler.ColourTo(i - 1, state);
state = SCE_C_COMMENTLINE;
} else if (ch == '\'') {
styler.ColourTo(i - 1, state);
state = SCE_C_STRING;
} else if (isoperator(ch)) {
styler.ColourTo(i - 1, state);
styler.ColourTo(i, SCE_C_OPERATOR);
}
} else if (state == SCE_C_WORD) {
if (!iswordchar(ch)) {
classifyWordSQL(styler.GetStartSegment(), i - 1, keywords, styler);
state = SCE_C_DEFAULT;
if (ch == '/' && chNext == '*') {
state = SCE_C_COMMENT;
} else if (ch == '-' && chNext == '-') {
state = SCE_C_COMMENTLINE;
} else if (ch == '\'') {
state = SCE_C_STRING;
} else if (isoperator(ch)) {
styler.ColourTo(i, SCE_C_OPERATOR);
}
}
} else {
if (state == SCE_C_COMMENT) {
if (ch == '/' && chPrev == '*') {
if (((i > (styler.GetStartSegment() + 2)) || ((initStyle == SCE_C_COMMENT) &&
(styler.GetStartSegment() == startPos)))) {
styler.ColourTo(i, state);
state = SCE_C_DEFAULT;
}
}
} else if (state == SCE_C_COMMENTLINE) {
if (ch == '\r' || ch == '\n') {
styler.ColourTo(i - 1, state);
state = SCE_C_DEFAULT;
}
} else if (state == SCE_C_STRING) {
if (ch == '\'') {
if ( chNext == '\'' ) {
i++;
} else {
styler.ColourTo(i, state);
state = SCE_C_DEFAULT;
i++;
}
ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
}
}
if (state == SCE_C_DEFAULT) { // One of the above succeeded
if (ch == '/' && chNext == '*') {
state = SCE_C_COMMENT;
} else if (ch == '-' && chNext == '-') {
state = SCE_C_COMMENTLINE;
} else if (ch == '\'') {
state = SCE_C_STRING;
} else if (iswordstart(ch)) {
state = SCE_C_WORD;
} else if (isoperator(ch)) {
styler.ColourTo(i, SCE_C_OPERATOR);
}
}
}
chPrev = ch;
}
styler.ColourTo(lengthDoc - 1, state);
}
LexerModule lmSQL(SCLEX_SQL, ColouriseSQLDoc);

View File

@@ -0,0 +1,139 @@
// SciTE - Scintilla based Text Editor
// LexVB.cxx - lexer for Visual Basic and VBScript
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
#include <stdarg.h>
#include "Platform.h"
#include "PropSet.h"
#include "Accessor.h"
#include "KeyWords.h"
#include "Scintilla.h"
#include "SciLexer.h"
static int classifyWordVB(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
char s[100];
bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.') ||
(styler[start] == '&' && tolower(styler[start+1]) == 'h');
unsigned int i;
for (i = 0; i < end - start + 1 && i < 30; i++) {
s[i] = static_cast<char>(tolower(styler[start + i]));
}
s[i] = '\0';
char chAttr = SCE_C_DEFAULT;
if (wordIsNumber)
chAttr = SCE_C_NUMBER;
else {
if (strcmp(s, "rem") == 0)
chAttr = SCE_C_COMMENTLINE;
else if (keywords.InList(s))
chAttr = SCE_C_WORD;
}
styler.ColourTo(end, chAttr);
if (chAttr == SCE_C_COMMENTLINE)
return SCE_C_COMMENTLINE;
else
return SCE_C_DEFAULT;
}
static void ColouriseVBDoc(unsigned int startPos, int length, int initStyle,
WordList *keywordlists[], Accessor &styler) {
WordList &keywords = *keywordlists[0];
styler.StartAt(startPos);
int visibleChars = 0;
int state = initStyle;
char chNext = styler[startPos];
styler.StartSegment(startPos);
int lengthDoc = startPos + length;
for (int i = startPos; i < lengthDoc; i++) {
char ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
if (styler.IsLeadByte(ch)) {
chNext = styler.SafeGetCharAt(i + 2);
i += 1;
continue;
}
if (ch == '\r' || ch == '\n') {
// End of line
if (state == SCE_C_COMMENTLINE || state == SCE_C_PREPROCESSOR) {
styler.ColourTo(i - 1, state);
state = SCE_C_DEFAULT;
}
visibleChars = 0;
}
if (!isspace(ch))
visibleChars++;
if (state == SCE_C_DEFAULT) {
if (iswordstart(ch)) {
styler.ColourTo(i - 1, state);
state = SCE_C_WORD;
} else if (ch == '\'') {
styler.ColourTo(i - 1, state);
state = SCE_C_COMMENTLINE;
} else if (ch == '\"') {
styler.ColourTo(i - 1, state);
state = SCE_C_STRING;
} else if (ch == '#' && visibleChars == 1) {
// Preprocessor commands are alone on their line
styler.ColourTo(i - 1, state);
state = SCE_C_PREPROCESSOR;
} else if (ch == '&' && tolower(chNext) == 'h') {
styler.ColourTo(i - 1, state);
state = SCE_C_WORD;
} else if (isoperator(ch)) {
styler.ColourTo(i - 1, state);
styler.ColourTo(i, SCE_C_OPERATOR);
}
} else if (state == SCE_C_WORD) {
if (!iswordchar(ch)) {
state = classifyWordVB(styler.GetStartSegment(), i - 1, keywords, styler);
if (state == SCE_C_DEFAULT) {
if (ch == '\'') {
state = SCE_C_COMMENTLINE;
} else if (ch == '\"') {
state = SCE_C_STRING;
} else if (isoperator(ch)) {
styler.ColourTo(i - 1, state);
styler.ColourTo(i, SCE_C_OPERATOR);
}
}
}
} else {
if (state == SCE_C_STRING) {
// VB doubles quotes to preserve them
if (ch == '\"') {
styler.ColourTo(i, state);
state = SCE_C_DEFAULT;
i++;
ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
}
}
if (state == SCE_C_DEFAULT) { // One of the above succeeded
if (ch == '\'') {
state = SCE_C_COMMENTLINE;
} else if (ch == '\"') {
state = SCE_C_STRING;
} else if (iswordstart(ch)) {
state = SCE_C_WORD;
}
}
}
}
styler.ColourTo(lengthDoc, state);
}
LexerModule lmVB(SCLEX_VB, ColouriseVBDoc);

View File

@@ -0,0 +1,105 @@
// Scintilla source code edit control
// LineMarker.cxx - defines the look of a line marker in the margin
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include "Platform.h"
#include "Scintilla.h"
#include "LineMarker.h"
void LineMarker::Draw(Surface *surface, PRectangle &rc) {
int minDim = Platform::Minimum(rc.Width(), rc.Height());
minDim--; // Ensure does not go beyond edge
int centreX = (rc.right + rc.left) / 2;
int centreY = (rc.bottom + rc.top) / 2;
int dimOn2 = minDim / 2;
int dimOn4 = minDim / 4;
if (rc.Width() > (rc.Height() * 2)) {
// Wide column is line number so move to left to try to avoid overlapping number
centreX = rc.left + dimOn2 + 1;
}
if (markType == SC_MARK_ROUNDRECT) {
PRectangle rcRounded = rc;
rcRounded.left = rc.left + 1;
rcRounded.right = rc.right - 1;
surface->RoundedRectangle(rcRounded, fore.allocated, back.allocated);
} else if (markType == SC_MARK_CIRCLE) {
PRectangle rcCircle;
rcCircle.left = centreX - dimOn2;
rcCircle.top = centreY - dimOn2;
rcCircle.right = centreX + dimOn2;
rcCircle.bottom = centreY + dimOn2;
surface->Ellipse(rcCircle, fore.allocated, back.allocated);
} else if (markType == SC_MARK_ARROW) {
Point pts[] = {
Point(centreX - dimOn4, centreY - dimOn2),
Point(centreX - dimOn4, centreY + dimOn2),
Point(centreX + dimOn2 - dimOn4, centreY),
};
surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]),
fore.allocated, back.allocated);
} else if (markType == SC_MARK_ARROWDOWN) {
Point pts[] = {
Point(centreX - dimOn2, centreY - dimOn4),
Point(centreX + dimOn2, centreY - dimOn4),
Point(centreX, centreY + dimOn2 - dimOn4),
};
surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]),
fore.allocated, back.allocated);
} else if (markType == SC_MARK_PLUS) {
int armSize = dimOn2-2;
Point pts[] = {
Point(centreX - armSize, centreY - 1),
Point(centreX - 1, centreY - 1),
Point(centreX - 1, centreY - armSize),
Point(centreX + 1, centreY - armSize),
Point(centreX + 1, centreY - 1),
Point(centreX + armSize, centreY -1),
Point(centreX + armSize, centreY +1),
Point(centreX + 1, centreY + 1),
Point(centreX + 1, centreY + armSize),
Point(centreX - 1, centreY + armSize),
Point(centreX - 1, centreY + 1),
Point(centreX - armSize, centreY + 1),
};
surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]),
fore.allocated, back.allocated);
} else if (markType == SC_MARK_MINUS) {
int armSize = dimOn2-2;
Point pts[] = {
Point(centreX - armSize, centreY - 1),
Point(centreX + armSize, centreY -1),
Point(centreX + armSize, centreY +1),
Point(centreX - armSize, centreY + 1),
};
surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]),
fore.allocated, back.allocated);
} else if (markType == SC_MARK_SMALLRECT) {
PRectangle rcSmall;
rcSmall.left = rc.left + 1;
rcSmall.top = rc.top + 2;
rcSmall.right = rc.right - 1;
rcSmall.bottom = rc.bottom - 2;
surface->RectangleDraw(rcSmall, fore.allocated, back.allocated);
} else if (markType == SC_MARK_EMPTY) {
// An invisible marker so don't draw anything
} else { // SC_MARK_SHORTARROW
Point pts[] = {
Point(centreX, centreY + dimOn2),
Point(centreX + dimOn2, centreY),
Point(centreX, centreY - dimOn2),
Point(centreX, centreY - dimOn4),
Point(centreX - dimOn4, centreY - dimOn4),
Point(centreX - dimOn4, centreY + dimOn4),
Point(centreX, centreY + dimOn4),
Point(centreX, centreY + dimOn2),
};
surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]),
fore.allocated, back.allocated);
}
}

View File

@@ -0,0 +1,22 @@
// Scintilla source code edit control
// LineMarker.h - defines the look of a line marker in the margin
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef LINEMARKER_H
#define LINEMARKER_H
class LineMarker {
public:
int markType;
ColourPair fore;
ColourPair back;
LineMarker() {
markType = SC_MARK_CIRCLE;
fore = Colour(0,0,0);
back = Colour(0xff,0xff,0xff);
}
void Draw(Surface *surface, PRectangle &rc);
};
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,742 @@
// SciTE - Scintilla based Text Editor
// PropSet.cxx - a java style properties file module
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
// Maintain a dictionary of properties
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
#include "Platform.h"
#include "PropSet.h"
bool EqualCaseInsensitive(const char *a, const char *b) {
#if PLAT_GTK
return 0 == strcasecmp(a, b);
#elif PLAT_WIN
return 0 == stricmp(a, b);
#elif PLAT_WX
return 0 == wxStricmp(a, b);
#endif
}
SString::size_type SString::npos = -1;
inline unsigned int HashString(const char *s) {
unsigned int ret = 0;
while (*s) {
ret <<= 4;
ret ^= *s;
s++;
}
return ret;
}
// Get a line of input. If end of line escaped with '\\' then continue reading.
static bool GetFullLine(const char *&fpc, int &lenData, char *s, int len) {
bool continuation = true;
s[0] = '\0';
while ((len > 1) && lenData > 0) {
char ch = *fpc;
fpc++;
lenData--;
if ((ch == '\r') || (ch == '\n')) {
if (!continuation) {
if ((lenData > 0) && (ch == '\r') && ((*fpc) == '\n')) {
// munch the second half of a crlf
fpc++;
lenData--;
}
*s = '\0';
return true;
}
} else if ((ch == '\\') && (lenData > 0) && ((*fpc == '\r') || (*fpc == '\n'))) {
continuation = true;
} else {
continuation = false;
*s++ = ch;
*s = '\0';
len--;
}
}
return false;
}
PropSet::PropSet() {
superPS = 0;
for (int root=0; root < hashRoots; root++)
props[root] = 0;
}
PropSet::~PropSet() {
superPS = 0;
Clear();
}
void PropSet::Set(const char *key, const char *val) {
unsigned int hash = HashString(key);
for (Property *p=props[hash % hashRoots]; p; p=p->next) {
if ((hash == p->hash) && (0 == strcmp(p->key, key))) {
// Replace current value
delete [](p->val);
p->val = StringDup(val);
return;
}
}
// Not found
Property *pNew = new Property;
if (pNew) {
pNew->hash = HashString(key);
pNew->key = StringDup(key);
pNew->val = StringDup(val);
pNew->next = props[hash % hashRoots];
props[hash % hashRoots] = pNew;
}
}
void PropSet::Set(char *keyval) {
while (isspace(*keyval))
keyval++;
char *eqat = strchr(keyval, '=');
if (eqat) {
*eqat = '\0';
Set(keyval, eqat + 1);
*eqat = '=';
}
}
SString PropSet::Get(const char *key) {
unsigned int hash = HashString(key);
for (Property *p=props[hash % hashRoots]; p; p=p->next) {
if ((hash == p->hash) && (0 == strcmp(p->key, key))) {
return p->val;
}
}
if (superPS) {
// Failed here, so try in base property set
return superPS->Get(key);
} else {
return "";
}
}
SString PropSet::GetExpanded(const char *key) {
SString val = Get(key);
return Expand(val.c_str());
}
SString PropSet::Expand(const char *withvars) {
char *base = StringDup(withvars);
char *cpvar = strstr(base, "$(");
while (cpvar) {
char *cpendvar = strchr(cpvar, ')');
if (cpendvar) {
int lenvar = cpendvar - cpvar - 2; // Subtract the $()
char *var = StringDup(cpvar+2, lenvar);
SString val = GetExpanded(var);
int newlenbase = strlen(base) + val.length() - lenvar;
char *newbase = new char[newlenbase];
strncpy(newbase, base, cpvar - base);
strcpy(newbase + (cpvar - base), val.c_str());
strcpy(newbase + (cpvar - base) + val.length(), cpendvar + 1);
delete []var;
delete []base;
base = newbase;
}
cpvar = strstr(base, "$(");
}
SString sret = base;
delete []base;
return sret;
}
int PropSet::GetInt(const char *key, int defaultValue) {
SString val = Get(key);
if (val.length())
return val.value();
else
return defaultValue;
}
inline bool isprefix(const char *target, const char *prefix) {
while (*target && *prefix) {
if (*target != *prefix)
return false;
target++;
prefix++;
}
if (*prefix)
return false;
else
return true;
}
bool issuffix(const char *target, const char *suffix) {
int lentarget = strlen(target);
int lensuffix = strlen(suffix);
if (lensuffix > lentarget)
return false;
for (int i = lensuffix - 1; i >= 0; i--) {
if (target[i + lentarget - lensuffix] != suffix[i])
return false;
}
return true;
}
SString PropSet::GetWild(const char *keybase, const char *filename) {
for (int root=0; root < hashRoots; root++) {
for (Property *p=props[root]; p; p=p->next) {
if (isprefix(p->key, keybase)) {
char *orgkeyfile = p->key + strlen(keybase);
char *keyfile = NULL;
if (strstr(orgkeyfile, "$(") == orgkeyfile) {
char *cpendvar = strchr(orgkeyfile, ')');
if (cpendvar) {
*cpendvar = '\0';
SString s = Get(orgkeyfile + 2);
*cpendvar= ')';
keyfile = strdup(s.c_str());
}
}
char *keyptr = keyfile;
if (keyfile == NULL)
keyfile = orgkeyfile;
for (; ; ) {
char *del = strchr(keyfile, ';');
if (del == NULL)
del = keyfile + strlen(keyfile);
char delchr = *del;
*del = '\0';
if (*keyfile == '*') {
if (issuffix(filename, keyfile + 1)) {
*del = delchr;
free(keyptr);
return p->val;
}
} else if (0 == strcmp(keyfile, filename)) {
*del = delchr;
free(keyptr);
return p->val;
}
if (delchr == '\0')
break;
*del = delchr;
keyfile = del + 1;
}
free(keyptr);
if (0 == strcmp(p->key, keybase)) {
return p->val;
}
}
}
}
if (superPS) {
// Failed here, so try in base property set
return superPS->GetWild(keybase, filename);
} else {
return "";
}
}
SString PropSet::GetNewExpand(const char *keybase, const char *filename) {
char *base = StringDup(GetWild(keybase, filename).c_str());
char *cpvar = strstr(base, "$(");
while (cpvar) {
char *cpendvar = strchr(cpvar, ')');
if (cpendvar) {
int lenvar = cpendvar - cpvar - 2; // Subtract the $()
char *var = StringDup(cpvar+2, lenvar);
SString val = GetWild(var, filename);
int newlenbase = strlen(base) + val.length() - lenvar;
char *newbase = new char[newlenbase];
strncpy(newbase, base, cpvar - base);
strcpy(newbase + (cpvar - base), val.c_str());
strcpy(newbase + (cpvar - base) + val.length(), cpendvar + 1);
delete []var;
delete []base;
base = newbase;
}
cpvar = strstr(base, "$(");
}
SString sret = base;
delete []base;
return sret;
}
void PropSet::Clear() {
for (int root=0; root < hashRoots; root++) {
Property *p=props[root];
while (p) {
Property *pNext=p->next;
p->hash = 0;
delete p->key;
p->key = 0;
delete p->val;
p->val = 0;
delete p;
p = pNext;
}
props[root] = 0;
}
}
void PropSet::ReadFromMemory(const char *data, int len, const char *directoryForImports) {
const char *pd = data;
char linebuf[60000];
bool ifIsTrue = true;
while (len > 0) {
GetFullLine(pd, len, linebuf, sizeof(linebuf));
if (isalpha(linebuf[0])) // If clause ends with first non-indented line
ifIsTrue = true;
if (isprefix(linebuf, "if ")) {
const char *expr = linebuf + strlen("if") + 1;
ifIsTrue = GetInt(expr);
} else if (isprefix(linebuf, "import ") && directoryForImports) {
char importPath[1024];
strcpy(importPath, directoryForImports);
strcat(importPath, linebuf + strlen("import") + 1);
strcat(importPath, ".properties");
Read(importPath,directoryForImports);
} else if (isalpha(linebuf[0])) {
Set(linebuf);
} else if (isspace(linebuf[0]) && ifIsTrue) {
Set(linebuf);
}
}
}
void PropSet::Read(const char *filename, const char *directoryForImports) {
char propsData[60000];
FILE *rcfile = fopen(filename, "rb");
if (rcfile) {
int lenFile = fread(propsData, 1, sizeof(propsData), rcfile);
fclose(rcfile);
ReadFromMemory(propsData, lenFile, directoryForImports);
} else {
//printf("Could not open <%s>\n", filename);
}
}
static bool iswordsep(char ch, bool onlyLineEnds) {
if (!isspace(ch))
return false;
if (!onlyLineEnds)
return true;
return ch == '\r' || ch == '\n';
}
// Creates an array that points into each word in the string and puts \0 terminators
// after each word.
static char **ArrayFromWordList(char *wordlist, int *len, bool onlyLineEnds = false) {
#if 1
char prev = '\n';
int words = 0;
for (int j = 0; wordlist[j]; j++) {
if (!iswordsep(wordlist[j], onlyLineEnds) && iswordsep(prev, onlyLineEnds))
words++;
prev = wordlist[j];
}
char **keywords = new char * [words + 1];
if (keywords) {
words = 0;
prev = '\0';
int slen = strlen(wordlist);
for (int k = 0; k < slen; k++) {
if (!iswordsep(wordlist[k], onlyLineEnds)) {
if (!prev) {
keywords[words] = &wordlist[k];
words++;
}
} else {
wordlist[k] = '\0';
}
prev = wordlist[k];
}
keywords[words] = &wordlist[slen];
*len = words;
} else {
*len = 0;
}
#else
int words = 0; // length of the returned buffer of pointers
#undef APICHUNK // how many pointers will be pre-allocated (to avoid buffer reallocation on each new pointer)
#define APICHUNK 256
int size = APICHUNK; // real size of the returned buffer of pointers
char **keywords; // buffer for the pointers returned
int slen = strlen(wordlist); //length of the buffer with api file
keywords = (char**) malloc((size + 1) * sizeof (*keywords));
words = 0;
for (int k = 0;;) {
while (iswordsep(wordlist[k], onlyLineEnds))
wordlist[k++] = '\0';
if (k >= slen)
break;
if (words >= size) {
do
size += APICHUNK;
while (size <= words);
keywords = (char**) realloc(keywords, (size + 1) * sizeof (*keywords));
}
keywords[words++] = wordlist + k;
do
if (k < slen)
k++;
else
goto out;
while (!iswordsep(wordlist[k], onlyLineEnds));
}
out:
keywords[words] = wordlist + slen;
*len = words;
#endif
return keywords;
}
void WordList::Clear() {
if (words) {
delete []list;
#if 1
delete []words;
#else
free(words);
#endif
free(wordsNoCase);
}
words = 0;
wordsNoCase = 0;
list = 0;
len = 0;
sorted = false;
}
void WordList::Set(const char *s) {
list = StringDup(s);
sorted = false;
words = ArrayFromWordList(list, &len, onlyLineEnds);
wordsNoCase = (char**) malloc ((len + 1) * sizeof (*wordsNoCase));
memcpy(wordsNoCase, words, (len + 1) * sizeof (*words));
}
char *WordList::Allocate(int size) {
list = new char[size + 1];
list[size] = '\0';
return list;
}
void WordList::SetFromAllocated() {
sorted = false;
words = ArrayFromWordList(list, &len, onlyLineEnds);
wordsNoCase = (char**) malloc ((len + 1) * sizeof (*wordsNoCase));
memcpy(wordsNoCase, words, (len + 1) * sizeof (*words));
}
int cmpString(const void *a1, const void *a2) {
// Can't work out the correct incantation to use modern casts here
return strcmp(*(char**)(a1), *(char**)(a2));
}
int cmpStringNoCase(const void *a1, const void *a2) {
// Can't work out the correct incantation to use modern casts here
return strcasecmp(*(char**)(a1), *(char**)(a2));
}
static void SortWordList(char **words, char **wordsNoCase, unsigned int len) {
qsort(reinterpret_cast<void*>(words), len, sizeof(*words),
cmpString);
qsort(reinterpret_cast<void*>(wordsNoCase), len, sizeof(*wordsNoCase),
cmpStringNoCase);
}
bool WordList::InList(const char *s) {
if (0 == words)
return false;
if (!sorted) {
sorted = true;
SortWordList(words, wordsNoCase, len);
for (unsigned int k = 0; k < (sizeof(starts) / sizeof(starts[0])); k++)
starts[k] = -1;
for (int l = len - 1; l >= 0; l--) {
unsigned char indexChar = words[l][0];
starts[indexChar] = l;
}
}
unsigned char firstChar = s[0];
int j = starts[firstChar];
if (j >= 0) {
while (words[j][0] == firstChar) {
if (s[1] == words[j][1]) {
const char *a = words[j] + 1;
const char *b = s + 1;
while (*a && *a == *b) {
a++;
b++;
}
if (!*a && !*b)
return true;
}
j++;
}
}
return false;
}
/**
* Returns an element (complete) of the wordlist array which has the beginning
* the same as the passed string. The length of the word to compare is passed
* too. Letter case can be ignored or preserved (default).
*/
const char *WordList::GetNearestWord(const char *wordStart, int searchLen /*= -1*/, bool ignoreCase /*= false*/) {
int start = 0; // lower bound of the api array block to search
int end = len - 1; // upper bound of the api array block to search
int pivot; // index of api array element just being compared
int cond; // comparison result (in the sense of strcmp() result)
const char *word; // api array element just being compared
if (0 == words)
return NULL;
if (!sorted) {
sorted = true;
SortWordList(words, wordsNoCase, len);
}
if (ignoreCase)
while (start <= end) { // binary searching loop
pivot = (start + end) >> 1;
word = wordsNoCase[pivot];
cond = strncasecmp(wordStart, word, searchLen);
if (!cond && nonFuncChar(word[searchLen])) // maybe there should be a "non-word character" test here?
return word; // result must not be freed with free()
else if (cond < 0)
end = pivot - 1;
else if (cond > 0)
start = pivot + 1;
}
else // preserve the letter case
while (start <= end) { // binary searching loop
pivot = (start + end) >> 1;
word = words[pivot];
cond = strncmp(wordStart, word, searchLen);
if (!cond && nonFuncChar(word[searchLen])) // maybe there should be a "non-word character" test here?
return word; // result must not be freed with free()
else if (cond >= 0)
start = pivot + 1;
else if (cond < 0)
end = pivot - 1;
}
return NULL;
}
/**
* Returns elements (first words of them) of the wordlist array which have
* the beginning the same as the passed string. The length of the word to
* compare is passed too. Letter case can be ignored or preserved (default).
* If there are more words meeting the condition they are returned all of
* them in the ascending order separated with spaces.
*
* NOTE: returned buffer has to be freed with a free() call.
*/
char *WordList::GetNearestWords(const char *wordStart, int searchLen /*= -1*/, bool ignoreCase /*= false*/) {
int wordlen; // length of the word part (before the '(' brace) of the api array element
int length = 0; // length of the returned buffer of words (string)
int newlength; // length of the new buffer before the reallocating itself
#undef WORDCHUNK // how many characters will be pre-allocated (to avoid buffer reallocation on each new word)
#define WORDCHUNK 100
int size = WORDCHUNK; // real size of the returned buffer of words
char *buffer; // buffer for the words returned
int start = 0; // lower bound of the api array block to search
int end = len - 1; // upper bound of the api array block to search
int pivot; // index of api array element just being compared
int cond; // comparison result (in the sense of strcmp() result)
int oldpivot; // pivot storage to be able to browse the api array upwards and then downwards
const char *word; // api array element just being compared
const char *brace; // position of the opening brace in the api array element just being compared
if (0 == words)
return NULL;
if (!sorted) {
sorted = true;
SortWordList(words, wordsNoCase, len);
}
buffer = (char*) malloc(size);
*buffer = '\0';
if (ignoreCase)
while (start <= end) { // binary searching loop
pivot = (start + end) >> 1;
word = wordsNoCase[pivot];
cond = strncasecmp(wordStart, word, searchLen);
if (!cond) {
oldpivot = pivot;
do { // browse sequentially the rest after the hit
brace = strchr(word, '(');
if (brace)
do
if (--brace < word)
break;
while (isspace(*brace));
else {
brace = word + strlen(word);
do
if (--brace < word)
break;
while (isspace(*brace));
}
wordlen = brace - word + 1;
newlength = length + wordlen; // stretch the buffer
if (length)
newlength++;
if (newlength >= size) {
do
size += WORDCHUNK;
while (size <= newlength);
buffer = (char*) realloc(buffer, size);
}
if (length) // append a new entry
buffer[length++] = ' ';
memcpy(buffer + length, word, wordlen);
length = newlength;
buffer[length] = '\0';
if (++pivot > end)
break;
word = wordsNoCase[pivot];
} while (!strncasecmp(wordStart, word, searchLen));
pivot = oldpivot;
for (;;) { // browse sequentially the rest before the hit
if (--pivot < start)
break;
word = wordsNoCase[pivot];
if (strncasecmp(wordStart, word, searchLen))
break;
brace = strchr(word, '(');
if (brace)
do
if (--brace < word)
break;
while (isspace(*brace));
else {
brace = word + strlen(word);
do
if (--brace < word)
break;
while (isspace(*brace));
}
wordlen = brace - word + 1;
newlength = length + wordlen; // stretch the buffer
if (length)
newlength++;
if (newlength >= size)
{
do
size += WORDCHUNK;
while (size <= newlength);
buffer = (char*) realloc(buffer, size);
}
if (length) // append a new entry
buffer[length++] = ' ';
memcpy(buffer + length, word, wordlen);
length = newlength;
buffer[length] = '\0';
}
return buffer; // result has to be freed with free()
}
else if (cond < 0)
end = pivot - 1;
else if (cond > 0)
start = pivot + 1;
}
else // preserve the letter case
while (start <= end) { // binary searching loop
pivot = (start + end) >> 1;
word = words[pivot];
cond = strncmp(wordStart, word, searchLen);
if (!cond) {
oldpivot = pivot;
do { // browse sequentially the rest after the hit
brace = strchr(word, '(');
if (brace)
do
if (--brace < word)
break;
while (isspace(*brace));
else {
brace = word + strlen(word);
do
if (--brace < word)
break;
while (isspace(*brace));
}
wordlen = brace - word + 1;
newlength = length + wordlen; // stretch the buffer
if (length)
newlength++;
if (newlength >= size)
{
do
size += WORDCHUNK;
while (size <= newlength);
buffer = (char*) realloc(buffer, size);
}
if (length) // append a new entry
buffer[length++] = ' ';
memcpy(buffer + length, word, wordlen);
length = newlength;
buffer[length] = '\0';
if (++pivot > end)
break;
word = words[pivot];
} while (!strncmp(wordStart, word, searchLen));
pivot = oldpivot;
for (;;) { // browse sequentially the rest before the hit
if (--pivot < start)
break;
word = words[pivot];
if (strncmp(wordStart, word, searchLen))
break;
brace = strchr(word, '(');
if (brace)
do
if (--brace < word)
break;
while (isspace(*brace));
else {
brace = word + strlen(word);
do
if (--brace < word)
break;
while (isspace(*brace));
}
wordlen = brace - word + 1;
newlength = length + wordlen; // stretch the buffer
if (length)
newlength++;
if (newlength >= size)
{
do
size += WORDCHUNK;
while (size <= newlength);
buffer = (char*) realloc(buffer, size);
}
if (length) // append a new entry
buffer[length++] = ' ';
memcpy(buffer + length, word, wordlen);
length = newlength;
buffer[length] = '\0';
}
return buffer; // result has to be freed with free()
}
else if (cond < 0)
end = pivot - 1;
else if (cond > 0)
start = pivot + 1;
}
free(buffer);
return NULL;
}

View File

@@ -0,0 +1,113 @@
// Scintilla source code edit control
// SVector.h - a simple expandable vector
// Copyright 1998-1999 by Neil Hodgson <neilh@hare.net.au>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef SVECTOR_H
#define SVECTOR_H
// A simple expandable integer vector.
// Storage not allocated for elements until an element is used.
// This makes it very lightweight unless used so is a good match for optional features.
class SVector {
int *v;
unsigned int size; // Number of elements allocated
unsigned int len; // Number of elements in vector
bool allocFailure; // A memory allocation call has failed
// Internally allocate more elements than the user wants to avoid
// thrashng the memory allocator
void SizeTo(int newSize) {
if (newSize < 4000)
newSize += 4000;
else
newSize = (newSize * 3) / 2;
int* newv = new int[newSize];
if (!newv) {
allocFailure = true;
return;
}
size = newSize;
unsigned int i=0;
for (; i<len; i++) {
newv[i] = v[i];
}
for (; i<size; i++) {
newv[i] = 0;
}
delete []v;
v = newv;
}
public:
SVector() {
allocFailure = false;
v = 0;
len = 0;
size = 0;
}
~SVector() {
Free();
}
SVector(const SVector &other) {
allocFailure = false;
v = 0;
len = 0;
size = 0;
if (other.Length() > 0) {
SizeTo(other.Length());
if (!allocFailure) {
for (int i=0;i<other.Length();i++)
v[i] = other.v[i];
len = other.Length();
}
}
}
SVector &operator=(const SVector &other) {
if (this != &other) {
delete []v;
allocFailure = false;
v = 0;
len = 0;
size = 0;
if (other.Length() > 0) {
SizeTo(other.Length());
if (!allocFailure) {
for (int i=0;i<other.Length();i++)
v[i] = other.v[i];
}
len = other.Length();
}
}
return *this;
}
int &operator[](unsigned int i) {
if (i >= len) {
if (i >= size) {
SizeTo(i);
}
len = i+1;
}
return v[i];
}
void Free() {
delete []v;
v = 0;
size = 0;
len = 0;
}
void SetLength(unsigned int newLength) {
if (newLength > len) {
if (newLength >= size) {
SizeTo(newLength);
}
}
len = newLength;
}
int Length() const {
return len;
}
};
#endif

View File

@@ -0,0 +1,499 @@
// Scintilla source code edit control
// ScintillaBase.cxx - an enhanced subclass of Editor with calltips, autocomplete and context menu
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include "Platform.h"
#include "Scintilla.h"
#include "PropSet.h"
#ifdef SCI_LEXER
#include "SciLexer.h"
#include "Accessor.h"
#include "WindowAccessor.h"
#include "DocumentAccessor.h"
#include "KeyWords.h"
#endif
#include "ContractionState.h"
#include "SVector.h"
#include "CellBuffer.h"
#include "CallTip.h"
#include "KeyMap.h"
#include "Indicator.h"
#include "LineMarker.h"
#include "Style.h"
#include "ViewStyle.h"
#include "AutoComplete.h"
#include "Document.h"
#include "Editor.h"
#include "ScintillaBase.h"
ScintillaBase::ScintillaBase() {
#ifdef SCI_LEXER
lexLanguage = SCLEX_CONTAINER;
for (int wl=0;wl<numWordLists;wl++)
keyWordLists[wl] = new WordList;
#endif
}
ScintillaBase::~ScintillaBase() {
#ifdef SCI_LEXER
for (int wl=0;wl<numWordLists;wl++)
delete keyWordLists[wl];
#endif
}
void ScintillaBase::Finalise() {
Editor::Finalise();
popup.Destroy();
}
void ScintillaBase::RefreshColourPalette(Palette &pal, bool want) {
Editor::RefreshColourPalette(pal, want);
ct.RefreshColourPalette(pal, want);
}
void ScintillaBase::AddCharUTF(char *s, unsigned int len) {
bool acActiveBeforeCharAdded = ac.Active();
if (!acActiveBeforeCharAdded || !ac.IsFillUpChar(*s))
Editor::AddCharUTF(s, len);
if (acActiveBeforeCharAdded)
AutoCompleteChanged(s[0]);
}
void ScintillaBase::Command(int cmdId) {
switch (cmdId) {
case idAutoComplete: // Nothing to do
break;
case idCallTip: // Nothing to do
break;
case idcmdUndo:
WndProc(SCI_UNDO, 0, 0);
break;
case idcmdRedo:
WndProc(SCI_REDO, 0, 0);
break;
case idcmdCut:
WndProc(SCI_CUT, 0, 0);
break;
case idcmdCopy:
WndProc(SCI_COPY, 0, 0);
break;
case idcmdPaste:
WndProc(SCI_PASTE, 0, 0);
break;
case idcmdDelete:
WndProc(SCI_CLEAR, 0, 0);
break;
case idcmdSelectAll:
WndProc(SCI_SELECTALL, 0, 0);
break;
}
}
int ScintillaBase::KeyCommand(unsigned int iMessage) {
// Most key commands cancel autocompletion mode
if (ac.Active()) {
switch (iMessage) {
// Except for these
case SCI_LINEDOWN:
AutoCompleteMove(1);
return 0;
case SCI_LINEUP:
AutoCompleteMove( -1);
return 0;
case SCI_PAGEDOWN:
AutoCompleteMove(5);
return 0;
case SCI_PAGEUP:
AutoCompleteMove( -5);
return 0;
case SCI_VCHOME:
AutoCompleteMove( -5000);
return 0;
case SCI_LINEEND:
AutoCompleteMove(5000);
return 0;
case SCI_DELETEBACK:
DelCharBack();
AutoCompleteChanged();
EnsureCaretVisible();
return 0;
case SCI_TAB:
AutoCompleteCompleted();
return 0;
case SCI_NEWLINE:
AutoCompleteCompleted();
return 0;
default:
ac.Cancel();
}
}
if (ct.inCallTipMode) {
if (
(iMessage != SCI_CHARLEFT) &&
(iMessage != SCI_CHARLEFTEXTEND) &&
(iMessage != SCI_CHARRIGHT) &&
(iMessage != SCI_CHARLEFTEXTEND) &&
(iMessage != SCI_EDITTOGGLEOVERTYPE) &&
(iMessage != SCI_DELETEBACK)
) {
ct.CallTipCancel();
}
if (iMessage == SCI_DELETEBACK) {
if (currentPos <= ct.posStartCallTip) {
ct.CallTipCancel();
}
}
}
return Editor::KeyCommand(iMessage);
}
void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) {
//Platform::DebugPrintf("AutoComplete %s\n", list);
ct.CallTipCancel();
if (ac.chooseSingle) {
if (list && !strchr(list, ac.GetSeparator())) {
if (ac.ignoreCase) {
SetEmptySelection(currentPos - lenEntered);
pdoc->DeleteChars(currentPos, lenEntered);
SetEmptySelection(currentPos);
pdoc->InsertString(currentPos, list);
SetEmptySelection(currentPos + strlen(list));
} else {
SetEmptySelection(currentPos);
pdoc->InsertString(currentPos, list + lenEntered);
SetEmptySelection(currentPos + strlen(list + lenEntered));
}
return;
}
}
ac.Start(wDraw, idAutoComplete, currentPos, lenEntered);
PRectangle rcClient = GetClientRectangle();
Point pt = LocationFromPosition(currentPos-lenEntered);
int heightLB = 100;
int widthLB = 100;
if (pt.x >= rcClient.right - widthLB) {
HorizontalScrollTo(xOffset + pt.x - rcClient.right + widthLB);
Redraw();
pt = LocationFromPosition(currentPos);
}
PRectangle rcac;
rcac.left = pt.x - 5;
if (pt.y >= rcClient.bottom - heightLB && // Wont fit below.
pt.y >= (rcClient.bottom + rcClient.top) / 2) { // and there is more room above.
rcac.top = pt.y - heightLB;
if (rcac.top < 0) {
heightLB += rcac.top;
rcac.top = 0;
}
} else {
rcac.top = pt.y + vs.lineHeight;
}
rcac.right = rcac.left + widthLB;
rcac.bottom = Platform::Minimum(rcac.top + heightLB, rcClient.bottom);
ac.lb.SetPositionRelative(rcac, wMain);
ac.lb.SetFont(vs.styles[STYLE_DEFAULT].font);
ac.lb.SetAverageCharWidth(vs.styles[STYLE_DEFAULT].aveCharWidth);
ac.SetList(list);
// Fiddle the position of the list so it is right next to the target and wide enough for all its strings
PRectangle rcList = ac.lb.GetDesiredRect();
int heightAlloced = rcList.bottom - rcList.top;
widthLB = Platform::Maximum(widthLB, rcList.right - rcList.left);
// Make an allowance for large strings in list
rcList.left = pt.x - 5;
rcList.right = rcList.left + widthLB;
if (pt.y >= rcClient.bottom - heightLB && // Wont fit below.
pt.y >= (rcClient.bottom + rcClient.top) / 2) { // and there is more room above.
rcList.top = pt.y - heightAlloced;
} else {
rcList.top = pt.y + vs.lineHeight;
}
rcList.bottom = rcList.top + heightAlloced;
ac.lb.SetPositionRelative(rcList, wMain);
ac.Show();
if (lenEntered != 0) {
AutoCompleteMoveToCurrentWord();
}
}
void ScintillaBase::AutoCompleteCancel() {
ac.Cancel();
}
void ScintillaBase::AutoCompleteMove(int delta) {
ac.Move(delta);
}
void ScintillaBase::AutoCompleteMoveToCurrentWord() {
char wordCurrent[1000];
int i;
int startWord = ac.posStart - ac.startLen;
for (i = startWord; i < currentPos; i++)
wordCurrent[i - startWord] = pdoc->CharAt(i);
wordCurrent[i - startWord] = '\0';
ac.Select(wordCurrent);
}
void ScintillaBase::AutoCompleteChanged(char ch) {
if (ac.IsFillUpChar(ch)) {
AutoCompleteCompleted(ch);
} else if (currentPos <= ac.posStart - ac.startLen) {
ac.Cancel();
} else if (ac.cancelAtStartPos && currentPos <= ac.posStart) {
ac.Cancel();
} else if (ac.IsStopChar(ch)) {
ac.Cancel();
} else {
AutoCompleteMoveToCurrentWord();
}
}
void ScintillaBase::AutoCompleteCompleted(char fillUp/*='\0'*/) {
int item = ac.lb.GetSelection();
char selected[1000];
if (item != -1) {
ac.lb.GetValue(item, selected, sizeof(selected));
}
ac.Cancel();
if (ac.ignoreCase) {
if (currentPos != ac.posStart) {
pdoc->DeleteChars(ac.posStart, currentPos - ac.posStart);
}
SetEmptySelection(ac.posStart - ac.startLen);
pdoc->DeleteChars(ac.posStart - ac.startLen, ac.startLen);
if (item != -1) {
SString piece = selected;
if (fillUp)
piece += fillUp;
pdoc->InsertString(currentPos, piece.c_str());
SetEmptySelection(currentPos + piece.length());
}
} else {
if (currentPos != ac.posStart) {
pdoc->DeleteChars(ac.posStart, currentPos - ac.posStart);
}
SetEmptySelection(ac.posStart);
if (item != -1) {
SString piece = selected + ac.startLen;
if (fillUp)
piece += fillUp;
pdoc->InsertString(currentPos, piece.c_str());
SetEmptySelection(currentPos + piece.length());
}
}
}
void ScintillaBase::ContextMenu(Point pt) {
popup.CreatePopUp();
AddToPopUp("Undo", idcmdUndo, pdoc->CanUndo());
AddToPopUp("Redo", idcmdRedo, pdoc->CanRedo());
AddToPopUp("");
AddToPopUp("Cut", idcmdCut, currentPos != anchor);
AddToPopUp("Copy", idcmdCopy, currentPos != anchor);
AddToPopUp("Paste", idcmdPaste, WndProc(SCI_CANPASTE, 0, 0));
AddToPopUp("Delete", idcmdDelete, currentPos != anchor);
AddToPopUp("");
AddToPopUp("Select All", idcmdSelectAll);
popup.Show(pt, wMain);
}
void ScintillaBase::CancelModes() {
AutoCompleteCancel();
ct.CallTipCancel();
Editor::CancelModes();
}
void ScintillaBase::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt) {
CancelModes();
Editor::ButtonDown(pt, curTime, shift, ctrl, alt);
}
#ifdef SCI_LEXER
void ScintillaBase::Colourise(int start, int end) {
int lengthDoc = Platform::SendScintilla(wMain.GetID(), SCI_GETLENGTH, 0, 0);
if (end == -1)
end = lengthDoc;
int len = end - start;
//WindowAccessor styler(wMain.GetID(), props);
DocumentAccessor styler(pdoc, props);
int styleStart = 0;
if (start > 0)
styleStart = styler.StyleAt(start - 1);
styler.SetCodePage(pdoc->dbcsCodePage);
LexerModule::Colourise(start, len, styleStart, lexLanguage, keyWordLists, styler);
styler.Flush();
}
#endif
void ScintillaBase::NotifyStyleToNeeded(int endStyleNeeded) {
#ifdef SCI_LEXER
if (lexLanguage != SCLEX_CONTAINER) {
int endStyled = Platform::SendScintilla(wMain.GetID(), SCI_GETENDSTYLED, 0, 0);
int lineEndStyled = Platform::SendScintilla(wMain.GetID(), SCI_LINEFROMPOSITION, endStyled, 0);
endStyled = Platform::SendScintilla(wMain.GetID(), SCI_POSITIONFROMLINE, lineEndStyled, 0);
Colourise(endStyled, endStyleNeeded);
return;
}
#endif
Editor::NotifyStyleToNeeded(endStyleNeeded);
}
long ScintillaBase::WndProc(unsigned int iMessage, unsigned long wParam, long lParam) {
switch (iMessage) {
case SCI_AUTOCSHOW:
AutoCompleteStart(wParam, reinterpret_cast<const char *>(lParam));
break;
case SCI_AUTOCCANCEL:
AutoCompleteCancel();
break;
case SCI_AUTOCACTIVE:
return ac.Active();
case SCI_AUTOCPOSSTART:
return ac.posStart;
case SCI_AUTOCCOMPLETE:
AutoCompleteCompleted();
break;
case SCI_AUTOCSETSEPARATOR:
ac.SetSeparator(static_cast<char>(wParam));
break;
case SCI_AUTOCGETSEPARATOR:
return ac.GetSeparator();
case SCI_AUTOCSTOPS:
ac.SetStopChars(reinterpret_cast<char *>(lParam));
break;
case SCI_AUTOCSELECT:
ac.Select(reinterpret_cast<char *>(lParam));
break;
case SCI_AUTOCSETCANCELATSTART:
ac.cancelAtStartPos = wParam;
break;
case SCI_AUTOCGETCANCELATSTART:
return ac.cancelAtStartPos;
case SCI_AUTOCSETFILLUPS:
ac.SetFillUpChars(reinterpret_cast<char *>(lParam));
break;
case SCI_AUTOCSETCHOOSESINGLE:
ac.chooseSingle = wParam;
break;
case SCI_AUTOCGETCHOOSESINGLE:
return ac.chooseSingle;
case SCI_AUTOCSETIGNORECASE:
ac.ignoreCase = wParam;
break;
case SCI_AUTOCGETIGNORECASE:
return ac.ignoreCase;
case SCI_CALLTIPSHOW: {
AutoCompleteCancel();
if (!ct.wCallTip.Created()) {
PRectangle rc = ct.CallTipStart(currentPos, LocationFromPosition(wParam),
reinterpret_cast<char *>(lParam),
vs.styles[STYLE_DEFAULT].fontName, vs.styles[STYLE_DEFAULT].size);
// If the call-tip window would be out of the client
// space, adjust so it displays above the text.
PRectangle rcClient = GetClientRectangle();
if (rc.bottom > rcClient.bottom) {
int offset = vs.lineHeight + rc.Height();
rc.top -= offset;
rc.bottom -= offset;
}
// Now display the window.
CreateCallTipWindow(rc);
ct.wCallTip.SetPositionRelative(rc, wDraw);
ct.wCallTip.Show();
}
}
break;
case SCI_CALLTIPCANCEL:
ct.CallTipCancel();
break;
case SCI_CALLTIPACTIVE:
return ct.inCallTipMode;
case SCI_CALLTIPPOSSTART:
return ct.posStartCallTip;
case SCI_CALLTIPSETHLT:
ct.SetHighlight(wParam, lParam);
break;
case SCI_CALLTIPSETBACK:
ct.colourBG = Colour(wParam);
InvalidateStyleRedraw();
break;
#ifdef SCI_LEXER
case SCI_SETLEXER:
lexLanguage = wParam;
break;
case SCI_GETLEXER:
return lexLanguage;
case SCI_COLOURISE:
Colourise(wParam, lParam);
Redraw();
break;
case SCI_SETPROPERTY:
props.Set(reinterpret_cast<const char *>(wParam),
reinterpret_cast<const char *>(lParam));
break;
case SCI_SETKEYWORDS:
if (wParam < numWordLists) {
keyWordLists[wParam]->Clear();
keyWordLists[wParam]->Set(reinterpret_cast<const char *>(lParam));
}
break;
#endif
default:
return Editor::WndProc(iMessage, wParam, lParam);
}
return 0l;
}

View File

@@ -0,0 +1,73 @@
// Scintilla source code edit control
// ScintillaBase.h - defines an enhanced subclass of Editor with calltips, autocomplete and context menu
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef SCINTILLABASE_H
#define SCINTILLABASE_H
class ScintillaBase : public Editor {
// Private so ScintillaBase objects can not be copied
ScintillaBase(const ScintillaBase &) : Editor() {}
ScintillaBase &operator=(const ScintillaBase &) { return *this; }
protected:
// Enumeration of commands and child windows
enum {
idCallTip=1,
idAutoComplete=2,
idcmdUndo=10,
idcmdRedo=11,
idcmdCut=12,
idcmdCopy=13,
idcmdPaste=14,
idcmdDelete=15,
idcmdSelectAll=16
};
Menu popup;
AutoComplete ac;
CallTip ct;
#ifdef SCI_LEXER
int lexLanguage;
PropSet props;
enum {numWordLists=5};
WordList *keyWordLists[numWordLists];
void Colourise(int start, int end);
#endif
ScintillaBase();
virtual ~ScintillaBase();
virtual void Initialise() = 0;
virtual void Finalise() = 0;
virtual void RefreshColourPalette(Palette &pal, bool want);
virtual void AddCharUTF(char *s, unsigned int len);
void Command(int cmdId);
virtual void CancelModes();
virtual int KeyCommand(unsigned int iMessage);
void AutoCompleteStart(int lenEntered, const char *list);
void AutoCompleteCancel();
void AutoCompleteMove(int delta);
void AutoCompleteChanged(char ch=0);
void AutoCompleteCompleted(char fillUp='\0');
void AutoCompleteMoveToCurrentWord();
virtual void CreateCallTipWindow(PRectangle rc) = 0;
virtual void AddToPopUp(const char *label, int cmd=0, bool enabled=true) = 0;
void ContextMenu(Point pt);
virtual void ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt);
virtual void NotifyStyleToNeeded(int endStyleNeeded);
public:
// Public so scintilla_send_message can use it
virtual long WndProc(unsigned int iMessage, unsigned long wParam, long lParam);
};
#endif

View File

@@ -0,0 +1,125 @@
// Scintilla source code edit control
// Style.cxx - defines the font and colour style for a class of text
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <string.h>
#include "Platform.h"
#include "Scintilla.h"
#include "Style.h"
Style::Style() {
aliasOfDefaultFont = true;
Clear(Colour(0,0,0), Colour(0xff,0xff,0xff),
Platform::DefaultFontSize(), 0, SC_CHARSET_DEFAULT,
false, false, false, false, true);
}
Style::Style(const Style &source) {
Clear(Colour(0,0,0), Colour(0xff,0xff,0xff),
0, 0, 0,
false, false, false, false, true);
fore.desired = source.fore.desired;
back.desired = source.back.desired;
characterSet = source.characterSet;
bold = source.bold;
italic = source.italic;
size = source.size;
eolFilled = source.eolFilled;
underline = source.underline;
visible = source.visible;
}
Style::~Style() {
if (aliasOfDefaultFont)
font.SetID(0);
else
font.Release();
aliasOfDefaultFont = false;
}
Style &Style::operator=(const Style &source) {
if (this == &source)
return *this;
Clear(Colour(0,0,0), Colour(0xff,0xff,0xff),
0, 0, SC_CHARSET_DEFAULT,
false, false, false, false, true);
fore.desired = source.fore.desired;
back.desired = source.back.desired;
characterSet = source.characterSet;
bold = source.bold;
italic = source.italic;
size = source.size;
eolFilled = source.eolFilled;
underline = source.underline;
visible = source.visible;
return *this;
}
void Style::Clear(Colour fore_, Colour back_, int size_,
const char *fontName_, int characterSet_,
bool bold_, bool italic_, bool eolFilled_, bool underline_, bool visible_) {
fore.desired = fore_;
back.desired = back_;
characterSet = characterSet_;
bold = bold_;
italic = italic_;
size = size_;
fontName = fontName_;
eolFilled = eolFilled_;
underline = underline_;
visible = visible_;
if (aliasOfDefaultFont)
font.SetID(0);
else
font.Release();
aliasOfDefaultFont = false;
}
bool Style::EquivalentFontTo(const Style *other) const {
if (bold != other->bold ||
italic != other->italic ||
size != other->size ||
characterSet != other->characterSet)
return false;
if (fontName == other->fontName)
return true;
if (!fontName)
return false;
if (!other->fontName)
return false;
return strcmp(fontName, other->fontName) == 0;
}
void Style::Realise(Surface &surface, int zoomLevel, Style *defaultStyle) {
int sizeZoomed = size + zoomLevel;
if (sizeZoomed <= 2) // Hangs if sizeZoomed <= 1
sizeZoomed = 2;
if (aliasOfDefaultFont)
font.SetID(0);
else
font.Release();
int deviceHeight = surface.DeviceHeightFont(sizeZoomed);
aliasOfDefaultFont = defaultStyle &&
(EquivalentFontTo(defaultStyle) || !fontName);
if (aliasOfDefaultFont) {
font.SetID(defaultStyle->font.GetID());
} else if (fontName) {
font.Create(fontName, characterSet, deviceHeight, bold, italic);
} else {
font.SetID(0);
}
ascent = surface.Ascent(font);
descent = surface.Descent(font);
// Probably more typographically correct to include leading
// but that means more complex drawing as leading must be erased
//lineHeight = surface.ExternalLeading() + surface.Height();
externalLeading = surface.ExternalLeading(font);
lineHeight = surface.Height(font);
aveCharWidth = surface.AverageCharWidth(font);
spaceWidth = surface.WidthChar(font, ' ');
}

View File

@@ -0,0 +1,43 @@
// Scintilla source code edit control
// Style.h - defines the font and colour style for a class of text
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef STYLE_H
#define STYLE_H
class Style {
public:
ColourPair fore;
ColourPair back;
bool aliasOfDefaultFont;
bool bold;
bool italic;
int size;
const char *fontName;
int characterSet;
bool eolFilled;
bool underline;
bool visible;
Font font;
unsigned int lineHeight;
unsigned int ascent;
unsigned int descent;
unsigned int externalLeading;
unsigned int aveCharWidth;
unsigned int spaceWidth;
Style();
Style(const Style &source);
~Style();
Style &operator=(const Style &source);
void Clear(Colour fore_, Colour back_,
int size_,
const char *fontName_, int characterSet_,
bool bold_, bool italic_, bool eolFilled_, bool underline_, bool visible_);
bool EquivalentFontTo(const Style *other) const;
void Realise(Surface &surface, int zoomLevel, Style *defaultStyle=0);
};
#endif

View File

@@ -0,0 +1,77 @@
// UniConversion.h - functions to handle UFT-8 and UCS-2 strings
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <stdlib.h>
#include "UniConversion.h"
unsigned int UTF8Length(const wchar_t *uptr, unsigned int tlen) {
unsigned int len = 0;
for (unsigned int i = 0; i < tlen && uptr[i]; i++) {
unsigned int uch = uptr[i];
if (uch < 0x80)
len++;
else if (uch < 0x800)
len+=2;
else
len +=3;
}
return len;
}
void UTF8FromUCS2(const wchar_t *uptr, unsigned int tlen, char *putf, unsigned int len) {
int k = 0;
for (unsigned int i = 0; i < tlen && uptr[i]; i++) {
unsigned int uch = uptr[i];
if (uch < 0x80) {
putf[k++] = static_cast<char>(uch);
} else if (uch < 0x800) {
putf[k++] = static_cast<char>(0xC0 | (uch >> 6));
putf[k++] = static_cast<char>(0x80 | (uch & 0x3f));
} else {
putf[k++] = static_cast<char>(0xE0 | (uch >> 12));
putf[k++] = static_cast<char>(0x80 | ((uch >> 6) & 0x3f));
putf[k++] = static_cast<char>(0x80 | (uch & 0x3f));
}
}
putf[len] = '\0';
}
unsigned int UCS2Length(const char *s, unsigned int len) {
unsigned int ulen = 0;
for (unsigned int i=0;i<len;i++) {
unsigned char ch = static_cast<unsigned char>(s[i]);
if ((ch < 0x80) || (ch > (0x80 + 0x40)))
ulen++;
}
return ulen;
}
unsigned int UCS2FromUTF8(const char *s, unsigned int len, wchar_t *tbuf, unsigned int tlen) {
#ifdef USE_API
return ::MultiByteToWideChar(CP_UTF8, 0, s, len, tbuf, tlen);
#else
unsigned int ui=0;
const unsigned char *us = reinterpret_cast<const unsigned char *>(s);
unsigned int i=0;
while ((i<len) && (ui<tlen)) {
unsigned char ch = us[i++];
if (ch < 0x80) {
tbuf[ui] = ch;
} else if (ch < 0x80 + 0x40 + 0x20) {
tbuf[ui] = static_cast<wchar_t>((ch & 0x1F) << 6);
ch = us[i++];
tbuf[ui] = static_cast<wchar_t>(tbuf[ui] + (ch & 0x7F));
} else {
tbuf[ui] = static_cast<wchar_t>((ch & 0xF) << 12);
ch = us[i++];
tbuf[ui] = static_cast<wchar_t>(tbuf[ui] + ((ch & 0x7F) << 6));
ch = us[i++];
tbuf[ui] = static_cast<wchar_t>(tbuf[ui] + (ch & 0x7F));
}
ui++;
}
return ui;
#endif
}

View File

@@ -0,0 +1,9 @@
// UniConversion.h - functions to handle UFT-8 and UCS-2 strings
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
unsigned int UTF8Length(const wchar_t *uptr, unsigned int tlen);
void UTF8FromUCS2(const wchar_t *uptr, unsigned int tlen, char *putf, unsigned int len);
unsigned int UCS2Length(const char *s, unsigned int len);
unsigned int UCS2FromUTF8(const char *s, unsigned int len, wchar_t *tbuf, unsigned int tlen);

View File

@@ -0,0 +1,238 @@
// Scintilla source code edit control
// ViewStyle.cxx - store information on how the document is to be viewed
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <string.h>
#include "Platform.h"
#include "Scintilla.h"
#include "Indicator.h"
#include "LineMarker.h"
#include "Style.h"
#include "ViewStyle.h"
MarginStyle::MarginStyle() :
symbol(false), width(16), mask(0xffffffff), sensitive(false) {
}
// A list of the fontnames - avoids wasting space in each style
FontNames::FontNames() {
max = 0;
}
FontNames::~FontNames() {
Clear();
}
void FontNames::Clear() {
for (int i=0;i<max;i++) {
delete []names[i];
}
max = 0;
}
const char *FontNames::Save(const char *name) {
if (!name)
return 0;
for (int i=0;i<max;i++) {
if (strcmp(names[i], name) == 0) {
return names[i];
}
}
names[max] = new char[strlen(name) + 1];
strcpy(names[max], name);
max++;
return names[max-1];
}
ViewStyle::ViewStyle() {
Init();
}
ViewStyle::ViewStyle(const ViewStyle &source) {
Init();
for (unsigned int sty=0;sty<(sizeof(styles)/sizeof(styles[0]));sty++) {
styles[sty] = source.styles[sty];
// Can't just copy fontname as its lifetime is relative to its owning ViewStyle
styles[sty].fontName = fontNames.Save(source.styles[sty].fontName);
}
for (int mrk=0;mrk<=MARKER_MAX;mrk++) {
markers[mrk] = source.markers[mrk];
}
for (int ind=0;ind<=INDIC_MAX;ind++) {
indicators[ind] = source.indicators[ind];
}
selforeset = source.selforeset;
selforeground.desired = source.selforeground.desired;
selbackset = source.selbackset;
selbackground.desired = source.selbackground.desired;
selbackground2.desired = source.selbackground2.desired;
selbar.desired = source.selbar.desired;
selbarlight.desired = source.selbarlight.desired;
caretcolour.desired = source.caretcolour.desired;
edgecolour.desired = source.edgecolour.desired;
edgeState = source.edgeState;
leftMarginWidth = source.leftMarginWidth;
rightMarginWidth = source.rightMarginWidth;
for (int i=0;i < margins; i++) {
ms[i] = source.ms[i];
}
symbolMargin = source.symbolMargin;
maskInLine = source.maskInLine;
fixedColumnWidth = source.fixedColumnWidth;
zoomLevel = source.zoomLevel;
viewWhitespace = source.viewWhitespace;
viewIndentationGuides = source.viewIndentationGuides;
viewEOL = source.viewEOL;
showMarkedLines = source.showMarkedLines;
}
ViewStyle::~ViewStyle() {
}
void ViewStyle::Init() {
fontNames.Clear();
ResetDefaultStyle();
indicators[0].style = INDIC_SQUIGGLE;
indicators[0].fore = Colour(0, 0x7f, 0);
indicators[1].style = INDIC_TT;
indicators[1].fore = Colour(0, 0, 0xff);
indicators[2].style = INDIC_PLAIN;
indicators[2].fore = Colour(0xff, 0, 0);
lineHeight = 1;
maxAscent = 1;
maxDescent = 1;
aveCharWidth = 8;
spaceWidth = 8;
selforeset = false;
selforeground.desired = Colour(0xff, 0, 0);
selbackset = true;
selbackground.desired = Colour(0xc0, 0xc0, 0xc0);
selbackground2.desired = Colour(0xb0, 0xb0, 0xb0);
selbar.desired = Platform::Chrome();
selbarlight.desired = Platform::ChromeHighlight();
styles[STYLE_LINENUMBER].fore.desired = Colour(0, 0, 0);
styles[STYLE_LINENUMBER].back.desired = Platform::Chrome();
//caretcolour.desired = Colour(0xff, 0, 0);
caretcolour.desired = Colour(0, 0, 0);
edgecolour.desired = Colour(0xc0, 0xc0, 0xc0);
edgeState = EDGE_NONE;
leftMarginWidth = 1;
rightMarginWidth = 1;
ms[0].symbol = false;
ms[0].width = 0;
ms[0].mask = 0;
ms[1].symbol = true;
ms[1].width = 16;
ms[1].mask = ~SC_MASK_FOLDERS;
ms[2].symbol = true;
ms[2].width = 14; // Nice width for arrows
ms[2].mask = SC_MASK_FOLDERS;
ms[2].width = 0; // Nice width for arrows
ms[2].mask = 0;
fixedColumnWidth = leftMarginWidth;
symbolMargin = false;
maskInLine = 0xffffffff;
for (int margin=0; margin < margins; margin++) {
fixedColumnWidth += ms[margin].width;
symbolMargin = symbolMargin || ms[margin].symbol;
if (ms[margin].width > 0)
maskInLine &= ~ms[margin].mask;
}
zoomLevel = 0;
viewWhitespace = wsInvisible;
viewIndentationGuides = false;
viewEOL = false;
showMarkedLines = true;
}
void ViewStyle::RefreshColourPalette(Palette &pal, bool want) {
unsigned int i;
for (i=0;i<(sizeof(styles)/sizeof(styles[0]));i++) {
pal.WantFind(styles[i].fore, want);
pal.WantFind(styles[i].back, want);
}
for (i=0;i<(sizeof(indicators)/sizeof(indicators[0]));i++) {
pal.WantFind(indicators[i].fore, want);
}
for (i=0;i<(sizeof(markers)/sizeof(markers[0]));i++) {
pal.WantFind(markers[i].fore, want);
pal.WantFind(markers[i].back, want);
}
pal.WantFind(selforeground, want);
pal.WantFind(selbackground, want);
pal.WantFind(selbackground2, want);
pal.WantFind(selbar, want);
pal.WantFind(selbarlight, want);
pal.WantFind(caretcolour, want);
pal.WantFind(edgecolour, want);
}
void ViewStyle::Refresh(Surface &surface) {
selbar.desired = Platform::Chrome();
selbarlight.desired = Platform::ChromeHighlight();
styles[STYLE_DEFAULT].Realise(surface, zoomLevel);
maxAscent = styles[STYLE_DEFAULT].ascent;
maxDescent = styles[STYLE_DEFAULT].descent;
for (unsigned int i=0;i<(sizeof(styles)/sizeof(styles[0]));i++) {
if (i != STYLE_DEFAULT) {
styles[i].Realise(surface, zoomLevel, &styles[STYLE_DEFAULT]);
if (maxAscent < styles[i].ascent)
maxAscent = styles[i].ascent;
if (maxDescent < styles[i].descent)
maxDescent = styles[i].descent;
}
}
lineHeight = maxAscent + maxDescent;
aveCharWidth = styles[STYLE_DEFAULT].aveCharWidth;
spaceWidth = styles[STYLE_DEFAULT].spaceWidth;
fixedColumnWidth = leftMarginWidth;
symbolMargin = false;
maskInLine = 0xffffffff;
for (int margin=0; margin < margins; margin++) {
fixedColumnWidth += ms[margin].width;
symbolMargin = symbolMargin || ms[margin].symbol;
if (ms[margin].width > 0)
maskInLine &= ~ms[margin].mask;
}
}
void ViewStyle::ResetDefaultStyle() {
styles[STYLE_DEFAULT].Clear(Colour(0,0,0), Colour(0xff,0xff,0xff),
Platform::DefaultFontSize(), fontNames.Save(Platform::DefaultFont()),
SC_CHARSET_DEFAULT,
false, false, false, false, true);
}
void ViewStyle::ClearStyles() {
// Reset all styles to be like the default style
for (unsigned int i=0;i<(sizeof(styles)/sizeof(styles[0]));i++) {
if (i != STYLE_DEFAULT) {
styles[i].Clear(
styles[STYLE_DEFAULT].fore.desired,
styles[STYLE_DEFAULT].back.desired,
styles[STYLE_DEFAULT].size,
styles[STYLE_DEFAULT].fontName,
styles[STYLE_DEFAULT].characterSet,
styles[STYLE_DEFAULT].bold,
styles[STYLE_DEFAULT].italic,
styles[STYLE_DEFAULT].eolFilled,
styles[STYLE_DEFAULT].underline,
styles[STYLE_DEFAULT].visible);
}
}
styles[STYLE_LINENUMBER].back.desired = Platform::Chrome();
}
void ViewStyle::SetStyleFontName(int styleIndex, const char *name) {
styles[styleIndex].fontName = fontNames.Save(name);
}

View File

@@ -0,0 +1,76 @@
// Scintilla source code edit control
// ViewStyle.h - store information on how the document is to be viewed
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef VIEWSTYLE_H
#define VIEWSTYLE_H
class MarginStyle {
public:
bool symbol;
int width;
int mask;
bool sensitive;
MarginStyle();
};
class FontNames {
private:
char *names[STYLE_MAX + 1];
int max;
public:
FontNames();
~FontNames();
void Clear();
const char *Save(const char *name);
};
enum WhiteSpaceVisibility {wsInvisible=0, wsVisibleAlways=1, wsVisibleAfterIndent=2};
class ViewStyle {
public:
FontNames fontNames;
Style styles[STYLE_MAX + 1];
LineMarker markers[MARKER_MAX + 1];
Indicator indicators[INDIC_MAX + 1];
int lineHeight;
unsigned int maxAscent;
unsigned int maxDescent;
unsigned int aveCharWidth;
unsigned int spaceWidth;
bool selforeset;
ColourPair selforeground;
bool selbackset;
ColourPair selbackground;
ColourPair selbackground2;
ColourPair selbar;
ColourPair selbarlight;
// Margins are ordered: Line Numbers, Selection Margin, Spacing Margin
int leftMarginWidth; // Spacing margin on left of text
int rightMarginWidth; // Spacing margin on left of text
enum { margins=3 };
bool symbolMargin;
int maskInLine; // Mask for markers to be put into text because there is nowhere for them to go in margin
MarginStyle ms[margins];
int fixedColumnWidth;
int zoomLevel;
WhiteSpaceVisibility viewWhitespace;
bool viewIndentationGuides;
bool viewEOL;
bool showMarkedLines;
ColourPair caretcolour;
ColourPair edgecolour;
int edgeState;
ViewStyle();
ViewStyle(const ViewStyle &source);
~ViewStyle();
void Init();
void RefreshColourPalette(Palette &pal, bool want);
void Refresh(Surface &surface);
void ResetDefaultStyle();
void ClearStyles();
void SetStyleFontName(int styleIndex, const char *name);
};
#endif

View File

@@ -0,0 +1,175 @@
// SciTE - Scintilla based Text Editor
// Accessor.cxx - rapid easy access to contents of a Scintilla
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
#include "Platform.h"
#include "PropSet.h"
#include "Accessor.h"
#include "WindowAccessor.h"
#include "Scintilla.h"
WindowAccessor::~WindowAccessor() {
}
#if PLAT_WIN
bool WindowAccessor::InternalIsLeadByte(char ch) {
if (SC_CP_UTF8 == codePage)
// For lexing, all characters >= 0x80 are treated the
// same so none is considered a lead byte.
return false;
else
return IsDBCSLeadByteEx(codePage, ch);
}
#else
// PLAT_GTK or PLAT_WX
// TODO: support DBCS under GTK+ and WX
bool WindowAccessor::InternalIsLeadByte(char) {
return false;
}
#endif
void WindowAccessor::Fill(int position) {
if (lenDoc == -1)
lenDoc = Platform::SendScintilla(id, SCI_GETTEXTLENGTH, 0, 0);
startPos = position - slopSize;
if (startPos + bufferSize > lenDoc)
startPos = lenDoc - bufferSize;
if (startPos < 0)
startPos = 0;
endPos = startPos + bufferSize;
if (endPos > lenDoc)
endPos = lenDoc;
TextRange tr = {{startPos, endPos}, buf};
Platform::SendScintilla(id, SCI_GETTEXTRANGE, 0, reinterpret_cast<long>(&tr));
}
char WindowAccessor::StyleAt(int position) {
return static_cast<char>(Platform::SendScintilla(
id, SCI_GETSTYLEAT, position, 0));
}
int WindowAccessor::GetLine(int position) {
return Platform::SendScintilla(id, SCI_LINEFROMPOSITION, position, 0);
}
int WindowAccessor::LineStart(int line) {
return Platform::SendScintilla(id, SCI_POSITIONFROMLINE, line, 0);
}
int WindowAccessor::LevelAt(int line) {
return Platform::SendScintilla(id, SCI_GETFOLDLEVEL, line, 0);
}
int WindowAccessor::Length() {
if (lenDoc == -1)
lenDoc = Platform::SendScintilla(id, SCI_GETTEXTLENGTH, 0, 0);
return lenDoc;
}
int WindowAccessor::GetLineState(int line) {
return Platform::SendScintilla(id, SCI_GETLINESTATE, line);
}
int WindowAccessor::SetLineState(int line, int state) {
return Platform::SendScintilla(id, SCI_SETLINESTATE, line, state);
}
void WindowAccessor::StartAt(unsigned int start, char chMask) {
Platform::SendScintilla(id, SCI_STARTSTYLING, start, chMask);
}
void WindowAccessor::StartSegment(unsigned int pos) {
startSeg = pos;
}
void WindowAccessor::ColourTo(unsigned int pos, int chAttr) {
// Only perform styling if non empty range
if (pos != startSeg - 1) {
if (pos < startSeg) {
Platform::DebugPrintf("Bad colour positions %d - %d\n", startSeg, pos);
}
if (validLen + (pos - startSeg + 1) >= bufferSize)
Flush();
if (validLen + (pos - startSeg + 1) >= bufferSize) {
// Too big for buffer so send directly
Platform::SendScintilla(id, SCI_SETSTYLING, pos - startSeg + 1, chAttr);
} else {
if (chAttr != chWhile)
chFlags = 0;
chAttr |= chFlags;
for (unsigned int i = startSeg; i <= pos; i++) {
styleBuf[validLen++] = static_cast<char>(chAttr);
}
}
}
startSeg = pos+1;
}
void WindowAccessor::SetLevel(int line, int level) {
Platform::SendScintilla(id, SCI_SETFOLDLEVEL, line, level);
}
void WindowAccessor::Flush() {
startPos = extremePosition;
lenDoc = -1;
if (validLen > 0) {
Platform::SendScintilla(id, SCI_SETSTYLINGEX, validLen,
reinterpret_cast<long>(styleBuf));
validLen = 0;
}
}
int WindowAccessor::IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader) {
int end = Length();
int spaceFlags = 0;
// Determines the indentation level of the current line and also checks for consistent
// indentation compared to the previous line.
// Indentation is judged consistent when the indentation whitespace of each line lines
// the same or the indentation of one line is a prefix of the other.
int pos = LineStart(line);
char ch = (*this)[pos];
int indent = 0;
bool inPrevPrefix = line > 0;
int posPrev = inPrevPrefix ? LineStart(line-1) : 0;
while ((ch == ' ' || ch == '\t') && (pos < end)) {
if (inPrevPrefix) {
char chPrev = (*this)[posPrev++];
if (chPrev == ' ' || chPrev == '\t') {
if (chPrev != ch)
spaceFlags |= wsInconsistent;
} else {
inPrevPrefix = false;
}
}
if (ch == ' ') {
spaceFlags |= wsSpace;
indent++;
} else { // Tab
spaceFlags |= wsTab;
if (spaceFlags & wsSpace)
spaceFlags |= wsSpaceTab;
indent = (indent / 8 + 1) * 8;
}
ch = (*this)[++pos];
}
*flags = spaceFlags;
indent += SC_FOLDLEVELBASE;
// if completely empty line or the start of a comment...
if (isspace(ch) || (pfnIsCommentLeader && (*pfnIsCommentLeader)(*this, pos, end-pos)) )
return indent | SC_FOLDLEVELWHITEFLAG;
else
return indent;
}

1729
contrib/src/stc/stc.cpp Normal file

File diff suppressed because it is too large Load Diff

523
contrib/src/stc/stc.cpp.in Normal file
View File

@@ -0,0 +1,523 @@
////////////////////////////////////////////////////////////////////////////
// Name: stc.cpp
// Purpose: A wxWindows implementation of Scintilla. This class is the
// one meant to be used directly by wx applications. It does not
// derive directly from the Scintilla classes, but instead
// delegates most things to the real Scintilla class.
// This allows the use of Scintilla without polluting the
// namespace with all the classes and identifiers from Scintilla.
//
// Author: Robin Dunn
//
// Created: 13-Jan-2000
// RCS-ID: $Id$
// Copyright: (c) 2000 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#include <ctype.h>
#include "wx/stc/stc.h"
#include "ScintillaWX.h"
#include <wx/tokenzr.h>
// The following code forces a reference to all of the Scintilla lexers.
// If we don't do something like this, then the linker tends to "optimize"
// them away. (eric@sourcegear.com)
int wxForceScintillaLexers(void)
{
extern LexerModule lmCPP;
extern LexerModule lmHTML;
extern LexerModule lmXML;
extern LexerModule lmProps;
extern LexerModule lmErrorList;
extern LexerModule lmMake;
extern LexerModule lmBatch;
extern LexerModule lmPerl;
extern LexerModule lmPython;
extern LexerModule lmSQL;
extern LexerModule lmVB;
if (
&lmCPP
&& &lmHTML
&& &lmXML
&& &lmProps
&& &lmErrorList
&& &lmMake
&& &lmBatch
&& &lmPerl
&& &lmPython
&& &lmSQL
&& &lmVB
)
{
return 1;
}
else
{
return 0;
}
}
//----------------------------------------------------------------------
const wxChar* wxSTCNameStr = "stcwindow";
BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
EVT_PAINT (wxStyledTextCtrl::OnPaint)
EVT_SCROLLWIN (wxStyledTextCtrl::OnScrollWin)
EVT_SIZE (wxStyledTextCtrl::OnSize)
EVT_LEFT_DOWN (wxStyledTextCtrl::OnMouseLeftDown)
EVT_MOTION (wxStyledTextCtrl::OnMouseMove)
EVT_LEFT_UP (wxStyledTextCtrl::OnMouseLeftUp)
EVT_RIGHT_UP (wxStyledTextCtrl::OnMouseRightUp)
EVT_CHAR (wxStyledTextCtrl::OnChar)
EVT_KEY_DOWN (wxStyledTextCtrl::OnKeyDown)
EVT_KILL_FOCUS (wxStyledTextCtrl::OnLoseFocus)
EVT_SET_FOCUS (wxStyledTextCtrl::OnGainFocus)
EVT_SYS_COLOUR_CHANGED (wxStyledTextCtrl::OnSysColourChanged)
EVT_ERASE_BACKGROUND (wxStyledTextCtrl::OnEraseBackground)
EVT_MENU_RANGE (-1, -1, wxStyledTextCtrl::OnMenu)
EVT_LISTBOX_DCLICK (-1, wxStyledTextCtrl::OnListBox)
END_EVENT_TABLE()
IMPLEMENT_CLASS(wxStyledTextCtrl, wxControl)
IMPLEMENT_DYNAMIC_CLASS(wxStyledTextEvent, wxCommandEvent)
//----------------------------------------------------------------------
// Constructor and Destructor
wxStyledTextCtrl::wxStyledTextCtrl(wxWindow *parent,
wxWindowID id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString& name) :
wxControl(parent, id, pos, size,
style | wxVSCROLL | wxHSCROLL | wxWANTS_CHARS | wxCLIP_CHILDREN,
wxDefaultValidator, name)
{
m_swx = new ScintillaWX(this);
m_stopWatch.Start();
}
wxStyledTextCtrl::~wxStyledTextCtrl() {
delete m_swx;
}
//----------------------------------------------------------------------
long wxStyledTextCtrl::SendMsg(int msg, long wp, long lp) {
return m_swx->WndProc(msg, wp, lp);
}
#ifdef MAKELONG
#undef MAKELONG
#endif
#define MAKELONG(a, b) ((a) | ((b) << 16))
static long wxColourAsLong(const wxColour& co) {
return (((long)co.Blue() << 16) |
((long)co.Green() << 8) |
((long)co.Red()));
}
static wxColour wxColourFromLong(long c) {
wxColour clr;
clr.Set(c & 0xff, (c >> 8) & 0xff, (c >> 16) & 0xff);
return clr;
}
static wxColour wxColourFromSpec(const wxString& spec) {
// spec should be #RRGGBB
char* junk;
int red = strtol(spec.Mid(1,2), &junk, 16);
int green = strtol(spec.Mid(3,2), &junk, 16);
int blue = strtol(spec.Mid(5,2), &junk, 16);
return wxColour(red, green, blue);
}
//----------------------------------------------------------------------
// BEGIN generated section. The following code is automatically generated
// by gen_iface.py from the contents of Scintilla.iface. Do not edit
// this file. Edit stc.cpp.in or gen_iface.py instead and regenerate.
%(METHOD_IMPS)s
// END of generated section
//----------------------------------------------------------------------
// Returns the line number of the line with the caret.
int wxStyledTextCtrl::GetCurrentLine() {
int line = LineFromPosition(GetCurrentPos());
return line;
}
// Extract style settings from a spec-string which is composed of one or
// more of the following comma separated elements:
//
// bold turns on bold
// italic turns on italics
// fore:#RRGGBB sets the foreground colour
// back:#RRGGBB sets the background colour
// face:[facename] sets the font face name to use
// size:[num] sets the font size in points
// eol turns on eol filling
// underline turns on underlining
//
void wxStyledTextCtrl::StyleSetSpec(int styleNum, const wxString& spec) {
wxStringTokenizer tkz(spec, ",");
while (tkz.HasMoreTokens()) {
wxString token = tkz.GetNextToken();
wxString option = token.BeforeFirst(':');
wxString val = token.AfterFirst(':');
if (option == "bold")
StyleSetBold(styleNum, true);
else if (option == "italic")
StyleSetItalic(styleNum, true);
else if (option == "underline")
StyleSetUnderline(styleNum, true);
else if (option == "eol")
StyleSetEOLFilled(styleNum, true);
else if (option == "size") {
long points;
if (val.ToLong(&points))
StyleSetSize(styleNum, points);
}
else if (option == "face")
StyleSetFaceName(styleNum, val);
else if (option == "fore")
StyleSetForeground(styleNum, wxColourFromSpec(val));
else if (option == "back")
StyleSetBackground(styleNum, wxColourFromSpec(val));
}
}
// Set style size, face, bold, italic, and underline attributes from
// a wxFont's attributes.
void wxStyledTextCtrl::StyleSetFont(int styleNum, wxFont& font) {
int size = font.GetPointSize();
wxString faceName = font.GetFaceName();
bool bold = font.GetWeight() == wxBOLD;
bool italic = font.GetStyle() != wxNORMAL;
bool under = font.GetUnderlined();
// TODO: add encoding/charset mapping
StyleSetFontAttr(styleNum, size, faceName, bold, italic, under);
}
// Set all font style attributes at once.
void wxStyledTextCtrl::StyleSetFontAttr(int styleNum, int size,
const wxString& faceName,
bool bold, bool italic,
bool underline) {
StyleSetSize(styleNum, size);
StyleSetFaceName(styleNum, faceName);
StyleSetBold(styleNum, bold);
StyleSetItalic(styleNum, italic);
StyleSetUnderline(styleNum, underline);
// TODO: add encoding/charset mapping
}
// Perform one of the operations defined by the wxSTC_CMD_* constants.
void wxStyledTextCtrl::CmdKeyExecute(int cmd) {
SendMsg(cmd);
}
// Set the left and right margin in the edit area, measured in pixels.
void wxStyledTextCtrl::SetMargins(int left, int right) {
SetMarginLeft(left);
SetMarginRight(right);
}
// Retrieve the start and end positions of the current selection.
void wxStyledTextCtrl::GetSelection(int* startPos, int* endPos) {
if (startPos != NULL)
*startPos = SendMsg(SCI_GETSELECTIONSTART);
if (endPos != NULL)
*endPos = SendMsg(SCI_GETSELECTIONEND);
}
// Retrieve the point in the window where a position is displayed.
wxPoint wxStyledTextCtrl::PointFromPosition(int pos) {
int x = SendMsg(SCI_POINTXFROMPOSITION, 0, pos);
int y = SendMsg(SCI_POINTYFROMPOSITION, 0, pos);
return wxPoint(x, y);
}
// Scroll enough to make the given line visible
void wxStyledTextCtrl::ScrollToLine(int line) {
m_swx->DoScrollToLine(line);
}
// Scroll enough to make the given column visible
void wxStyledTextCtrl::ScrollToColumn(int column) {
m_swx->DoScrollToColumn(column);
}
//----------------------------------------------------------------------
// Event handlers
void wxStyledTextCtrl::OnPaint(wxPaintEvent& evt) {
wxPaintDC dc(this);
wxRegion region = GetUpdateRegion();
m_swx->DoPaint(&dc, region.GetBox());
}
void wxStyledTextCtrl::OnScrollWin(wxScrollWinEvent& evt) {
if (evt.GetOrientation() == wxHORIZONTAL)
m_swx->DoHScroll(evt.GetEventType(), evt.GetPosition());
else
m_swx->DoVScroll(evt.GetEventType(), evt.GetPosition());
}
void wxStyledTextCtrl::OnSize(wxSizeEvent& evt) {
wxSize sz = GetClientSize();
m_swx->DoSize(sz.x, sz.y);
}
void wxStyledTextCtrl::OnMouseLeftDown(wxMouseEvent& evt) {
wxPoint pt = evt.GetPosition();
m_swx->DoButtonDown(Point(pt.x, pt.y), m_stopWatch.Time(),
evt.ShiftDown(), evt.ControlDown(), evt.AltDown());
}
void wxStyledTextCtrl::OnMouseMove(wxMouseEvent& evt) {
wxPoint pt = evt.GetPosition();
m_swx->DoButtonMove(Point(pt.x, pt.y));
}
void wxStyledTextCtrl::OnMouseLeftUp(wxMouseEvent& evt) {
wxPoint pt = evt.GetPosition();
m_swx->DoButtonUp(Point(pt.x, pt.y), m_stopWatch.Time(),
evt.ControlDown());
}
void wxStyledTextCtrl::OnMouseRightUp(wxMouseEvent& evt) {
wxPoint pt = evt.GetPosition();
m_swx->DoContextMenu(Point(pt.x, pt.y));
}
void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
long key = evt.KeyCode();
if ((key > WXK_ESCAPE) &&
(key != WXK_DELETE) && (key < 255) &&
!evt.ControlDown() && !evt.AltDown()) {
m_swx->DoAddChar(key);
}
else {
evt.Skip();
}
}
void wxStyledTextCtrl::OnKeyDown(wxKeyEvent& evt) {
long key = evt.KeyCode();
key = toupper(key);
int processed = m_swx->DoKeyDown(key, evt.ShiftDown(),
evt.ControlDown(), evt.AltDown());
if (! processed)
evt.Skip();
}
void wxStyledTextCtrl::OnLoseFocus(wxFocusEvent& evt) {
m_swx->DoLoseFocus();
}
void wxStyledTextCtrl::OnGainFocus(wxFocusEvent& evt) {
m_swx->DoGainFocus();
}
void wxStyledTextCtrl::OnSysColourChanged(wxSysColourChangedEvent& evt) {
m_swx->DoSysColourChange();
}
void wxStyledTextCtrl::OnEraseBackground(wxEraseEvent& evt) {
// do nothing to help avoid flashing
}
void wxStyledTextCtrl::OnMenu(wxCommandEvent& evt) {
m_swx->DoCommand(evt.GetId());
}
void wxStyledTextCtrl::OnListBox(wxCommandEvent& evt) {
m_swx->DoOnListBox();
}
//----------------------------------------------------------------------
// Turn notifications from Scintilla into events
void wxStyledTextCtrl::NotifyChange() {
wxStyledTextEvent evt(wxEVT_STC_CHANGE, GetId());
GetEventHandler()->ProcessEvent(evt);
}
void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) {
SCNotification& scn = *_scn;
int eventType = 0;
switch (scn.nmhdr.code) {
case SCN_STYLENEEDED:
eventType = wxEVT_STC_STYLENEEDED;
break;
case SCN_CHARADDED:
eventType = wxEVT_STC_CHARADDED;
break;
case SCN_UPDATEUI:
eventType = wxEVT_STC_UPDATEUI;
break;
case SCN_SAVEPOINTREACHED:
eventType = wxEVT_STC_SAVEPOINTREACHED;
break;
case SCN_SAVEPOINTLEFT:
eventType = wxEVT_STC_SAVEPOINTLEFT;
break;
case SCN_MODIFYATTEMPTRO:
eventType = wxEVT_STC_ROMODIFYATTEMPT;
break;
case SCN_DOUBLECLICK:
eventType = wxEVT_STC_DOUBLECLICK;
break;
case SCN_MODIFIED:
eventType = wxEVT_STC_MODIFIED;
break;
case SCN_KEY:
eventType = wxEVT_STC_KEY;
break;
case SCN_MACRORECORD:
eventType = wxEVT_STC_MACRORECORD;
break;
case SCN_MARGINCLICK:
eventType = wxEVT_STC_MARGINCLICK;
break;
case SCN_NEEDSHOWN:
eventType = wxEVT_STC_NEEDSHOWN;
break;
case SCN_POSCHANGED:
eventType = wxEVT_STC_POSCHANGED;
break;
}
if (eventType) {
wxStyledTextEvent evt(eventType, GetId());
evt.SetPosition(scn.position);
evt.SetKey(scn.ch);
evt.SetModifiers(scn.modifiers);
if (eventType == wxEVT_STC_MODIFIED) {
evt.SetModificationType(scn.modificationType);
if (scn.text)
evt.SetText(wxString(scn.text, scn.length));
evt.SetLength(scn.length);
evt.SetLinesAdded(scn.linesAdded);
evt.SetLine(scn.line);
evt.SetFoldLevelNow(scn.foldLevelNow);
evt.SetFoldLevelPrev(scn.foldLevelPrev);
}
if (eventType == wxEVT_STC_MARGINCLICK)
evt.SetMargin(scn.margin);
if (eventType == wxEVT_STC_MACRORECORD) {
evt.SetMessage(scn.message);
evt.SetWParam(scn.wParam);
evt.SetLParam(scn.lParam);
}
GetEventHandler()->ProcessEvent(evt);
}
}
//----------------------------------------------------------------------
//----------------------------------------------------------------------
//----------------------------------------------------------------------
wxStyledTextEvent::wxStyledTextEvent(wxEventType commandType, int id)
: wxCommandEvent(commandType, id)
{
m_position = 0;
m_key = 0;
m_modifiers = 0;
m_modificationType = 0;
m_length = 0;
m_linesAdded = 0;
m_line = 0;
m_foldLevelNow = 0;
m_foldLevelPrev = 0;
m_margin = 0;
m_message = 0;
m_wParam = 0;
m_lParam = 0;
}
bool wxStyledTextEvent::GetShift() const { return (m_modifiers & SCI_SHIFT) != 0; }
bool wxStyledTextEvent::GetControl() const { return (m_modifiers & SCI_CTRL) != 0; }
bool wxStyledTextEvent::GetAlt() const { return (m_modifiers & SCI_ALT) != 0; }
void wxStyledTextEvent::CopyObject(wxObject& obj) const {
wxCommandEvent::CopyObject(obj);
wxStyledTextEvent* o = (wxStyledTextEvent*)&obj;
o->m_position = m_position;
o->m_key = m_key;
o->m_modifiers = m_modifiers;
o->m_modificationType = m_modificationType;
o->m_text = m_text;
o->m_length = m_length;
o->m_linesAdded = m_linesAdded;
o->m_line = m_line;
o->m_foldLevelNow = m_foldLevelNow;
o->m_foldLevelPrev = m_foldLevelPrev;
o->m_margin = m_margin;
o->m_message = m_message;
o->m_wParam = m_wParam;
o->m_lParam = m_lParam;
}
//----------------------------------------------------------------------
//----------------------------------------------------------------------

297
contrib/src/stc/stc.h.in Normal file
View File

@@ -0,0 +1,297 @@
////////////////////////////////////////////////////////////////////////////
// Name: stc.h
// Purpose: A wxWindows implementation of Scintilla. This class is the
// one meant to be used directly by wx applications. It does not
// derive directly from the Scintilla classes, and in fact there
// is no mention of Scintilla classes at all in this header.
// This class delegates all method calls and events to the
// Scintilla objects and so forth. This allows the use of
// Scintilla without polluting the namespace with all the
// classes and itentifiers from Scintilla.
//
// Author: Robin Dunn
//
// Created: 13-Jan-2000
// RCS-ID: $Id$
// Copyright: (c) 2000 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifndef __stc_h__
#define __stc_h__
#include <wx/wx.h>
//----------------------------------------------------------------------
// BEGIN generated section. The following code is automatically generated
// by gen_iface.py. Do not edit this file. Edit stc.h.in instead
// and regenerate
%(VALUES)s
// END of generated section
//----------------------------------------------------------------------
// Others
#define wxSTC_MASK_FOLDERS ((1 << wxSTC_MARKNUM_FOLDER) | (1 << wxSTC_MARKNUM_FOLDEROPEN))
//----------------------------------------------------------------------
class ScintillaWX; // forward declare
class WordList;
struct SCNotification;
extern const wxChar* wxSTCNameStr;
//----------------------------------------------------------------------
class wxStyledTextCtrl : public wxControl {
public:
#ifdef SWIG
wxStyledTextCtrl(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const char* name = "styledtext");
#else
wxStyledTextCtrl(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxString& name = wxSTCNameStr);
#endif
#ifndef SWIG
~wxStyledTextCtrl();
#endif
//----------------------------------------------------------------------
// BEGIN generated section. The following code is automatically generated
// by gen_iface.py. Do not edit this file. Edit stc.h.in instead
// and regenerate
%(METHOD_DEFS)s
// END of generated section
//----------------------------------------------------------------------
// Others...
// Returns the line number of the line with the caret.
int GetCurrentLine();
// Extract style settings from a spec-string which is composed of one or
// more of the following comma separated elements:
//
// bold turns on bold
// italic turns on italics
// fore:#RRGGBB sets the foreground colour
// back:#RRGGBB sets the background colour
// face:[facename] sets the font face name to use
// size:[num] sets the font size in points
// eol turns on eol filling
// underline turns on underlining
//
void StyleSetSpec(int styleNum, const wxString& spec);
// Set style size, face, bold, italic, and underline attributes from
// a wxFont's attributes.
void StyleSetFont(int styleNum, wxFont& font);
// Set all font style attributes at once.
void StyleSetFontAttr(int styleNum, int size,
const wxString& faceName,
bool bold, bool italic,
bool underline);
// Perform one of the operations defined by the wxSTC_CMD_* constants.
void CmdKeyExecute(int cmd);
// Set the left and right margin in the edit area, measured in pixels.
void SetMargins(int left, int right);
// Retrieve the start and end positions of the current selection.
#ifdef SWIG
void GetSelection(int* OUTPUT, int* OUTPUT);
#else
void GetSelection(int* startPos, int* endPos);
#endif
// Retrieve the point in the window where a position is displayed.
wxPoint PointFromPosition(int pos);
// Scroll enough to make the given line visible
void ScrollToLine(int line);
// Scroll enough to make the given column visible
void ScrollToColumn(int column);
//----------------------------------------------------------------------
#ifndef SWIG
private:
// Event handlers
void OnPaint(wxPaintEvent& evt);
void OnScrollWin(wxScrollWinEvent& evt);
void OnSize(wxSizeEvent& evt);
void OnMouseLeftDown(wxMouseEvent& evt);
void OnMouseMove(wxMouseEvent& evt);
void OnMouseLeftUp(wxMouseEvent& evt);
void OnMouseRightUp(wxMouseEvent& evt);
void OnChar(wxKeyEvent& evt);
void OnKeyDown(wxKeyEvent& evt);
void OnLoseFocus(wxFocusEvent& evt);
void OnGainFocus(wxFocusEvent& evt);
void OnSysColourChanged(wxSysColourChangedEvent& evt);
void OnEraseBackground(wxEraseEvent& evt);
void OnMenu(wxCommandEvent& evt);
void OnListBox(wxCommandEvent& evt);
// Turn notifications from Scintilla into events
void NotifyChange();
void NotifyParent(SCNotification* scn);
long SendMsg(int msg, long wp=0, long lp=0);
private:
DECLARE_EVENT_TABLE()
DECLARE_CLASS(wxStyledTextCtrl)
ScintillaWX* m_swx;
wxStopWatch m_stopWatch;
friend class ScintillaWX;
friend class Platform;
#endif
};
//----------------------------------------------------------------------
class wxStyledTextEvent : public wxCommandEvent {
public:
wxStyledTextEvent(wxEventType commandType=0, int id=0);
~wxStyledTextEvent() {}
void SetPosition(int pos) { m_position = pos; }
void SetKey(int k) { m_key = k; }
void SetModifiers(int m) { m_modifiers = m; }
void SetModificationType(int t) { m_modificationType = t; }
void SetText(const char* t) { m_text = t; }
void SetLength(int len) { m_length = len; }
void SetLinesAdded(int num) { m_linesAdded = num; }
void SetLine(int val) { m_line = val; }
void SetFoldLevelNow(int val) { m_foldLevelNow = val; }
void SetFoldLevelPrev(int val) { m_foldLevelPrev = val; }
void SetMargin(int val) { m_margin = val; }
void SetMessage(int val) { m_message = val; }
void SetWParam(int val) { m_wParam = val; }
void SetLParam(int val) { m_lParam = val; }
int GetPosition() const { return m_position; }
int GetKey() const { return m_key; }
int GetModifiers() const { return m_modifiers; }
int GetModificationType() const { return m_modificationType; }
wxString GetText() const { return m_text; }
int GetLength() const { return m_length; }
int GetLinesAdded() const { return m_linesAdded; }
int GetLine() const { return m_line; }
int GetFoldLevelNow() const { return m_foldLevelNow; }
int GetFoldLevelPrev() const { return m_foldLevelPrev; }
int GetMargin() const { return m_margin; }
int GetMessage() const { return m_message; }
int GetWParam() const { return m_wParam; }
int GetLParam() const { return m_lParam; }
bool GetShift() const;
bool GetControl() const;
bool GetAlt() const;
void CopyObject(wxObject& obj) const;
#ifndef SWIG
private:
DECLARE_DYNAMIC_CLASS(wxStyledTextEvent)
int m_position;
int m_key;
int m_modifiers;
int m_modificationType; // wxEVT_STC_MODIFIED
wxString m_text;
int m_length;
int m_linesAdded;
int m_line;
int m_foldLevelNow;
int m_foldLevelPrev;
int m_margin; // wxEVT_STC_MARGINCLICK
int m_message; // wxEVT_STC_MACRORECORD
int m_wParam;
int m_lParam;
#endif
};
// Event types
enum {
wxEVT_STC_CHANGE = 1650,
wxEVT_STC_STYLENEEDED,
wxEVT_STC_CHARADDED,
wxEVT_STC_UPDATEUI,
wxEVT_STC_SAVEPOINTREACHED,
wxEVT_STC_SAVEPOINTLEFT,
wxEVT_STC_ROMODIFYATTEMPT,
wxEVT_STC_DOUBLECLICK,
wxEVT_STC_MODIFIED,
wxEVT_STC_KEY,
wxEVT_STC_MACRORECORD,
wxEVT_STC_MARGINCLICK,
wxEVT_STC_NEEDSHOWN,
wxEVT_STC_POSCHANGED
};
#ifndef SWIG
typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
#define EVT_STC_CHANGE(id, fn) { wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
#define EVT_STC_STYLENEEDED(id, fn) { wxEVT_STC_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
#define EVT_STC_CHARADDED(id, fn) { wxEVT_STC_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
#define EVT_STC_UPDATEUI(id, fn) { wxEVT_STC_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
#define EVT_STC_SAVEPOINTREACHED(id, fn) { wxEVT_STC_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
#define EVT_STC_SAVEPOINTLEFT(id, fn) { wxEVT_STC_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
#define EVT_STC_ROMODIFYATTEMPT(id, fn) { wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
#define EVT_STC_DOUBLECLICK(id, fn) { wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
#define EVT_STC_MODIFIED(id, fn) { wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
#define EVT_STC_KEY(id, fn) { wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
#define EVT_STC_MACRORECORD(id, fn) { wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
#define EVT_STC_MARGINCLICK(id, fn) { wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
#define EVT_STC_NEEDSHOWN(id, fn) { wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
#define EVT_STC_POSCHANGED(id, fn) { wxEVT_STC_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
#endif
//----------------------------------------------------------------------
//----------------------------------------------------------------------
#endif

View File

@@ -1,90 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/generic/scrolwin.h
// Purpose: wxGenericScrolledWindow class
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_GENERIC_SCROLLWIN_H_
#define _WX_GENERIC_SCROLLWIN_H_
// ----------------------------------------------------------------------------
// headers and constants
// ----------------------------------------------------------------------------
#include "wx/window.h"
#include "wx/panel.h"
extern WXDLLEXPORT_DATA(const wxChar*) wxPanelNameStr;
// default scrolled window style
#ifndef wxScrolledWindowStyle
#define wxScrolledWindowStyle (wxHSCROLL | wxVSCROLL)
#endif
// ----------------------------------------------------------------------------
// wxGenericScrolledWindow
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxGenericScrolledWindow : public wxPanel,
public wxScrollHelper
{
public:
wxGenericScrolledWindow() : wxScrollHelper(this) { }
wxGenericScrolledWindow(wxWindow *parent,
wxWindowID winid = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxScrolledWindowStyle,
const wxString& name = wxPanelNameStr)
: wxScrollHelper(this)
{
Create(parent, winid, pos, size, style, name);
}
virtual ~wxGenericScrolledWindow();
bool Create(wxWindow *parent,
wxWindowID winid,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxScrolledWindowStyle,
const wxString& name = wxPanelNameStr);
virtual void PrepareDC(wxDC& dc) { DoPrepareDC(dc); }
// lay out the window and its children
virtual bool Layout();
virtual void DoSetVirtualSize(int x, int y);
// wxWindow's GetBestVirtualSize returns the actual window size,
// whereas we want to return the virtual size
virtual wxSize GetBestVirtualSize() const;
// Return the size best suited for the current window
// (this isn't a virtual size, this is a sensible size for the window)
virtual wxSize DoGetBestSize() const;
protected:
// this is needed for wxEVT_PAINT processing hack described in
// wxScrollHelperEvtHandler::ProcessEvent()
void OnPaint(wxPaintEvent& event);
// we need to return a special WM_GETDLGCODE value to process just the
// arrows but let the other navigation characters through
#ifdef __WXMSW__
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
#endif // __WXMSW__
private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxGenericScrolledWindow)
DECLARE_EVENT_TABLE()
};
#endif // _WX_GENERIC_SCROLLWIN_H_

View File

@@ -1,193 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/gtk/scrolwin.h
// Purpose: wxScrolledWindow class
// Author: Robert Roebling
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id$
// Copyright: (c) Robert Roebling
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_GTK_SCROLLWIN_H_
#define _WX_GTK_SCROLLWIN_H_
// ----------------------------------------------------------------------------
// headers and constants
// ----------------------------------------------------------------------------
#include "wx/window.h"
#include "wx/panel.h"
WXDLLEXPORT_DATA(extern const wxChar*) wxPanelNameStr;
// default scrolled window style
#ifndef wxScrolledWindowStyle
#define wxScrolledWindowStyle (wxHSCROLL | wxVSCROLL)
#endif
// ----------------------------------------------------------------------------
// wxScrolledWindow
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxScrolledWindow : public wxPanel
{
public:
wxScrolledWindow()
{ Init(); }
wxScrolledWindow(wxWindow *parent,
wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxScrolledWindowStyle,
const wxString& name = wxPanelNameStr)
{ Create(parent, id, pos, size, style, name); }
void Init();
bool Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxScrolledWindowStyle,
const wxString& name = wxPanelNameStr);
// Normally the wxScrolledWindow will scroll itself, but in
// some rare occasions you might want it to scroll another
// window (e.g. a child of it in order to scroll only a portion
// the area between the scrollbars (spreadsheet: only cell area
// will move).
virtual void SetTargetWindow( wxWindow *target, bool pushEventHandler = FALSE );
virtual wxWindow *GetTargetWindow() const;
// Set the scrolled area of the window.
virtual void DoSetVirtualSize( int x, int y );
// wxWindow's GetBestVirtualSize returns the actual window size,
// whereas we want to return the virtual size
virtual wxSize GetBestVirtualSize() const;
// Return the size best suited for the current window
// (this isn't a virtual size, this is a sensible size for the window)
virtual wxSize DoGetBestSize() const;
// Set the x, y scrolling increments.
void SetScrollRate( int xstep, int ystep );
// Number of pixels per user unit (0 or -1 for no scrollbar)
// Length of virtual canvas in user units
// Length of page in user units
// Default action is to set the virtual size and alter scrollbars
// accordingly.
virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
int noUnitsX, int noUnitsY,
int xPos = 0, int yPos = 0,
bool noRefresh = FALSE );
// Physically scroll the window
virtual void Scroll(int x_pos, int y_pos);
int GetScrollPageSize(int orient) const;
void SetScrollPageSize(int orient, int pageSize);
virtual void GetScrollPixelsPerUnit(int *x_unit, int *y_unit) const;
// Enable/disable Windows scrolling in either direction.
// If TRUE, wxWidgets scrolls the canvas and only a bit of
// the canvas is invalidated; no Clear() is necessary.
// If FALSE, the whole canvas is invalidated and a Clear() is
// necessary. Disable for when the scroll increment is used
// to actually scroll a non-constant distance
virtual void EnableScrolling(bool x_scrolling, bool y_scrolling);
// Get the view start
virtual void GetViewStart(int *x, int *y) const;
// translate between scrolled and unscrolled coordinates
void CalcScrolledPosition(int x, int y, int *xx, int *yy) const
{ DoCalcScrolledPosition(x, y, xx, yy); }
wxPoint CalcScrolledPosition(const wxPoint& pt) const
{
wxPoint p2;
DoCalcScrolledPosition(pt.x, pt.y, &p2.x, &p2.y);
return p2;
}
void CalcUnscrolledPosition(int x, int y, int *xx, int *yy) const
{ DoCalcUnscrolledPosition(x, y, xx, yy); }
wxPoint CalcUnscrolledPosition(const wxPoint& pt) const
{
wxPoint p2;
DoCalcUnscrolledPosition(pt.x, pt.y, &p2.x, &p2.y);
return p2;
}
virtual void DoCalcScrolledPosition(int x, int y, int *xx, int *yy) const;
virtual void DoCalcUnscrolledPosition(int x, int y, int *xx, int *yy) const;
// Override this function to draw the graphic (or just process EVT_PAINT)
virtual void OnDraw(wxDC& WXUNUSED(dc)) {}
// Override this function if you don't want to have wxScrolledWindow
// automatically change the origin according to the scroll position.
void PrepareDC(wxDC& dc) { DoPrepareDC(dc); }
// lay out the window and its children
virtual bool Layout();
// Adjust the scrollbars
virtual void AdjustScrollbars();
// Set the scale factor, used in PrepareDC
void SetScale(double xs, double ys) { m_scaleX = xs; m_scaleY = ys; }
double GetScaleX() const { return m_scaleX; }
double GetScaleY() const { return m_scaleY; }
// implementation from now on
void OnScroll(wxScrollWinEvent& event);
void OnSize(wxSizeEvent& event);
void OnPaint(wxPaintEvent& event);
void OnChar(wxKeyEvent& event);
void GtkVScroll( float value, unsigned int scroll_type );
void GtkHScroll( float value, unsigned int scroll_type );
void GtkVConnectEvent();
void GtkHConnectEvent();
void GtkVDisconnectEvent();
void GtkHDisconnectEvent();
// Calculate scroll increment
virtual int CalcScrollInc(wxScrollWinEvent& event);
// Overridden from wxWidgets due callback being static
virtual void SetScrollPos( int orient, int pos, bool refresh = TRUE );
virtual void DoPrepareDC(wxDC& dc);
protected:
wxWindow *m_targetWindow;
int m_xScrollPixelsPerLine;
int m_yScrollPixelsPerLine;
bool m_xScrollingEnabled;
bool m_yScrollingEnabled;
// FIXME: these next four members are duplicated in the GtkAdjustment
// members of wxWindow. Can they be safely removed from here?
int m_xScrollPosition;
int m_yScrollPosition;
int m_xScrollLinesPerPage;
int m_yScrollLinesPerPage;
double m_scaleY,m_scaleX;
private:
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxScrolledWindow)
};
#endif
// _WX_GTK_SCROLLWIN_H_
// vi:sts=4:sw=4:et

View File

@@ -1,300 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/gtk/window.h
// Purpose:
// Author: Robert Roebling
// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKWINDOWH__
#define __GTKWINDOWH__
// helper structure that holds class that holds GtkIMContext object and
// some additional data needed for key events processing
struct wxGtkIMData;
//-----------------------------------------------------------------------------
// callback definition for inserting a window (internal)
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxWindowGTK;
typedef void (*wxInsertChildFunction)( wxWindowGTK*, wxWindowGTK* );
//-----------------------------------------------------------------------------
// wxWindowGTK
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxWindowGTK : public wxWindowBase
{
public:
// creating the window
// -------------------
wxWindowGTK();
wxWindowGTK(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr);
bool Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr);
virtual ~wxWindowGTK();
// implement base class (pure) virtual methods
// -------------------------------------------
virtual bool Destroy();
virtual void Raise();
virtual void Lower();
virtual bool Show( bool show = TRUE );
virtual bool Enable( bool enable = TRUE );
virtual bool IsRetained() const;
virtual void SetFocus();
virtual bool AcceptsFocus() const;
virtual bool Reparent( wxWindowBase *newParent );
virtual void WarpPointer(int x, int y);
virtual void Refresh( bool eraseBackground = TRUE,
const wxRect *rect = (const wxRect *) NULL );
virtual void Update();
virtual void ClearBackground();
virtual bool SetBackgroundColour( const wxColour &colour );
virtual bool SetForegroundColour( const wxColour &colour );
virtual bool SetCursor( const wxCursor &cursor );
virtual bool SetFont( const wxFont &font );
virtual bool SetBackgroundStyle(wxBackgroundStyle style) ;
virtual int GetCharHeight() const;
virtual int GetCharWidth() const;
virtual void GetTextExtent(const wxString& string,
int *x, int *y,
int *descent = (int *) NULL,
int *externalLeading = (int *) NULL,
const wxFont *theFont = (const wxFont *) NULL)
const;
#if wxUSE_MENUS_NATIVE
virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
#endif // wxUSE_MENUS_NATIVE
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
int range, bool refresh = TRUE );
virtual void SetScrollPos( int orient, int pos, bool refresh = TRUE );
virtual int GetScrollPos( int orient ) const;
virtual int GetScrollThumb( int orient ) const;
virtual int GetScrollRange( int orient ) const;
virtual void ScrollWindow( int dx, int dy,
const wxRect* rect = (wxRect *) NULL );
#if wxUSE_DRAG_AND_DROP
virtual void SetDropTarget( wxDropTarget *dropTarget );
#endif // wxUSE_DRAG_AND_DROP
#ifdef __WXGTK20__
virtual void AddChild( wxWindowBase *child );
virtual void RemoveChild( wxWindowBase *child );
#endif
// implementation
// --------------
virtual WXWidget GetHandle() const { return m_widget; }
// I don't want users to override what's done in idle so everything that
// has to be done in idle time in order for wxGTK to work is done in
// OnInternalIdle
virtual void OnInternalIdle();
// Internal represention of Update()
void GtkUpdate();
// For compatibility across platforms (not in event table)
void OnIdle(wxIdleEvent& WXUNUSED(event)) {}
// wxGTK-specific: called recursively by Enable,
// to give widgets an oppprtunity to correct their colours after they
// have been changed by Enable
virtual void OnParentEnable( bool WXUNUSED(enable) ) {}
// Used by all window classes in the widget creation process.
bool PreCreation( wxWindowGTK *parent, const wxPoint &pos, const wxSize &size );
void PostCreation();
// Internal addition of child windows. differs from class
// to class not by using virtual functions but by using
// the m_insertCallback.
void DoAddChild(wxWindowGTK *child);
// This methods sends wxPaintEvents to the window. It reads the
// update region, breaks it up into rects and sends an event
// for each rect. It is also responsible for background erase
// events and NC paint events. It is called from "draw" and
// "expose" handlers as well as from ::Update()
void GtkSendPaintEvents();
// The methods below are required because many native widgets
// are composed of several subwidgets and setting a style for
// the widget means setting it for all subwidgets as well.
// also, it is nor clear, which native widget is the top
// widget where (most of) the input goes. even tooltips have
// to be applied to all subwidgets.
virtual GtkWidget* GetConnectWidget();
virtual bool IsOwnGtkWindow( GdkWindow *window );
void ConnectWidget( GtkWidget *widget );
#ifdef __WXGTK20__
// Returns the default context which usually is anti-aliased
PangoContext *GtkGetPangoDefaultContext();
// Returns the X11 context which renders on the X11 client
// side (which can be remote) and which usually is not
// anti-aliased and is thus faster
// MR: Now returns the default pango_context for the widget as GtkGetPangoDefaultContext to
// not depend on libpangox - which is completely deprecated.
//BCI: Remove GtkGetPangoX11Context and m_x11Context completely when symbols may be removed
PangoContext *GtkGetPangoX11Context();
PangoContext *m_x11Context; // MR: Now unused
#endif
#if wxUSE_TOOLTIPS
virtual void ApplyToolTip( GtkTooltips *tips, const wxChar *tip );
#endif // wxUSE_TOOLTIPS
// Called from GTK signales handlers. it indicates that
// the layouting functions have to be called later on
// (i.e. in idle time, implemented in OnInternalIdle() ).
void GtkUpdateSize() { m_sizeSet = FALSE; }
// fix up the mouse event coords, used by wxListBox only so far
virtual void FixUpMouseEvent(GtkWidget * WXUNUSED(widget),
wxCoord& WXUNUSED(x),
wxCoord& WXUNUSED(y)) { }
// is this window transparent for the mouse events (as wxStaticBox is)?
virtual bool IsTransparentForMouse() const { return FALSE; }
// is this a radiobutton (used by radiobutton code itself only)?
virtual bool IsRadioButton() const { return FALSE; }
// position and size of the window
int m_x, m_y;
int m_width, m_height;
int m_oldClientWidth,m_oldClientHeight;
// see the docs in src/gtk/window.cpp
GtkWidget *m_widget; // mostly the widget seen by the rest of GTK
GtkWidget *m_wxwindow; // mostly the client area as per wxWidgets
// this widget will be queried for GTK's focus events
GtkWidget *m_focusWidget;
#ifdef __WXGTK20__
wxGtkIMData *m_imData;
#else // GTK 1
#ifdef HAVE_XIM
// XIM support for wxWidgets
GdkIC *m_ic;
GdkICAttr *m_icattr;
#endif // HAVE_XIM
#endif // GTK 2/1
#ifndef __WXGTK20__
// The area to be cleared (and not just refreshed)
// We cannot make this distinction under GTK 2.0.
wxRegion m_clearRegion;
#endif
// scrolling stuff
GtkAdjustment *m_hAdjust,*m_vAdjust;
float m_oldHorizontalPos;
float m_oldVerticalPos;
// extra (wxGTK-specific) flags
bool m_needParent:1; // ! wxFrame, wxDialog, wxNotebookPage ?
bool m_noExpose:1; // wxGLCanvas has its own redrawing
bool m_nativeSizeEvent:1; // wxGLCanvas sends wxSizeEvent upon "alloc_size"
bool m_hasScrolling:1;
bool m_hasVMT:1;
bool m_sizeSet:1;
bool m_resizing:1;
bool m_acceptsFocus:1; // true if not static
bool m_hasFocus:1; // true if == FindFocus()
bool m_isScrolling:1; // dragging scrollbar thumb?
bool m_clipPaintRegion:1; // TRUE after ScrollWindow()
#ifdef __WXGTK20__
bool m_dirtyTabOrder:1; // tab order changed, GTK focus
// chain needs update
#endif
bool m_needsStyleChange:1; // May not be able to change
// background style until OnIdle
// C++ has no virtual methods in the constrcutor of any class but we need
// different methods of inserting a child window into a wxFrame,
// wxMDIFrame, wxNotebook etc. this is the callback that will get used.
wxInsertChildFunction m_insertCallback;
// implement the base class pure virtuals
virtual void DoClientToScreen( int *x, int *y ) const;
virtual void DoScreenToClient( int *x, int *y ) const;
virtual void DoGetPosition( int *x, int *y ) const;
virtual void DoGetSize( int *width, int *height ) const;
virtual void DoGetClientSize( int *width, int *height ) const;
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
virtual void DoSetClientSize(int width, int height);
virtual void DoMoveWindow(int x, int y, int width, int height);
virtual void DoCaptureMouse();
virtual void DoReleaseMouse();
#if wxUSE_TOOLTIPS
virtual void DoSetToolTip( wxToolTip *tip );
#endif // wxUSE_TOOLTIPS
protected:
// common part of all ctors (not virtual because called from ctor)
void Init();
#ifdef __WXGTK20__
virtual void DoMoveInTabOrder(wxWindow *win, MoveKind move);
// Copies m_children tab order to GTK focus chain:
void RealizeTabOrder();
#endif
// Called by ApplyWidgetStyle (which is called by SetFont() and
// SetXXXColour etc to apply style changed to native widgets) to create
// modified GTK style with non-standard attributes. If forceStyle=true,
// creates empty GtkRcStyle if there are no modifications, otherwise
// returns NULL in such case.
GtkRcStyle *CreateWidgetStyle(bool forceStyle = false);
// Overridden in many GTK widgets who have to handle subwidgets
virtual void ApplyWidgetStyle(bool forceStyle = false);
// helper function to ease native widgets wrapping, called by
// ApplyWidgetStyle -- override this, not ApplyWidgetStyle
virtual void DoApplyWidgetStyle(GtkRcStyle *style);
private:
DECLARE_DYNAMIC_CLASS(wxWindowGTK)
DECLARE_NO_COPY_CLASS(wxWindowGTK)
};
extern WXDLLIMPEXP_CORE wxWindow *wxFindFocusedChild(wxWindowGTK *win);
#endif // __GTKWINDOWH__

View File

@@ -1,193 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/gtk/scrolwin.h
// Purpose: wxScrolledWindow class
// Author: Robert Roebling
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id$
// Copyright: (c) Robert Roebling
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_GTK_SCROLLWIN_H_
#define _WX_GTK_SCROLLWIN_H_
// ----------------------------------------------------------------------------
// headers and constants
// ----------------------------------------------------------------------------
#include "wx/window.h"
#include "wx/panel.h"
WXDLLEXPORT_DATA(extern const wxChar*) wxPanelNameStr;
// default scrolled window style
#ifndef wxScrolledWindowStyle
#define wxScrolledWindowStyle (wxHSCROLL | wxVSCROLL)
#endif
// ----------------------------------------------------------------------------
// wxScrolledWindow
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxScrolledWindow : public wxPanel
{
public:
wxScrolledWindow()
{ Init(); }
wxScrolledWindow(wxWindow *parent,
wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxScrolledWindowStyle,
const wxString& name = wxPanelNameStr)
{ Create(parent, id, pos, size, style, name); }
void Init();
bool Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxScrolledWindowStyle,
const wxString& name = wxPanelNameStr);
// Normally the wxScrolledWindow will scroll itself, but in
// some rare occasions you might want it to scroll another
// window (e.g. a child of it in order to scroll only a portion
// the area between the scrollbars (spreadsheet: only cell area
// will move).
virtual void SetTargetWindow( wxWindow *target, bool pushEventHandler = FALSE );
virtual wxWindow *GetTargetWindow() const;
// Set the scrolled area of the window.
virtual void DoSetVirtualSize( int x, int y );
// wxWindow's GetBestVirtualSize returns the actual window size,
// whereas we want to return the virtual size
virtual wxSize GetBestVirtualSize() const;
// Return the size best suited for the current window
// (this isn't a virtual size, this is a sensible size for the window)
virtual wxSize DoGetBestSize() const;
// Set the x, y scrolling increments.
void SetScrollRate( int xstep, int ystep );
// Number of pixels per user unit (0 or -1 for no scrollbar)
// Length of virtual canvas in user units
// Length of page in user units
// Default action is to set the virtual size and alter scrollbars
// accordingly.
virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
int noUnitsX, int noUnitsY,
int xPos = 0, int yPos = 0,
bool noRefresh = FALSE );
// Physically scroll the window
virtual void Scroll(int x_pos, int y_pos);
int GetScrollPageSize(int orient) const;
void SetScrollPageSize(int orient, int pageSize);
virtual void GetScrollPixelsPerUnit(int *x_unit, int *y_unit) const;
// Enable/disable Windows scrolling in either direction.
// If TRUE, wxWidgets scrolls the canvas and only a bit of
// the canvas is invalidated; no Clear() is necessary.
// If FALSE, the whole canvas is invalidated and a Clear() is
// necessary. Disable for when the scroll increment is used
// to actually scroll a non-constant distance
virtual void EnableScrolling(bool x_scrolling, bool y_scrolling);
// Get the view start
virtual void GetViewStart(int *x, int *y) const;
// translate between scrolled and unscrolled coordinates
void CalcScrolledPosition(int x, int y, int *xx, int *yy) const
{ DoCalcScrolledPosition(x, y, xx, yy); }
wxPoint CalcScrolledPosition(const wxPoint& pt) const
{
wxPoint p2;
DoCalcScrolledPosition(pt.x, pt.y, &p2.x, &p2.y);
return p2;
}
void CalcUnscrolledPosition(int x, int y, int *xx, int *yy) const
{ DoCalcUnscrolledPosition(x, y, xx, yy); }
wxPoint CalcUnscrolledPosition(const wxPoint& pt) const
{
wxPoint p2;
DoCalcUnscrolledPosition(pt.x, pt.y, &p2.x, &p2.y);
return p2;
}
virtual void DoCalcScrolledPosition(int x, int y, int *xx, int *yy) const;
virtual void DoCalcUnscrolledPosition(int x, int y, int *xx, int *yy) const;
// Override this function to draw the graphic (or just process EVT_PAINT)
virtual void OnDraw(wxDC& WXUNUSED(dc)) {}
// Override this function if you don't want to have wxScrolledWindow
// automatically change the origin according to the scroll position.
void PrepareDC(wxDC& dc) { DoPrepareDC(dc); }
// lay out the window and its children
virtual bool Layout();
// Adjust the scrollbars
virtual void AdjustScrollbars();
// Set the scale factor, used in PrepareDC
void SetScale(double xs, double ys) { m_scaleX = xs; m_scaleY = ys; }
double GetScaleX() const { return m_scaleX; }
double GetScaleY() const { return m_scaleY; }
// implementation from now on
void OnScroll(wxScrollWinEvent& event);
void OnSize(wxSizeEvent& event);
void OnPaint(wxPaintEvent& event);
void OnChar(wxKeyEvent& event);
void GtkVScroll( float value, unsigned int scroll_type );
void GtkHScroll( float value, unsigned int scroll_type );
void GtkVConnectEvent();
void GtkHConnectEvent();
void GtkVDisconnectEvent();
void GtkHDisconnectEvent();
// Calculate scroll increment
virtual int CalcScrollInc(wxScrollWinEvent& event);
// Overridden from wxWidgets due callback being static
virtual void SetScrollPos( int orient, int pos, bool refresh = TRUE );
virtual void DoPrepareDC(wxDC& dc);
protected:
wxWindow *m_targetWindow;
int m_xScrollPixelsPerLine;
int m_yScrollPixelsPerLine;
bool m_xScrollingEnabled;
bool m_yScrollingEnabled;
// FIXME: these next four members are duplicated in the GtkAdjustment
// members of wxWindow. Can they be safely removed from here?
int m_xScrollPosition;
int m_yScrollPosition;
int m_xScrollLinesPerPage;
int m_yScrollLinesPerPage;
double m_scaleY,m_scaleX;
private:
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxScrolledWindow)
};
#endif
// _WX_GTK_SCROLLWIN_H_
// vi:sts=4:sw=4:et

View File

@@ -1,300 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/gtk/window.h
// Purpose:
// Author: Robert Roebling
// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKWINDOWH__
#define __GTKWINDOWH__
// helper structure that holds class that holds GtkIMContext object and
// some additional data needed for key events processing
struct wxGtkIMData;
//-----------------------------------------------------------------------------
// callback definition for inserting a window (internal)
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxWindowGTK;
typedef void (*wxInsertChildFunction)( wxWindowGTK*, wxWindowGTK* );
//-----------------------------------------------------------------------------
// wxWindowGTK
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxWindowGTK : public wxWindowBase
{
public:
// creating the window
// -------------------
wxWindowGTK();
wxWindowGTK(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr);
bool Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr);
virtual ~wxWindowGTK();
// implement base class (pure) virtual methods
// -------------------------------------------
virtual bool Destroy();
virtual void Raise();
virtual void Lower();
virtual bool Show( bool show = TRUE );
virtual bool Enable( bool enable = TRUE );
virtual bool IsRetained() const;
virtual void SetFocus();
virtual bool AcceptsFocus() const;
virtual bool Reparent( wxWindowBase *newParent );
virtual void WarpPointer(int x, int y);
virtual void Refresh( bool eraseBackground = TRUE,
const wxRect *rect = (const wxRect *) NULL );
virtual void Update();
virtual void ClearBackground();
virtual bool SetBackgroundColour( const wxColour &colour );
virtual bool SetForegroundColour( const wxColour &colour );
virtual bool SetCursor( const wxCursor &cursor );
virtual bool SetFont( const wxFont &font );
virtual bool SetBackgroundStyle(wxBackgroundStyle style) ;
virtual int GetCharHeight() const;
virtual int GetCharWidth() const;
virtual void GetTextExtent(const wxString& string,
int *x, int *y,
int *descent = (int *) NULL,
int *externalLeading = (int *) NULL,
const wxFont *theFont = (const wxFont *) NULL)
const;
#if wxUSE_MENUS_NATIVE
virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
#endif // wxUSE_MENUS_NATIVE
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
int range, bool refresh = TRUE );
virtual void SetScrollPos( int orient, int pos, bool refresh = TRUE );
virtual int GetScrollPos( int orient ) const;
virtual int GetScrollThumb( int orient ) const;
virtual int GetScrollRange( int orient ) const;
virtual void ScrollWindow( int dx, int dy,
const wxRect* rect = (wxRect *) NULL );
#if wxUSE_DRAG_AND_DROP
virtual void SetDropTarget( wxDropTarget *dropTarget );
#endif // wxUSE_DRAG_AND_DROP
#ifdef __WXGTK20__
virtual void AddChild( wxWindowBase *child );
virtual void RemoveChild( wxWindowBase *child );
#endif
// implementation
// --------------
virtual WXWidget GetHandle() const { return m_widget; }
// I don't want users to override what's done in idle so everything that
// has to be done in idle time in order for wxGTK to work is done in
// OnInternalIdle
virtual void OnInternalIdle();
// Internal represention of Update()
void GtkUpdate();
// For compatibility across platforms (not in event table)
void OnIdle(wxIdleEvent& WXUNUSED(event)) {}
// wxGTK-specific: called recursively by Enable,
// to give widgets an oppprtunity to correct their colours after they
// have been changed by Enable
virtual void OnParentEnable( bool WXUNUSED(enable) ) {}
// Used by all window classes in the widget creation process.
bool PreCreation( wxWindowGTK *parent, const wxPoint &pos, const wxSize &size );
void PostCreation();
// Internal addition of child windows. differs from class
// to class not by using virtual functions but by using
// the m_insertCallback.
void DoAddChild(wxWindowGTK *child);
// This methods sends wxPaintEvents to the window. It reads the
// update region, breaks it up into rects and sends an event
// for each rect. It is also responsible for background erase
// events and NC paint events. It is called from "draw" and
// "expose" handlers as well as from ::Update()
void GtkSendPaintEvents();
// The methods below are required because many native widgets
// are composed of several subwidgets and setting a style for
// the widget means setting it for all subwidgets as well.
// also, it is nor clear, which native widget is the top
// widget where (most of) the input goes. even tooltips have
// to be applied to all subwidgets.
virtual GtkWidget* GetConnectWidget();
virtual bool IsOwnGtkWindow( GdkWindow *window );
void ConnectWidget( GtkWidget *widget );
#ifdef __WXGTK20__
// Returns the default context which usually is anti-aliased
PangoContext *GtkGetPangoDefaultContext();
// Returns the X11 context which renders on the X11 client
// side (which can be remote) and which usually is not
// anti-aliased and is thus faster
// MR: Now returns the default pango_context for the widget as GtkGetPangoDefaultContext to
// not depend on libpangox - which is completely deprecated.
//BCI: Remove GtkGetPangoX11Context and m_x11Context completely when symbols may be removed
PangoContext *GtkGetPangoX11Context();
PangoContext *m_x11Context; // MR: Now unused
#endif
#if wxUSE_TOOLTIPS
virtual void ApplyToolTip( GtkTooltips *tips, const wxChar *tip );
#endif // wxUSE_TOOLTIPS
// Called from GTK signales handlers. it indicates that
// the layouting functions have to be called later on
// (i.e. in idle time, implemented in OnInternalIdle() ).
void GtkUpdateSize() { m_sizeSet = FALSE; }
// fix up the mouse event coords, used by wxListBox only so far
virtual void FixUpMouseEvent(GtkWidget * WXUNUSED(widget),
wxCoord& WXUNUSED(x),
wxCoord& WXUNUSED(y)) { }
// is this window transparent for the mouse events (as wxStaticBox is)?
virtual bool IsTransparentForMouse() const { return FALSE; }
// is this a radiobutton (used by radiobutton code itself only)?
virtual bool IsRadioButton() const { return FALSE; }
// position and size of the window
int m_x, m_y;
int m_width, m_height;
int m_oldClientWidth,m_oldClientHeight;
// see the docs in src/gtk/window.cpp
GtkWidget *m_widget; // mostly the widget seen by the rest of GTK
GtkWidget *m_wxwindow; // mostly the client area as per wxWidgets
// this widget will be queried for GTK's focus events
GtkWidget *m_focusWidget;
#ifdef __WXGTK20__
wxGtkIMData *m_imData;
#else // GTK 1
#ifdef HAVE_XIM
// XIM support for wxWidgets
GdkIC *m_ic;
GdkICAttr *m_icattr;
#endif // HAVE_XIM
#endif // GTK 2/1
#ifndef __WXGTK20__
// The area to be cleared (and not just refreshed)
// We cannot make this distinction under GTK 2.0.
wxRegion m_clearRegion;
#endif
// scrolling stuff
GtkAdjustment *m_hAdjust,*m_vAdjust;
float m_oldHorizontalPos;
float m_oldVerticalPos;
// extra (wxGTK-specific) flags
bool m_needParent:1; // ! wxFrame, wxDialog, wxNotebookPage ?
bool m_noExpose:1; // wxGLCanvas has its own redrawing
bool m_nativeSizeEvent:1; // wxGLCanvas sends wxSizeEvent upon "alloc_size"
bool m_hasScrolling:1;
bool m_hasVMT:1;
bool m_sizeSet:1;
bool m_resizing:1;
bool m_acceptsFocus:1; // true if not static
bool m_hasFocus:1; // true if == FindFocus()
bool m_isScrolling:1; // dragging scrollbar thumb?
bool m_clipPaintRegion:1; // TRUE after ScrollWindow()
#ifdef __WXGTK20__
bool m_dirtyTabOrder:1; // tab order changed, GTK focus
// chain needs update
#endif
bool m_needsStyleChange:1; // May not be able to change
// background style until OnIdle
// C++ has no virtual methods in the constrcutor of any class but we need
// different methods of inserting a child window into a wxFrame,
// wxMDIFrame, wxNotebook etc. this is the callback that will get used.
wxInsertChildFunction m_insertCallback;
// implement the base class pure virtuals
virtual void DoClientToScreen( int *x, int *y ) const;
virtual void DoScreenToClient( int *x, int *y ) const;
virtual void DoGetPosition( int *x, int *y ) const;
virtual void DoGetSize( int *width, int *height ) const;
virtual void DoGetClientSize( int *width, int *height ) const;
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
virtual void DoSetClientSize(int width, int height);
virtual void DoMoveWindow(int x, int y, int width, int height);
virtual void DoCaptureMouse();
virtual void DoReleaseMouse();
#if wxUSE_TOOLTIPS
virtual void DoSetToolTip( wxToolTip *tip );
#endif // wxUSE_TOOLTIPS
protected:
// common part of all ctors (not virtual because called from ctor)
void Init();
#ifdef __WXGTK20__
virtual void DoMoveInTabOrder(wxWindow *win, MoveKind move);
// Copies m_children tab order to GTK focus chain:
void RealizeTabOrder();
#endif
// Called by ApplyWidgetStyle (which is called by SetFont() and
// SetXXXColour etc to apply style changed to native widgets) to create
// modified GTK style with non-standard attributes. If forceStyle=true,
// creates empty GtkRcStyle if there are no modifications, otherwise
// returns NULL in such case.
GtkRcStyle *CreateWidgetStyle(bool forceStyle = false);
// Overridden in many GTK widgets who have to handle subwidgets
virtual void ApplyWidgetStyle(bool forceStyle = false);
// helper function to ease native widgets wrapping, called by
// ApplyWidgetStyle -- override this, not ApplyWidgetStyle
virtual void DoApplyWidgetStyle(GtkRcStyle *style);
private:
DECLARE_DYNAMIC_CLASS(wxWindowGTK)
DECLARE_NO_COPY_CLASS(wxWindowGTK)
};
extern WXDLLIMPEXP_CORE wxWindow *wxFindFocusedChild(wxWindowGTK *win);
#endif // __GTKWINDOWH__

View File

@@ -1,238 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: include/wx/scrolwin.h
// Purpose: wxScrolledWindow, wxScrolledControl and wxScrollHelper
// Author: Vadim Zeitlin
// Modified by:
// Created: 30.08.00
// RCS-ID: $Id$
// Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_SCROLWIN_H_BASE_
#define _WX_SCROLWIN_H_BASE_
#include "wx/window.h"
class WXDLLEXPORT wxScrollHelperEvtHandler;
class WXDLLEXPORT wxTimer;
// ----------------------------------------------------------------------------
// wxScrollHelper: this class implements the scrolling logic which is used by
// wxScrolledWindow and wxScrolledControl. It is a mix-in: just derive from it
// to implement scrolling in your class.
// ----------------------------------------------------------------------------
#if !defined(__WXGTK__) || defined(__WXUNIVERSAL__)
class WXDLLEXPORT wxScrollHelper
{
public:
// ctor and dtor
wxScrollHelper(wxWindow *winToScroll = (wxWindow *)NULL);
void SetWindow(wxWindow *winToScroll);
virtual ~wxScrollHelper();
// configure the scrolling
virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
int noUnitsX, int noUnitsY,
int xPos = 0, int yPos = 0,
bool noRefresh = false );
// scroll to the given (in logical coords) position
virtual void Scroll(int x, int y);
// get/set the page size for this orientation (wxVERTICAL/wxHORIZONTAL)
int GetScrollPageSize(int orient) const;
void SetScrollPageSize(int orient, int pageSize);
// Set the x, y scrolling increments.
void SetScrollRate( int xstep, int ystep );
// get the size of one logical unit in physical ones
virtual void GetScrollPixelsPerUnit(int *pixelsPerUnitX,
int *pixelsPerUnitY) const;
// Enable/disable Windows scrolling in either direction. If true, wxWidgets
// scrolls the canvas and only a bit of the canvas is invalidated; no
// Clear() is necessary. If false, the whole canvas is invalidated and a
// Clear() is necessary. Disable for when the scroll increment is used to
// actually scroll a non-constant distance
virtual void EnableScrolling(bool x_scrolling, bool y_scrolling);
// Get the view start
virtual void GetViewStart(int *x, int *y) const;
// Set the scale factor, used in PrepareDC
void SetScale(double xs, double ys) { m_scaleX = xs; m_scaleY = ys; }
double GetScaleX() const { return m_scaleX; }
double GetScaleY() const { return m_scaleY; }
// translate between scrolled and unscrolled coordinates
void CalcScrolledPosition(int x, int y, int *xx, int *yy) const
{ DoCalcScrolledPosition(x, y, xx, yy); }
wxPoint CalcScrolledPosition(const wxPoint& pt) const
{
wxPoint p2;
DoCalcScrolledPosition(pt.x, pt.y, &p2.x, &p2.y);
return p2;
}
void CalcUnscrolledPosition(int x, int y, int *xx, int *yy) const
{ DoCalcUnscrolledPosition(x, y, xx, yy); }
wxPoint CalcUnscrolledPosition(const wxPoint& pt) const
{
wxPoint p2;
DoCalcUnscrolledPosition(pt.x, pt.y, &p2.x, &p2.y);
return p2;
}
virtual void DoCalcScrolledPosition(int x, int y, int *xx, int *yy) const;
virtual void DoCalcUnscrolledPosition(int x, int y, int *xx, int *yy) const;
// Adjust the scrollbars
virtual void AdjustScrollbars(void);
// Calculate scroll increment
virtual int CalcScrollInc(wxScrollWinEvent& event);
// Normally the wxScrolledWindow will scroll itself, but in some rare
// occasions you might want it to scroll [part of] another window (e.g. a
// child of it in order to scroll only a portion the area between the
// scrollbars (spreadsheet: only cell area will move).
virtual void SetTargetWindow(wxWindow *target);
virtual wxWindow *GetTargetWindow() const;
void SetTargetRect(const wxRect& rect) { m_rectToScroll = rect; }
wxRect GetTargetRect() const { return m_rectToScroll; }
// Override this function to draw the graphic (or just process EVT_PAINT)
virtual void OnDraw(wxDC& WXUNUSED(dc)) { }
// change the DC origin according to the scroll position.
virtual void DoPrepareDC(wxDC& dc);
// are we generating the autoscroll events?
bool IsAutoScrolling() const { return m_timerAutoScroll != NULL; }
// stop generating the scroll events when mouse is held outside the window
void StopAutoScrolling();
// this method can be overridden in a derived class to forbid sending the
// auto scroll events - note that unlike StopAutoScrolling() it doesn't
// stop the timer, so it will be called repeatedly and will typically
// return different values depending on the current mouse position
//
// the base class version just returns true
virtual bool SendAutoScrollEvents(wxScrollWinEvent& event) const;
// the methods to be called from the window event handlers
void HandleOnScroll(wxScrollWinEvent& event);
void HandleOnSize(wxSizeEvent& event);
void HandleOnPaint(wxPaintEvent& event);
void HandleOnChar(wxKeyEvent& event);
void HandleOnMouseEnter(wxMouseEvent& event);
void HandleOnMouseLeave(wxMouseEvent& event);
#if wxUSE_MOUSEWHEEL
void HandleOnMouseWheel(wxMouseEvent& event);
#endif // wxUSE_MOUSEWHEEL
// FIXME: this is needed for now for wxPlot compilation, should be removed
// once it is fixed!
void OnScroll(wxScrollWinEvent& event) { HandleOnScroll(event); }
protected:
// get pointer to our scroll rect if we use it or NULL
const wxRect *GetScrollRect() const
{
return m_rectToScroll.width != 0 ? &m_rectToScroll : NULL;
}
// get the size of the target window
wxSize GetTargetSize() const
{
return m_rectToScroll.width != 0 ? m_rectToScroll.GetSize()
: m_targetWindow->GetClientSize();
}
void GetTargetSize(int *w, int *h)
{
wxSize size = GetTargetSize();
if ( w )
*w = size.x;
if ( h )
*h = size.y;
}
// change just the target window (unlike SetWindow which changes m_win as
// well)
void DoSetTargetWindow(wxWindow *target);
// delete the event handler we installed
void DeleteEvtHandler();
double m_scaleX;
double m_scaleY;
wxWindow *m_win,
*m_targetWindow;
wxRect m_rectToScroll;
wxTimer *m_timerAutoScroll;
int m_xScrollPixelsPerLine;
int m_yScrollPixelsPerLine;
int m_xScrollPosition;
int m_yScrollPosition;
int m_xScrollLines;
int m_yScrollLines;
int m_xScrollLinesPerPage;
int m_yScrollLinesPerPage;
bool m_xScrollingEnabled;
bool m_yScrollingEnabled;
#if wxUSE_MOUSEWHEEL
int m_wheelRotation;
#endif // wxUSE_MOUSEWHEEL
wxScrollHelperEvtHandler *m_handler;
DECLARE_NO_COPY_CLASS(wxScrollHelper)
};
#endif
// ----------------------------------------------------------------------------
// wxScrolledWindow: a wxWindow which knows how to scroll
// ----------------------------------------------------------------------------
#if defined(__WXGTK__) && !defined(__WXUNIVERSAL__)
#include "wx/gtk/scrolwin.h"
#else // !wxGTK
#include "wx/generic/scrolwin.h"
class WXDLLEXPORT wxScrolledWindow : public wxGenericScrolledWindow
{
public:
wxScrolledWindow() { }
wxScrolledWindow(wxWindow *parent,
wxWindowID winid = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxScrolledWindowStyle,
const wxString& name = wxPanelNameStr)
: wxGenericScrolledWindow(parent, winid, pos, size, style, name)
{
}
private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxScrolledWindow)
};
#define wxSCROLLED_WINDOW_IS_GENERIC 1
#endif
#endif
// _WX_SCROLWIN_H_BASE_

1396
include/wx/stc/stc.h Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

56
src/stc/Makefile.in Normal file
View File

@@ -0,0 +1,56 @@
###############################################################################
# Purpose: Makefile.in for STC contrib for Unix with autoconf
# Created: 14.03.00
# Author: VZ
# Version: $Id$
###############################################################################
top_srcdir = @top_srcdir@/..
top_builddir = ../../..
scintilla_dir = $(top_srcdir)/contrib/src/stc/scintilla
libsrc_dir = contrib/src/stc@PATH_IFS@$(scintilla_dir)/src
TARGET_LIBNAME=libstc
LIBVERSION_CURRENT=1
LIBVERSION_REVISION=0
LIBVERSION_AGE=0
HEADER_PATH=$(top_srcdir)/contrib/include/wx
HEADER_SUBDIR=stc
HEADERS=stc.h
OBJECTS=PlatWX.o ScintillaWX.o stc.o \
DocumentAccessor.o \
LexCPP.o \
LexHTML.o \
LexLua.o \
LexOthers.o \
LexPerl.o \
LexPython.o \
LexSQL.o \
LexVB.o \
UniConversion.o \
WindowAccessor.o \
AutoComplete.o \
CallTip.o \
CellBuffer.o \
ContractionState.o \
Document.o \
Editor.o \
Indicator.o \
KeyMap.o \
KeyWords.o \
LineMarker.o \
PropSet.o \
ScintillaBase.o \
Style.o \
ViewStyle.o \
PosRegExp.o \
APPEXTRADEFS=-D__WX__ -DSCI_LEXER -I$(scintilla_dir)/src -I$(scintilla_dir)/include -I$(top_srcdir)/contrib/include
include $(top_builddir)/src/makelib.env

712
src/stc/PlatWX.cpp Normal file
View File

@@ -0,0 +1,712 @@
// Scintilla source code edit control
// PlatWX.cxx - implementation of platform facilities on wxWindows
// Copyright 1998-1999 by Neil Hodgson <neilh@scintilla.org>
// Robin Dunn <robin@aldunn.com>
// The License.txt file describes the conditions under which this software may be distributed.
#include <ctype.h>
#include "Platform.h"
#include "wx/stc/stc.h"
#ifdef __WXGTK__
#include <gtk/gtk.h>
#endif
Point Point::FromLong(long lpoint) {
return Point(lpoint & 0xFFFF, lpoint >> 16);
}
wxRect wxRectFromPRectangle(PRectangle prc) {
wxRect rc(prc.left, prc.top,
prc.right-prc.left, prc.bottom-prc.top);
return rc;
}
PRectangle PRectangleFromwxRect(wxRect rc) {
return PRectangle(rc.GetLeft(), rc.GetTop(), rc.GetRight(), rc.GetBottom());
}
Colour::Colour(long lcol) {
co.Set(lcol & 0xff, (lcol >> 8) & 0xff, (lcol >> 16) & 0xff);
}
Colour::Colour(unsigned int red, unsigned int green, unsigned int blue) {
co.Set(red, green, blue);
}
bool Colour::operator==(const Colour &other) const {
return co == other.co;
}
long Colour::AsLong() const {
return (((long)co.Blue() << 16) |
((long)co.Green() << 8) |
((long)co.Red()));
}
unsigned int Colour::GetRed() {
return co.Red();
}
unsigned int Colour::GetGreen() {
return co.Green();
}
unsigned int Colour::GetBlue() {
return co.Blue();
}
Palette::Palette() {
used = 0;
allowRealization = false;
}
Palette::~Palette() {
Release();
}
void Palette::Release() {
used = 0;
}
// This method either adds a colour to the list of wanted colours (want==true)
// or retrieves the allocated colour back to the ColourPair.
// This is one method to make it easier to keep the code for wanting and retrieving in sync.
void Palette::WantFind(ColourPair &cp, bool want) {
if (want) {
for (int i=0; i < used; i++) {
if (entries[i].desired == cp.desired)
return;
}
if (used < numEntries) {
entries[used].desired = cp.desired;
entries[used].allocated = cp.desired;
used++;
}
} else {
for (int i=0; i < used; i++) {
if (entries[i].desired == cp.desired) {
cp.allocated = entries[i].allocated;
return;
}
}
cp.allocated = cp.desired;
}
}
void Palette::Allocate(Window &) {
if (allowRealization) {
}
}
Font::Font() {
id = 0;
ascent = 0;
}
Font::~Font() {
}
void Font::Create(const char *faceName, int characterSet, int size, bool bold, bool italic) {
Release();
id = new wxFont(size,
wxDEFAULT,
italic ? wxITALIC : wxNORMAL,
bold ? wxBOLD : wxNORMAL,
false,
faceName,
wxFONTENCODING_DEFAULT);
}
void Font::Release() {
if (id)
delete id;
id = 0;
}
Surface::Surface() :
hdc(0), hdcOwned(0), bitmap(0),
x(0), y(0) {
}
Surface::~Surface() {
Release();
}
void Surface::Release() {
if (bitmap) {
((wxMemoryDC*)hdc)->SelectObject(wxNullBitmap);
delete bitmap;
bitmap = 0;
}
if (hdcOwned) {
delete hdc;
hdc = 0;
hdcOwned = false;
}
}
bool Surface::Initialised() {
return hdc != 0;
}
void Surface::Init() {
Release();
hdc = new wxMemoryDC();
hdcOwned = true;
// **** ::SetTextAlign(hdc, TA_BASELINE);
}
void Surface::Init(SurfaceID hdc_) {
Release();
hdc = hdc_;
// **** ::SetTextAlign(hdc, TA_BASELINE);
}
void Surface::InitPixMap(int width, int height, Surface *surface_) {
Release();
hdc = new wxMemoryDC(surface_->hdc);
hdcOwned = true;
bitmap = new wxBitmap(width, height);
((wxMemoryDC*)hdc)->SelectObject(*bitmap);
// **** ::SetTextAlign(hdc, TA_BASELINE);
}
void Surface::PenColour(Colour fore) {
hdc->SetPen(wxPen(fore.co, 1, wxSOLID));
}
void Surface::BrushColor(Colour back) {
hdc->SetBrush(wxBrush(back.co, wxSOLID));
}
void Surface::SetFont(Font &font_) {
if (font_.GetID()) {
hdc->SetFont(*font_.GetID());
}
}
int Surface::LogPixelsY() {
return hdc->GetPPI().y;
}
int Surface::DeviceHeightFont(int points) {
return points * LogPixelsY() / 72;
}
void Surface::MoveTo(int x_, int y_) {
x = x_;
y = y_;
}
void Surface::LineTo(int x_, int y_) {
hdc->DrawLine(x,y, x_,y_);
x = x_;
y = y_;
}
void Surface::Polygon(Point *pts, int npts, Colour fore,
Colour back) {
PenColour(fore);
BrushColor(back);
hdc->DrawPolygon(npts, (wxPoint*)pts);
}
void Surface::RectangleDraw(PRectangle rc, Colour fore, Colour back) {
PenColour(fore);
BrushColor(back);
hdc->DrawRectangle(wxRectFromPRectangle(rc));
}
void Surface::FillRectangle(PRectangle rc, Colour back) {
BrushColor(back);
hdc->SetPen(*wxTRANSPARENT_PEN);
hdc->DrawRectangle(wxRectFromPRectangle(rc));
}
void Surface::FillRectangle(PRectangle rc, Surface &surfacePattern) {
wxBrush br;
if (surfacePattern.bitmap)
br = wxBrush(*surfacePattern.bitmap);
else // Something is wrong so display in red
br = wxBrush(*wxRED, wxSOLID);
hdc->SetPen(*wxTRANSPARENT_PEN);
hdc->SetBrush(br);
hdc->DrawRectangle(wxRectFromPRectangle(rc));
}
void Surface::RoundedRectangle(PRectangle rc, Colour fore, Colour back) {
PenColour(fore);
BrushColor(back);
hdc->DrawRoundedRectangle(wxRectFromPRectangle(rc), 4);
}
void Surface::Ellipse(PRectangle rc, Colour fore, Colour back) {
PenColour(fore);
BrushColor(back);
hdc->DrawEllipse(wxRectFromPRectangle(rc));
}
void Surface::Copy(PRectangle rc, Point from, Surface &surfaceSource) {
wxRect r = wxRectFromPRectangle(rc);
hdc->Blit(r.x, r.y, r.width, r.height,
surfaceSource.hdc, from.x, from.y, wxCOPY);
}
void Surface::DrawText(PRectangle rc, Font &font, int ybase,
const char *s, int len, Colour fore, Colour back) {
SetFont(font);
hdc->SetTextForeground(fore.co);
hdc->SetTextBackground(back.co);
FillRectangle(rc, back);
// ybase is where the baseline should be, but wxWin uses the upper left
// corner, so I need to calculate the real position for the text...
hdc->DrawText(wxString(s, len), rc.left, ybase - font.ascent);
}
void Surface::DrawTextClipped(PRectangle rc, Font &font, int ybase, const char *s, int len, Colour fore, Colour back) {
SetFont(font);
hdc->SetTextForeground(fore.co);
hdc->SetTextBackground(back.co);
FillRectangle(rc, back);
hdc->SetClippingRegion(wxRectFromPRectangle(rc));
// see comments above
hdc->DrawText(wxString(s, len), rc.left, ybase - font.ascent);
hdc->DestroyClippingRegion();
}
int Surface::WidthText(Font &font, const char *s, int len) {
SetFont(font);
int w;
int h;
hdc->GetTextExtent(wxString(s, len), &w, &h);
return w;
}
void Surface::MeasureWidths(Font &font, const char *s, int len, int *positions) {
SetFont(font);
int totalWidth = 0;
for (int i=0; i<len; i++) {
int w;
int h;
hdc->GetTextExtent(s[i], &w, &h);
totalWidth += w;
positions[i] = totalWidth;
}
}
int Surface::WidthChar(Font &font, char ch) {
SetFont(font);
int w;
int h;
hdc->GetTextExtent(ch, &w, &h);
return w;
}
#define EXTENT_TEST " `~!@#$%^&*()-_=+\\|[]{};:\"\'<,>.?/1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
int Surface::Ascent(Font &font) {
SetFont(font);
int w, h, d, e;
hdc->GetTextExtent(EXTENT_TEST, &w, &h, &d, &e);
font.ascent = h - d;
return font.ascent;
}
int Surface::Descent(Font &font) {
SetFont(font);
int w, h, d, e;
hdc->GetTextExtent(EXTENT_TEST, &w, &h, &d, &e);
return d;
}
int Surface::InternalLeading(Font &font) {
return 0;
}
int Surface::ExternalLeading(Font &font) {
SetFont(font);
int w, h, d, e;
hdc->GetTextExtent(EXTENT_TEST, &w, &h, &d, &e);
return e;
}
int Surface::Height(Font &font) {
SetFont(font);
return hdc->GetCharHeight();
}
int Surface::AverageCharWidth(Font &font) {
SetFont(font);
return hdc->GetCharWidth();
}
int Surface::SetPalette(Palette *pal, bool inBackGround) {
return 0; // **** figure out what to do with palettes...
}
void Surface::SetClip(PRectangle rc) {
hdc->SetClippingRegion(wxRectFromPRectangle(rc));
}
void Surface::FlushCachedState() {
}
Window::~Window() {
}
void Window::Destroy() {
if (id)
id->Destroy();
id = 0;
}
bool Window::HasFocus() {
return wxWindow::FindFocus() == id;
}
PRectangle Window::GetPosition() {
wxRect rc(id->GetPosition(), id->GetSize());
return PRectangleFromwxRect(rc);
}
void Window::SetPosition(PRectangle rc) {
wxRect r = wxRectFromPRectangle(rc);
id->SetSize(r);
}
void Window::SetPositionRelative(PRectangle rc, Window) {
SetPosition(rc); // ????
}
PRectangle Window::GetClientPosition() {
wxSize sz = id->GetClientSize();
return PRectangle(0, 0, sz.x, sz.y);
}
void Window::Show(bool show) {
id->Show(show);
}
void Window::InvalidateAll() {
id->Refresh(false);
}
void Window::InvalidateRectangle(PRectangle rc) {
wxRect r = wxRectFromPRectangle(rc);
id->Refresh(false, &r);
}
void Window::SetFont(Font &font) {
id->SetFont(*font.GetID());
}
void Window::SetCursor(Cursor curs) {
int cursorId;
switch (curs) {
case cursorText:
cursorId = wxCURSOR_IBEAM;
break;
case cursorArrow:
cursorId = wxCURSOR_ARROW;
break;
case cursorUp:
cursorId = wxCURSOR_ARROW; // ** no up arrow... wxCURSOR_UPARROW;
break;
case cursorWait:
cursorId = wxCURSOR_WAIT;
break;
case cursorHoriz:
cursorId = wxCURSOR_SIZEWE;
break;
case cursorVert:
cursorId = wxCURSOR_SIZENS;
break;
case cursorReverseArrow:
cursorId = wxCURSOR_POINT_RIGHT;
break;
default:
cursorId = wxCURSOR_ARROW;
break;
}
id->SetCursor(wxCursor(cursorId));
}
void Window::SetTitle(const char *s) {
id->SetTitle(s);
}
class wxSTCListBox : public wxListBox {
public:
wxSTCListBox(wxWindow* parent, wxWindowID id)
: wxListBox(parent, id, wxDefaultPosition, wxDefaultSize,
0, NULL, wxLB_SINGLE | wxLB_SORT | wxSIMPLE_BORDER)
{}
void OnFocus(wxFocusEvent& event) {
GetParent()->SetFocus();
event.Skip();
}
#ifdef __WXGTK__
void DoSetFirstItem(int n);
#endif
private:
DECLARE_EVENT_TABLE()
};
BEGIN_EVENT_TABLE(wxSTCListBox, wxListBox)
EVT_SET_FOCUS(wxSTCListBox::OnFocus)
END_EVENT_TABLE()
#ifdef __WXGTK__
// This can be removed after 2.2.2 I think
void wxSTCListBox::DoSetFirstItem( int n )
{
wxCHECK_RET( m_list, wxT("invalid listbox") );
if (gdk_pointer_is_grabbed () && GTK_WIDGET_HAS_GRAB (m_list))
return;
// terribly efficient
const gchar *vadjustment_key = "gtk-vadjustment";
guint vadjustment_key_id = g_quark_from_static_string (vadjustment_key);
GtkAdjustment *adjustment =
(GtkAdjustment*) gtk_object_get_data_by_id (GTK_OBJECT (m_list), vadjustment_key_id);
wxCHECK_RET( adjustment, wxT("invalid listbox code") );
GList *target = g_list_nth( m_list->children, n );
wxCHECK_RET( target, wxT("invalid listbox index") );
GtkWidget *item = GTK_WIDGET(target->data);
wxCHECK_RET( item, wxT("invalid listbox code") );
// find the last item before this one which is already realized
size_t nItemsBefore;
for ( nItemsBefore = 0; item && (item->allocation.y == -1); nItemsBefore++ )
{
target = target->prev;
if ( !target )
{
// nothing we can do if there are no allocated items yet
return;
}
item = GTK_WIDGET(target->data);
}
gtk_adjustment_set_value(adjustment,
item->allocation.y +
nItemsBefore*item->allocation.height);
}
#endif
ListBox::ListBox() {
}
ListBox::~ListBox() {
}
void ListBox::Create(Window &parent, int ctrlID) {
id = new wxSTCListBox(parent.id, ctrlID);
// id = new wxListBox(parent.id, ctrlID, wxDefaultPosition, wxDefaultSize,
// 0, NULL, wxLB_SINGLE | wxLB_SORT | wxSIMPLE_BORDER);
}
PRectangle ListBox::GetDesiredRect() {
wxSize sz = ((wxListBox*)id)->GetBestSize();
PRectangle rc;
rc.top = 0;
rc.left = 0;
if (sz.x > 150) // TODO: A better way to determine these max sizes
sz.x = 150;
if (sz.y > 100)
sz.y = 100;
rc.right = sz.x;
rc.bottom = sz.y;
return rc;
}
void ListBox::SetAverageCharWidth(int width) {
aveCharWidth = width;
}
void ListBox::SetFont(Font &font) {
Window::SetFont(font);
}
void ListBox::Clear() {
((wxListBox*)id)->Clear();
}
void ListBox::Append(char *s) {
((wxListBox*)id)->Append(s);
}
int ListBox::Length() {
return ((wxListBox*)id)->Number();
}
void ListBox::Select(int n) {
((wxListBox*)id)->SetSelection(n);
#ifdef __WXGTK__
if (n > 4)
n = n - 4;
else
n = 1;
((wxListBox*)id)->SetFirstItem(n);
#endif
}
int ListBox::GetSelection() {
return ((wxListBox*)id)->GetSelection();
}
int ListBox::Find(const char *prefix) {
if (prefix) {
for (int x=0; x < ((wxListBox*)id)->Number(); x++) {
wxString text = ((wxListBox*)id)->GetString(x);
if (text.StartsWith(prefix))
return x;
}
}
return -1;
}
void ListBox::GetValue(int n, char *value, int len) {
wxString text = ((wxListBox*)id)->GetString(n);
strncpy(value, text.c_str(), len);
value[len-1] = '\0';
}
void ListBox::Sort() {
// wxWindows keeps sorted so no need to sort
}
Menu::Menu() : id(0) {
}
void Menu::CreatePopUp() {
Destroy();
id = new wxMenu();
}
void Menu::Destroy() {
if (id)
delete id;
id = 0;
}
void Menu::Show(Point pt, Window &w) {
w.GetID()->PopupMenu(id, pt.x - 4, pt.y);
Destroy();
}
Colour Platform::Chrome() {
wxColour c;
c = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE);
return Colour(c.Red(), c.Green(), c.Blue());
}
Colour Platform::ChromeHighlight() {
wxColour c;
c = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DHIGHLIGHT);
return Colour(c.Red(), c.Green(), c.Blue());
}
const char *Platform::DefaultFont() {
return wxNORMAL_FONT->GetFaceName();
}
int Platform::DefaultFontSize() {
return 8;
}
unsigned int Platform::DoubleClickTime() {
return 500; // **** ::GetDoubleClickTime();
}
void Platform::DebugDisplay(const char *s) {
wxLogDebug(s);
}
bool Platform::IsKeyDown(int key) {
return false; // I don't think we'll need this.
}
long Platform::SendScintilla(WindowID w,
unsigned int msg,
unsigned long wParam,
long lParam) {
wxStyledTextCtrl* stc = (wxStyledTextCtrl*)w;
return stc->SendMsg(msg, wParam, lParam);
}
// These are utility functions not really tied to a platform
int Platform::Minimum(int a, int b) {
if (a < b)
return a;
else
return b;
}
int Platform::Maximum(int a, int b) {
if (a > b)
return a;
else
return b;
}
#define TRACE
void Platform::DebugPrintf(const char *format, ...) {
#ifdef TRACE
char buffer[2000];
va_list pArguments;
va_start(pArguments, format);
vsprintf(buffer,format,pArguments);
va_end(pArguments);
Platform::DebugDisplay(buffer);
#endif
}
int Platform::Clamp(int val, int minVal, int maxVal) {
if (val > maxVal)
val = maxVal;
if (val < minVal)
val = minVal;
return val;
}

47
src/stc/README.txt Normal file
View File

@@ -0,0 +1,47 @@
This contrib is the wxStyledTextCtrl, which is a wrapper around the
Scintilla edit control. (See www.scintilla.org)
There is still VERY MUCH to be done, most notable of which is a more
advanced sample that exercises more of the code. (I havn't tested
AutoComplete or CallTips, or most of the event types at all yet.) And
also documentation, adding wrappers for some new scintilla
functionality, building and testing on wxGTK, etc. Be patient, it all
will get there soon.
Let me describe a bit about the architecture I am implementing...
Obviously there is the Platform layer which implements the varioius
platform classes by using wxWindows classes and filling in where
needed. Then there is a ScintillaWX class that is derived from
ScintillaBase and implements the necessary virtual methods that
Scintilla needs to fully funciton. This class however is not meant to
ever be used directly by wx programmers. I call it one end of the
bridge between the wx and Scintilla worlds. The other end of the
bridge is a class called wxStyledTextCtrl that looks, feels and acts
like other classes in wxWindows. Here is a diagram:
+------------------+ +-------------------+
| wxStyledTextCtrl |--bridge--| ScintillaWX |
+------------------+ +-------------------+
| ScintillaBase |
+-------------------+
| Editor |
+-------------------+
| PlatWX |
+-------------------+
wxStyledTextCtrl derives from wxControl so it has a window that can be
drawn upon. When a wxStyledTextCtrl is constructed it constructs a
ScintillaWX for itself and passes itself to the scintilla object to be
set as the wMain and wDraw attributes. All method calls on the STC
are sent over the bridge in the form of calls to ScintiallWX::WndProc.
All notifications are sent back over the bridge and turned into
wxEvents.
Robin

515
src/stc/ScintillaWX.cpp Normal file
View File

@@ -0,0 +1,515 @@
////////////////////////////////////////////////////////////////////////////
// Name: ScintillaWX.cxx
// Purpose: A wxWindows implementation of Scintilla. A class derived
// from ScintillaBase that uses the "wx platform" defined in
// PlatformWX.cxx This class is one end of a bridge between
// the wx world and the Scintilla world. It needs a peer
// object of type wxStyledTextCtrl to function.
//
// Author: Robin Dunn
//
// Created: 13-Jan-2000
// RCS-ID: $Id$
// Copyright: (c) 2000 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#include <ctype.h>
#include "ScintillaWX.h"
#include "wx/stc/stc.h"
//----------------------------------------------------------------------
const int H_SCROLL_MAX = 2000;
const int H_SCROLL_STEP = 20;
const int H_SCROLL_PAGE = 200;
//----------------------------------------------------------------------
// Helper classes
class wxSTCTimer : public wxTimer {
public:
wxSTCTimer(ScintillaWX* swx) {
this->swx = swx;
}
void Notify() {
swx->DoTick();
}
private:
ScintillaWX* swx;
};
bool wxSTCDropTarget::OnDropText(wxCoord x, wxCoord y, const wxString& data) {
return swx->DoDropText(x, y, data);
}
wxDragResult wxSTCDropTarget::OnEnter(wxCoord x, wxCoord y, wxDragResult def) {
return swx->DoDragEnter(x, y, def);
}
wxDragResult wxSTCDropTarget::OnDragOver(wxCoord x, wxCoord y, wxDragResult def) {
return swx->DoDragOver(x, y, def);
}
void wxSTCDropTarget::OnLeave() {
swx->DoDragLeave();
}
class wxSTCCallTip : public wxWindow {
public:
wxSTCCallTip(wxWindow* parent, int ID, CallTip* ct)
: wxWindow(parent, ID)
{
m_ct = ct;
}
void OnPaint(wxPaintEvent& evt) {
wxPaintDC dc(this);
Surface surfaceWindow;
surfaceWindow.Init(&dc);
m_ct->PaintCT(&surfaceWindow);
surfaceWindow.Release();
}
CallTip* m_ct;
DECLARE_EVENT_TABLE()
};
BEGIN_EVENT_TABLE(wxSTCCallTip, wxWindow)
EVT_PAINT(wxSTCCallTip::OnPaint)
END_EVENT_TABLE()
//----------------------------------------------------------------------
// Constructor/Destructor
ScintillaWX::ScintillaWX(wxStyledTextCtrl* win) {
capturedMouse = false;
wMain = win;
wDraw = win;
stc = win;
Initialise();
}
ScintillaWX::~ScintillaWX() {
SetTicking(false);
}
//----------------------------------------------------------------------
// base class virtuals
void ScintillaWX::Initialise() {
//ScintillaBase::Initialise();
dropTarget = new wxSTCDropTarget;
dropTarget->SetScintilla(this);
stc->SetDropTarget(dropTarget);
}
void ScintillaWX::Finalise() {
ScintillaBase::Finalise();
}
void ScintillaWX::StartDrag() {
wxDropSource source(wMain.GetID());
wxTextDataObject data(dragChars);
wxDragResult result;
source.SetData(data);
result = source.DoDragDrop(TRUE);
if (result == wxDragMove && dropWentOutside)
ClearSelection();
inDragDrop = FALSE;
SetDragPosition(invalidPosition);
}
void ScintillaWX::SetTicking(bool on) {
wxSTCTimer* steTimer;
if (timer.ticking != on) {
timer.ticking = on;
if (timer.ticking) {
steTimer = new wxSTCTimer(this);
steTimer->Start(timer.tickSize);
timer.tickerID = (int)steTimer;
} else {
steTimer = (wxSTCTimer*)timer.tickerID;
steTimer->Stop();
delete steTimer;
timer.tickerID = 0;
}
}
timer.ticksToWait = caret.period;
}
void ScintillaWX::SetMouseCapture(bool on) {
if (on && !capturedMouse)
wMain.GetID()->CaptureMouse();
else if (!on && capturedMouse)
wMain.GetID()->ReleaseMouse();
capturedMouse = on;
}
bool ScintillaWX::HaveMouseCapture() {
return capturedMouse;
}
void ScintillaWX::ScrollText(int linesToMove) {
int dy = vs.lineHeight * (linesToMove);
// TODO: calculate the rectangle to refreshed...
wMain.GetID()->ScrollWindow(0, dy);
}
void ScintillaWX::SetVerticalScrollPos() {
wMain.GetID()->SetScrollPos(wxVERTICAL, topLine);
}
void ScintillaWX::SetHorizontalScrollPos() {
wMain.GetID()->SetScrollPos(wxHORIZONTAL, xOffset);
}
bool ScintillaWX::ModifyScrollBars(int nMax, int nPage) {
bool modified = false;
int sbMax = wMain.GetID()->GetScrollRange(wxVERTICAL);
int sbThumb = wMain.GetID()->GetScrollThumb(wxVERTICAL);
int sbPos = wMain.GetID()->GetScrollPos(wxVERTICAL);
if (sbMax != nMax || sbThumb != nPage) {
wMain.GetID()->SetScrollbar(wxVERTICAL, sbPos, nPage, nMax);
modified = true;
}
sbMax = wMain.GetID()->GetScrollRange(wxHORIZONTAL);
sbThumb = wMain.GetID()->GetScrollThumb(wxHORIZONTAL);
if ((sbMax != H_SCROLL_MAX) || (sbThumb != H_SCROLL_STEP)) {
wMain.GetID()->SetScrollbar(wxHORIZONTAL, 0, H_SCROLL_STEP, H_SCROLL_MAX);
modified = true;
}
return modified;
}
void ScintillaWX::NotifyChange() {
stc->NotifyChange();
}
void ScintillaWX::NotifyParent(SCNotification scn) {
stc->NotifyParent(&scn);
}
void ScintillaWX::Copy() {
if (currentPos != anchor) {
char* text = CopySelectionRange();
wxTheClipboard->Open();
wxTheClipboard->SetData(new wxTextDataObject(text));
wxTheClipboard->Close();
}
}
void ScintillaWX::Paste() {
pdoc->BeginUndoAction();
ClearSelection();
wxTextDataObject data;
bool canPaste;
wxTheClipboard->Open();
canPaste = wxTheClipboard->GetData(data);
wxTheClipboard->Close();
if (canPaste) {
wxString str = data.GetText();
int len = str.Length();
pdoc->InsertString(currentPos, str.c_str(), len);
SetEmptySelection(currentPos + len);
}
pdoc->EndUndoAction();
NotifyChange();
Redraw();
}
bool ScintillaWX::CanPaste() {
wxTextDataObject data;
bool canPaste;
wxTheClipboard->Open();
canPaste = wxTheClipboard->GetData(data);
wxTheClipboard->Close();
return canPaste;
}
void ScintillaWX::CreateCallTipWindow(PRectangle) {
ct.wCallTip = new wxSTCCallTip(wDraw.GetID(), -1, &ct);
ct.wDraw = ct.wCallTip;
}
void ScintillaWX::AddToPopUp(const char *label, int cmd, bool enabled) {
if (!label[0])
popup.GetID()->AppendSeparator();
else
popup.GetID()->Append(cmd, label);
if (!enabled)
popup.GetID()->Enable(cmd, enabled);
}
void ScintillaWX::ClaimSelection() {
}
long ScintillaWX::DefWndProc(unsigned int /*iMessage*/, unsigned long /*wParam*/, long /*lParam*/) {
return 0;
}
long ScintillaWX::WndProc(unsigned int iMessage, unsigned long wParam, long lParam) {
// switch (iMessage) {
// case EM_CANPASTE:
// return CanPaste();
// default:
return ScintillaBase::WndProc(iMessage, wParam, lParam);
// }
// return 0;
}
//----------------------------------------------------------------------
// Event delegates
void ScintillaWX::DoPaint(wxDC* dc, wxRect rect) {
paintState = painting;
Surface surfaceWindow;
surfaceWindow.Init(dc);
PRectangle rcPaint = PRectangleFromwxRect(rect);
dc->BeginDrawing();
Paint(&surfaceWindow, rcPaint);
dc->EndDrawing();
surfaceWindow.Release();
if (paintState == paintAbandoned) {
// Painting area was insufficient to cover new styling or brace highlight positions
FullPaint();
}
paintState = notPainting;
#ifdef __WXGTK__
// On wxGTK the editor window paints can overwrite the listbox...
if (ac.Active())
((wxWindow*)ac.lb.GetID())->Refresh(TRUE);
#endif
}
void ScintillaWX::DoHScroll(int type, int pos) {
int xPos = xOffset;
switch (type) {
case wxEVT_SCROLLWIN_LINEUP:
xPos -= H_SCROLL_STEP;
break;
case wxEVT_SCROLLWIN_LINEDOWN:
xPos += H_SCROLL_STEP;
break;
case wxEVT_SCROLLWIN_PAGEUP:
xPos -= H_SCROLL_PAGE;
break;
case wxEVT_SCROLLWIN_PAGEDOWN:
xPos += H_SCROLL_PAGE;
break;
case wxEVT_SCROLLWIN_TOP:
xPos = 0;
break;
case wxEVT_SCROLLWIN_BOTTOM:
xPos = H_SCROLL_MAX;
break;
case wxEVT_SCROLLWIN_THUMBTRACK:
xPos = pos;
break;
}
HorizontalScrollTo(xPos);
}
void ScintillaWX::DoVScroll(int type, int pos) {
int topLineNew = topLine;
switch (type) {
case wxEVT_SCROLLWIN_LINEUP:
topLineNew -= 1;
break;
case wxEVT_SCROLLWIN_LINEDOWN:
topLineNew += 1;
break;
case wxEVT_SCROLLWIN_PAGEUP:
topLineNew -= LinesToScroll();
break;
case wxEVT_SCROLLWIN_PAGEDOWN:
topLineNew += LinesToScroll();
break;
case wxEVT_SCROLLWIN_TOP:
topLineNew = 0;
break;
case wxEVT_SCROLLWIN_BOTTOM:
topLineNew = MaxScrollPos();
break;
case wxEVT_SCROLLWIN_THUMBTRACK:
topLineNew = pos;
break;
}
ScrollTo(topLineNew);
}
void ScintillaWX::DoSize(int width, int height) {
PRectangle rcClient(0,0,width,height);
SetScrollBarsTo(rcClient);
DropGraphics();
}
void ScintillaWX::DoLoseFocus(){
DropCaret();
}
void ScintillaWX::DoGainFocus(){
ShowCaretAtCurrentPosition();
}
void ScintillaWX::DoSysColourChange() {
InvalidateStyleData();
}
void ScintillaWX::DoButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt) {
ButtonDown(pt, curTime, shift, ctrl, alt);
}
void ScintillaWX::DoButtonUp(Point pt, unsigned int curTime, bool ctrl) {
ButtonUp(pt, curTime, ctrl);
}
void ScintillaWX::DoButtonMove(Point pt) {
ButtonMove(pt);
}
void ScintillaWX::DoAddChar(char ch) {
//bool acActiveBeforeCharAdded = ac.Active();
AddChar(ch);
//if (acActiveBeforeCharAdded)
// AutoCompleteChanged(ch);
}
int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt) {
switch (key) {
case WXK_DOWN: key = SCK_DOWN; break;
case WXK_UP: key = SCK_UP; break;
case WXK_LEFT: key = SCK_LEFT; break;
case WXK_RIGHT: key = SCK_RIGHT; break;
case WXK_HOME: key = SCK_HOME; break;
case WXK_END: key = SCK_END; break;
case WXK_PRIOR: key = SCK_PRIOR; break;
case WXK_NEXT: key = SCK_NEXT; break;
case WXK_DELETE: key = SCK_DELETE; break;
case WXK_INSERT: key = SCK_INSERT; break;
case WXK_ESCAPE: key = SCK_ESCAPE; break;
case WXK_BACK: key = SCK_BACK; break;
case WXK_TAB: key = SCK_TAB; break;
case WXK_RETURN: key = SCK_RETURN; break;
case WXK_ADD: key = SCK_ADD; break;
case WXK_SUBTRACT: key = SCK_SUBTRACT; break;
case WXK_DIVIDE: key = SCK_DIVIDE; break;
case WXK_CONTROL: key = 0; break;
case WXK_ALT: key = 0; break;
case WXK_SHIFT: key = 0; break;
}
return KeyDown(key, shift, ctrl, alt);
}
void ScintillaWX::DoCommand(int ID) {
Command(ID);
}
void ScintillaWX::DoContextMenu(Point pt) {
ContextMenu(pt);
}
void ScintillaWX::DoOnListBox() {
AutoCompleteCompleted();
}
//----------------------------------------------------------------------
bool ScintillaWX::DoDropText(long x, long y, const wxString& data) {
SetDragPosition(invalidPosition);
int movePos = PositionFromLocation(Point(x,y));
DropAt(movePos, data, dragResult == wxDragMove, FALSE); // TODO: rectangular?
return TRUE;
}
wxDragResult ScintillaWX::DoDragEnter(wxCoord x, wxCoord y, wxDragResult def) {
return def;
}
wxDragResult ScintillaWX::DoDragOver(wxCoord x, wxCoord y, wxDragResult def) {
SetDragPosition(PositionFromLocation(Point(x, y)));
dragResult = def;
return def;
}
void ScintillaWX::DoDragLeave() {
SetDragPosition(invalidPosition);
}
//----------------------------------------------------------------------
// Redraw all of text area. This paint will not be abandoned.
void ScintillaWX::FullPaint() {
paintState = painting;
// rcPaint = GetTextRectangle();
// wxClientDC dc(wMain.GetID());
// Surface surfaceWindow;
// surfaceWindow.Init(&dc);
// Paint(&surfaceWindow, rcPaint);
// surfaceWindow.Release();
wMain.GetID()->Refresh(FALSE);
paintState = notPainting;
}
void ScintillaWX::DoScrollToLine(int line) {
ScrollTo(line);
}
void ScintillaWX::DoScrollToColumn(int column) {
HorizontalScrollTo(column * vs.spaceWidth);
}
//----------------------------------------------------------------------
//----------------------------------------------------------------------

152
src/stc/ScintillaWX.h Normal file
View File

@@ -0,0 +1,152 @@
////////////////////////////////////////////////////////////////////////////
// Name: ScintillaWX.h
// Purpose: A wxWindows implementation of Scintilla. A class derived
// from ScintillaBase that uses the "wx platform" defined in
// PlatWX.cpp. This class is one end of a bridge between
// the wx world and the Scintilla world. It needs a peer
// object of type wxStyledTextCtrl to function.
//
// Author: Robin Dunn
//
// Created: 13-Jan-2000
// RCS-ID: $Id$
// Copyright: (c) 2000 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifndef __ScintillaWX_h__
#define __ScintillaWX_h__
//----------------------------------------------------------------------
#include "Platform.h"
#include "Scintilla.h"
#ifdef SCI_LEXER
#include "SciLexer.h"
#include "PropSet.h"
#include "Accessor.h"
#include "KeyWords.h"
#endif
#include "ContractionState.h"
#include "SVector.h"
#include "CellBuffer.h"
#include "CallTip.h"
#include "KeyMap.h"
#include "Indicator.h"
#include "LineMarker.h"
#include "Style.h"
#include "ViewStyle.h"
#include "AutoComplete.h"
#include "Document.h"
#include "Editor.h"
#include "ScintillaBase.h"
#include <wx/wx.h>
#include <wx/dataobj.h>
#include <wx/clipbrd.h>
#include <wx/dnd.h>
//----------------------------------------------------------------------
class wxStyledTextCtrl; // forward
class ScintillaWX;
//----------------------------------------------------------------------
// Helper classes
class wxSTCDropTarget : public wxTextDropTarget {
public:
void SetScintilla(ScintillaWX* swx) {
this->swx = swx;
}
bool OnDropText(wxCoord x, wxCoord y, const wxString& data);
wxDragResult OnEnter(wxCoord x, wxCoord y, wxDragResult def);
wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def);
void OnLeave();
private:
ScintillaWX* swx;
};
//----------------------------------------------------------------------
class ScintillaWX : public ScintillaBase {
public:
ScintillaWX(wxStyledTextCtrl* win);
~ScintillaWX();
// base class virtuals
virtual void Initialise();
virtual void Finalise();
virtual void StartDrag();
virtual void SetTicking(bool on);
virtual void SetMouseCapture(bool on);
virtual bool HaveMouseCapture();
virtual void ScrollText(int linesToMove);
virtual void SetVerticalScrollPos();
virtual void SetHorizontalScrollPos();
virtual bool ModifyScrollBars(int nMax, int nPage);
virtual void Copy();
virtual void Paste();
virtual void CreateCallTipWindow(PRectangle rc);
virtual void AddToPopUp(const char *label, int cmd = 0, bool enabled = true);
virtual void ClaimSelection();
virtual long DefWndProc(unsigned int iMessage,
unsigned long wParam,
long lParam);
virtual long WndProc(unsigned int iMessage,
unsigned long wParam,
long lParam);
virtual void NotifyChange();
virtual void NotifyParent(SCNotification scn);
// Event delegates
void DoPaint(wxDC* dc, wxRect rect);
void DoHScroll(int type, int pos);
void DoVScroll(int type, int pos);
void DoSize(int width, int height);
void DoLoseFocus();
void DoGainFocus();
void DoSysColourChange();
void DoButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt);
void DoButtonUp(Point pt, unsigned int curTime, bool ctrl);
void DoButtonMove(Point pt);
void DoAddChar(char ch);
int DoKeyDown(int key, bool shift, bool ctrl, bool alt);
void DoTick() { Tick(); }
bool DoDropText(long x, long y, const wxString& data);
wxDragResult DoDragEnter(wxCoord x, wxCoord y, wxDragResult def);
wxDragResult DoDragOver(wxCoord x, wxCoord y, wxDragResult def);
void DoDragLeave();
void DoCommand(int ID);
void DoContextMenu(Point pt);
void DoOnListBox();
// helpers
void FullPaint();
bool CanPaste();
bool GetHideSelection() { return hideSelection; }
void DoScrollToLine(int line);
void DoScrollToColumn(int column);
private:
bool capturedMouse;
wxStyledTextCtrl* stc;
wxSTCDropTarget* dropTarget;
wxDragResult dragResult;
};
//----------------------------------------------------------------------
#endif

250
src/stc/StcVC.dsp Normal file
View File

@@ -0,0 +1,250 @@
# Microsoft Developer Studio Project File - Name="StcVC" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 5.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=StcVC - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "StcVC.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "StcVC.mak" CFG="StcVC - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "StcVC - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "StcVC - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
!IF "$(CFG)" == "StcVC - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
RSC=rc.exe
# ADD BASE RSC /l 0x809
# ADD RSC /l 0x809
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../include" /I "scintilla/include" /I "scintilla/src" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "__WX__" /D "SCI_LEXER" /FD /c
# SUBTRACT CPP /YX
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\..\lib\stc.lib"
!ELSEIF "$(CFG)" == "StcVC - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
RSC=rc.exe
# ADD BASE RSC /l 0x809
# ADD RSC /l 0x809
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "../../../include" /I "../../include" /I "scintilla/include" /I "scintilla/src" /D "_DEBUG" /D DEBUG=1 /D "__WXDEBUG__" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "__WX__" /D "SCI_LEXER" /FD /c
# SUBTRACT CPP /YX
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\..\lib\stcd.lib"
!ENDIF
# Begin Target
# Name "StcVC - Win32 Release"
# Name "StcVC - Win32 Debug"
# Begin Group "Stc"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\PlatWX.cpp
# End Source File
# Begin Source File
SOURCE=.\ScintillaWX.cpp
# End Source File
# Begin Source File
SOURCE=.\ScintillaWX.h
# End Source File
# Begin Source File
SOURCE=.\stc.cpp
# End Source File
# End Group
# Begin Group "Scintilla"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\scintilla\src\Accessor.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\AutoComplete.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\AutoComplete.h
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\CallTip.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\CallTip.h
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\CellBuffer.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\CellBuffer.h
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\ContractionState.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\ContractionState.h
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\Document.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\Document.h
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\Editor.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\Editor.h
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\Indicator.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\Indicator.h
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\KeyMap.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\KeyMap.h
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\KeyWords.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\LexCPP.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\LexHTML.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\LexOthers.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\LexPerl.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\LexPython.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\LexSQL.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\LexVB.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\LineMarker.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\LineMarker.h
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\PropSet.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\ScintillaBase.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\ScintillaBase.h
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\Style.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\Style.h
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\SVector.h
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\ViewStyle.cxx
# End Source File
# Begin Source File
SOURCE=.\scintilla\src\ViewStyle.h
# End Source File
# End Group
# End Target
# End Project

29
src/stc/StcVC.dsw Normal file
View File

@@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "StcVC"=.\StcVC.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

684
src/stc/gen_iface.py Normal file
View File

@@ -0,0 +1,684 @@
#!/bin/env python
#----------------------------------------------------------------------------
# Name: gen_iface.py
# Purpose: Generate stc.h and stc.cpp from the info in Scintilla.iface
#
# Author: Robin Dunn
#
# Created: 5-Sept-2000
# RCS-ID: $Id$
# Copyright: (c) 2000 by Total Control Software
# Licence: wxWindows license
#----------------------------------------------------------------------------
import sys, string, re
from fileinput import FileInput
IFACE = './scintilla/include/Scintilla.iface'
H_TEMPLATE = './stc.h.in'
CPP_TEMPLATE = './stc.cpp.in'
H_DEST = '../../include/wx/stc/stc.h' # './stc_test.h' #
CPP_DEST = './stc.cpp' #'./stc_test.cpp'
# Value prefixes to convert
valPrefixes = [('SCI_', ''),
('SC_', ''),
('SCN_', None), # just toss these...
('SCEN_', None),
('SCE_', ''),
('SCLEX_', 'LEX_'),
('SCK_', 'KEY_'),
('SCFIND_', 'FIND_'),
('SCWS_', 'WS_'),
]
# Message funcion values that should have a CMD_ constant as well
cmdValues = [ (2300, 2350), 2011, 2013, (2176, 2180) ]
# Map some generic typenames to wx types, using return value syntax
retTypeMap = {
'position': 'int',
'string': 'wxString',
'colour': 'wxColour',
}
# Map some generic typenames to wx types, using parameter syntax
paramTypeMap = {
'position': 'int',
'string': 'const wxString&',
'colour': 'const wxColour&',
'keymod': 'int',
}
# Map of method info that needs tweaked. Either the name needs changed, or
# the method definition/implementation. Tuple items are:
#
# 1. New method name. None to skip the method, 0 to leave the
# default name.
# 2. Method definition for the .h file, 0 to leave alone
# 3. Method implementation for the .cpp file, 0 to leave alone.
# 4. tuple of Doc string lines, or 0 to leave alone.
#
methodOverrideMap = {
'AddText' : (0,
'void %s(const wxString& text);',
'''void %s(const wxString& text) {
SendMsg(%s, text.Len(), (long)text.c_str());''',
0),
'AddStyledText' : (0,
'void %s(const wxString& text);',
'''void %s(const wxString& text) {
SendMsg(%s, text.Len(), (long)text.c_str());''',
0),
'GetViewWS' : ( 'GetViewWhiteSpace', 0, 0, 0),
'SetViewWS' : ( 'SetViewWhiteSpace', 0, 0, 0),
'GetStyledText' : (0,
'wxString %s(int startPos, int endPos);',
'''wxString %s(int startPos, int endPos) {
wxString text;
int len = endPos - startPos;
TextRange tr;
tr.lpstrText = text.GetWriteBuf(len*2+1);
tr.chrg.cpMin = startPos;
tr.chrg.cpMax = endPos;
SendMsg(%s, 0, (long)&tr);
text.UngetWriteBuf(len*2);
return text;''',
('Retrieve a buffer of cells.',)),
'PositionFromPoint' : (0,
'int %s(wxPoint pt);',
'''int %s(wxPoint pt) {
return SendMsg(%s, pt.x, pt.y);''',
0),
'GetCurLine' : (0,
'wxString %s(int* OUTPUT=NULL);',
'''wxString %s(int* linePos) {
wxString text;
int len = LineLength(GetCurrentLine());
char* buf = text.GetWriteBuf(len+1);
int pos = SendMsg(%s, len, (long)buf);
text.UngetWriteBuf();
if (linePos) *linePos = pos;
return text;''',
0),
'SetUsePalette' : (None, 0,0,0),
'MarkerSetFore' : ('MarkerSetForeground', 0, 0, 0),
'MarkerSetBack' : ('MarkerSetBackground', 0, 0, 0),
'MarkerDefine' : (0,
'''void %s(int markerNumber, int markerSymbol,
const wxColour& foreground = wxNullColour,
const wxColour& background = wxNullColour);''',
'''void %s(int markerNumber, int markerSymbol,
const wxColour& foreground,
const wxColour& background) {
SendMsg(%s, markerNumber, markerSymbol);
if (foreground.Ok())
MarkerSetForeground(markerNumber, foreground);
if (background.Ok())
MarkerSetBackground(markerNumber, background);''',
('Set the symbol used for a particular marker number,',
'and optionally the for and background colours.')),
'SetMarginTypeN' : ('SetMarginType', 0, 0, 0),
'GetMarginTypeN' : ('GetMarginType', 0, 0, 0),
'SetMarginWidthN' : ('SetMarginWidth', 0, 0, 0),
'GetMarginWidthN' : ('GetMarginWidth', 0, 0, 0),
'SetMarginMaskN' : ('SetMarginMask', 0, 0, 0),
'GetMarginMaskN' : ('GetMarginMask', 0, 0, 0),
'SetMarginSensitiveN' : ('SetMarginSensitive', 0, 0, 0),
'GetMarginSensitiveN' : ('GetMarginSensitive', 0, 0, 0),
'StyleSetFore' : ('StyleSetForeground', 0, 0, 0),
'StyleSetBack' : ('StyleSetBackground', 0, 0, 0),
'SetSelFore' : ('SetSelForeground', 0, 0, 0),
'SetSelBack' : ('SetSelBackground', 0, 0, 0),
'SetCaretFore' : ('SetCaretForeground', 0, 0, 0),
'StyleSetFont' : ('StyleSetFaceName', 0, 0, 0),
# need to fix this to map between wx and scintilla encoding flags, leave it out for now...
'StyleSetCharacterSet' : (None, 0, 0, 0),
'AssignCmdKey' : ('CmdKeyAssign',
'void %s(int key, int modifiers, int cmd);',
'''void %s(int key, int modifiers, int cmd) {
SendMsg(%s, MAKELONG(key, modifiers), cmd);''',
0),
'ClearCmdKey' : ('CmdKeyClear',
'void %s(int key, int modifiers);',
'''void %s(int key, int modifiers) {
SendMsg(%s, MAKELONG(key, modifiers));''',
0),
'ClearAllCmdKeys' : ('CmdKeyClearAll', 0, 0, 0),
'SetStylingEx' : ('SetStyleBytes',
'void %s(int length, char* styleBytes);',
'''void %s(int length, char* styleBytes) {
SendMsg(%s, length, (long)styleBytes);''',
0),
'IndicSetStyle' : ('IndicatorSetStyle', 0, 0, 0),
'IndicGetStyle' : ('IndicatorGetStyle', 0, 0, 0),
'IndicSetFore' : ('IndicatorSetForeground', 0, 0, 0),
'IndicGetFore' : ('IndicatorGetForeground', 0, 0, 0),
'AutoCShow' : ('AutoCompShow', 0, 0, 0),
'AutoCCancel' : ('AutoCompCancel', 0, 0, 0),
'AutoCActive' : ('AutoCompActive', 0, 0, 0),
'AutoCPosStart' : ('AutoCompPosStart', 0, 0, 0),
'AutoCComplete' : ('AutoCompComplete', 0, 0, 0),
'AutoCStops' : ('AutoCompStops', 0, 0, 0),
'AutoCSetSeparator' : ('AutoCompSetSeparator', 0, 0, 0),
'AutoCGetSeparator' : ('AutoCompGetSeparator', 0, 0, 0),
'AutoCSelect' : ('AutoCompSelect', 0, 0, 0),
'AutoCSetCancelAtStart' : ('AutoCompSetCancelAtStart', 0, 0, 0),
'AutoCGetCancelAtStart' : ('AutoCompGetCancelAtStart', 0, 0, 0),
'AutoCSetFillUps' : ('AutoCompSetFillUps', 0, 0, 0),
'AutoCSetChooseSingle' : ('AutoCompSetChooseSingle', 0, 0, 0),
'AutoCGetChooseSingle' : ('AutoCompGetChooseSingle', 0, 0, 0),
'AutoCSetIgnoreCase' : ('AutoCompSetIgnoreCase', 0, 0, 0),
'AutoCGetIgnoreCase' : ('AutoCompGetIgnoreCase', 0, 0, 0),
'SetHScrollBar' : ('SetUseHorizontalScrollBar', 0, 0, 0),
'GetHScrollBar' : ('GetUseHorizontalScrollBar', 0, 0, 0),
'GetCaretFore' : ('GetCaretForeground', 0, 0, 0),
'GetUsePalette' : (None, 0, 0, 0),
'FindText' : (0,
'''int %s(int minPos, int maxPos,
const wxString& text,
bool caseSensitive, bool wholeWord);''',
'''int %s(int minPos, int maxPos,
const wxString& text,
bool caseSensitive, bool wholeWord) {
TextToFind ft;
int flags = 0;
flags |= caseSensitive ? SCFIND_MATCHCASE : 0;
flags |= wholeWord ? SCFIND_WHOLEWORD : 0;
ft.chrg.cpMin = minPos;
ft.chrg.cpMax = maxPos;
ft.lpstrText = (char*)text.c_str();
return SendMsg(%s, flags, (long)&ft);''',
0),
'FormatRange' : (0,
'''int %s(bool doDraw,
int startPos,
int endPos,
wxDC* draw,
wxDC* target, // Why does it use two? Can they be the same?
wxRect renderRect,
wxRect pageRect);''',
''' int %s(bool doDraw,
int startPos,
int endPos,
wxDC* draw,
wxDC* target, // Why does it use two? Can they be the same?
wxRect renderRect,
wxRect pageRect) {
RangeToFormat fr;
fr.hdc = draw;
fr.hdcTarget = target;
fr.rc.top = renderRect.GetTop();
fr.rc.left = renderRect.GetLeft();
fr.rc.right = renderRect.GetRight();
fr.rc.bottom = renderRect.GetBottom();
fr.rcPage.top = pageRect.GetTop();
fr.rcPage.left = pageRect.GetLeft();
fr.rcPage.right = pageRect.GetRight();
fr.rcPage.bottom = pageRect.GetBottom();
fr.chrg.cpMin = startPos;
fr.chrg.cpMax = endPos;
return SendMsg(%s, doDraw, (long)&fr);''',
0),
'GetLine' : (0,
'wxString %s(int line);',
'''wxString %s(int line) {
wxString text;
int len = LineLength(line);
char* buf = text.GetWriteBuf(len+1);
int pos = SendMsg(%s, line, (long)buf);
text.UngetWriteBuf();
return text;''',
('Retrieve the contents of a line.',)),
'SetSel' : ('SetSelection', 0, 0, 0),
'GetSelText' : ('GetSelectedText',
'wxString %s();',
'''wxString %s() {
wxString text;
int start;
int end;
GetSelection(&start, &end);
int len = end - start;
char* buff = text.GetWriteBuf(len+1);
SendMsg(%s, 0, (long)buff);
text.UngetWriteBuf();
return text;''',
('Retrieve the selected text.',)),
'GetTextRange' : (0,
'wxString %s(int startPos, int endPos);',
'''wxString %s(int startPos, int endPos) {
wxString text;
int len = endPos - startPos;
char* buff = text.GetWriteBuf(len+1);
TextRange tr;
tr.lpstrText = buff;
tr.chrg.cpMin = startPos;
tr.chrg.cpMax = endPos;
SendMsg(%s, 0, (long)&tr);
text.UngetWriteBuf();
return text;''',
('Retrieve a range of text.',)),
'PointXFromPosition' : (None, 0, 0, 0),
'PointYFromPosition' : (None, 0, 0, 0),
'ScrollCaret' : ('EnsureCaretVisible', 0, 0, 0),
'ReplaceSel' : ('ReplaceSelection', 0, 0, 0),
'Null' : (None, 0, 0, 0),
'GetText' : (0,
'wxString %s();',
'''wxString %s() {
wxString text;
int len = GetTextLength();
char* buff = text.GetWriteBuf(len+1);
SendMsg(%s, len, (long)buff);
buff[len] = 0;
text.UngetWriteBuf();
return text;''',
('Retrieve all the text in the document.', )),
'GetDirectFunction' : (None, 0, 0, 0),
'GetDirectPointer' : (None, 0, 0, 0),
'CallTipPosStart' : ('CallTipPosAtStart', 0, 0, 0),
'CallTipSetHlt' : ('CallTipSetHighlight', 0, 0, 0),
'CallTipSetBack' : ('CallTipSetBackground', 0, 0, 0),
# Remove all methods that are key commands since they can be
# executed with CmdKeyExecute
'LineDown' : (None, 0, 0, 0),
'LineDownExtend' : (None, 0, 0, 0),
'LineUp' : (None, 0, 0, 0),
'LineUpExtend' : (None, 0, 0, 0),
'CharLeft' : (None, 0, 0, 0),
'CharLeftExtend' : (None, 0, 0, 0),
'CharRight' : (None, 0, 0, 0),
'CharRightExtend' : (None, 0, 0, 0),
'WordLeft' : (None, 0, 0, 0),
'WordLeftExtend' : (None, 0, 0, 0),
'WordRight' : (None, 0, 0, 0),
'WordRightExtend' : (None, 0, 0, 0),
'Home' : (None, 0, 0, 0),
'HomeExtend' : (None, 0, 0, 0),
'LineEnd' : (None, 0, 0, 0),
'LineEndExtend' : (None, 0, 0, 0),
'DocumentStart' : (None, 0, 0, 0),
'DocumentStartExtend' : (None, 0, 0, 0),
'DocumentEnd' : (None, 0, 0, 0),
'DocumentEndExtend' : (None, 0, 0, 0),
'PageUp' : (None, 0, 0, 0),
'PageUpExtend' : (None, 0, 0, 0),
'PageDown' : (None, 0, 0, 0),
'PageDownExtend' : (None, 0, 0, 0),
'EditToggleOvertype' : (None, 0, 0, 0),
'Cancel' : (None, 0, 0, 0),
'DeleteBack' : (None, 0, 0, 0),
'Tab' : (None, 0, 0, 0),
'BackTab' : (None, 0, 0, 0),
'NewLine' : (None, 0, 0, 0),
'FormFeed' : (None, 0, 0, 0),
'VCHome' : (None, 0, 0, 0),
'VCHomeExtend' : (None, 0, 0, 0),
'ZoomIn' : (None, 0, 0, 0),
'ZoomOut' : (None, 0, 0, 0),
'DelWordLeft' : (None, 0, 0, 0),
'DelWordRight' : (None, 0, 0, 0),
'LineCut' : (None, 0, 0, 0),
'LineDelete' : (None, 0, 0, 0),
'LineTranspose' : (None, 0, 0, 0),
'LowerCase' : (None, 0, 0, 0),
'UpperCase' : (None, 0, 0, 0),
'LineScrollDown' : (None, 0, 0, 0),
'LineScrollUp' : (None, 0, 0, 0),
'GetDocPointer' : (0,
'void* %s();',
'''void* %s() {
return (void*)SendMsg(%s);''',
0),
'SetDocPointer' : (0,
'void %s(void* docPointer);',
'''void %s(void* docPointer) {
SendMsg(%s, (long)docPointer);''',
0),
'CreateDocument' : (0,
'void* %s();',
'''void* %s() {
return (void*)SendMsg(%s);''',
0),
'AddRefDocument' : (0,
'void %s(void* docPointer);',
'''void %s(void* docPointer) {
SendMsg(%s, (long)docPointer);''',
0),
'ReleaseDocument' : (0,
'void %s(void* docPointer);',
'''void %s(void* docPointer) {
SendMsg(%s, (long)docPointer);''',
0),
'GrabFocus' : (None, 0, 0, 0),
'' : ('', 0, 0, 0),
}
#----------------------------------------------------------------------------
def processIface(iface, h_tmplt, cpp_tmplt, h_dest, cpp_dest):
curDocStrings = []
values = []
methods = []
# parse iface file
fi = FileInput(iface)
for line in fi:
line = line[:-1]
if line[:2] == '##' or line == '':
#curDocStrings = []
continue
op = line[:4]
if line[:2] == '# ': # a doc string
curDocStrings.append(line[2:])
elif op == 'val ':
parseVal(line[4:], values, curDocStrings)
curDocStrings = []
elif op == 'fun ' or op == 'set ' or op == 'get ':
parseFun(line[4:], methods, curDocStrings, values)
curDocStrings = []
elif op == 'cat ':
if string.strip(line[4:]) == 'Deprecated':
break # skip the rest of the file
elif op == 'evt ':
pass
else:
print '***** Unknown line type: ', line
# process templates
data = {}
data['VALUES'] = processVals(values)
defs, imps = processMethods(methods)
data['METHOD_DEFS'] = defs
data['METHOD_IMPS'] = imps
# get template text
h_text = open(h_tmplt).read()
cpp_text = open(cpp_tmplt).read()
# do the substitutions
h_text = h_text % data
cpp_text = cpp_text % data
# write out destination files
open(h_dest, 'w').write(h_text)
open(cpp_dest, 'w').write(cpp_text)
#----------------------------------------------------------------------------
def processVals(values):
text = []
for name, value, docs in values:
if docs:
text.append('')
for x in docs:
text.append('// ' + x)
text.append('#define %s %s' % (name, value))
return string.join(text, '\n')
#----------------------------------------------------------------------------
def processMethods(methods):
defs = []
imps = []
for retType, name, number, param1, param2, docs in methods:
retType = retTypeMap.get(retType, retType)
params = makeParamString(param1, param2)
name, theDef, theImp, docs = checkMethodOverride(name, number, docs)
if name is None:
continue
# Build the method definition for the .h file
if docs:
defs.append('')
for x in docs:
defs.append(' // ' + x)
if not theDef:
theDef = ' %s %s(%s);' % (retType, name, params)
defs.append(theDef)
# Build the method implementation string
if docs:
imps.append('')
for x in docs:
imps.append('// ' + x)
if not theImp:
theImp = '%s wxStyledTextCtrl::%s(%s) {\n ' % (retType, name, params)
if retType == 'wxColour':
theImp = theImp + 'long c = '
elif retType != 'void':
theImp = theImp + 'return '
theImp = theImp + 'SendMsg(%s, %s, %s)' % (number,
makeArgString(param1),
makeArgString(param2))
if retType == 'bool':
theImp = theImp + ' != 0'
if retType == 'wxColour':
theImp = theImp + ';\n return wxColourFromLong(c)'
theImp = theImp + ';\n}'
imps.append(theImp)
return string.join(defs, '\n'), string.join(imps, '\n')
#----------------------------------------------------------------------------
def checkMethodOverride(name, number, docs):
theDef = theImp = None
if methodOverrideMap.has_key(name):
item = methodOverrideMap[name]
if item[0] != 0:
name = item[0]
if item[1] != 0:
theDef = ' ' + (item[1] % name)
if item[2] != 0:
theImp = item[2] % ('wxStyledTextCtrl::'+name, number) + '\n}'
if item[3] != 0:
docs = item[3]
return name, theDef, theImp, docs
#----------------------------------------------------------------------------
def makeArgString(param):
if not param:
return '0'
typ, name = param
if typ == 'string':
return '(long)%s.c_str()' % name
if typ == 'colour':
return 'wxColourAsLong(%s)' % name
return name
#----------------------------------------------------------------------------
def makeParamString(param1, param2):
def doOne(param):
if param:
aType = paramTypeMap.get(param[0], param[0])
return aType + ' ' + param[1]
else:
return ''
st = doOne(param1)
if st and param2:
st = st + ', '
st = st + doOne(param2)
return st
#----------------------------------------------------------------------------
def parseVal(line, values, docs):
name, val = string.split(line, '=')
# remove prefixes such as SCI, etc.
for old, new in valPrefixes:
lo = len(old)
if name[:lo] == old:
if new is None:
return
name = new + name[lo:]
# add it to the list
values.append( ('wxSTC_' + name, val, docs) )
#----------------------------------------------------------------------------
funregex = re.compile(r'\s*([a-zA-Z0-9_]+)' # <ws>return type
'\s+([a-zA-Z0-9_]+)=' # <ws>name=
'([0-9]+)' # number
'\(([ a-zA-Z0-9_]*),' # (param,
'([ a-zA-Z0-9_]*)\)') # param)
def parseFun(line, methods, docs, values):
def parseParam(param):
param = string.strip(param)
if param == '':
param = None
else:
param = tuple(string.split(param))
return param
mo = funregex.match(line)
if mo is None:
print "***** Line doesn't match! : " + line
retType, name, number, param1, param2 = mo.groups()
param1 = parseParam(param1)
param2 = parseParam(param2)
# Special case. For the key command functionss we want a value defined too
num = string.atoi(number)
for v in cmdValues:
if (type(v) == type(()) and v[0] <= num < v[1]) or v == num:
parseVal('CMD_%s=%s' % (string.upper(name), number), values, ())
#if retType == 'void' and not param1 and not param2:
methods.append( (retType, name, number, param1, param2, tuple(docs)) )
#----------------------------------------------------------------------------
def main(args):
# TODO: parse command line args to replace default input/output files???
# Now just do it
processIface(IFACE, H_TEMPLATE, CPP_TEMPLATE, H_DEST, CPP_DEST)
if __name__ == '__main__':
main(sys.argv)
#----------------------------------------------------------------------------

92
src/stc/makefile.b32 Normal file
View File

@@ -0,0 +1,92 @@
#
# File: makefile.b32
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright:
#
# Makefile : Builds wxMMedia library for 32-bit BC++
# N.B. use:
# make -f makefile.b32 stc.cfg
# make -f makefile.b32
WXDIR = $(WXWIN)
SCINTILLA=.\scintilla
S=$(SCINTILLA)\src
STCEXTRACPPFLAGS=-D__WX__ -DSCI_LEXER -I$(SCINTILLA)/include -I$(S)
LIBTARGET=$(WXDIR)\contrib\lib\stc.lib
OBJECTS = \
Accessor.obj \
AutoComplete.obj \
CallTip.obj \
CellBuffer.obj \
ContractionState.obj \
Document.obj \
DocumentAccessor.obj \
Editor.obj \
Indicator.obj \
KeyMap.obj \
KeyWords.obj \
LexCPP.obj \
LexHTML.obj \
LexLua.obj \
LexOthers.obj \
LexPerl.obj \
LexPython.obj \
LexSQL.obj \
LexVB.obj \
LineMarker.obj \
PropSet.obj \
PosRegExp.obj \
ScintillaBase.obj \
Style.obj \
UniConversion.obj \
ViewStyle.obj \
WindowAccessor.obj \
\
PlatWX.obj \
ScintillaWX.obj \
stc.obj \
!include $(WXDIR)\src\makelib.b32
CFG = stc.cfg
CPPFLAGS=$(DLL_FLAGS) $(EXTRACPPFLAGS) @$(CFG)
{$(S)}.cxx.obj:
bcc32 $(CPPFLAGS) -P -c {$< }
$(CFG): makefile.b32
copy &&!
-H=$(WXDIR)\src\msw\wx32.csm
-3
-d
-a1 # byte alignment
-R-
-X
-w-par
-w-aus
-w-hid # virtual function A hides virtual function B
-WE
-tWM
-I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/xpm;$(WXDIR)/src/tiff
-I$(WXDIR)\include\wx\msw\gnuwin32
-L$(BCCDIR)\lib
-D__WXWIN__
-D__WXMSW__
-D__WINDOWS__
-DWIN32
$(OPT)
$(DEBUG_FLAGS)
$(WIN95FLAG)
$(STCEXTRACPPFLAGS)
! $(CFG)

46
src/stc/makefile.g95 Normal file
View File

@@ -0,0 +1,46 @@
# File: makefile.g95 For stectrl
# Author: Robin Dunn
# Created: 1-Feb-2000
# Updated:
WXDIR = ../../..
SCINTILLA=$(WXDIR)/contrib/src/stc/scintilla
S=$(SCINTILLA)/src
EXTRAINC=-D__WX__ -DSCI_LEXER -I$(SCINTILLA)/include -I$(S) -I. -I$(WXDIR)/contrib/include
OBJECTS = \
$(S)/Accessor.$(OBJSUFF) \
$(S)/AutoComplete.$(OBJSUFF) \
$(S)/CallTip.$(OBJSUFF) \
$(S)/CellBuffer.$(OBJSUFF) \
$(S)/ContractionState.$(OBJSUFF)\
$(S)/Document.$(OBJSUFF) \
$(S)/Editor.$(OBJSUFF) \
$(S)/Indicator.$(OBJSUFF) \
$(S)/KeyMap.$(OBJSUFF) \
$(S)/KeyWords.$(OBJSUFF) \
$(S)/LineMarker.$(OBJSUFF) \
$(S)/PropSet.$(OBJSUFF) \
$(S)/ScintillaBase.$(OBJSUFF) \
$(S)/Style.$(OBJSUFF) \
$(S)/ViewStyle.$(OBJSUFF) \
$(S)/LexCPP.$(OBJSUFF) \
$(S)/LexHTML.$(OBJSUFF) \
$(S)/LexLua.$(OBJSUFF) \
$(S)/LexOthers.$(OBJSUFF) \
$(S)/LexPerl.$(OBJSUFF) \
$(S)/LexPython.$(OBJSUFF) \
$(S)/LexSQL.$(OBJSUFF) \
$(S)/LexVB.$(OBJSUFF) \
$(S)/DocumentAccessor.$(OBJSUFF)\
$(S)/UniConversion.$(OBJSUFF) \
$(S)/WindowAccessor.$(OBJSUFF) \
$(S)/PosRegExp.$(OBJSUFF) \
PlatWX.$(OBJSUFF) \
ScintillaWX.$(OBJSUFF) \
stc.$(OBJSUFF)
LIBTARGET = $(WXDIR)/contrib/lib/libstc.a
include $(WXDIR)/src/makelib.g95

105
src/stc/makefile.vc Normal file
View File

@@ -0,0 +1,105 @@
# File: makefile.vc For stectrl
# Author: Robin Dunn
# Created: 1-Feb-2000
# Updated:
# Set WXDIR for your system
WXDIR = $(WXWIN)
SCINTILLA=.\scintilla
S=$(SCINTILLA)\src
EXTRAINC=-D__WX__ -DSCI_LEXER -I$(SCINTILLA)/include -I$(S) -I. -I$(WXDIR)\contrib\include
NOPCH=1
!include $(WXDIR)\src\makevc.env
OBJECTS = \
$(D)\AutoComplete.obj \
$(D)\CallTip.obj \
$(D)\CellBuffer.obj \
$(D)\ContractionState.obj\
$(D)\Document.obj \
$(D)\DocumentAccessor.obj\
$(D)\Editor.obj \
$(D)\Indicator.obj \
$(D)\KeyMap.obj \
$(D)\KeyWords.obj \
$(D)\LexCPP.obj \
$(D)\LexHTML.obj \
$(D)\LexLua.obj \
$(D)\LexOthers.obj \
$(D)\LexPerl.obj \
$(D)\LexPython.obj \
$(D)\LexSQL.obj \
$(D)\LexVB.obj \
$(D)\LineMarker.obj \
$(D)\PosRegExp.obj \
$(D)\PropSet.obj \
$(D)\ScintillaBase.obj \
$(D)\Style.obj \
$(D)\UniConversion.obj \
$(D)\ViewStyle.obj \
$(D)\WindowAccessor.obj \
\
$(D)\PlatWX.obj \
$(D)\ScintillaWX.obj \
$(D)\stc.obj \
LIBTARGET = $(WXDIR)\contrib\lib\stc$(LIBEXT).lib
all: $(D) $(LIBTARGET)
$(D) :
mkdir $(D)
wx:
cd $(WXDIR)\src\msw
nmake -f makefile.vc FINAL=$(FINAL)
cd $(THISDIR)
wxclean:
cd $(WXDIR)\src\msw
nmake -f makefile.vc clean
cd $(THISDIR)
$(LIBTARGET): $(OBJECTS)
-erase $(LIBTARGET)
$(implib) @<<
-out:$(LIBTARGET)
-machine:$(CPU)
$(OBJECTS)
<<
{$(S)}.cxx{$(D)}.obj:
$(cc) @<<
$(CPPFLAGS) /c /Fo$@ /Tp $<
<<
{}.cpp{$(D)}.obj:
$(cc) @<<
$(CPPFLAGS) /c /Fo$@ /Tp $<
<<
show:
@echo $(CPPFLAGS)
clean:
-erase $(D)\*.obj
-erase *.sbr
-erase *.exe
-erase *.res
-erase *.map
-erase *.pdb
-erase $(LIBTARGET)

View File

@@ -0,0 +1,7 @@
This directory contains copies of the scintilla/src and
scintilla/include directories from the Scintilla/SCiTE source
distribution. All other code needed to implement Scintilla on top of
wxWindows is located in the directory above this one.
The current version of the Scintilla code is 1.32

View File

@@ -0,0 +1,70 @@
// SciTE - Scintilla based Text Editor
// Accessor.h - rapid easy access to contents of a Scintilla
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
enum { wsSpace = 1, wsTab = 2, wsSpaceTab = 4, wsInconsistent=8};
class Accessor;
typedef bool (*PFNIsCommentLeader)(Accessor &styler, int pos, int len);
// Interface to data in a Scintilla
class Accessor {
protected:
enum {extremePosition=0x7FFFFFFF};
// bufferSize is a trade off between time taken to copy the characters and retrieval overhead
// slopSize positions the buffer before the desired position in case there is some backtracking
enum {bufferSize=4000, slopSize=bufferSize/8};
char buf[bufferSize+1];
int startPos;
int endPos;
int codePage;
virtual bool InternalIsLeadByte(char ch)=0;
virtual void Fill(int position)=0;
public:
Accessor() : startPos(extremePosition), endPos(0), codePage(0) {}
virtual ~Accessor() {}
char operator[](int position) {
if (position < startPos || position >= endPos) {
Fill(position);
}
return buf[position - startPos];
}
char SafeGetCharAt(int position, char chDefault=' ') {
// Safe version of operator[], returning a defined value for invalid position
if (position < startPos || position >= endPos) {
Fill(position);
if (position < startPos || position >= endPos) {
// Position is outside range of document
return chDefault;
}
}
return buf[position - startPos];
}
bool IsLeadByte(char ch) {
return codePage && InternalIsLeadByte(ch);
}
void SetCodePage(int codePage_) { codePage = codePage_; }
virtual char StyleAt(int position)=0;
virtual int GetLine(int position)=0;
virtual int LineStart(int line)=0;
virtual int LevelAt(int line)=0;
virtual int Length()=0;
virtual void Flush()=0;
virtual int GetLineState(int line)=0;
virtual int SetLineState(int line, int state)=0;
virtual int GetPropertyInt(const char *key, int defaultValue=0)=0;
// Style setting
virtual void StartAt(unsigned int start, char chMask=31)=0;
virtual void SetFlags(char chFlags_, char chWhile_)=0;
virtual unsigned int GetStartSegment()=0;
virtual void StartSegment(unsigned int pos)=0;
virtual void ColourTo(unsigned int pos, int chAttr)=0;
virtual void SetLevel(int line, int level)=0;
virtual int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0)=0;
};

View File

@@ -0,0 +1,41 @@
// SciTE - Scintilla based Text Editor
// KeyWords.h - colourise for particular languages
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
typedef void (*LexerFunction)(unsigned int startPos, int lengthDoc, int initStyle,
WordList *keywordlists[], Accessor &styler);
class LexerModule {
static LexerModule *base;
LexerModule *next;
int language;
LexerFunction fn;
public:
LexerModule(int language_, LexerFunction fn_);
static void Colourise(unsigned int startPos, int lengthDoc, int initStyle,
int language, WordList *keywordlists[], Accessor &styler);
};
inline bool iswordchar(char ch) {
return isalnum(ch) || ch == '.' || ch == '_';
}
inline bool iswordstart(char ch) {
return isalnum(ch) || ch == '_';
}
inline bool isoperator(char ch) {
if (isalnum(ch))
return false;
// '.' left out as it is used to make up numbers
if (ch == '%' || ch == '^' || ch == '&' || ch == '*' ||
ch == '(' || ch == ')' || ch == '-' || ch == '+' ||
ch == '=' || ch == '|' || ch == '{' || ch == '}' ||
ch == '[' || ch == ']' || ch == ':' || ch == ';' ||
ch == '<' || ch == '>' || ch == ',' || ch == '/' ||
ch == '?' || ch == '!' || ch == '.' || ch == '~')
return true;
return false;
}

View File

@@ -0,0 +1,411 @@
// Scintilla source code edit control
// Platform.h - interface to platform facilities
// Also includes some basic utilities
// Implemented in PlatGTK.cxx for GTK+/Linux, PlatWin.cxx for Windows, and PlatWX.cxx for wxWindows
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef PLATFORM_H
#define PLATFORM_H
// PLAT_GTK = GTK+ on Linux, PLAT_WIN = Win32 API on Win32 OS
// PLAT_WX is wxWindows on any supported platform
// Could also have PLAT_GTKWIN = GTK+ on Win32 OS in future
#define PLAT_GTK 0
#define PLAT_WIN 0
#define PLAT_WX 0
#if defined(__WX__)
#undef PLAT_WX
#define PLAT_WX 1
#elif defined(GTK)
#undef PLAT_GTK
#define PLAT_GTK 1
#else
#undef PLAT_WIN
#define PLAT_WIN 1
#endif
// Include the main header for each platform
#if PLAT_GTK
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#endif
#if PLAT_WIN
#define _WIN32_WINNT 0x0400 // Otherwise some required stuff gets ifdef'd out
// Vassili Bourdo: shut up annoying Visual C++ warnings:
#ifdef _MSC_VER
#pragma warning(disable: 4800 4244 4309)
#endif
#include <windows.h>
#include <commctrl.h>
#include <richedit.h>
#endif
#if PLAT_WX
#include <wx/wx.h>
#endif
// Underlying the implementation of the platform classes are platform specific types.
// Sometimes these need to be passed around by client code so they are defined here
#if PLAT_GTK
typedef GdkColor ColourID;
typedef GdkFont* FontID;
typedef GdkDrawable* SurfaceID;
typedef GtkWidget* WindowID;
typedef GtkItemFactory* MenuID;
#endif
#if PLAT_WIN
typedef COLORREF ColourID;
typedef HFONT FontID;
typedef HDC SurfaceID;
typedef HWND WindowID;
typedef HMENU MenuID;
#endif
#if PLAT_WX
typedef wxColour ColourID;
typedef wxFont* FontID;
typedef wxDC* SurfaceID;
typedef wxWindow* WindowID;
typedef wxMenu* MenuID;
#endif
// Point is exactly the same as the Win32 POINT and GTK+ GdkPoint so can be used interchangeably
class Point {
public:
int x;
int y;
Point(int x_=0, int y_=0) : x(x_), y(y_) {
}
// Other automatically defined methods (assignment, copy constructor, destructor) are fine
static Point FromLong(long lpoint);
};
// PRectangle is exactly the same as the Win32 RECT so can be used interchangeably
// PRectangles contain their top and left sides, but not their right and bottom sides
class PRectangle {
public:
int left;
int top;
int right;
int bottom;
PRectangle(int left_=0, int top_=0, int right_=0, int bottom_ = 0) :
left(left_), top(top_), right(right_), bottom(bottom_) {
}
// Other automatically defined methods (assignment, copy constructor, destructor) are fine
bool Contains(Point pt) {
return (pt.x >= left) && (pt.x <= right) &&
(pt.y >= top) && (pt.y <= bottom);
}
bool Contains(PRectangle rc) {
return (rc.left >= left) && (rc.right <= right) &&
(rc.top >= top) && (rc.bottom <= bottom);
}
bool Intersects(PRectangle other) {
return (right >= other.left) && (left <= other.right) &&
(bottom >= other.top) && (top <= other.bottom);
}
int Width() { return right - left; }
int Height() { return bottom - top; }
};
#if PLAT_WX
wxRect wxRectFromPRectangle(PRectangle prc);
PRectangle PRectangleFromwxRect(wxRect rc);
#endif
class Colour {
ColourID co;
public:
Colour(long lcol=0);
Colour(unsigned int red, unsigned int green, unsigned int blue);
bool operator==(const Colour &other) const;
long AsLong() const;
unsigned int GetRed();
unsigned int GetGreen();
unsigned int GetBlue();
friend class Surface;
friend class Palette;
};
// Colour pairs hold a desired colour and the colour that the graphics engine
// allocates to approximate the desired colour.
// To make palette management more automatic, ColourPairs could register at
// construction time with a palette management object.
struct ColourPair {
Colour desired;
Colour allocated;
ColourPair(Colour desired_=Colour(0,0,0)) {
desired = desired_;
allocated = desired;
}
};
class Window; // Forward declaration for Palette
class Palette {
int used;
enum {numEntries = 100};
ColourPair entries[numEntries];
#if PLAT_GTK
GdkColor *allocatedPalette;
int allocatedLen;
#elif PLAT_WIN
HPALETTE hpal;
#elif PLAT_WX
// wxPalette* pal; // **** Is this needed?
#endif
public:
bool allowRealization;
Palette();
~Palette();
void Release();
// This method either adds a colour to the list of wanted colours (want==true)
// or retrieves the allocated colour back to the ColourPair.
// This is one method to make it easier to keep the code for wanting and retrieving in sync.
void WantFind(ColourPair &cp, bool want);
void Allocate(Window &w);
friend class Surface;
};
class Font {
protected:
FontID id;
#if PLAT_WX
int ascent;
#endif
// Private so Font objects can not be copied
Font(const Font &) {}
Font &operator=(const Font &) { id=0; return *this; }
public:
Font();
virtual ~Font();
virtual void Create(const char *faceName, int characterSet, int size, bool bold, bool italic);
virtual void Release();
FontID GetID() { return id; }
// Alias another font - caller guarantees not to Release
void SetID(FontID id_) { id = id_; }
friend class Surface;
};
// A surface abstracts a place to draw
class Surface {
private:
bool unicodeMode;
#if PLAT_GTK
GdkDrawable *drawable;
GdkGC *gc;
GdkPixmap *ppixmap;
int x;
int y;
bool inited;
bool createdGC;
#elif PLAT_WIN
HDC hdc;
bool hdcOwned;
HPEN pen;
HPEN penOld;
HBRUSH brush;
HBRUSH brushOld;
HFONT font;
HFONT fontOld;
HBITMAP bitmap;
HBITMAP bitmapOld;
HPALETTE paletteOld;
#elif PLAT_WX
wxDC* hdc;
bool hdcOwned;
wxBitmap* bitmap;
int x;
int y;
#endif
// Private so Surface objects can not be copied
Surface(const Surface &) {}
Surface &operator=(const Surface &) { return *this; }
#if PLAT_WIN || PLAT_WX
void BrushColor(Colour back);
void SetFont(Font &font_);
#endif
public:
Surface();
~Surface();
void Init();
void Init(SurfaceID hdc_);
void InitPixMap(int width, int height, Surface *surface_);
void Release();
bool Initialised();
void PenColour(Colour fore);
int LogPixelsY();
int DeviceHeightFont(int points);
void MoveTo(int x_, int y_);
void LineTo(int x_, int y_);
void Polygon(Point *pts, int npts, Colour fore, Colour back);
void RectangleDraw(PRectangle rc, Colour fore, Colour back);
void FillRectangle(PRectangle rc, Colour back);
void FillRectangle(PRectangle rc, Surface &surfacePattern);
void RoundedRectangle(PRectangle rc, Colour fore, Colour back);
void Ellipse(PRectangle rc, Colour fore, Colour back);
void Copy(PRectangle rc, Point from, Surface &surfaceSource);
void DrawText(PRectangle rc, Font &font_, int ybase, const char *s, int len, Colour fore, Colour back);
void DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, Colour fore, Colour back);
void MeasureWidths(Font &font_, const char *s, int len, int *positions);
int WidthText(Font &font_, const char *s, int len);
int WidthChar(Font &font_, char ch);
int Ascent(Font &font_);
int Descent(Font &font_);
int InternalLeading(Font &font_);
int ExternalLeading(Font &font_);
int Height(Font &font_);
int AverageCharWidth(Font &font_);
int SetPalette(Palette *pal, bool inBackGround);
void SetClip(PRectangle rc);
void FlushCachedState();
void SetUnicodeMode(bool unicodeMode_) {
unicodeMode=unicodeMode_;
}
};
// Class to hide the details of window manipulation
// Does not own the window which will normally have a longer life than this object
class Window {
friend class ListBox;
protected:
WindowID id;
public:
Window() : id(0) {}
Window(const Window &source) : id(source.id) {}
virtual ~Window();
Window &operator=(WindowID id_) {
id = id_;
return *this;
}
WindowID GetID() { return id; }
bool Created() { return id != 0; }
void Destroy();
bool HasFocus();
PRectangle GetPosition();
void SetPosition(PRectangle rc);
void SetPositionRelative(PRectangle rc, Window relativeTo);
PRectangle GetClientPosition();
void Show(bool show=true);
void InvalidateAll();
void InvalidateRectangle(PRectangle rc);
virtual void SetFont(Font &font);
enum Cursor { cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow };
void SetCursor(Cursor curs);
void SetTitle(const char *s);
#if PLAT_WIN
LRESULT SendMessage(UINT msg, WPARAM wParam=0, LPARAM lParam=0);
int GetDlgCtrlID();
HINSTANCE GetInstance();
#endif
};
class ListBox : public Window {
#if PLAT_GTK
WindowID list;
WindowID scroller;
int current;
#endif
int desiredVisibleRows;
unsigned int maxItemCharacters;
unsigned int aveCharWidth;
public:
ListBox();
virtual ~ListBox();
void Create(Window &parent, int ctrlID);
virtual void SetFont(Font &font);
void SetAverageCharWidth(int width);
void SetVisibleRows(int rows);
PRectangle GetDesiredRect();
void Clear();
void Append(char *s);
int Length();
void Select(int n);
int GetSelection();
int Find(const char *prefix);
void GetValue(int n, char *value, int len);
void Sort();
};
class Menu {
MenuID id;
public:
Menu();
MenuID GetID() { return id; }
void CreatePopUp();
void Destroy();
void Show(Point pt, Window &w);
};
// Platform class used to retrieve system wide parameters such as double click speed
// and chrome colour. Not a creatable object, more of a module with several functions.
class Platform {
// Private so Platform objects can not be copied
Platform(const Platform &) {}
Platform &operator=(const Platform &) { return *this; }
public:
// Should be private because no new Platforms are ever created
// but gcc warns about this
Platform() {}
~Platform() {}
static Colour Chrome();
static Colour ChromeHighlight();
static const char *DefaultFont();
static int DefaultFontSize();
static unsigned int DoubleClickTime();
static void DebugDisplay(const char *s);
static bool IsKeyDown(int key);
static long SendScintilla(
WindowID w, unsigned int msg, unsigned long wParam=0, long lParam=0);
// These are utility functions not really tied to a platform
static int Minimum(int a, int b);
static int Maximum(int a, int b);
// Next three assume 16 bit shorts and 32 bit longs
static long LongFromTwoShorts(short a,short b) {
return (a) | ((b) << 16);
}
static short HighShortFromLong(long x) {
return static_cast<short>(x >> 16);
}
static short LowShortFromLong(long x) {
return static_cast<short>(x & 0xffff);
}
static void DebugPrintf(const char *format, ...);
static int Clamp(int val, int minVal, int maxVal);
};
#endif

View File

@@ -0,0 +1,138 @@
#ifndef POSREGEXP_H
#define POSREGEXP_H
#define MatchesNum 0x10
enum EOps
{
ReBlockOps = 0x1000,
ReMul, // *
RePlus, // +
ReQuest, // ?
ReNGMul, // *?
ReNGPlus, // +?
ReNGQuest, // ??
ReRangeN, // {n,}
ReRangeNM, // {n,m}
ReNGRangeN, // {n,}?
ReNGRangeNM, // {n,m}?
ReOr, // |
ReBehind = 0x1100, // ?#n
ReNBehind = 0x1200, // ?~n
ReAhead = 0x1300, // ?=
ReNAhead = 0x1400, // ?!
ReSymbolOps = 0x2000,
ReEmpty,
ReSymb, // a b \W \s ...
ReEnum, // []
ReNEnum, // [^]
ReBrackets, // (...)
ReBkTrace = 0x2100, // \yN
ReBkBrack = 0x2200 // \N
};
enum ESymbols
{
ReAnyChr = 0x4000, // .
ReSoL, // ^
ReEoL, // $
ReDigit, // \d
ReNDigit, // \D
ReWordSymb, // \w
ReNWordSymb, // \W
ReWSpace, // \s
ReNWSpace, // \S
ReUCase, // \u
ReNUCase , // \l
ReWBound, // \b
ReNWBound, // \B
RePreNW, // \c
ReStart, // \m
ReEnd, // \M
ReChr = 0x0 // Char in Lower Byte
};
enum ETempSymb
{
ReTemp = 0x7000,
ReLBrack, ReRBrack,
ReEnumS, ReEnumE, ReNEnumS,
ReRangeS, ReRangeE, ReNGRangeE, ReFrToEnum
};
#define BackSlash '\\'
typedef union SCharData
{
int IArr[8];
char CArr[32];
void SetBit(unsigned char Bit);
void ClearBit(unsigned char Bit);
bool GetBit(unsigned char Bit);
} *PCharData;
typedef struct SRegInfo
{
SRegInfo();
~SRegInfo();
EOps Op;
union{
SRegInfo *Param;
int Symb;
PCharData ChrClass;
}un;
int s,e;
SRegInfo *Parent;
SRegInfo *Next;
} *PRegInfo;
typedef struct SMatches
{
int s[MatchesNum];
int e[MatchesNum];
int CurMatch;
} *PMatches;
typedef class PosRegExp
{
PRegInfo Info;
PMatches BkTrace;
bool NoCase,Extend,NoMoves;
bool Error;
int *Exprn;
int posParse;
int posEnd,posStart;
int posBkStr;
int FirstChar;
bool SetExprLow(const char *Expr);
bool SetStructs(PRegInfo &Info,int st,int end);
void Optimize();
bool CheckSymb(int Symb,bool Inc);
bool LowParse(PRegInfo Re);
bool LowParseRe(PRegInfo &Next);
bool LowCheckNext(PRegInfo Re);
bool ParseRe(int posStr);
bool QuickCheck();
public:
PMatches Matches;
int Ok, CurMatch;
void *param;
char (*CharAt)(int pos, void *param);
PosRegExp();
~PosRegExp();
bool isok();
bool SetNoMoves(bool Moves);
bool SetBkTrace(int posStr,PMatches Trace);
bool SetExpr(const char *Expr);
bool Parse(int posStr, int posStop, PMatches Mtch);
bool Parse(int posStr,int posSol, int posEol, PMatches Mtch, int Moves = -1);
bool Evaluate(char *Expr, int posStr, PMatches Mtch, char **Res);
} *PPosRegExp;
#endif /* POSREGEXP_H */

View File

@@ -0,0 +1,244 @@
// SciTE - Scintilla based Text Editor
// PropSet.h - a java style properties file module
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef PROPSET_H
#define PROPSET_H
bool EqualCaseInsensitive(const char *a, const char *b);
#if PLAT_WIN
#define strcasecmp stricmp
#define strncasecmp strnicmp
#endif
#ifdef __WXMSW__
#define strcasecmp stricmp
#define strncasecmp strnicmp
#endif
// Define another string class.
// While it would be 'better' to use std::string, that doubles the executable size.
inline char *StringDup(const char *s, int len=-1) {
if (!s)
return 0;
if (len == -1)
len = strlen(s);
char *sNew = new char[len + 1];
if (sNew) {
strncpy(sNew, s, len);
sNew[len] = '\0';
}
return sNew;
}
class SString {
char *s;
int ssize;
public:
typedef const char* const_iterator;
typedef int size_type;
static size_type npos;
const char* begin(void) const {
return s;
}
const char* end(void) const {
return &s[ssize];
}
size_type size(void) const {
if (s)
return ssize;
else
return 0;
}
SString &assign(const char* sother, int size_ = -1) {
char *t = s;
s = StringDup(sother,size_);
ssize = (s) ? strlen(s) : 0;
delete []t;
return *this;
}
SString &assign(const SString& sother, int size_ = -1) {
return assign(sother.s,size_);
}
SString &assign(const_iterator ibeg, const_iterator iend) {
return assign(ibeg,iend - ibeg);
}
SString() {
s = 0;
ssize = 0;
}
SString(const SString &source) {
s = StringDup(source.s);
ssize = (s) ? strlen(s) : 0;
}
SString(const char *s_) {
s = StringDup(s_);
ssize = (s) ? strlen(s) : 0;
}
SString(int i) {
char number[100];
sprintf(number, "%0d", i);
s = StringDup(number);
ssize = (s) ? strlen(s) : 0;
}
~SString() {
delete []s;
s = 0;
ssize = 0;
}
SString &operator=(const SString &source) {
if (this != &source) {
delete []s;
s = StringDup(source.s);
ssize = (s) ? strlen(s) : 0;
}
return *this;
}
bool operator==(const SString &other) const {
if ((s == 0) && (other.s == 0))
return true;
if ((s == 0) || (other.s == 0))
return false;
return strcmp(s, other.s) == 0;
}
bool operator!=(const SString &other) const {
return !operator==(other);
}
bool operator==(const char *sother) const {
if ((s == 0) && (sother == 0))
return true;
if ((s == 0) || (sother == 0))
return false;
return strcmp(s, sother) == 0;
}
bool operator!=(const char *sother) const {
return !operator==(sother);
}
const char *c_str() const {
if (s)
return s;
else
return "";
}
int length() const {
if (s)
return strlen(s);
else
return 0;
}
char operator[](int i) const {
if (s)
return s[i];
else
return '\0';
}
SString &operator +=(const char *sother) {
return append(sother,-1);
}
SString &operator +=(const SString &sother) {
return append(sother.s,sother.ssize);
}
SString &operator +=(char ch) {
return append(&ch,1);
}
SString &append(const char* sother, int lenOther) {
int len = length();
if(lenOther < 0)
lenOther = strlen(sother);
char *sNew = new char[len + lenOther + 1];
if (sNew) {
if (s)
memcpy(sNew, s, len);
strncpy(&sNew[len], sother, lenOther);
sNew[len + lenOther] = '\0';
delete []s;
s = sNew;
ssize = (s) ? strlen(s) : 0;
}
return *this;
}
int value() const {
if (s)
return atoi(s);
else
return 0;
}
void substitute(char find, char replace) {
char *t = s;
while (t) {
t = strchr(t, find);
if (t)
*t = replace;
}
}
// I don't think this really belongs here -- Neil
void correctPath() {
#ifdef unix
substitute('\\', '/');
#else
substitute('/', '\\');
#endif
}
};
struct Property {
unsigned int hash;
char *key;
char *val;
Property *next;
Property() : hash(0), key(0), val(0), next(0) {}
};
class PropSet {
private:
enum { hashRoots=31 };
Property *props[hashRoots];
public:
PropSet *superPS;
PropSet();
~PropSet();
void Set(const char *key, const char *val);
void Set(char *keyval);
SString Get(const char *key);
SString GetExpanded(const char *key);
SString Expand(const char *withvars);
int GetInt(const char *key, int defaultValue=0);
SString GetWild(const char *keybase, const char *filename);
SString GetNewExpand(const char *keybase, const char *filename);
void Clear();
void ReadFromMemory(const char *data, int len, const char *directoryForImports=0);
void Read(const char *filename, const char *directoryForImports);
};
class WordList {
public:
// Each word contains at least one character - a empty word acts as sentinal at the end.
char **words;
char **wordsNoCase;
char *list;
int len;
bool onlyLineEnds; // Delimited by any white space or only line ends
bool sorted;
int starts[256];
WordList(bool onlyLineEnds_ = false) :
words(0), wordsNoCase(0), list(0), len(0), onlyLineEnds(onlyLineEnds_), sorted(false) {}
~WordList() { Clear(); }
operator bool() { return words ? true : false; }
const char *operator[](int ind) { return words[ind]; }
void Clear();
void Set(const char *s);
char *Allocate(int size);
void SetFromAllocated();
bool InList(const char *s);
const char *GetNearestWord(const char *wordStart, int searchLen = -1, bool ignoreCase = false);
char *GetNearestWords(const char *wordStart, int searchLen = -1, bool ignoreCase = false);
};
inline bool nonFuncChar(char ch) {
return strchr("\t\n\r !\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~", ch) != NULL;
}
#endif

View File

@@ -0,0 +1,204 @@
// Scintilla source code edit control
// SciLexer - interface to the added lexer functions in the SciLexer version of the edit control
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
// Most of this file is automatically generated from the Scintilla.iface interface definition
// file which contains any comments about the definitions. HFacer.py does the generation.
#ifndef SCILEXER_H
#define SCILEXER_H
// SciLexer features - not in standard Scintilla
//++Autogenerated -- start of section automatically generated from Scintilla.iface
#define SCLEX_CONTAINER 0
#define SCLEX_NULL 1
#define SCLEX_PYTHON 2
#define SCLEX_CPP 3
#define SCLEX_HTML 4
#define SCLEX_XML 5
#define SCLEX_PERL 6
#define SCLEX_SQL 7
#define SCLEX_VB 8
#define SCLEX_PROPERTIES 9
#define SCLEX_ERRORLIST 10
#define SCLEX_MAKEFILE 11
#define SCLEX_BATCH 12
#define SCLEX_XCODE 13
#define SCLEX_LATEX 14
#define SCLEX_LUA 15
#define SCLEX_DIFF 16
#define SCE_P_DEFAULT 0
#define SCE_P_COMMENTLINE 1
#define SCE_P_NUMBER 2
#define SCE_P_STRING 3
#define SCE_P_CHARACTER 4
#define SCE_P_WORD 5
#define SCE_P_TRIPLE 6
#define SCE_P_TRIPLEDOUBLE 7
#define SCE_P_CLASSNAME 8
#define SCE_P_DEFNAME 9
#define SCE_P_OPERATOR 10
#define SCE_P_IDENTIFIER 11
#define SCE_P_COMMENTBLOCK 12
#define SCE_P_STRINGEOL 13
#define SCE_C_DEFAULT 0
#define SCE_C_COMMENT 1
#define SCE_C_COMMENTLINE 2
#define SCE_C_COMMENTDOC 3
#define SCE_C_NUMBER 4
#define SCE_C_WORD 5
#define SCE_C_STRING 6
#define SCE_C_CHARACTER 7
#define SCE_C_UUID 8
#define SCE_C_PREPROCESSOR 9
#define SCE_C_OPERATOR 10
#define SCE_C_IDENTIFIER 11
#define SCE_C_STRINGEOL 12
#define SCE_C_VERBATIM 13
#define SCE_H_DEFAULT 0
#define SCE_H_TAG 1
#define SCE_H_TAGUNKNOWN 2
#define SCE_H_ATTRIBUTE 3
#define SCE_H_ATTRIBUTEUNKNOWN 4
#define SCE_H_NUMBER 5
#define SCE_H_DOUBLESTRING 6
#define SCE_H_SINGLESTRING 7
#define SCE_H_OTHER 8
#define SCE_H_COMMENT 9
#define SCE_H_ENTITY 10
#define SCE_H_TAGEND 11
#define SCE_H_XMLSTART 12
#define SCE_H_XMLEND 13
#define SCE_H_SCRIPT 14
#define SCE_H_ASP 15
#define SCE_H_ASPAT 16
#define SCE_H_CDATA 17
#define SCE_H_QUESTION 18
#define SCE_H_VALUE 19
#define SCE_HJ_START 40
#define SCE_HJ_DEFAULT 41
#define SCE_HJ_COMMENT 42
#define SCE_HJ_COMMENTLINE 43
#define SCE_HJ_COMMENTDOC 44
#define SCE_HJ_NUMBER 45
#define SCE_HJ_WORD 46
#define SCE_HJ_KEYWORD 47
#define SCE_HJ_DOUBLESTRING 48
#define SCE_HJ_SINGLESTRING 49
#define SCE_HJ_SYMBOLS 50
#define SCE_HJ_STRINGEOL 51
#define SCE_HJA_START 55
#define SCE_HJA_DEFAULT 56
#define SCE_HJA_COMMENT 57
#define SCE_HJA_COMMENTLINE 58
#define SCE_HJA_COMMENTDOC 59
#define SCE_HJA_NUMBER 60
#define SCE_HJA_WORD 61
#define SCE_HJA_KEYWORD 62
#define SCE_HJA_DOUBLESTRING 63
#define SCE_HJA_SINGLESTRING 64
#define SCE_HJA_SYMBOLS 65
#define SCE_HJA_STRINGEOL 66
#define SCE_HB_START 70
#define SCE_HB_DEFAULT 71
#define SCE_HB_COMMENTLINE 72
#define SCE_HB_NUMBER 73
#define SCE_HB_WORD 74
#define SCE_HB_STRING 75
#define SCE_HB_IDENTIFIER 76
#define SCE_HB_STRINGEOL 77
#define SCE_HBA_START 80
#define SCE_HBA_DEFAULT 81
#define SCE_HBA_COMMENTLINE 82
#define SCE_HBA_NUMBER 83
#define SCE_HBA_WORD 84
#define SCE_HBA_STRING 85
#define SCE_HBA_IDENTIFIER 86
#define SCE_HBA_STRINGEOL 87
#define SCE_HP_START 90
#define SCE_HP_DEFAULT 91
#define SCE_HP_COMMENTLINE 92
#define SCE_HP_NUMBER 93
#define SCE_HP_STRING 94
#define SCE_HP_CHARACTER 95
#define SCE_HP_WORD 96
#define SCE_HP_TRIPLE 97
#define SCE_HP_TRIPLEDOUBLE 98
#define SCE_HP_CLASSNAME 99
#define SCE_HP_DEFNAME 100
#define SCE_HP_OPERATOR 101
#define SCE_HP_IDENTIFIER 102
#define SCE_HPA_START 105
#define SCE_HPA_DEFAULT 106
#define SCE_HPA_COMMENTLINE 107
#define SCE_HPA_NUMBER 108
#define SCE_HPA_STRING 109
#define SCE_HPA_CHARACTER 110
#define SCE_HPA_WORD 111
#define SCE_HPA_TRIPLE 112
#define SCE_HPA_TRIPLEDOUBLE 113
#define SCE_HPA_CLASSNAME 114
#define SCE_HPA_DEFNAME 115
#define SCE_HPA_OPERATOR 116
#define SCE_HPA_IDENTIFIER 117
#define SCE_HPHP_DEFAULT 118
#define SCE_HPHP_HSTRING 119
#define SCE_HPHP_SIMPLESTRING 120
#define SCE_HPHP_WORD 121
#define SCE_HPHP_NUMBER 122
#define SCE_HPHP_VARIABLE 123
#define SCE_HPHP_COMMENT 124
#define SCE_HPHP_COMMENTLINE 125
#define SCE_HPHP_STRINGEOL 126
#define SCE_PL_DEFAULT 0
#define SCE_PL_HERE 1
#define SCE_PL_COMMENTLINE 2
#define SCE_PL_POD 3
#define SCE_PL_NUMBER 4
#define SCE_PL_WORD 5
#define SCE_PL_STRING 6
#define SCE_PL_CHARACTER 7
#define SCE_PL_PUNCTUATION 8
#define SCE_PL_PREPROCESSOR 9
#define SCE_PL_OPERATOR 10
#define SCE_PL_IDENTIFIER 11
#define SCE_PL_SCALAR 12
#define SCE_PL_ARRAY 13
#define SCE_PL_HASH 14
#define SCE_PL_SYMBOLTABLE 15
#define SCE_PL_REF 16
#define SCE_PL_REGEX 17
#define SCE_PL_REGSUBST 18
#define SCE_PL_LONGQUOTE 19
#define SCE_PL_BACKTICKS 20
#define SCE_PL_DATASECTION 21
#define SCE_L_DEFAULT 0
#define SCE_L_COMMAND 1
#define SCE_L_TAG 2
#define SCE_L_MATH 3
#define SCE_L_COMMENT 4
#define SCE_LUA_DEFAULT 0
#define SCE_LUA_COMMENT 1
#define SCE_LUA_COMMENTLINE 2
#define SCE_LUA_COMMENTDOC 3
#define SCE_LUA_NUMBER 4
#define SCE_LUA_WORD 5
#define SCE_LUA_STRING 6
#define SCE_LUA_CHARACTER 7
#define SCE_LUA_LITERALSTRING 8
#define SCE_LUA_PREPROCESSOR 9
#define SCE_LUA_OPERATOR 10
#define SCE_LUA_IDENTIFIER 11
#define SCE_LUA_STRINGEOL 12
#define SCE_ERR_DEFAULT 0
#define SCE_ERR_PYTHON 1
#define SCE_ERR_GCC 2
#define SCE_ERR_MS 3
#define SCE_ERR_CMD 4
#define SCE_ERR_BORLAND 5
#define SCE_ERR_PERL 6
//--Autogenerated -- end of section automatically generated from Scintilla.iface
#endif

Some files were not shown because too many files have changed in this diff Show More