2009-12-16 19:05 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/tests/gtkeys.prg
    + added code to test clipboard (CTRL+INS shows clipboard text and
      CTRL+END set new text in clipboard).
This commit is contained in:
Przemyslaw Czerpak
2009-12-16 18:05:42 +00:00
parent 5fafefc19c
commit 24c0d47fb3
2 changed files with 22 additions and 2 deletions

View File

@@ -17,6 +17,11 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-12-16 19:05 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/tests/gtkeys.prg
+ added code to test clipboard (CTRL+INS shows clipboard text and
CTRL+END set new text in clipboard).
2009-12-16 18:28 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* harbour-win-spec
* harbour-wce-spec

View File

@@ -18,7 +18,7 @@
#endif
function main()
local k, i
local k, i, s
local aKeys := { ;
{ "K_UP", 5, "Up arrow, Ctrl-E" }, ;
{ "K_DOWN", 24, "Down arrow, Ctrl-X" }, ;
@@ -235,8 +235,23 @@ while (.t.)
? " key:"+str(k,7)
endif
// ?? " ("+ltrim(str(maxrow()))+":"+ltrim(str(maxcol()))+")"
if k==64 .and. nextkey()==0
if k==asc("@") .and. nextkey()==0
exit
#ifdef __HARBOUR__
elseif k==K_CTRL_INS
if alert( "Would you like to show clipboard text?", { "YES", "NO" } ) == 1
s := hb_gtInfo( HB_GTI_CLIPBOARDDATA )
? "Clipboard text: [" + s + "]"
endif
elseif k==K_CTRL_END
if alert( "Would you like to set clipboard text?", { "YES", "NO" } ) == 1
s := hb_tstostr( hb_datetime() ) + hb_osNewLine() + ;
"Harbour " + hb_gtVersion() + " clipboard test" + hb_osNewLine()
? "New clipboard text: [" + s + "]"
hb_gtInfo( HB_GTI_CLIPBOARDDATA, s )
endif
#endif
endif
enddo
?