Commit graph

51 commits

Author SHA1 Message Date
ehouse
8f08667f5d Lots more changes, and some reversions. Win32, gtk and ncurses all
work now including saving/opening games.  Network play probably
doesn't as writing/reading a dict from stream has to change.  It's
doubtful patches from this branch will be merged.  Rather, I'll take
the concepts and crib some code when re-implementing.  Concepts:
XP_UCHAR becomes UTF-8 on both platforms, and on wince we translate to
wchar_t just as now but from the utf-8 codepage.  That keeps the work
and risk to a minimum.
2009-03-29 15:53:15 +00:00
ehouse
2d33d47d67 Too many changes to list. Linux works to display utf-8 dict text on
gtk and curses, but crashes when saving game (-f option.)  Wince
doesn't even compile.  This is to backup partial changes, not a
revision to build.
2009-03-22 23:58:22 +00:00
ehouse
000f120694 get rid of excess logging (one line) 2009-01-18 18:17:08 +00:00
ehouse
cacf676bfd Get rid of unused parameter 2009-01-14 13:02:08 +00:00
ehouse
8a47aa177d Always use GetForegroundWindow to find parent 2009-01-05 14:06:52 +00:00
ehouse
3ab61e4264 Use Ok for stringbox, Done for Saved games dialog; next release to be
rc1, not b7
2008-12-13 04:39:06 +00:00
ehouse
a0a96fe020 Back out change: button to dismiss Saved games dialog is "Done" again,
not "Ok".
2008-12-12 05:28:53 +00:00
ehouse
d0222385fb Warn when unable to open a saved game (generally when an older version
of the app tries to open game saved by newer version.)
2008-12-11 13:48:59 +00:00
ehouse
ad459c8a0a Add appropriate icon flags to all uses of MessageBox; remove a couple
of unnecessary Cancel buttons.
2008-12-07 16:24:26 +00:00
ehouse
670d0be212 Don't let smartphone users set hintlimits checkbox, and explain
why. Fix bug calling MessageBox with main window ptr from dialog.
Include name of preexisting file when warning user who enters it while
saving/renaming.
2008-12-07 01:30:18 +00:00
ehouse
0652a85acd When fewer than 4 players shown in game info dialog, move controls
higher that are below player rows. On some screen sizes this prevents
those items from being off-screen. Note that this requires use of
DM_RESETSCROLL message to get Smartphone to recalc scroll info and
that DM_RESETSCROLL is not yet defined in cegcc.
2008-11-18 12:36:27 +00:00
ehouse
17b139b2c7 Add checkmarks to four menuitems to show state; add fullScreen
menuitem to w32 version and give it something to do.
2008-11-10 18:49:26 +00:00
ehouse
48d0492338 For win32 builds, locate files relative to ./ 2008-11-02 04:15:10 +00:00
ehouse
3771b0a4e6 Use SHGetSpecialFolderPath to locate dicts in /Document Files/Crosswords; reserve 1-pixel space around Rem: text 2008-10-29 08:46:02 +00:00
ehouse
552a6a5560 Get rid of string constants referencing \My Documents, using instead
SHGetSpecialFolderPath.  Cache the result of calling it.  Note that
mingw SHGetSpecialFolderPath headers define SHGetSpecialFolderPath as
SHGetSpecialFolderPathW which isn't in the library; hack around that.
2008-10-25 18:08:36 +00:00
ehouse
1bb0217785 Send message on back key only when coming up, not going down, to
prevent double-dismiss of dialogs.
2008-10-18 19:38:31 +00:00
ehouse
ff0bbb7c54 Remove overdesigned edit-control-caching mechanism in favor of just
asking if the current focus owner is an edit control.
2008-10-14 05:25:15 +00:00
ehouse
be93f274ee Walk dialog's controls and make a list of Edit controls so that dialog
procs don't have to pass them in.  Compare handles rather than IDs.
2008-10-13 05:46:45 +00:00
ehouse
20bcdea816 Trapped back key should exit dialog even if it has an edit control if
that control does not have focus.  Do that.  And since I can't figure
out how to use APIs available in CE to find edit controls dynamically
each dialog proc has to pass its IDs in.  May fix that later, in which
case ceDlgSetEdits() should be removed.
2008-10-13 01:26:20 +00:00
ehouse
79bb886495 Two large changes. First, layout board etc. based only on screen
dimensions and one constant giving the minimum height of a cell.
Replaces a bunch of constants that didn't scale to different sized
screens well.  Second, add the vertical scrollbar into the focus
rotation.  Once I have it showing that it's focussed it'll be easier
to figure out how to scroll the screen.
2008-09-28 17:50:04 +00:00
ehouse
4fb1e05b3a Get rid of cute-but-confusing feature whereby the menuitem to which
the left softkey is set is removed from the right key's menu.  More
important is that menu-9-6 always mean "exit".
2008-08-27 12:38:01 +00:00
ehouse
84758c8be2 Go back to using combobox on PPC but keep spinners on Smartphone.
Meaning: both exist in the resource, and at runtime we disable the
unwanted one and lookup IDs and sometimes window messages in order to
operate on 'em.  Also, spinners send WM_NOTIFY messages, so handle
that.  Current implementation is a bit of a hack but works.
2008-08-27 12:16:33 +00:00
ehouse
38314f2a2e fix scrollbars now that I finally understand what nPage is supposed to be. 2008-08-01 10:37:52 +00:00
ehouse
b265e3fa18 Implement dup, delete and rename buttons in saved games dialog.
Differs from Palm in having no edit field.  Rather, a separate dialog
comes up to get the new name.  Rather than reload the spinbox with a
new set of saved games after an action, just close and reopen the
dialog.
2008-06-26 04:17:14 +00:00
ehouse
5e06c72f5d Finally fix scroll-follows-focus for color edit dialog (the tallest).
Trick was to add BS_NOTIFY property to dialog controls and look for
the WM_COMMAND->BN_SETFOCUS message.
2008-06-07 14:40:05 +00:00
ehouse
588c16d45f rename and reorganize/simplify dialog-handling code common to all
dialogs, handling scrolling and backspace key (smartphone only) and
scroll-by-focus in a single place.
2008-06-05 04:29:28 +00:00
ehouse
7da66696ed Fix dictionary-search code to look in top-level temporary directories
rather than hard-coded "SD Card" etc. to work in non-English cases;
fix password dialog to fit, and simplify it; fix backspace on
smartphone for all dialogs with EDIT fields to actually backspace
rather than exiting app; and in main window have it raise focus.  This
change requires SHSendBackToFocusWindow(), which is not yet in cegcc.
Until I get a patch accepted this breaks wince builds.
2008-05-31 22:07:29 +00:00
ehouse
44186e220d Use SHInitDialog on smartphone to create fullscreen dialogs. Move
test for smartphone into util functions so can't forget it.  This
fixes scrolling on smartphone.
2008-05-10 15:42:52 +00:00
ehouse
e8765fb12c make ceDlgSetup figure out from sizes whether to scroll; make
ceDoDlgFocusScroll parse params passed into WM_NEXTDLGCTL message to
figure out what object is about to get focus.
2008-03-31 00:22:24 +00:00
ehouse
e866602426 rename ceStackButtonsRight ceDlgSetup, and make it do more general
setup of dialogs on CE.  No need to move buttons, but now scrolling
may need to be enabled, dialogs made fullscreen, and softkeys added.
Add functions to be called from dialog's wndprocs to implement
scrolling.
2008-03-23 19:37:53 +00:00
ehouse
ef5e20d708 Don't subtract command bar height from client rect height on
smartphone.  This prevents windows from being too small in
non-fullscreen mode.  Make ceSizeIfFullscreen work based on state
rather than assuming it's toggling.
2008-03-15 18:32:22 +00:00
ehouse
c9101ec801 Rework dialogs to fit or (eventually) scroll on small screen; put
dialogs in fullscreen mode; switch from dropdowns to spinbuttons on
CE; grab OS version on startup (not yet used.)
2008-03-15 15:39:58 +00:00
ehouse
2c3b7b23db Work on soft key and menu: derive text from menu item being moved so
that we can pull out and later replace any item by id alone.  Do
something similar on Win32 to ease development.  Remove '&' from
menuitem text, allowing winders to assign command keys, so that we
don't have to pull it before assigning text to softkey.
2008-03-10 01:47:46 +00:00
ehouse
78dfed6c59 Put back "turn done" menu, and add call to change the left softkey.
Call it when turn changes, new game is begun, and hint feature has
been used.  Currently menuitem is duplicated.  Goal is to remove the
item being attached to the left button and to replace it when another
is chosen.
2008-02-26 13:49:41 +00:00
ehouse
ce3131fb06 modify ceStackButtonsRight to place dialog ok/cancel buttons in
bottom menubar where possible; move XP_LOGW to cedebug.c
2008-02-16 17:14:35 +00:00
ehouse
e891a26756 substitute macro for common sizeof(x)/sizeof(x[0]) pattern; no generated code change 2007-05-26 14:03:07 +00:00
ehouse
9f0df402ce Calculate old window width correctly when figuring new width. Fixes
problem of buttons drawn too close to right edge.
2006-05-28 00:40:28 +00:00
ehouse
af7a0ad216 Before putting dialog into landscape mode, make sure it won't be wider
than the screen.  That is, don't be fooled when in portrait mode by a
screen height that's SIP-reduced.
2006-05-27 22:52:10 +00:00
ehouse
c2ddb62591 modify API for "portraitizing" dialogs, and space the buttons evenly
rather than stacking all from bottom.  This doesn't quit work on ce
since GetWindowInfo isn't available and IsWindowVisible does the wrong
thing.
2006-05-27 17:18:42 +00:00
ehouse
3ca36f57fc For dialogs in portrait-mode, move OK and Cancel buttons to the right
side and shrink up from the bottom
2006-05-25 03:41:32 +00:00
ehouse
23e26a3ba9 debug-only function for logging wchar_t strings 2006-04-20 04:38:40 +00:00
ehouse
2e901dde4e type changes to stop warnings 2006-01-31 14:40:49 +00:00
ehouse
dcd31cd092 update email address in header comments: no code change 2006-01-08 01:25:02 +00:00
ehouse
746e69b315 add assertion on null string 2005-07-23 15:16:26 +00:00
ehouse
b92bb148a9 add ceCenterCtl() 2005-02-06 06:52:24 +00:00
ehouse
9b39fa592d removed commented out code 2004-05-28 02:47:27 +00:00
ehouse
27a4402466 add ceGetDlgItemNum 2004-04-09 02:32:27 +00:00
ehouse
49fce9e3ed add ceSetDlgItemNum 2004-04-03 15:33:33 +00:00
ehouse
33ed650231 possible bug 2004-03-19 04:33:21 +00:00
ehouse
f7bd5b703e add ceSetDlgItemFileName 2004-02-27 06:18:21 +00:00