mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
Remove my old port of the winelib notepad
svn path=/trunk/; revision=2366
This commit is contained in:
parent
a36b062468
commit
0de577f6cd
29 changed files with 0 additions and 3690 deletions
|
@ -1,103 +0,0 @@
|
|||
/*
|
||||
* Notepad (Danish resources)
|
||||
*
|
||||
* Copyright 1998 Henrik Olsen <henrik@iaeste.dk>
|
||||
*/
|
||||
|
||||
#define LANGUAGE_ID Da
|
||||
#define LANGUAGE_NUMBER 6
|
||||
#define LANGUAGE_MENU_ITEM "&Dansk"
|
||||
|
||||
/* Menu */
|
||||
|
||||
#define MENU_FILE "&Filef"
|
||||
#define MENU_FILE_NEW "&Ny..."
|
||||
#define MENU_FILE_OPEN "Å&bn\tEnter"
|
||||
#define MENU_FILE_SAVE "&Gem"
|
||||
#define MENU_FILE_SAVEAS "Gem so&m..."
|
||||
#define MENU_FILE_PRINT "&Udskriv"
|
||||
#define MENU_FILE_PAGESETUP "Side&opsætning..."
|
||||
#define MENU_FILE_PRINTSETUP "&Indstil printer..."
|
||||
#define MENU_FILE_EXIT "&Afslut"
|
||||
|
||||
#define MENU_EDIT "&Rediger"
|
||||
#define MENU_EDIT_UNDO "&Fortryd\tCtrl+Z"
|
||||
#define MENU_EDIT_CUT "&Klip\tCtrl+X"
|
||||
#define MENU_EDIT_COPY "K&opier\tCtrl+C"
|
||||
#define MENU_EDIT_PASTE "Sæt &ind\tCtrl+V"
|
||||
#define MENU_EDIT_DELETE "&Slet\tDel"
|
||||
#define MENU_EDIT_SELECTALL "Marker &alt"
|
||||
#define MENU_EDIT_TIMEDATE "&Dato/tid\tF5"
|
||||
#define MENU_EDIT_WRAP "Automatisk &linjeskift"
|
||||
|
||||
#define MENU_SEARCH "&Søg"
|
||||
#define MENU_SEARCH_SEARCH "&Søg..."
|
||||
#define MENU_SEARCH_NEXT "&Find næste\tF3"
|
||||
|
||||
#define MENU_LANGUAGE "S&prog"
|
||||
|
||||
#define MENU_HELP "&Hjælp"
|
||||
#define MENU_HELP_CONTENTS "&Indhold"
|
||||
#define MENU_HELP_SEARCH "&Søg efter hjælp om..."
|
||||
#define MENU_HELP_HELP_ON_HELP "&Brug af Hjælp"
|
||||
|
||||
#define MENU_INFO "&Om Notesblok..."
|
||||
#define MENU_INFO_LICENSE "&Licens"
|
||||
#define MENU_INFO_NO_WARRANTY "&NO WARRANTY"
|
||||
#define MENU_INFO_ABOUT_WINE "&Om WINE"
|
||||
|
||||
|
||||
/* Dialogs */
|
||||
|
||||
#define DIALOG_OK "OK"
|
||||
#define DIALOG_CANCEL "Annuller"
|
||||
#define DIALOG_BROWSE "&Gennemse..."
|
||||
#define DIALOG_HELP "&Hjælp"
|
||||
|
||||
#define DIALOG_PAGESETUP_CAPTION "Sideopsætning"
|
||||
#define DIALOG_PAGESETUP_HEAD "&Sidehoved:"
|
||||
#define DIALOG_PAGESETUP_TAIL "Side&fod:"
|
||||
#define DIALOG_PAGESETUP_MARGIN "Margener:"
|
||||
#define DIALOG_PAGESETUP_LEFT "&Venstre:"
|
||||
#define DIALOG_PAGESETUP_RIGHT "&Højre:"
|
||||
#define DIALOG_PAGESETUP_TOP "&Top:"
|
||||
#define DIALOG_PAGESETUP_BOTTOM "&Bund:"
|
||||
|
||||
|
||||
/* Strings */
|
||||
|
||||
#define STRING_PAGESETUP_HEADERVALUE "&n" /* FIXME */
|
||||
#define STRING_PAGESETUP_FOOTERVALUE "Page &s" /* FIXME */
|
||||
#define STRING_PAGESETUP_LEFTVALUE "20 mm" /* FIXME */
|
||||
#define STRING_PAGESETUP_RIGHTVALUE "20 mm" /* FIXME */
|
||||
#define STRING_PAGESETUP_TOPVALUE "25 mm" /* FIXME */
|
||||
#define STRING_PAGESETUP_BOTTOMVALUE "25 mm" /* FIXME */
|
||||
|
||||
#define STRING_NOTEPAD "Notesblok"
|
||||
#define STRING_ERROR "FEJL"
|
||||
#define STRING_WARNING "ADVARSEL"
|
||||
#define STRING_INFO "Information"
|
||||
|
||||
#define STRING_UNTITLED "(ikke-navngivet)"
|
||||
|
||||
#define STRING_ALL_FILES "Alle filer (*.*)"
|
||||
#define STRING_TEXT_FILES_TXT "Tekst filer (*.txt)"
|
||||
|
||||
#define STRING_TOOLARGE "Filen '%s' er for stor til Notesblok. \
|
||||
\nBrug en anden editor til at redigere filen."
|
||||
|
||||
#define STRING_NOTEXT "Du har ikke skrevet noget tekst. \
|
||||
\nSkriv noget tekst, og prøv så igen"
|
||||
|
||||
/* FIXME: */
|
||||
|
||||
#define STRING_NOTSAVED "Filen '%s'\n has been modified.\n\n \
|
||||
Would you like to save the changes ?"
|
||||
|
||||
#define STRING_NOTFOUND "Kan ikke finde '%s'."
|
||||
|
||||
#define STRING_OUT_OF_MEMORY "Der er ikke nok hukommelse til at udføre \
|
||||
denne operation. \nAfslut et eller flere aktive programmer for at frigøre \
|
||||
hukommelse, og prøv så igen."
|
||||
|
||||
#include "notepad.rc"
|
|
@ -1,104 +0,0 @@
|
|||
/*
|
||||
* Notepad (German resources)
|
||||
*
|
||||
* Copyright 1997,98 Marcel Baur <mbaur@g26.ethz.ch>
|
||||
* To be distributed under the Wine License
|
||||
*/
|
||||
|
||||
#define LANGUAGE_ID De
|
||||
#define LANGUAGE_NUMBER 2
|
||||
#define LANGUAGE_MENU_ITEM "&Deutsch"
|
||||
|
||||
|
||||
/* Menu */
|
||||
|
||||
#define MENU_FILE "&Datei"
|
||||
#define MENU_FILE_NEW "&Neu..."
|
||||
#define MENU_FILE_OPEN "Ö&ffnen..."
|
||||
#define MENU_FILE_SAVE "&Speichern"
|
||||
#define MENU_FILE_SAVEAS "Speichern &unter..."
|
||||
#define MENU_FILE_PRINT "&Drucken"
|
||||
#define MENU_FILE_PAGESETUP "Seite ein&richten..."
|
||||
#define MENU_FILE_PRINTSETUP "Drucker&einrichtung..."
|
||||
#define MENU_FILE_EXIT "&Beenden"
|
||||
|
||||
#define MENU_EDIT "&Bearbeiten"
|
||||
#define MENU_EDIT_UNDO "&Rückgängig\tStrg+Z"
|
||||
#define MENU_EDIT_CUT "&Ausschneiden\tStrg+X"
|
||||
#define MENU_EDIT_COPY "&Kopieren\tStrg+C"
|
||||
#define MENU_EDIT_PASTE "&Einfügen\tStrg+V"
|
||||
#define MENU_EDIT_DELETE "&Löschen\tEntf"
|
||||
#define MENU_EDIT_SELECTALL "Alles &markieren"
|
||||
#define MENU_EDIT_TIMEDATE "&Uhrzeit/Datum\tF5"
|
||||
#define MENU_EDIT_WRAP "&Zeilenumbruch"
|
||||
|
||||
#define MENU_SEARCH "&Suchen"
|
||||
#define MENU_SEARCH_SEARCH "Suchen..."
|
||||
#define MENU_SEARCH_NEXT "&Weitersuchen\tF3"
|
||||
|
||||
#define MENU_LANGUAGE "&Sprache"
|
||||
|
||||
#define MENU_HELP "&Hilfe"
|
||||
#define MENU_HELP_CONTENTS "&Inhalt"
|
||||
#define MENU_HELP_SEARCH "&Suchen..."
|
||||
#define MENU_HELP_HELP_ON_HELP "&Hilfe benutzen"
|
||||
|
||||
#define MENU_INFO "Inf&o..."
|
||||
#define MENU_INFO_LICENSE "&Lizenz"
|
||||
#define MENU_INFO_NO_WARRANTY "&KEINE GARANTIE"
|
||||
#define MENU_INFO_ABOUT_WINE "&Über WINE"
|
||||
|
||||
|
||||
/* Dialogs */
|
||||
|
||||
#define DIALOG_OK "OK"
|
||||
#define DIALOG_CANCEL "Abbrechen"
|
||||
#define DIALOG_BROWSE "&Durchsuchen..."
|
||||
#define DIALOG_HELP "&Hilfe"
|
||||
|
||||
#define DIALOG_PAGESETUP_CAPTION "Seite einrichten"
|
||||
#define DIALOG_PAGESETUP_HEAD "&Kopfzeile:"
|
||||
#define DIALOG_PAGESETUP_TAIL "&Fußzeile:"
|
||||
#define DIALOG_PAGESETUP_MARGIN "Ränder"
|
||||
#define DIALOG_PAGESETUP_LEFT "&Links:"
|
||||
#define DIALOG_PAGESETUP_RIGHT "&Rechts:"
|
||||
#define DIALOG_PAGESETUP_TOP "&Oben:"
|
||||
#define DIALOG_PAGESETUP_BOTTOM "&Unten:"
|
||||
|
||||
|
||||
/* Strings */
|
||||
|
||||
#define STRING_PAGESETUP_HEADERVALUE "&n"
|
||||
#define STRING_PAGESETUP_FOOTERVALUE "Page &s"
|
||||
#define STRING_PAGESETUP_LEFTVALUE "20 mm"
|
||||
#define STRING_PAGESETUP_RIGHTVALUE "20 mm"
|
||||
#define STRING_PAGESETUP_TOPVALUE "25 mm"
|
||||
#define STRING_PAGESETUP_BOTTOMVALUE "25 mm"
|
||||
|
||||
#define STRING_NOTEPAD "Editor"
|
||||
#define STRING_ERROR "FEHLER"
|
||||
#define STRING_WARNING "ACHTUNG"
|
||||
#define STRING_INFO "Information"
|
||||
|
||||
#define STRING_UNTITLED "(unbenannt)"
|
||||
|
||||
#define STRING_ALL_FILES "Alle Dateien (*.*)"
|
||||
#define STRING_TEXT_FILES_TXT "Textdateien (*.txt)"
|
||||
|
||||
#define STRING_TOOLARGE "'%s' ist zu gross für den Editor\n \
|
||||
Benutzen Sie bitte einen anderen Editor, um diese Datei zu bearbeiten."
|
||||
|
||||
#define STRING_NOTEXT "Sie haben keinen Text eingegeben, der \
|
||||
gespeichert\n werden könnte. Geben Sie Text ein, und versuchen Sie es \
|
||||
\nerneut."
|
||||
|
||||
#define STRING_NOTSAVED "Datei %s\n wurde geaendert.\n\n \
|
||||
Moechten Sie die Aenderungen speichern ?"
|
||||
|
||||
#define STRING_NOTFOUND "'%s' kann nicht gefunden werden."
|
||||
|
||||
#define STRING_OUT_OF_MEMORY "Nicht genügend Arbeitsspeicher, \
|
||||
um diese Funktion \nabzuschließen. Beenden Sie eine oder mehrere \
|
||||
\nAnwendungen, um den verfügbaren Arbeitsspeicher zu \nerhöhen."
|
||||
|
||||
#include "notepad.rc"
|
|
@ -1,103 +0,0 @@
|
|||
/*
|
||||
* Notepad (English resources)
|
||||
*
|
||||
* Copyright 1997,98 Marcel Baur <mbaur@g26.ethz.ch>
|
||||
* Proofread 1998 by David Lee Lambert <lamber45@egr.msu.edu>
|
||||
*/
|
||||
|
||||
#define LANGUAGE_ID En
|
||||
#define LANGUAGE_NUMBER 0
|
||||
#define LANGUAGE_MENU_ITEM "&English"
|
||||
|
||||
|
||||
/* Menu */
|
||||
|
||||
#define MENU_FILE "&File"
|
||||
#define MENU_FILE_NEW "&New..."
|
||||
#define MENU_FILE_OPEN "&Open"
|
||||
#define MENU_FILE_SAVE "&Save"
|
||||
#define MENU_FILE_SAVEAS "Save &as..."
|
||||
#define MENU_FILE_PRINT "&Print"
|
||||
#define MENU_FILE_PAGESETUP "Page Se&tup..."
|
||||
#define MENU_FILE_PRINTSETUP "P&rinter Setup..."
|
||||
#define MENU_FILE_EXIT "&Exit"
|
||||
|
||||
#define MENU_EDIT "&Edit"
|
||||
#define MENU_EDIT_UNDO "&Undo\tCtrl+Z"
|
||||
#define MENU_EDIT_CUT "Cu&t\tCtrl+X"
|
||||
#define MENU_EDIT_COPY "&Copy\tCtrl+C"
|
||||
#define MENU_EDIT_PASTE "&Paste\tCtrl+V"
|
||||
#define MENU_EDIT_DELETE "&Delete\tDel"
|
||||
#define MENU_EDIT_SELECTALL "Select &all"
|
||||
#define MENU_EDIT_TIMEDATE "&Time/Date\tF5"
|
||||
#define MENU_EDIT_WRAP "&Wrap long lines"
|
||||
|
||||
#define MENU_SEARCH "&Search"
|
||||
#define MENU_SEARCH_SEARCH "Search..."
|
||||
#define MENU_SEARCH_NEXT "&Search next\tF3"
|
||||
|
||||
#define MENU_LANGUAGE "&Language"
|
||||
|
||||
#define MENU_HELP "&Help"
|
||||
#define MENU_HELP_CONTENTS "&Contents"
|
||||
#define MENU_HELP_SEARCH "&Search..."
|
||||
#define MENU_HELP_HELP_ON_HELP "&Help on help"
|
||||
|
||||
#define MENU_INFO "Inf&o..."
|
||||
#define MENU_INFO_LICENSE "&License"
|
||||
#define MENU_INFO_NO_WARRANTY "&NO WARRANTY"
|
||||
#define MENU_INFO_ABOUT_WINE "&About Wine"
|
||||
|
||||
|
||||
/* Dialogs */
|
||||
|
||||
#define DIALOG_OK "OK"
|
||||
#define DIALOG_CANCEL "Cancel"
|
||||
#define DIALOG_BROWSE "&Browse..."
|
||||
#define DIALOG_HELP "&Help"
|
||||
|
||||
#define DIALOG_PAGESETUP_CAPTION "Page Setup"
|
||||
#define DIALOG_PAGESETUP_HEAD "&Header:"
|
||||
#define DIALOG_PAGESETUP_TAIL "&Footer:"
|
||||
#define DIALOG_PAGESETUP_MARGIN "&Margins:"
|
||||
#define DIALOG_PAGESETUP_LEFT "&Left:"
|
||||
#define DIALOG_PAGESETUP_RIGHT "&Right:"
|
||||
#define DIALOG_PAGESETUP_TOP "&Top:"
|
||||
#define DIALOG_PAGESETUP_BOTTOM "&Bottom:"
|
||||
|
||||
|
||||
/* Strings */
|
||||
|
||||
#define STRING_PAGESETUP_HEADERVALUE "&n" /* FIXME */
|
||||
#define STRING_PAGESETUP_FOOTERVALUE "Page &s" /* FIXME */
|
||||
#define STRING_PAGESETUP_LEFTVALUE "20 mm" /* FIXME */
|
||||
#define STRING_PAGESETUP_RIGHTVALUE "20 mm" /* FIXME */
|
||||
#define STRING_PAGESETUP_TOPVALUE "25 mm" /* FIXME */
|
||||
#define STRING_PAGESETUP_BOTTOMVALUE "25 mm" /* FIXME */
|
||||
|
||||
#define STRING_NOTEPAD "Notepad"
|
||||
#define STRING_ERROR "ERROR"
|
||||
#define STRING_WARNING "WARNING"
|
||||
#define STRING_INFO "Information"
|
||||
|
||||
#define STRING_UNTITLED "(untitled)"
|
||||
|
||||
#define STRING_ALL_FILES "All files (*.*)"
|
||||
#define STRING_TEXT_FILES_TXT "Text files (*.txt)"
|
||||
|
||||
#define STRING_TOOLARGE "File '%s' is too large for notepad.\n \
|
||||
Please use a different editor."
|
||||
|
||||
#define STRING_NOTEXT "You didn't enter any text. \
|
||||
\nPlease type something and try again"
|
||||
|
||||
#define STRING_NOTSAVED "File '%s'\nhas been modified\n\n \
|
||||
Would you like to save the changes ?"
|
||||
|
||||
#define STRING_NOTFOUND "'%s' can not be found."
|
||||
|
||||
#define STRING_OUT_OF_MEMORY "Not enough memory to complete this \
|
||||
task. \nClose one or more applications to increase the amount of \nfree \
|
||||
memory."
|
||||
|
||||
#include "notepad.rc"
|
|
@ -1,106 +0,0 @@
|
|||
/*
|
||||
* Notepad (English resources)
|
||||
*
|
||||
* Copyright 1997,98 Marcel Baur <mbaur@g26.ethz.ch>
|
||||
* Proofread 1998 by David Lee Lambert <lamber45@egr.msu.edu>
|
||||
* Proofread 1999 by Jose Marcos Lopez <jose.lopez@upcnet.upc.es>
|
||||
*/
|
||||
|
||||
#define LANGUAGE_ID Es
|
||||
#define LANGUAGE_NUMBER d
|
||||
#define LANGUAGE_MENU_ITEM "Castellano"
|
||||
|
||||
|
||||
/* Menu */
|
||||
|
||||
#define MENU_FILE "&Archivo"
|
||||
#define MENU_FILE_NEW "&Nuevo"
|
||||
#define MENU_FILE_OPEN "&Abrir"
|
||||
#define MENU_FILE_SAVE "&Guardar"
|
||||
#define MENU_FILE_SAVEAS "Guardar co&mo..."
|
||||
#define MENU_FILE_PAGESETUP "&Configurar página..."
|
||||
#define MENU_FILE_PRINT "&Imprimir"
|
||||
#define MENU_FILE_PRINTSETUP "&Configuración impresora..."
|
||||
#define MENU_FILE_EXIT "&Salir"
|
||||
|
||||
#define MENU_EDIT "&Editar"
|
||||
#define MENU_EDIT_UNDO "&Deshacer\tCtrl+Z"
|
||||
#define MENU_EDIT_CUT "Cor&tar\tCtrl+X"
|
||||
#define MENU_EDIT_COPY "&Copiar\tCtrl+C"
|
||||
#define MENU_EDIT_PASTE "&Pegar\tCtrl+V"
|
||||
#define MENU_EDIT_DELETE "&Borrar\tDel"
|
||||
#define MENU_EDIT_SELECTALL "Seleccionar t&odo"
|
||||
#define MENU_EDIT_TIMEDATE "&Hora y Fecha\tF5"
|
||||
#define MENU_EDIT_WRAP "&Ajuste de línea automático"
|
||||
|
||||
#define MENU_SEARCH "&Buscar"
|
||||
#define MENU_SEARCH_SEARCH "&Buscar..."
|
||||
#define MENU_SEARCH_NEXT "Buscar &siguiente\tF3"
|
||||
|
||||
#define MENU_LANGUAGE "&Idioma"
|
||||
|
||||
#define MENU_HELP "&Ayuda"
|
||||
#define MENU_HELP_CONTENTS "&Indice"
|
||||
#define MENU_HELP_SEARCH "&Buscar..."
|
||||
#define MENU_HELP_HELP_ON_HELP "&Ayuda sobre la ayuda"
|
||||
|
||||
#define MENU_INFO "Inf&ormación..."
|
||||
#define MENU_INFO_LICENSE "&Licencia"
|
||||
#define MENU_INFO_NO_WARRANTY "SIN &GARANTÍA"
|
||||
#define MENU_INFO_ABOUT_WINE "&Acerca de Wine"
|
||||
|
||||
|
||||
/* Dialogs */
|
||||
|
||||
#define DIALOG_OK "OK"
|
||||
#define DIALOG_CANCEL "Cancelar"
|
||||
#define DIALOG_BROWSE "&Buscar..."
|
||||
#define DIALOG_HELP "&Ayuda"
|
||||
|
||||
#define DIALOG_PAGESETUP_CAPTION "&Ajuste de página"
|
||||
#define DIALOG_PAGESETUP_HEAD "&Cabecera:"
|
||||
#define DIALOG_PAGESETUP_TAIL "&Pié:"
|
||||
#define DIALOG_PAGESETUP_MARGIN "&Margenes:"
|
||||
#define DIALOG_PAGESETUP_LEFT "&Izquierda:"
|
||||
#define DIALOG_PAGESETUP_RIGHT "&Derecha:"
|
||||
#define DIALOG_PAGESETUP_TOP "A&rriba:"
|
||||
#define DIALOG_PAGESETUP_BOTTOM "Aba&jo:"
|
||||
|
||||
|
||||
/* Strings */
|
||||
|
||||
#define STRING_PAGESETUP_HEADERVALUE "&n" /* FIXME */
|
||||
#define STRING_PAGESETUP_FOOTERVALUE "Página &s" /* FIXME */
|
||||
#define STRING_PAGESETUP_LEFTVALUE "20 mm" /* FIXME */
|
||||
#define STRING_PAGESETUP_RIGHTVALUE "20 mm" /* FIXME */
|
||||
#define STRING_PAGESETUP_TOPVALUE "25 mm" /* FIXME */
|
||||
#define STRING_PAGESETUP_BOTTOMVALUE "25 mm" /* FIXME */
|
||||
|
||||
#define STRING_NOTEPAD "Bloc de Notas"
|
||||
#define STRING_ERROR "ERROR"
|
||||
#define STRING_WARNING "CUIDADO"
|
||||
#define STRING_INFO "Información"
|
||||
|
||||
#define STRING_UNTITLED "(sin título)"
|
||||
|
||||
#define STRING_ALL_FILES "Todos los archivos (*.*)"
|
||||
#define STRING_TEXT_FILES_TXT "Documentos de texto (*.txt)"
|
||||
|
||||
#define STRING_TOOLARGE "El archivo '%s' es demasiado grande para el bloc de notas.\n \
|
||||
Use otro editor."
|
||||
|
||||
#define STRING_NOTEXT "Ud. no escribió nada. \
|
||||
\nPor favor escriba algo y pruebe de nuevo"
|
||||
|
||||
/* FIXME */
|
||||
|
||||
#define STRING_NOTSAVED "El texto en el archivo '%s' ha cambiado\n\n \
|
||||
¿Desea guardar los cambios?"
|
||||
|
||||
#define STRING_NOTFOUND "no se encontró '%s'."
|
||||
|
||||
#define STRING_OUT_OF_MEMORY "No hay suficiente memoria para terminar \
|
||||
esta tarea. \nCierre una o más aplicaciones para aumentar la cantidad \nde \
|
||||
memoria libre."
|
||||
|
||||
#include "notepad.rc"
|
|
@ -1,104 +0,0 @@
|
|||
/*
|
||||
* Notepad (Finnish resources)
|
||||
*
|
||||
* Copyright 1999 by Jukka Iivonen <iivonen@iki.fi>
|
||||
*/
|
||||
|
||||
#define LANGUAGE_ID Fi
|
||||
#define LANGUAGE_NUMBER b
|
||||
#define LANGUAGE_MENU_ITEM "&Finnish"
|
||||
|
||||
|
||||
/* Menu */
|
||||
|
||||
#define MENU_FILE "&Tiedosto"
|
||||
#define MENU_FILE_NEW "&Uusi..."
|
||||
#define MENU_FILE_OPEN "&Avaa"
|
||||
#define MENU_FILE_SAVE "Ta&lleta"
|
||||
#define MENU_FILE_SAVEAS "Talleta &nimellä..."
|
||||
#define MENU_FILE_PRINT "T&ulosta"
|
||||
#define MENU_FILE_PAGESETUP "&Sivun asetukset..."
|
||||
#define MENU_FILE_PRINTSETUP "&Kirjoittimen asetukset..."
|
||||
#define MENU_FILE_EXIT "&Poistu"
|
||||
|
||||
#define MENU_EDIT "&Muokkaa"
|
||||
#define MENU_EDIT_UNDO "&Palauta\tCtrl+Z"
|
||||
#define MENU_EDIT_CUT "&Leikkaa\tCtrl+X"
|
||||
#define MENU_EDIT_COPY "&Kopioi\tCtrl+C"
|
||||
#define MENU_EDIT_PASTE "L&iitä\tCtrl+V"
|
||||
#define MENU_EDIT_DELETE "P&oista\tDel"
|
||||
#define MENU_EDIT_SELECTALL "&Valitse kaikki"
|
||||
#define MENU_EDIT_TIMEDATE "&Aika/Päivämäärä\tF5"
|
||||
#define MENU_EDIT_WRAP "Ka&tkaise pitkä rivi"
|
||||
|
||||
#define MENU_SEARCH "&Etsi"
|
||||
#define MENU_SEARCH_SEARCH "Etsi..."
|
||||
#define MENU_SEARCH_NEXT "Etsi &seuraava\tF3"
|
||||
|
||||
#define MENU_LANGUAGE "&Kieli"
|
||||
|
||||
#define MENU_HELP "&Apua"
|
||||
#define MENU_HELP_CONTENTS "&Sisältö"
|
||||
#define MENU_HELP_SEARCH "&Etsi..."
|
||||
#define MENU_HELP_HELP_ON_HELP "Apua &Opastuksesta"
|
||||
|
||||
#define MENU_INFO "Inf&o..."
|
||||
#define MENU_INFO_LICENSE "&Lisenssi"
|
||||
#define MENU_INFO_NO_WARRANTY "&EI TAKUUTA"
|
||||
#define MENU_INFO_ABOUT_WINE "&Tietoja Wine:ista"
|
||||
|
||||
|
||||
/* Dialogs */
|
||||
|
||||
#define DIALOG_OK "OK"
|
||||
#define DIALOG_CANCEL "Peruuta"
|
||||
#define DIALOG_BROWSE "&Selaa..."
|
||||
#define DIALOG_HELP "&Apua"
|
||||
|
||||
#define DIALOG_PAGESETUP_CAPTION "Sivun asetukset"
|
||||
#define DIALOG_PAGESETUP_HEAD "&Yläotsikko:"
|
||||
#define DIALOG_PAGESETUP_TAIL "Alao&tsikko:"
|
||||
#define DIALOG_PAGESETUP_MARGIN "&Marginaali:"
|
||||
#define DIALOG_PAGESETUP_LEFT "&Vasen:"
|
||||
#define DIALOG_PAGESETUP_RIGHT "&Oikea:"
|
||||
#define DIALOG_PAGESETUP_TOP "Y&lä:"
|
||||
#define DIALOG_PAGESETUP_BOTTOM "&Ala:"
|
||||
|
||||
|
||||
/* Strings */
|
||||
|
||||
#define STRING_PAGESETUP_HEADERVALUE "&n" /* FIXME */
|
||||
#define STRING_PAGESETUP_FOOTERVALUE "Sivu &s" /* FIXME */
|
||||
#define STRING_PAGESETUP_LEFTVALUE "20 mm" /* FIXME */
|
||||
#define STRING_PAGESETUP_RIGHTVALUE "20 mm" /* FIXME */
|
||||
#define STRING_PAGESETUP_TOPVALUE "25 mm" /* FIXME */
|
||||
#define STRING_PAGESETUP_BOTTOMVALUE "25 mm" /* FIXME */
|
||||
|
||||
#define STRING_NOTEPAD "Notepad"
|
||||
#define STRING_ERROR "VIRHE"
|
||||
#define STRING_WARNING "VAROITUS"
|
||||
#define STRING_INFO "Tiedoitus"
|
||||
|
||||
#define STRING_UNTITLED "(otsikoimaton)"
|
||||
|
||||
#define STRING_ALL_FILES "Kaikki tiedostot (*.*)"
|
||||
#define STRING_TEXT_FILES_TXT "Teksti tiedostot (*.txt)"
|
||||
|
||||
#define STRING_TOOLARGE "Tiedosto '%s' on liian suuri.\n \
|
||||
Please use a different editor."
|
||||
|
||||
#define STRING_NOTEXT "Et syöttänyt lainkaan tekstiä. \
|
||||
\nKirjoita jotain ja yritä uudelleen"
|
||||
|
||||
/* FIXME */
|
||||
|
||||
#define STRING_NOTSAVED "File '%s'\nhas been modified\n\n \
|
||||
Would you like to save your changes ?"
|
||||
|
||||
#define STRING_NOTFOUND "'%s' ei löydy."
|
||||
|
||||
#define STRING_OUT_OF_MEMORY "Muistia ei ole riittävästi tämän \
|
||||
\ntehtävän tekemiseksi. Sulje jokin sovellus vapauttaaksesi\n \
|
||||
muistia."
|
||||
|
||||
#include "notepad.rc"
|
|
@ -1,108 +0,0 @@
|
|||
/*
|
||||
* Notepad (French resources)
|
||||
*
|
||||
* Copyright 1997,98 Marcel Baur <mbaur@g26.ethz.ch>
|
||||
* Translation by Laurent Buffler <laurent@bluewin.ch>
|
||||
*/
|
||||
|
||||
#define LANGUAGE_ID Fr
|
||||
#define LANGUAGE_NUMBER 3
|
||||
#define LANGUAGE_MENU_ITEM "&Français"
|
||||
|
||||
|
||||
/* Menu */
|
||||
|
||||
#define MENU_FILE "&Fichier"
|
||||
#define MENU_FILE_NEW "&Nouveau..."
|
||||
#define MENU_FILE_OPEN "&Ouvrir"
|
||||
#define MENU_FILE_SAVE "&Sauver"
|
||||
#define MENU_FILE_SAVEAS "S&auver sous..."
|
||||
#define MENU_FILE_PRINT "Im&primer"
|
||||
#define MENU_FILE_PAGESETUP "&Mise en page..."
|
||||
#define MENU_FILE_PRINTSETUP "Imp&rimante..."
|
||||
#define MENU_FILE_EXIT "&Quitter"
|
||||
|
||||
#define MENU_EDIT "&Edition"
|
||||
#define MENU_EDIT_UNDO "&Annuler\tCtrl+Z"
|
||||
#define MENU_EDIT_CUT "Coupe&r\tCtrl+X"
|
||||
#define MENU_EDIT_COPY "&Copier\tCtrl+C"
|
||||
#define MENU_EDIT_PASTE "C&oller\tCtrl+V"
|
||||
#define MENU_EDIT_DELETE "E&ffacer\tDel"
|
||||
#define MENU_EDIT_SELECTALL "Tout &selectionner"
|
||||
#define MENU_EDIT_TIMEDATE "&Heure/Date\tF5"
|
||||
#define MENU_EDIT_WRAP "&Retour à la ligne"
|
||||
|
||||
#define MENU_SEARCH "&Recherche"
|
||||
#define MENU_SEARCH_SEARCH "&Chercher..."
|
||||
#define MENU_SEARCH_NEXT "&Suivant\tF3"
|
||||
|
||||
#define MENU_LANGUAGE "&Langue"
|
||||
|
||||
#define MENU_HELP "&Aide"
|
||||
#define MENU_HELP_CONTENTS "&Sommaire"
|
||||
#define MENU_HELP_SEARCH "&Chercher..."
|
||||
#define MENU_HELP_HELP_ON_HELP "&Aide sur l'aide"
|
||||
|
||||
#define MENU_INFO "Inf&o..."
|
||||
#define MENU_INFO_LICENSE "&License"
|
||||
#define MENU_INFO_NO_WARRANTY "&SANS GARANTIE"
|
||||
#define MENU_INFO_ABOUT_WINE "&A propos de Wine"
|
||||
|
||||
|
||||
/* Dialogs */
|
||||
|
||||
#define DIALOG_OK "OK"
|
||||
#define DIALOG_CANCEL "Annuler"
|
||||
#define DIALOG_BROWSE "&Parcourir..."
|
||||
#define DIALOG_HELP "&Aide"
|
||||
|
||||
#define DIALOG_PAGESETUP_CAPTION "Mise en page"
|
||||
#define DIALOG_PAGESETUP_HEAD "&En-tête:"
|
||||
#define DIALOG_PAGESETUP_TAIL "&Pied de page:"
|
||||
#define DIALOG_PAGESETUP_MARGIN "&Marges:"
|
||||
#define DIALOG_PAGESETUP_LEFT "&Gauche:"
|
||||
#define DIALOG_PAGESETUP_RIGHT "&Droite:"
|
||||
#define DIALOG_PAGESETUP_TOP "&Haut:"
|
||||
#define DIALOG_PAGESETUP_BOTTOM "&Bas:"
|
||||
|
||||
|
||||
/* Strings */
|
||||
|
||||
#define STRING_PAGESETUP_HEADERVALUE "&n" /* FIXME */
|
||||
#define STRING_PAGESETUP_FOOTERVALUE "Page &s" /* FIXME */
|
||||
#define STRING_PAGESETUP_LEFTVALUE "20 mm" /* FIXME */
|
||||
#define STRING_PAGESETUP_RIGHTVALUE "20 mm" /* FIXME */
|
||||
#define STRING_PAGESETUP_TOPVALUE "25 mm" /* FIXME */
|
||||
#define STRING_PAGESETUP_BOTTOMVALUE "25 mm" /* FIXME */
|
||||
|
||||
#define STRING_NOTEPAD "Notepad"
|
||||
#define STRING_ERROR "ERREUR"
|
||||
#define STRING_WARNING "AVERTISSEMENT"
|
||||
#define STRING_INFO "Information"
|
||||
|
||||
#define STRING_UNTITLED "(sans titre)"
|
||||
|
||||
#define STRING_ALL_FILES "Tous (*.*)"
|
||||
#define STRING_TEXT_FILES_TXT "Fichiers texte (*.txt)"
|
||||
|
||||
#define STRING_TOOLARGE "Le fichier '%s' est trop grand pour le bloc note.\n \
|
||||
Veuillez utiliser un autre éditeur."
|
||||
|
||||
#define STRING_NOTEXT "Vous n'avez pas entré de texte. \
|
||||
\nVeuillez taper quelque chose et recommencer"
|
||||
|
||||
/* FIXME */
|
||||
|
||||
#define STRING_NOTSAVED "Le fichier '%s'\n\n a change\n \
|
||||
Would you like to save your changes ?"
|
||||
|
||||
#define STRING_NOTFOUND "'%s' introuvable."
|
||||
|
||||
#define STRING_OUT_OF_MEMORY "Pas assez de mémoire pour finir cette tâche. \
|
||||
\nFermez une ou plusier applications pour libérer \n \
|
||||
de la mémoire."
|
||||
|
||||
#include "notepad.rc"
|
||||
|
||||
/* Strings */
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
#include "windows.h"
|
||||
#include "license.h"
|
||||
|
||||
static CHAR LicenseCaption_En[] = "LICENSE";
|
||||
static CHAR License_En[] = "\
|
||||
You may without charge, royalty or other payment, copy and\
|
||||
distribute copies of this work and derivative works of this work\
|
||||
in source or binary form provided that: (1)\
|
||||
you appropriately publish on each copy an appropriate copyright\
|
||||
notice; (2) faithfully reproduce all prior copyright notices\
|
||||
included in the original work (you may also add your own\
|
||||
copyright notice); and (3) agree to indemnify and hold all prior\
|
||||
authors, copyright holders and licensors of the work harmless\
|
||||
from and against all damages arising from use of the work.\
|
||||
\n\
|
||||
You may distribute sources of derivative works of the work\
|
||||
provided that (1) (a) all source files of the original work that\
|
||||
have been modified, (b) all source files of the derivative work\
|
||||
that contain any party of the original work, and (c) all source\
|
||||
files of the derivative work that are necessary to compile, link\
|
||||
and run the derivative work without unresolved external calls and\
|
||||
with the same functionality of the original work (\"Necessary\
|
||||
Sources\") carry a prominent notice explaining the nature and date\
|
||||
of the modification and/or creation. You are encouraged to make\
|
||||
the Necessary Sources available under this license in order to\
|
||||
further the development and acceptance of the work.\
|
||||
\n\
|
||||
EXCEPT AS OTHERWISE RESTRICTED BY LAW, THIS WORK IS PROVIDED\
|
||||
WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES OF ANY KIND, INCLUDING\
|
||||
BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF FITNESS FOR A\
|
||||
PARTICULAR PURPOSE, MERCHANTABILITY OR TITLE. EXCEPT AS\
|
||||
OTHERWISE PROVIDED BY LAW, NO AUTHOR, COPYRIGHT HOLDER OR\
|
||||
LICENSOR SHALL BE LIABLE TO YOU FOR DAMAGES OF ANY KIND, EVEN IF\
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.";
|
||||
|
||||
static CHAR NoWarrantyCaption_En[] = "NO WARRANTY";
|
||||
static CHAR NoWarranty_En[] = "\
|
||||
EXCEPT AS OTHERWISE RESTRICTED BY LAW, THIS WORK IS PROVIDED\
|
||||
WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES OF ANY KIND, INCLUDING\
|
||||
BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF FITNESS FOR A\
|
||||
PARTICULAR PURPOSE, MERCHANTABILITY OR TITLE. EXCEPT AS\
|
||||
OTHERWISE PROVIDED BY LAW, NO AUTHOR, COPYRIGHT HOLDER OR\
|
||||
LICENSOR SHALL BE LIABLE TO YOU FOR DAMAGES OF ANY KIND, EVEN IF\
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.";
|
||||
|
||||
LICENSE WineLicense_En = {License_En, LicenseCaption_En,
|
||||
NoWarranty_En, NoWarrantyCaption_En};
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
#
|
||||
#
|
||||
#
|
||||
PATH_TO_TOP = ../..
|
||||
|
||||
PROGS = notepad
|
||||
|
||||
OBJECTS = dialog.o language.o license.o License_En.o main.o search.o rsrc.coff
|
||||
|
||||
LIBS = ../../dk/w32/lib/kernel32.a ../../dk/w32/lib/gdi32.a \
|
||||
../../dk/w32/lib/libcomdlg32.a
|
||||
|
||||
CFLAGS =
|
||||
|
||||
all: $(PROGS:%=%.exe)
|
||||
|
||||
.phony: all
|
||||
|
||||
clean:
|
||||
- $(RM) *.o *.coff *.exe *.sym
|
||||
|
||||
.phony: clean
|
||||
|
||||
install: $(PROGS:%=$(FLOPPY_DIR)/apps/%.exe)
|
||||
|
||||
$(PROGS:%=$(FLOPPY_DIR)/apps/%.exe): $(FLOPPY_DIR)/apps/%.exe: %.exe
|
||||
$(CP) $*.exe $(FLOPPY_DIR)/apps/$*.exe
|
||||
|
||||
dist: $(PROGS:%=../../$(DIST_DIR)/apps/%.exe)
|
||||
|
||||
$(PROGS:%=../../$(DIST_DIR)/apps/%.exe): ../../$(DIST_DIR)/apps/%.exe: %.exe
|
||||
$(CP) $*.exe ../../$(DIST_DIR)/apps/$*.exe
|
||||
|
||||
notepad.exe: $(OBJECTS)
|
||||
$(CC) $(CFLAGS) -Wl,--subsystem,windows $(OBJECTS) $(LIBS) -o notepad.exe
|
||||
$(NM) --numeric-sort notepad.exe > notepad.sym
|
||||
|
||||
%.coff: %.rc
|
||||
$(RC) $(RCINC) $< -o $@
|
||||
|
||||
include ../../rules.mak
|
|
@ -1,102 +0,0 @@
|
|||
/*
|
||||
* Notepad (English resources)
|
||||
*
|
||||
* Copyright 1999 Marcel Baur <alves@correionet.com.br>
|
||||
*/
|
||||
|
||||
#define LANGUAGE_ID Pt
|
||||
#define LANGUAGE_NUMBER 16
|
||||
#define LANGUAGE_MENU_ITEM "&Português"
|
||||
|
||||
|
||||
/* Menu */
|
||||
|
||||
#define MENU_FILE "&Arquivo"
|
||||
#define MENU_FILE_NEW "&Novo..."
|
||||
#define MENU_FILE_OPEN "A&brir"
|
||||
#define MENU_FILE_SAVE "&Salvar"
|
||||
#define MENU_FILE_SAVEAS "Salvar &como..."
|
||||
#define MENU_FILE_PRINT "&Imprimir"
|
||||
#define MENU_FILE_PAGESETUP "C&onfigurar Página..."
|
||||
#define MENU_FILE_PRINTSETUP "Configurar I&mpressora..."
|
||||
#define MENU_FILE_EXIT "&Sair"
|
||||
|
||||
#define MENU_EDIT "&Editar"
|
||||
#define MENU_EDIT_UNDO "&Desfazer\tCtrl+Z"
|
||||
#define MENU_EDIT_CUT "C&ortar\tCtrl+X"
|
||||
#define MENU_EDIT_COPY "&Copiar\tCtrl+C"
|
||||
#define MENU_EDIT_PASTE "Co&lar\tCtrl+V"
|
||||
#define MENU_EDIT_DELETE "&Delete\tDel"
|
||||
#define MENU_EDIT_SELECTALL "Selecionar &Tudo"
|
||||
#define MENU_EDIT_TIMEDATE "&Data/Hora\tF5"
|
||||
#define MENU_EDIT_WRAP "&Quebrar linhas longas"
|
||||
|
||||
#define MENU_SEARCH "&Pesquisa"
|
||||
#define MENU_SEARCH_SEARCH "Pesquisar..."
|
||||
#define MENU_SEARCH_NEXT "&Procurar Próxima\tF3"
|
||||
|
||||
#define MENU_LANGUAGE "&Linguagem"
|
||||
|
||||
#define MENU_HELP "&Ajuda"
|
||||
#define MENU_HELP_CONTENTS "&Conteúdo"
|
||||
#define MENU_HELP_SEARCH "&Procurar..."
|
||||
#define MENU_HELP_HELP_ON_HELP "&Ajuda na ajuda"
|
||||
|
||||
#define MENU_INFO "Inf&ormações..."
|
||||
#define MENU_INFO_LICENSE "&Licença"
|
||||
#define MENU_INFO_NO_WARRANTY "&SEM GARANTIA"
|
||||
#define MENU_INFO_ABOUT_WINE "&Sobre Wine"
|
||||
|
||||
|
||||
/* Dialogs */
|
||||
|
||||
#define DIALOG_OK "OK"
|
||||
#define DIALOG_CANCEL "Cancelar"
|
||||
#define DIALOG_BROWSE "&Procurar..."
|
||||
#define DIALOG_HELP "&Ajuda"
|
||||
|
||||
#define DIALOG_PAGESETUP_CAPTION "Configurar Página"
|
||||
#define DIALOG_PAGESETUP_HEAD "&Cabeçalho:"
|
||||
#define DIALOG_PAGESETUP_TAIL "&Rodapé:"
|
||||
#define DIALOG_PAGESETUP_MARGIN "&Margens:"
|
||||
#define DIALOG_PAGESETUP_LEFT "&Esquerda:"
|
||||
#define DIALOG_PAGESETUP_RIGHT "&Direita:"
|
||||
#define DIALOG_PAGESETUP_TOP "&Superior:"
|
||||
#define DIALOG_PAGESETUP_BOTTOM "&Inferior:"
|
||||
|
||||
|
||||
/* Strings */
|
||||
|
||||
#define STRING_PAGESETUP_HEADERVALUE "&n" /* FIXME */
|
||||
#define STRING_PAGESETUP_FOOTERVALUE "Página &s" /* FIXME */
|
||||
#define STRING_PAGESETUP_LEFTVALUE "20 mm" /* FIXME */
|
||||
#define STRING_PAGESETUP_RIGHTVALUE "20 mm" /* FIXME */
|
||||
#define STRING_PAGESETUP_TOPVALUE "25 mm" /* FIXME */
|
||||
#define STRING_PAGESETUP_BOTTOMVALUE "25 mm" /* FIXME */
|
||||
|
||||
#define STRING_NOTEPAD "Notepad"
|
||||
#define STRING_ERROR "ERRO"
|
||||
#define STRING_WARNING "AVISO"
|
||||
#define STRING_INFO "Informação"
|
||||
|
||||
#define STRING_UNTITLED "(sem nome)"
|
||||
|
||||
#define STRING_ALL_FILES "Todos os arquivos (*.*)"
|
||||
#define STRING_TEXT_FILES_TXT "Arquivos texto (*.txt)"
|
||||
|
||||
#define STRING_TOOLARGE "Arquivo '%s' é muito longo para o notepad.\n \
|
||||
Por favor use um editor diferente."
|
||||
|
||||
#define STRING_NOTEXT "Você não digitou nenhum texto. \
|
||||
\nPor favor digite alguma coisa e tente novamente"
|
||||
|
||||
#define STRING_NOTSAVED "Arquivo '%s'\nfoi modificado\n\n \
|
||||
Gostaria de salvar as alteraçÕes ?"
|
||||
|
||||
#define STRING_NOTFOUND "'%s' não pode ser encontrado."
|
||||
|
||||
#define STRING_OUT_OF_MEMORY "Não há memória suficiente para completar essa \
|
||||
tarefa. \nFeche uma ou mais aplicações para aumentar a quantidade de memória \
|
||||
livre."
|
||||
|
||||
#include "notepad.rc"
|
|
@ -1,103 +0,0 @@
|
|||
/*
|
||||
* Notepad (English resources)
|
||||
*
|
||||
* Copyright 1997,98 Marcel Baur <mbaur@g26.ethz.ch>
|
||||
* Proofread 1998 by David Lee Lambert <lamber45@egr.msu.edu>
|
||||
*/
|
||||
|
||||
#define LANGUAGE_ID Sk
|
||||
#define LANGUAGE_NUMBER 10
|
||||
#define LANGUAGE_MENU_ITEM "&Slovensky"
|
||||
|
||||
|
||||
/* Menu */
|
||||
|
||||
#define MENU_FILE "&Súbor"
|
||||
#define MENU_FILE_NEW "&Nový..."
|
||||
#define MENU_FILE_OPEN "&Otvori<72>"
|
||||
#define MENU_FILE_SAVE "U&loži<C5BE>"
|
||||
#define MENU_FILE_SAVEAS "Ulož&i<> ako..."
|
||||
#define MENU_FILE_PRINT "&Tlaèi<C3A8>"
|
||||
#define MENU_FILE_PAGESETUP "&Nastavenie tlaèe..."
|
||||
#define MENU_FILE_PRINTSETUP "Nastavenie tlaèiar&ne..."
|
||||
#define MENU_FILE_EXIT "U&konèi<C3A8>"
|
||||
|
||||
#define MENU_EDIT "&Upravi<76>"
|
||||
#define MENU_EDIT_UNDO "&Krok spä<70>\tCtrl+Z"
|
||||
#define MENU_EDIT_CUT "V&ystrihnú<6E>\tCtrl+X"
|
||||
#define MENU_EDIT_COPY "&Kopírova<76>\tCtrl+C"
|
||||
#define MENU_EDIT_PASTE "V&lepi<70>\tCtrl+V"
|
||||
#define MENU_EDIT_DELETE "&Zmaza<7A>\tDel"
|
||||
#define MENU_EDIT_SELECTALL "Vybr&a<> všetko"
|
||||
#define MENU_EDIT_TIMEDATE "Èas&/Dátum\tF5"
|
||||
#define MENU_EDIT_WRAP "&Zalomi<6D> dlhé riadky"
|
||||
|
||||
#define MENU_SEARCH "&H¾ada<64>"
|
||||
#define MENU_SEARCH_SEARCH "H¾ada<64>..."
|
||||
#define MENU_SEARCH_NEXT "&H¾ada<64> ïa¾ší\tF3"
|
||||
|
||||
#define MENU_LANGUAGE "&Jazyk"
|
||||
|
||||
#define MENU_HELP "&Pomoc"
|
||||
#define MENU_HELP_CONTENTS "&Obsah"
|
||||
#define MENU_HELP_SEARCH "&H¾ada<64>..."
|
||||
#define MENU_HELP_HELP_ON_HELP "&Pomoc na pomoci"
|
||||
|
||||
#define MENU_INFO "Inf&o..."
|
||||
#define MENU_INFO_LICENSE "&Licencia"
|
||||
#define MENU_INFO_NO_WARRANTY "&BEZ ZÁRUKY"
|
||||
#define MENU_INFO_ABOUT_WINE "O &Wine"
|
||||
|
||||
|
||||
/* Dialogs */
|
||||
|
||||
#define DIALOG_OK "OK"
|
||||
#define DIALOG_CANCEL "Zruši<C5A1>"
|
||||
#define DIALOG_BROWSE "&Listova<76>..."
|
||||
#define DIALOG_HELP "&Pomoc"
|
||||
|
||||
#define DIALOG_PAGESETUP_CAPTION "Nastavenie stránky"
|
||||
#define DIALOG_PAGESETUP_HEAD "&Hlavièka:"
|
||||
#define DIALOG_PAGESETUP_TAIL "&Päta:"
|
||||
#define DIALOG_PAGESETUP_MARGIN "&Okraje:"
|
||||
#define DIALOG_PAGESETUP_LEFT "¼a&vý:"
|
||||
#define DIALOG_PAGESETUP_RIGHT "P&ravý:"
|
||||
#define DIALOG_PAGESETUP_TOP "H&ore:"
|
||||
#define DIALOG_PAGESETUP_BOTTOM "Do&lu:"
|
||||
|
||||
|
||||
/* Strings */
|
||||
|
||||
#define STRING_PAGESETUP_HEADERVALUE "&n" /* FIXME */
|
||||
#define STRING_PAGESETUP_FOOTERVALUE "Strana &s" /* FIXME */
|
||||
#define STRING_PAGESETUP_LEFTVALUE "20 mm" /* FIXME */
|
||||
#define STRING_PAGESETUP_RIGHTVALUE "20 mm" /* FIXME */
|
||||
#define STRING_PAGESETUP_TOPVALUE "25 mm" /* FIXME */
|
||||
#define STRING_PAGESETUP_BOTTOMVALUE "25 mm" /* FIXME */
|
||||
|
||||
#define STRING_NOTEPAD "Notepad"
|
||||
#define STRING_ERROR "CHYBA"
|
||||
#define STRING_WARNING "VAROVANIE"
|
||||
#define STRING_INFO "Informácie"
|
||||
|
||||
#define STRING_UNTITLED "(nepomenovaný)"
|
||||
|
||||
#define STRING_ALL_FILES "Všetky súbory (*.*)"
|
||||
#define STRING_TEXT_FILES_TXT "Textové súbory (*.txt)"
|
||||
|
||||
#define STRING_TOOLARGE "File '%s' is too large for notepad.\n \
|
||||
Please use a different editor."
|
||||
|
||||
#define STRING_NOTEXT "Niè ste nenapísali. \
|
||||
\nProsím, napíšte nejaký text a pokúste sa znovu."
|
||||
|
||||
#define STRING_NOTSAVED "Súbor '%s'\nbol zmenenýn\n \
|
||||
Prajete si uloži<C5BE> zmeny ?"
|
||||
|
||||
#define STRING_NOTFOUND "'%s' nemôže by<62> nájdený."
|
||||
|
||||
#define STRING_OUT_OF_MEMORY "Not enough memory to complete this \
|
||||
task. \nClose one or more applications to increase the amount of \nfree \
|
||||
memory."
|
||||
|
||||
#include "notepad.rc"
|
|
@ -1,105 +0,0 @@
|
|||
/*
|
||||
* Notepad (Swedish resources)
|
||||
*
|
||||
* Copyright 1997,98 Marcel Baur <mbaur@g26.ethz.ch>
|
||||
* Swedish language by Karl Backström <karl_b@geocities.com>
|
||||
*/
|
||||
|
||||
#define LANGUAGE_ID Sw
|
||||
#define LANGUAGE_NUMBER 1d
|
||||
#define LANGUAGE_MENU_ITEM "&Svenska"
|
||||
|
||||
|
||||
/* Menu */
|
||||
|
||||
#define MENU_FILE "&Arkiv"
|
||||
#define MENU_FILE_NEW "&Ny..."
|
||||
#define MENU_FILE_OPEN "Ö&ppna"
|
||||
#define MENU_FILE_SAVE "&Spara"
|
||||
#define MENU_FILE_SAVEAS "Spara &som..."
|
||||
#define MENU_FILE_PRINT "&Skriv ut"
|
||||
#define MENU_FILE_PAGESETUP "Sid La&yout..."
|
||||
#define MENU_FILE_PRINTSETUP "Skrivar &inställningar..."
|
||||
#define MENU_FILE_EXIT "&Avsluta"
|
||||
|
||||
#define MENU_EDIT "&Redigera"
|
||||
#define MENU_EDIT_UNDO "&Undo\tCtrl+Z"
|
||||
#define MENU_EDIT_CUT "Klippa\tCtrl+X"
|
||||
#define MENU_EDIT_COPY "&Kopiera\tCtrl+C"
|
||||
#define MENU_EDIT_PASTE "&Klistra in\tCtrl+V"
|
||||
#define MENU_EDIT_DELETE "&Ta bort\tDel"
|
||||
#define MENU_EDIT_SELECTALL "Markera &allt"
|
||||
#define MENU_EDIT_TIMEDATE "&Tid/Datum\tF5"
|
||||
#define MENU_EDIT_WRAP "&Dela långa meningar"
|
||||
|
||||
#define MENU_SEARCH "&Sök"
|
||||
#define MENU_SEARCH_SEARCH "Sök..."
|
||||
#define MENU_SEARCH_NEXT "&Sök nästa\tF3"
|
||||
|
||||
#define MENU_LANGUAGE "&Språk"
|
||||
|
||||
#define MENU_HELP "&Hjälp"
|
||||
#define MENU_HELP_CONTENTS "&Innehåll"
|
||||
#define MENU_HELP_SEARCH "&Sök..."
|
||||
#define MENU_HELP_HELP_ON_HELP "Användningen &av hjälp"
|
||||
|
||||
#define MENU_INFO "Inf&ormation..."
|
||||
#define MENU_INFO_LICENSE "&Licens"
|
||||
#define MENU_INFO_NO_WARRANTY "&INGEN GARANTI"
|
||||
#define MENU_INFO_ABOUT_WINE "&Om Wine"
|
||||
|
||||
|
||||
/* Dialogs */
|
||||
|
||||
#define DIALOG_OK "OK"
|
||||
#define DIALOG_CANCEL "Avbryt"
|
||||
#define DIALOG_BROWSE "&Bläddra..."
|
||||
#define DIALOG_HELP "&Hjälp"
|
||||
|
||||
#define DIALOG_PAGESETUP_CAPTION "Sid Layout"
|
||||
#define DIALOG_PAGESETUP_HEAD "&Huvudnot:"
|
||||
#define DIALOG_PAGESETUP_TAIL "&Fotnot:"
|
||||
#define DIALOG_PAGESETUP_MARGIN "Kanter:"
|
||||
#define DIALOG_PAGESETUP_LEFT "&Vänster:"
|
||||
#define DIALOG_PAGESETUP_RIGHT "&Höger:"
|
||||
#define DIALOG_PAGESETUP_TOP "&Över:"
|
||||
#define DIALOG_PAGESETUP_BOTTOM "&Under:"
|
||||
|
||||
|
||||
/* Strings */
|
||||
|
||||
#define STRING_PAGESETUP_HEADERVALUE "&n" /* FIXME */
|
||||
#define STRING_PAGESETUP_FOOTERVALUE "Page &s" /* FIXME */
|
||||
#define STRING_PAGESETUP_LEFTVALUE "20 mm" /* FIXME */
|
||||
#define STRING_PAGESETUP_RIGHTVALUE "20 mm" /* FIXME */
|
||||
#define STRING_PAGESETUP_TOPVALUE "25 mm" /* FIXME */
|
||||
#define STRING_PAGESETUP_BOTTOMVALUE "25 mm" /* FIXME */
|
||||
|
||||
#define STRING_NOTEPAD "Anteckningar"
|
||||
#define STRING_ERROR "FEL"
|
||||
#define STRING_WARNING "VARNING"
|
||||
#define STRING_INFO "Information"
|
||||
|
||||
#define STRING_UNTITLED "(untitled)"
|
||||
|
||||
#define STRING_ALL_FILES "Alla filer (*.*)"
|
||||
#define STRING_TEXT_FILES_TXT "Text filer (*.txt)"
|
||||
|
||||
#define STRING_TOOLARGE "Filen '%s' är för stor för notepad.\n \
|
||||
Använd en annan editor."
|
||||
|
||||
#define STRING_NOTEXT "Du skrev inte in någon text. \
|
||||
\nSkriv något och försök sedan igen"
|
||||
|
||||
/* FIXME */
|
||||
|
||||
#define STRING_NOTSAVED "Filen '%s'\nhas been modified\n\n \
|
||||
Would you like to save your changes ?"
|
||||
|
||||
#define STRING_NOTFOUND "'%s' hittades inte."
|
||||
|
||||
#define STRING_OUT_OF_MEMORY "Inte tillräkligt med minne för att slutföra \
|
||||
den här uppgiften. \nAvsluta ett eller flera program för att öka mängden \nfritt \
|
||||
minne."
|
||||
|
||||
#include "notepad.rc"
|
|
@ -1,104 +0,0 @@
|
|||
/*
|
||||
* Notepad (Walloon resources)
|
||||
*
|
||||
* Si vos voloz aider avou li ratoûrnaedje des libes programes è walon,
|
||||
* vos poloz scrîre a l' adresse emile <linux-wa@chanae.alphanet.ch>
|
||||
*/
|
||||
|
||||
#define LANGUAGE_ID Wa
|
||||
#define LANGUAGE_NUMBER 90
|
||||
#define LANGUAGE_MENU_ITEM "&Walon"
|
||||
|
||||
|
||||
/* Menu */
|
||||
|
||||
#define MENU_FILE "&Fitchî"
|
||||
#define MENU_FILE_NEW "&Novea..."
|
||||
#define MENU_FILE_OPEN "&Drovî"
|
||||
#define MENU_FILE_SAVE "&Schaper"
|
||||
#define MENU_FILE_SAVEAS "Schaper èt r&lomer..."
|
||||
#define MENU_FILE_PRINT "&Rexhe"
|
||||
#define MENU_FILE_PAGESETUP "Arrandjmint del &Pådje..."
|
||||
#define MENU_FILE_PRINTSETUP "&Apontiaedje del scrirece..."
|
||||
#define MENU_FILE_EXIT "Moussî &Foû"
|
||||
|
||||
#define MENU_EDIT "&Candjî"
|
||||
#define MENU_EDIT_UNDO "&Disfé\tCtrl+Z"
|
||||
#define MENU_EDIT_CUT "Cô&per\tCtrl+X"
|
||||
#define MENU_EDIT_COPY "&Copyî\tCtrl+C"
|
||||
#define MENU_EDIT_PASTE "C&laper\tCtrl+V"
|
||||
#define MENU_EDIT_DELETE "&Rafacer\tDel"
|
||||
#define MENU_EDIT_SELECTALL "&Tchwezi totafwait"
|
||||
#define MENU_EDIT_TIMEDATE "&Eure/Date\tF5"
|
||||
#define MENU_EDIT_WRAP "Côper les ro&yes"
|
||||
|
||||
#define MENU_SEARCH "C&werî"
|
||||
#define MENU_SEARCH_SEARCH "Cwerî..."
|
||||
#define MENU_SEARCH_NEXT "&Shûvant\tF3"
|
||||
|
||||
#define MENU_LANGUAGE "&Lingaedje"
|
||||
|
||||
#define MENU_HELP "&Aide"
|
||||
#define MENU_HELP_CONTENTS "Å&dvins"
|
||||
#define MENU_HELP_SEARCH "C&werî..."
|
||||
#define MENU_HELP_HELP_ON_HELP "&Aide so l' Aide"
|
||||
|
||||
#define MENU_INFO "&Informåcion..."
|
||||
#define MENU_INFO_LICENSE "&Licinse"
|
||||
#define MENU_INFO_NO_WARRANTY "&NOLE WARANTEYE"
|
||||
#define MENU_INFO_ABOUT_WINE "Å &dfait di Wine"
|
||||
|
||||
|
||||
/* Dialogs */
|
||||
|
||||
#define DIALOG_OK "I Va"
|
||||
#define DIALOG_CANCEL "Rinoncî"
|
||||
#define DIALOG_BROWSE "&Foyer..."
|
||||
#define DIALOG_HELP "&Aide"
|
||||
|
||||
#define DIALOG_PAGESETUP_CAPTION "Arindjmint del Pådje"
|
||||
/* "Tite" ni va nén vraiymint, i fåt ene sacwe d' meyeu [header] */
|
||||
#define DIALOG_PAGESETUP_HEAD "&Tite:"
|
||||
#define DIALOG_PAGESETUP_TAIL "&Pînote:"
|
||||
/* "mardjes" ? [marges] */
|
||||
#define DIALOG_PAGESETUP_MARGIN "&Mardjes:"
|
||||
#define DIALOG_PAGESETUP_LEFT "&Hintche:"
|
||||
#define DIALOG_PAGESETUP_RIGHT "&Droete:"
|
||||
#define DIALOG_PAGESETUP_TOP "&Copete:"
|
||||
#define DIALOG_PAGESETUP_BOTTOM "&Bas:"
|
||||
|
||||
|
||||
/* Strings */
|
||||
|
||||
#define STRING_PAGESETUP_HEADERVALUE "&n" /* FIXME */
|
||||
#define STRING_PAGESETUP_FOOTERVALUE "Pådje &s" /* FIXME */
|
||||
#define STRING_PAGESETUP_LEFTVALUE "20 mm" /* FIXME */
|
||||
#define STRING_PAGESETUP_RIGHTVALUE "20 mm" /* FIXME */
|
||||
#define STRING_PAGESETUP_TOPVALUE "25 mm" /* FIXME */
|
||||
#define STRING_PAGESETUP_BOTTOMVALUE "25 mm" /* FIXME */
|
||||
|
||||
#define STRING_NOTEPAD "Notepad"
|
||||
#define STRING_ERROR "AROKE"
|
||||
#define STRING_WARNING "ADVERTIXHMINT"
|
||||
#define STRING_INFO "Informåcion"
|
||||
|
||||
#define STRING_UNTITLED "(sin tite)"
|
||||
|
||||
#define STRING_ALL_FILES "Tos les fitchîs (*.*)"
|
||||
#define STRING_TEXT_FILES_TXT "Fitchîs tekse (*.txt)"
|
||||
|
||||
#define STRING_TOOLARGE "Li fitchî '%s' est trop gros pol notepad.\n \
|
||||
Eployoz on ôte aspougneu di tekse."
|
||||
|
||||
#define STRING_NOTEXT "Vos n' avoz rén sicrît. \
|
||||
\nTapez ene sacwe èt rasayez"
|
||||
|
||||
#define STRING_NOTSAVED "Li fitchî '%s'\na candjî\n\n \
|
||||
El voloz schaper ?"
|
||||
|
||||
#define STRING_NOTFOUND "'%s' pout nén esse trové."
|
||||
|
||||
#define STRING_OUT_OF_MEMORY "Li memwere est plinne. \n\
|
||||
Cloyoz on programe ou pus po monter li memwere libe."
|
||||
|
||||
#include "notepad.rc"
|
|
@ -1,667 +0,0 @@
|
|||
/*
|
||||
* Notepad (dialog.c)
|
||||
*
|
||||
* Copyright 1998,99 Marcel Baur <mbaur@g26.ethz.ch>
|
||||
* To be distributed under the Wine License
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
|
||||
/* temp for ROS */
|
||||
#include "ros.h"
|
||||
|
||||
#include "main.h"
|
||||
#include "license.h"
|
||||
#include "language.h"
|
||||
#include "dialog.h"
|
||||
|
||||
#define LCC_HASASSERT
|
||||
#include "lcc.h"
|
||||
|
||||
static LRESULT WINAPI DIALOG_PAGESETUP_DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
|
||||
|
||||
int AlertIDS(UINT ids_message, UINT ids_caption, WORD type) {
|
||||
/*
|
||||
* Given some ids strings, this acts as a language-aware wrapper for
|
||||
* "MessageBox"
|
||||
*/
|
||||
CHAR szMessage[MAX_STRING_LEN];
|
||||
CHAR szCaption[MAX_STRING_LEN];
|
||||
|
||||
LoadString(Globals.hInstance, ids_message, szMessage, sizeof(szMessage));
|
||||
LoadString(Globals.hInstance, ids_caption, szCaption, sizeof(szCaption));
|
||||
|
||||
return (MessageBox(Globals.hMainWnd, szMessage, szCaption, type));
|
||||
}
|
||||
|
||||
void AlertFileNotFound(LPSTR szFileName) {
|
||||
|
||||
int nResult;
|
||||
CHAR szMessage[MAX_STRING_LEN];
|
||||
CHAR szRessource[MAX_STRING_LEN];
|
||||
|
||||
/* Load and format szMessage */
|
||||
LoadString(Globals.hInstance, IDS_NOTFOUND, szRessource, sizeof(szRessource));
|
||||
wsprintf(szMessage, szRessource, szFileName);
|
||||
|
||||
/* Load szCaption */
|
||||
LoadString(Globals.hInstance, IDS_ERROR, szRessource, sizeof(szRessource));
|
||||
|
||||
/* Display Modal Dialog */
|
||||
nResult = MessageBox(Globals.hMainWnd, szMessage, szRessource, MB_ICONEXCLAMATION);
|
||||
|
||||
}
|
||||
|
||||
int AlertFileNotSaved(LPSTR szFileName) {
|
||||
|
||||
int nResult;
|
||||
CHAR szMessage[MAX_STRING_LEN];
|
||||
CHAR szRessource[MAX_STRING_LEN];
|
||||
|
||||
/* Load and format Message */
|
||||
|
||||
LoadString(Globals.hInstance, IDS_NOTSAVED, szRessource, sizeof(szRessource));
|
||||
wsprintf(szMessage, szRessource, szFileName);
|
||||
|
||||
/* Load Caption */
|
||||
|
||||
LoadString(Globals.hInstance, IDS_ERROR, szRessource, sizeof(szRessource));
|
||||
|
||||
/* Display modal */
|
||||
nResult = MessageBox(Globals.hMainWnd, szMessage, szRessource, MB_ICONEXCLAMATION|MB_YESNOCANCEL);
|
||||
return(nResult);
|
||||
}
|
||||
|
||||
|
||||
VOID AlertOutOfMemory(void) {
|
||||
int nResult;
|
||||
|
||||
nResult = AlertIDS(IDS_OUT_OF_MEMORY, IDS_ERROR, MB_ICONEXCLAMATION);
|
||||
PostQuitMessage(1);
|
||||
}
|
||||
|
||||
|
||||
BOOL ExistFile(LPCSTR szFilename) {
|
||||
/*
|
||||
* Returns: TRUE - if "szFileName" exists
|
||||
* FALSE - if it does not
|
||||
*/
|
||||
WIN32_FIND_DATA entry;
|
||||
HANDLE hFile;
|
||||
|
||||
hFile = FindFirstFile(szFilename, &entry);
|
||||
|
||||
return (hFile!=INVALID_HANDLE_VALUE);
|
||||
}
|
||||
|
||||
VOID DoSaveFile(VOID) {
|
||||
|
||||
/* FIXME: Really Save the file */
|
||||
/* ... (Globals.szFileName); */
|
||||
}
|
||||
|
||||
|
||||
BOOL DoCloseFile(void) {
|
||||
/* Return value: TRUE - User agreed to close (both save/don't save) */
|
||||
/* FALSE - User cancelled close by selecting "Cancel" */
|
||||
|
||||
int nResult;
|
||||
|
||||
if (strlen(Globals.szFileName)>0) {
|
||||
/* prompt user to save changes */
|
||||
nResult = AlertFileNotSaved(Globals.szFileName);
|
||||
switch (nResult) {
|
||||
case IDYES: DoSaveFile();
|
||||
break;
|
||||
|
||||
case IDNO: break;
|
||||
|
||||
case IDCANCEL: return(FALSE);
|
||||
break;
|
||||
|
||||
default: return(FALSE);
|
||||
break;
|
||||
} /* switch */
|
||||
} /* if */
|
||||
|
||||
/* Forget file name */
|
||||
lstrcpy(Globals.szFileName, "");
|
||||
LANGUAGE_UpdateWindowCaption();
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
void DoOpenFile(LPCSTR szFileName) {
|
||||
|
||||
/* Close any files and prompt to save changes */
|
||||
if (DoCloseFile()) {
|
||||
GetFileTitle(szFileName, Globals.szFileName, sizeof(Globals.szFileName));
|
||||
LANGUAGE_UpdateWindowCaption();
|
||||
|
||||
LoadBufferFromFile(szFileName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
VOID DIALOG_FileNew(VOID)
|
||||
{
|
||||
/* Close any files and promt to save changes */
|
||||
if (DoCloseFile()) {
|
||||
TrashBuffer();
|
||||
}
|
||||
}
|
||||
|
||||
VOID DIALOG_FileOpen(VOID)
|
||||
{
|
||||
OPENFILENAME openfilename;
|
||||
CHAR szPath[MAX_PATHNAME_LEN];
|
||||
CHAR szDir[MAX_PATHNAME_LEN];
|
||||
CHAR szzFilter[2 * MAX_STRING_LEN + 100];
|
||||
CHAR szDefaultExt[4];
|
||||
LPSTR p = szzFilter;
|
||||
|
||||
lstrcpy(szDefaultExt, "txt");
|
||||
|
||||
LoadString(Globals.hInstance, IDS_TEXT_FILES_TXT, p, MAX_STRING_LEN);
|
||||
p += strlen(p) + 1;
|
||||
lstrcpy(p, "*.txt");
|
||||
p += strlen(p) + 1;
|
||||
LoadString(Globals.hInstance, IDS_ALL_FILES, p, MAX_STRING_LEN);
|
||||
p += strlen(p) + 1;
|
||||
lstrcpy(p, "*.*");
|
||||
p += strlen(p) + 1;
|
||||
*p = '\0';
|
||||
|
||||
GetCurrentDirectory(sizeof(szDir), szDir);
|
||||
lstrcpy(szPath,"*.txt");
|
||||
|
||||
openfilename.lStructSize = sizeof(OPENFILENAME);
|
||||
openfilename.hwndOwner = Globals.hMainWnd;
|
||||
openfilename.hInstance = Globals.hInstance;
|
||||
openfilename.lpstrFilter = szzFilter;
|
||||
openfilename.lpstrCustomFilter = 0;
|
||||
openfilename.nMaxCustFilter = 0;
|
||||
openfilename.nFilterIndex = 0;
|
||||
openfilename.lpstrFile = szPath;
|
||||
openfilename.nMaxFile = sizeof(szPath);
|
||||
openfilename.lpstrFileTitle = 0;
|
||||
openfilename.nMaxFileTitle = 0;
|
||||
openfilename.lpstrInitialDir = szDir;
|
||||
openfilename.lpstrTitle = 0;
|
||||
openfilename.Flags = OFN_FILEMUSTEXIST + OFN_PATHMUSTEXIST;
|
||||
openfilename.nFileOffset = 0;
|
||||
openfilename.nFileExtension = 0;
|
||||
openfilename.lpstrDefExt = szDefaultExt;
|
||||
openfilename.lCustData = 0;
|
||||
openfilename.lpfnHook = 0;
|
||||
openfilename.lpTemplateName = 0;
|
||||
|
||||
if (GetOpenFileName(&openfilename)) {
|
||||
|
||||
if (ExistFile(openfilename.lpstrFile))
|
||||
DoOpenFile(openfilename.lpstrFile);
|
||||
else
|
||||
AlertFileNotFound(openfilename.lpstrFile);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
VOID DIALOG_FileSave(VOID)
|
||||
{
|
||||
/* FIXME: Save File */
|
||||
|
||||
DIALOG_FileSaveAs();
|
||||
}
|
||||
|
||||
VOID DIALOG_FileSaveAs(VOID)
|
||||
{
|
||||
OPENFILENAME saveas;
|
||||
CHAR szPath[MAX_PATHNAME_LEN];
|
||||
CHAR szDir[MAX_PATHNAME_LEN];
|
||||
CHAR szDefaultExt[4];
|
||||
CHAR szzFilter[2 * MAX_STRING_LEN + 100];
|
||||
|
||||
LPSTR p = szzFilter;
|
||||
|
||||
lstrcpy(szDefaultExt, "txt");
|
||||
|
||||
LoadString(Globals.hInstance, IDS_TEXT_FILES_TXT, p, MAX_STRING_LEN);
|
||||
p += strlen(p) + 1;
|
||||
lstrcpy(p, "*.txt");
|
||||
p += strlen(p) + 1;
|
||||
LoadString(Globals.hInstance, IDS_ALL_FILES, p, MAX_STRING_LEN);
|
||||
p += strlen(p) + 1;
|
||||
lstrcpy(p, "*.*");
|
||||
p += strlen(p) + 1;
|
||||
*p = '\0';
|
||||
|
||||
lstrcpy(szPath,"*.*");
|
||||
|
||||
GetCurrentDirectory(sizeof(szDir), szDir);
|
||||
|
||||
saveas.lStructSize = sizeof(OPENFILENAME);
|
||||
saveas.hwndOwner = Globals.hMainWnd;
|
||||
saveas.hInstance = Globals.hInstance;
|
||||
saveas.lpstrFilter = szzFilter;
|
||||
saveas.lpstrCustomFilter = 0;
|
||||
saveas.nMaxCustFilter = 0;
|
||||
saveas.nFilterIndex = 0;
|
||||
saveas.lpstrFile = szPath;
|
||||
saveas.nMaxFile = sizeof(szPath);
|
||||
saveas.lpstrFileTitle = 0;
|
||||
saveas.nMaxFileTitle = 0;
|
||||
saveas.lpstrInitialDir = szDir;
|
||||
saveas.lpstrTitle = 0;
|
||||
saveas.Flags = OFN_PATHMUSTEXIST + OFN_OVERWRITEPROMPT + OFN_HIDEREADONLY;
|
||||
saveas.nFileOffset = 0;
|
||||
saveas.nFileExtension = 0;
|
||||
saveas.lpstrDefExt = szDefaultExt;
|
||||
saveas.lCustData = 0;
|
||||
saveas.lpfnHook = 0;
|
||||
saveas.lpTemplateName = 0;
|
||||
|
||||
if (GetSaveFileName(&saveas)) {
|
||||
lstrcpy(Globals.szFileName, saveas.lpstrFile);
|
||||
LANGUAGE_UpdateWindowCaption();
|
||||
DIALOG_FileSave();
|
||||
}
|
||||
}
|
||||
|
||||
VOID DIALOG_FilePrint(VOID)
|
||||
{
|
||||
LONG bFlags, nBase;
|
||||
WORD nOffset;
|
||||
DOCINFO di;
|
||||
int nResult;
|
||||
HDC hContext;
|
||||
PRINTDLG printer;
|
||||
|
||||
CHAR szDocumentName[MAX_STRING_LEN]; /* Name of document */
|
||||
CHAR szPrinterName[MAX_STRING_LEN]; /* Name of the printer */
|
||||
CHAR szDeviceName[MAX_STRING_LEN]; /* Name of the printer device */
|
||||
CHAR szOutput[MAX_STRING_LEN]; /* in which file/device to print */
|
||||
|
||||
/* LPDEVMODE hDevMode; */
|
||||
/* LPDEVNAMES hDevNames; */
|
||||
|
||||
/* hDevMode = GlobalAlloc(GMEM_MOVEABLE + GMEM_ZEROINIT, sizeof(DEVMODE)); */
|
||||
/* hDevNames = GlobalAlloc(GMEM_MOVEABLE + GMEM_ZEROINIT, sizeof(DEVNAMES)); */
|
||||
|
||||
/* Get Current Settings */
|
||||
|
||||
printer.lStructSize = sizeof(PRINTDLG);
|
||||
printer.hwndOwner = Globals.hMainWnd;
|
||||
printer.hInstance = Globals.hInstance;
|
||||
|
||||
/* Let PrintDlg create a DEVMODE structure */
|
||||
printer.hDevMode = 0;
|
||||
printer.hDevNames = 0;
|
||||
printer.hDC = 0;
|
||||
printer.Flags = PD_RETURNDEFAULT;
|
||||
printer.nFromPage = 0;
|
||||
printer.nToPage = 0;
|
||||
printer.nMinPage = 0;
|
||||
printer.nMaxPage = 0;
|
||||
printer.nCopies = 0;
|
||||
printer.lCustData = 0;
|
||||
printer.lpfnPrintHook = 0;
|
||||
printer.lpfnSetupHook = 0;
|
||||
printer.lpPrintTemplateName = 0;
|
||||
printer.lpSetupTemplateName = 0;
|
||||
printer.hPrintTemplate = 0;
|
||||
printer.hSetupTemplate = 0;
|
||||
|
||||
nResult = PrintDlg(&printer);
|
||||
|
||||
/* hContext = CreateDC(, szDeviceName, "TEST.TXT", 0); */
|
||||
|
||||
/* Congratulations to those Microsoft Engineers responsable */
|
||||
/* for the following pointer acrobatics */
|
||||
|
||||
assert(printer.hDevNames!=0);
|
||||
|
||||
nBase = (LONG)(printer.hDevNames);
|
||||
|
||||
nOffset = (WORD)((LPDEVNAMES) printer.hDevNames)->wDriverOffset;
|
||||
lstrcpy(szPrinterName, (LPCSTR) (nBase + nOffset));
|
||||
|
||||
nOffset = (WORD)((LPDEVNAMES) printer.hDevNames)->wDeviceOffset;
|
||||
lstrcpy(szDeviceName, (LPCSTR) (nBase + nOffset));
|
||||
|
||||
nOffset = (WORD)((LPDEVNAMES) printer.hDevNames)->wOutputOffset;
|
||||
lstrcpy(szOutput, (LPCSTR) (nBase + nOffset));
|
||||
|
||||
MessageBox(Globals.hMainWnd, szPrinterName, "Printer Name", MB_ICONEXCLAMATION);
|
||||
MessageBox(Globals.hMainWnd, szDeviceName, "Device Name", MB_ICONEXCLAMATION);
|
||||
MessageBox(Globals.hMainWnd, szOutput, "Output", MB_ICONEXCLAMATION);
|
||||
|
||||
/* Set some default flags */
|
||||
|
||||
bFlags = PD_RETURNDC + PD_SHOWHELP;
|
||||
|
||||
if (TRUE) {
|
||||
/* Remove "Print Selection" if there is no selection */
|
||||
bFlags = bFlags + PD_NOSELECTION;
|
||||
}
|
||||
|
||||
printer.Flags = bFlags;
|
||||
/*
|
||||
printer.nFromPage = 0;
|
||||
printer.nToPage = 0;
|
||||
printer.nMinPage = 0;
|
||||
printer.nMaxPage = 0;
|
||||
*/
|
||||
|
||||
/* Let commdlg manage copy settings */
|
||||
printer.nCopies = (WORD)PD_USEDEVMODECOPIES;
|
||||
|
||||
if (PrintDlg(&printer)) {
|
||||
|
||||
/* initialize DOCINFO */
|
||||
di.cbSize = sizeof(DOCINFO);
|
||||
lstrcpy((LPSTR)di.lpszDocName, szDocumentName);
|
||||
lstrcpy((LPSTR)di.lpszOutput, szOutput);
|
||||
|
||||
hContext = printer.hDC;
|
||||
assert(hContext!=0);
|
||||
assert( (int) hContext!=PD_RETURNDC);
|
||||
|
||||
SetMapMode(hContext, MM_LOMETRIC);
|
||||
/* SetViewPortExExt(hContext, 10, 10, 0); */
|
||||
SetBkMode(hContext, OPAQUE);
|
||||
|
||||
nResult = TextOut(hContext, 0, 0, " ", 1);
|
||||
assert(nResult != 0);
|
||||
|
||||
nResult = StartDoc(hContext, &di);
|
||||
assert(nResult != SP_ERROR);
|
||||
|
||||
nResult = StartPage(hContext);
|
||||
assert(nResult >0);
|
||||
|
||||
/* FIXME: actually print */
|
||||
|
||||
nResult = EndPage(hContext);
|
||||
|
||||
switch (nResult) {
|
||||
case SP_ERROR:
|
||||
MessageBox(Globals.hMainWnd, "Generic Error", "Print Engine Error", MB_ICONEXCLAMATION);
|
||||
break;
|
||||
case SP_APPABORT:
|
||||
MessageBox(Globals.hMainWnd, "The print job was aborted.", "Print Engine Error", MB_ICONEXCLAMATION);
|
||||
break;
|
||||
case SP_USERABORT:
|
||||
MessageBox(Globals.hMainWnd, "The print job was aborted using the Print Manager ", "Print Engine Error", MB_ICONEXCLAMATION);
|
||||
break;
|
||||
case SP_OUTOFDISK:
|
||||
MessageBox(Globals.hMainWnd, "Out of disk space", "Print Engine Error", MB_ICONEXCLAMATION);
|
||||
break;
|
||||
case SP_OUTOFMEMORY:
|
||||
AlertOutOfMemory();
|
||||
break;
|
||||
default:
|
||||
MessageBox(Globals.hMainWnd, "Default", "Print", MB_ICONEXCLAMATION);
|
||||
} /* switch */
|
||||
nResult = EndDoc(hContext);
|
||||
assert(nResult>=0);
|
||||
nResult = DeleteDC(hContext);
|
||||
assert(nResult!=0);
|
||||
} /* if */
|
||||
|
||||
/* GlobalFree(hDevNames); */
|
||||
/* GlobalFree(hDevMode); */
|
||||
}
|
||||
|
||||
VOID DIALOG_FilePageSetup(VOID)
|
||||
{
|
||||
DIALOG_PageSetup();
|
||||
}
|
||||
|
||||
VOID DIALOG_FilePrinterSetup(VOID)
|
||||
{
|
||||
PRINTDLG printer;
|
||||
|
||||
printer.lStructSize = sizeof(PRINTDLG);
|
||||
printer.hwndOwner = Globals.hMainWnd;
|
||||
printer.hInstance = Globals.hInstance;
|
||||
printer.hDevMode = 0;
|
||||
printer.hDevNames = 0;
|
||||
printer.hDC = 0;
|
||||
printer.Flags = PD_PRINTSETUP;
|
||||
printer.nFromPage = 0;
|
||||
printer.nToPage = 0;
|
||||
printer.nMinPage = 0;
|
||||
printer.nMaxPage = 0;
|
||||
printer.nCopies = 1;
|
||||
printer.lCustData = 0;
|
||||
printer.lpfnPrintHook = 0;
|
||||
printer.lpfnSetupHook = 0;
|
||||
printer.lpPrintTemplateName = 0;
|
||||
printer.lpSetupTemplateName = 0;
|
||||
printer.hPrintTemplate = 0;
|
||||
printer.hSetupTemplate = 0;
|
||||
|
||||
if (PrintDlg(&printer)) {
|
||||
/* do nothing */
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
VOID DIALOG_FileExit(VOID)
|
||||
{
|
||||
if (DoCloseFile()) {
|
||||
PostQuitMessage(0);
|
||||
}
|
||||
}
|
||||
|
||||
VOID DIALOG_EditUndo(VOID)
|
||||
{
|
||||
MessageBox(Globals.hMainWnd, "Undo", "Debug", MB_ICONEXCLAMATION);
|
||||
/* undo */
|
||||
}
|
||||
|
||||
VOID DIALOG_EditCut(VOID)
|
||||
{
|
||||
HANDLE hMem;
|
||||
|
||||
hMem = GlobalAlloc(GMEM_ZEROINIT, 99);
|
||||
|
||||
OpenClipboard(Globals.hMainWnd);
|
||||
EmptyClipboard();
|
||||
|
||||
/* FIXME: Get text */
|
||||
lstrcpy((CHAR *)hMem, "Hello World");
|
||||
|
||||
SetClipboardData(CF_TEXT, hMem);
|
||||
CloseClipboard();
|
||||
|
||||
GlobalFree(hMem);
|
||||
}
|
||||
|
||||
VOID DIALOG_EditCopy(VOID)
|
||||
{
|
||||
HANDLE hMem;
|
||||
|
||||
hMem = GlobalAlloc(GMEM_ZEROINIT, 99);
|
||||
|
||||
OpenClipboard(Globals.hMainWnd);
|
||||
EmptyClipboard();
|
||||
|
||||
/* FIXME: Get text */
|
||||
lstrcpy((CHAR *)hMem, "Hello World");
|
||||
|
||||
SetClipboardData(CF_TEXT, hMem);
|
||||
CloseClipboard();
|
||||
|
||||
GlobalFree(hMem);
|
||||
}
|
||||
|
||||
VOID DIALOG_EditPaste(VOID)
|
||||
{
|
||||
HANDLE hClipText;
|
||||
|
||||
if (IsClipboardFormatAvailable(CF_TEXT)) {
|
||||
OpenClipboard(Globals.hMainWnd);
|
||||
hClipText = GetClipboardData(CF_TEXT);
|
||||
CloseClipboard();
|
||||
MessageBox(Globals.hMainWnd, (CHAR *)hClipText, "PASTE", MB_ICONEXCLAMATION);
|
||||
}
|
||||
}
|
||||
|
||||
VOID DIALOG_EditDelete(VOID)
|
||||
{
|
||||
/* Delete */
|
||||
}
|
||||
|
||||
VOID DIALOG_EditSelectAll(VOID)
|
||||
{
|
||||
/* Select all */
|
||||
}
|
||||
|
||||
VOID DIALOG_EditTimeDate(VOID)
|
||||
{
|
||||
SYSTEMTIME st;
|
||||
LPSYSTEMTIME lpst = &st;
|
||||
CHAR szDate[MAX_STRING_LEN];
|
||||
LPSTR date = szDate;
|
||||
|
||||
GetLocalTime(&st);
|
||||
GetDateFormat(LOCALE_USER_DEFAULT, LOCALE_SLONGDATE, lpst, NULL, date, MAX_STRING_LEN);
|
||||
GetTimeFormat(LOCALE_USER_DEFAULT, LOCALE_STIMEFORMAT, lpst, NULL, date, MAX_STRING_LEN);
|
||||
|
||||
}
|
||||
|
||||
VOID DIALOG_EditWrap(VOID)
|
||||
{
|
||||
Globals.bWrapLongLines = !Globals.bWrapLongLines;
|
||||
CheckMenuItem(Globals.hEditMenu, NP_EDIT_WRAP, MF_BYCOMMAND |
|
||||
(Globals.bWrapLongLines ? MF_CHECKED : MF_UNCHECKED));
|
||||
}
|
||||
|
||||
VOID DIALOG_Search(VOID)
|
||||
{
|
||||
Globals.find.lStructSize = sizeof(Globals.find);
|
||||
Globals.find.hwndOwner = Globals.hMainWnd;
|
||||
Globals.find.hInstance = Globals.hInstance;
|
||||
Globals.find.lpstrFindWhat = (CHAR *) &Globals.szFindText;
|
||||
Globals.find.wFindWhatLen = sizeof(Globals.szFindText);
|
||||
Globals.find.lpstrReplaceWith = 0;
|
||||
Globals.find.wReplaceWithLen = 0;
|
||||
Globals.find.Flags = FR_DOWN;
|
||||
Globals.find.lCustData = 0;
|
||||
Globals.find.lpfnHook = 0;
|
||||
Globals.find.lpTemplateName = 0;
|
||||
|
||||
/* We only need to create the modal FindReplace dialog which will */
|
||||
/* notify us of incoming events using hMainWnd Window Messages */
|
||||
|
||||
Globals.hFindReplaceDlg = FindText(&Globals.find);
|
||||
assert(Globals.hFindReplaceDlg !=0);
|
||||
}
|
||||
|
||||
VOID DIALOG_SearchNext(VOID)
|
||||
{
|
||||
/* Search Next */
|
||||
}
|
||||
|
||||
VOID DIALOG_HelpContents(VOID)
|
||||
{
|
||||
WinHelp(Globals.hMainWnd, HELPFILE, HELP_INDEX, 0);
|
||||
}
|
||||
|
||||
VOID DIALOG_HelpSearch(VOID)
|
||||
{
|
||||
/* Search Help */
|
||||
}
|
||||
|
||||
VOID DIALOG_HelpHelp(VOID)
|
||||
{
|
||||
WinHelp(Globals.hMainWnd, HELPFILE, HELP_HELPONHELP, 0);
|
||||
}
|
||||
|
||||
VOID DIALOG_HelpLicense(VOID)
|
||||
{
|
||||
WineLicense(Globals.hMainWnd);
|
||||
}
|
||||
|
||||
VOID DIALOG_HelpNoWarranty(VOID)
|
||||
{
|
||||
WineWarranty(Globals.hMainWnd);
|
||||
}
|
||||
|
||||
VOID DIALOG_HelpAboutWine(VOID)
|
||||
{
|
||||
CHAR szNotepad[MAX_STRING_LEN];
|
||||
|
||||
LoadString(Globals.hInstance, IDS_NOTEPAD, szNotepad, sizeof(szNotepad));
|
||||
ShellAbout(Globals.hMainWnd, szNotepad, "Notepad\n" /* WINE_RELEASE_INFO */, 0);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* DIALOG_PageSetup
|
||||
*/
|
||||
|
||||
VOID DIALOG_PageSetup(VOID)
|
||||
{
|
||||
WNDPROC lpfnDlg;
|
||||
|
||||
lpfnDlg = MakeProcInstance(DIALOG_PAGESETUP_DlgProc, Globals.hInstance);
|
||||
DialogBox(Globals.hInstance, STRING_PAGESETUP_Xx, Globals.hMainWnd, (DLGPROC)lpfnDlg);
|
||||
FreeProcInstance(lpfnDlg);
|
||||
}
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* DIALOG_PAGESETUP_DlgProc
|
||||
*/
|
||||
|
||||
static LRESULT WINAPI DIALOG_PAGESETUP_DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
|
||||
switch (msg)
|
||||
{
|
||||
case WM_COMMAND:
|
||||
switch (wParam)
|
||||
{
|
||||
case IDOK:
|
||||
/* save user input and close dialog */
|
||||
GetDlgItemText(hDlg, NP_PAGESETUP_HEAD, Globals.szHeader, sizeof(Globals.szHeader));
|
||||
GetDlgItemText(hDlg, NP_PAGESETUP_TAIL, Globals.szFooter, sizeof(Globals.szFooter));
|
||||
GetDlgItemText(hDlg, NP_PAGESETUP_TOP, Globals.szMarginTop, sizeof(Globals.szMarginTop));
|
||||
GetDlgItemText(hDlg, NP_PAGESETUP_BOTTOM, Globals.szMarginBottom, sizeof(Globals.szMarginBottom));
|
||||
GetDlgItemText(hDlg, NP_PAGESETUP_LEFT, Globals.szMarginLeft, sizeof(Globals.szMarginLeft));
|
||||
GetDlgItemText(hDlg, NP_PAGESETUP_RIGHT, Globals.szMarginRight, sizeof(Globals.szMarginRight));
|
||||
EndDialog(hDlg, IDOK);
|
||||
return TRUE;
|
||||
|
||||
case IDCANCEL:
|
||||
/* discard user input and close dialog */
|
||||
EndDialog(hDlg, IDCANCEL);
|
||||
return TRUE;
|
||||
|
||||
case IDHELP:
|
||||
/* FIXME: Bring this to work */
|
||||
MessageBox(Globals.hMainWnd, "Sorry, no help available", "Help", MB_ICONEXCLAMATION);
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_INITDIALOG:
|
||||
/* fetch last user input prior to display dialog */
|
||||
SetDlgItemText(hDlg, NP_PAGESETUP_HEAD, Globals.szHeader);
|
||||
SetDlgItemText(hDlg, NP_PAGESETUP_TAIL, Globals.szFooter);
|
||||
SetDlgItemText(hDlg, NP_PAGESETUP_TOP, Globals.szMarginTop);
|
||||
SetDlgItemText(hDlg, NP_PAGESETUP_BOTTOM, Globals.szMarginBottom);
|
||||
SetDlgItemText(hDlg, NP_PAGESETUP_LEFT, Globals.szMarginLeft);
|
||||
SetDlgItemText(hDlg, NP_PAGESETUP_RIGHT, Globals.szMarginRight);
|
||||
break;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
/*
|
||||
* Notepad (dialog.h)
|
||||
*
|
||||
* Copyright 1998 Marcel Baur <mbaur@g26.ethz.ch>
|
||||
*/
|
||||
|
||||
#include "windows.h"
|
||||
|
||||
VOID DIALOG_FileNew(VOID);
|
||||
VOID DIALOG_FileOpen(VOID);
|
||||
VOID DIALOG_FileSave(VOID);
|
||||
VOID DIALOG_FileSaveAs(VOID);
|
||||
VOID DIALOG_FilePrint(VOID);
|
||||
VOID DIALOG_FilePageSetup(VOID);
|
||||
VOID DIALOG_FilePrinterSetup(VOID);
|
||||
VOID DIALOG_FileExit(VOID);
|
||||
|
||||
VOID DIALOG_EditUndo(VOID);
|
||||
VOID DIALOG_EditCut(VOID);
|
||||
VOID DIALOG_EditCopy(VOID);
|
||||
VOID DIALOG_EditPaste(VOID);
|
||||
VOID DIALOG_EditDelete(VOID);
|
||||
VOID DIALOG_EditSelectAll(VOID);
|
||||
VOID DIALOG_EditTimeDate(VOID);
|
||||
VOID DIALOG_EditWrap(VOID);
|
||||
|
||||
VOID DIALOG_Search(VOID);
|
||||
VOID DIALOG_SearchNext(VOID);
|
||||
|
||||
VOID DIALOG_HelpContents(VOID);
|
||||
VOID DIALOG_HelpSearch(VOID);
|
||||
VOID DIALOG_HelpHelp(VOID);
|
||||
VOID DIALOG_HelpLicense(VOID);
|
||||
VOID DIALOG_HelpNoWarranty(VOID);
|
||||
VOID DIALOG_HelpAboutWine(VOID);
|
||||
|
||||
VOID DIALOG_PageSetup(VOID);
|
||||
VOID DIALOG_TimeDate(VOID);
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
Tue Oct 12 20:31:00 1999 Gustavo Junior Alves <alves@correionet.com.br>
|
||||
* [Pt.rc] [Makefile.in]
|
||||
Added Portuguese language support.
|
||||
|
||||
Fri Mar 5 22:14:13 1999 Marcel Baur <mbaur@g26.ethz.ch>
|
||||
* NEW [search.c] - Added Boyer-Moore text search
|
||||
|
||||
Sat Feb 6 20:25:25 1999 Marcel Baur <mbaur@g26.ethz.ch>
|
||||
- Added new IDS_NOTSAVED ressource (needs translation in *.rc)
|
||||
- Improved printing support (not yet complete)
|
||||
- Improved file drag and drop (should now work) - General code cleanup
|
||||
|
||||
Thu Jan 28 18:17:08 1999 Jukka Iivonen <iivonen@iki.fi>
|
||||
* [Fi.rc] [main.c] [Makefile.in]
|
||||
- Added Finnish language support.
|
||||
|
||||
Sun Oct 18 14:11:42 1998 Marcel Baur <mbaur@g26.ethz.ch>
|
||||
|
||||
* [??.rc], [TODO], [dialog.c], [dialog.h], [language.c],
|
||||
[language.h], [license.c], [license.h], [main.c], [main.h],
|
||||
[notepad.rc]:
|
||||
|
||||
- Fixed GetOpenFileName and GetSaveFileName dialogs.
|
||||
- Fixed Print dialog and introduced PrinterSetup dialog.
|
||||
- Fixed PageSetup dialog: values are now correctly initialized
|
||||
(had to change all *.rc files)
|
||||
- Preliminary file drag and drop support.
|
||||
|
||||
Fri Jun 12 23:29:44 1998 Marcel Baur <mbaur@g26.ethz.ch>
|
||||
- Fixed GetDateFormat()->GetTimeFormat() for locale time.
|
||||
|
||||
Mon May 25 14:30:00 1998 Henrik Olsen <henrik@iaeste.dk>
|
||||
* [Da.rc]
|
||||
- Added Danish language support.
|
||||
|
||||
Fri May 15 23:59:22 1998 Marcel Baur <mbaur@g26.ethz.ch>
|
||||
- Date/Time now uses locale-specific formats
|
||||
- Language-specific window caption, displays file being edited.
|
||||
- Started with parsing of command line settings
|
||||
- Started with DoOpenFile, DoCloseFile, DoSaveFile logics
|
||||
- Prompt user to save settings when closing a file
|
||||
-> Introduced a new message box (not yet finished)
|
||||
- Fixed minor features (missing IDS in main.h, ...)
|
||||
|
||||
Sun Mar 29 20:29:41 1998 Laurent Buffler <laurent@bluewin.ch>
|
||||
* [Fr.rc]
|
||||
- Added French language support.
|
||||
|
||||
Fri Feb 27 21:03:37 1998 Karl Backström <karl_b@geocities.com>
|
||||
- Fixed some minor features.
|
||||
|
||||
Sat Feb 14 17:42:29 1998 Karl Backström <karl_b@geocities.com>
|
||||
* NEW [language.c] [language.h]
|
||||
- Takes care of all language related stuff.
|
||||
- A new [programs] in .winerc is in use.
|
||||
|
||||
Tue Feb 10 23:34:08 1998 Marcel Baur <mbaur@g26.ethz.ch>
|
||||
- Fixed broken language menus
|
||||
|
||||
Fri Feb 06 23.54.35 1998 Karl Backström <karl_b@geocities.com>
|
||||
* [main.c] [main.h] [notepad.rc]
|
||||
- Fixed language support for menus.
|
||||
* NEW [dialog.c] [dialog.h]
|
||||
- Moved all menu and dialog related stuff here.
|
||||
|
||||
Sun Jan 18 23:05:04 1998 Karl Backström <karl_b@geocities.com>
|
||||
* [Sw.rc]
|
||||
- Added/updated Swedish language support.
|
||||
|
||||
Tue Dec 23 23:35:04 1997 Marcel Baur <mbaur@g26.ethz.ch>
|
||||
- Fixed lots of bugs w/ resources in *.rc
|
||||
- moved [notepad.c] into [main.c]
|
||||
- moved [notepad.h] into [main.h]
|
||||
|
||||
Fri Dec 05 20:51:55 1997 Marcel Baur <mbaur@g26.ethz.ch>
|
||||
* [notepad.c] [notepad.h] [notepad.rc] [En.rc] [De.rc]
|
||||
[license.c] [license.h] [License_En.c]
|
||||
[README] [TODO] [ChangeLog]
|
||||
- Originals by Marcel Baur
|
|
@ -1,10 +0,0 @@
|
|||
NOTEPAD for WINE
|
||||
================
|
||||
There is now a web page dedicated to Notepad for Wine I am maintaing.
|
||||
Please see http://www.vis.inf.ethz.ch/students/mbaur/notepad
|
||||
for latest info about Notepad.
|
||||
This page also includes screenshots.
|
||||
This is an early release of notepad and most of the code is still broken.
|
||||
It will probably compile but the application will not make much sense yet.
|
||||
Please see file TODO for things to do and keep the file ChangeLog
|
||||
up to date.I also try to read wine-devel@winehq.com frequently.
|
|
@ -1,21 +0,0 @@
|
|||
FIXME - and list:
|
||||
* - use scroll bars (vertical done)
|
||||
* - cut 'n paste
|
||||
* - save file (Not started)
|
||||
* - print file (Crashes Win9x)
|
||||
* - find dialog
|
||||
* - encapsulate data structures (?) - half done
|
||||
* - free unused memory
|
||||
* - solve Open problems (This seems to work)
|
||||
* - smoother scrolling
|
||||
* - separate view code and document code
|
||||
|
||||
|
||||
TODO -
|
||||
|
||||
- Logfile feature
|
||||
if Notepad opens a file with ".LOG" (really?) in the first line, the
|
||||
current date/time should automatically be inserted into the last line
|
||||
of the file at startup.
|
||||
|
||||
- Upgrade Language Support
|
|
@ -1,132 +0,0 @@
|
|||
/*
|
||||
* Notepad
|
||||
*
|
||||
* Copyright 1997,98 Marcel Baur <mbaur@g26.ethz.ch>
|
||||
* Copyright 1998 Karl Backstr”m <karl_b@geocities.com>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "windows.h"
|
||||
#include "main.h"
|
||||
#include "language.h"
|
||||
|
||||
CHAR STRING_MENU_Xx[] = "MENU_Xx";
|
||||
CHAR STRING_PAGESETUP_Xx[] = "DIALOG_PAGESETUP_Xx";
|
||||
|
||||
void LANGUAGE_UpdateWindowCaption(void) {
|
||||
/* Sets the caption of the main window according to Globals.szFileName:
|
||||
Notepad - (untitled) if no file is open
|
||||
Notepad - [filename] if a file is given
|
||||
*/
|
||||
|
||||
CHAR szCaption[MAX_STRING_LEN];
|
||||
CHAR szUntitled[MAX_STRING_LEN];
|
||||
|
||||
LoadString(Globals.hInstance, IDS_NOTEPAD, szCaption, sizeof(szCaption));
|
||||
|
||||
if (strlen(Globals.szFileName)>0) {
|
||||
lstrcat(szCaption, " - [");
|
||||
lstrcat(szCaption, Globals.szFileName);
|
||||
lstrcat(szCaption, "]");
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadString(Globals.hInstance, IDS_UNTITLED, szUntitled, sizeof(szUntitled));
|
||||
lstrcat(szCaption, " - ");
|
||||
lstrcat(szCaption, szUntitled);
|
||||
}
|
||||
|
||||
SetWindowText(Globals.hMainWnd, szCaption);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
static BOOL LANGUAGE_LoadStringOther(UINT num, UINT ids, LPSTR str, UINT len)
|
||||
{
|
||||
BOOL bOk;
|
||||
|
||||
ids -= Globals.wStringTableOffset;
|
||||
ids += num * 0x100;
|
||||
|
||||
bOk = LoadString(Globals.hInstance, ids, str, len);
|
||||
|
||||
return(bOk);
|
||||
}
|
||||
|
||||
|
||||
|
||||
VOID LANGUAGE_SelectByName(LPCSTR lang)
|
||||
{
|
||||
INT i;
|
||||
CHAR newlang[3];
|
||||
|
||||
for (i = 0; i <= MAX_LANGUAGE_NUMBER; i++)
|
||||
if (LANGUAGE_LoadStringOther(i, IDS_LANGUAGE_ID, newlang, sizeof(newlang)) &&
|
||||
!lstrcmp(lang, newlang))
|
||||
{
|
||||
LANGUAGE_SelectByNumber(i);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fallback */
|
||||
for (i = 0; i <= MAX_LANGUAGE_NUMBER; i++)
|
||||
if (LANGUAGE_LoadStringOther(i, IDS_LANGUAGE_ID, newlang, sizeof(newlang)))
|
||||
{
|
||||
LANGUAGE_SelectByNumber(i);
|
||||
return;
|
||||
}
|
||||
|
||||
MessageBox(Globals.hMainWnd, "No language found", "FATAL ERROR", MB_OK);
|
||||
PostQuitMessage(1);
|
||||
}
|
||||
|
||||
VOID LANGUAGE_SelectByNumber(UINT num)
|
||||
{
|
||||
INT i;
|
||||
CHAR lang[3];
|
||||
CHAR item[MAX_STRING_LEN];
|
||||
HMENU hMainMenu;
|
||||
|
||||
/* Select string table */
|
||||
Globals.wStringTableOffset = num * 0x100;
|
||||
|
||||
/* Get Language id */
|
||||
LoadString(Globals.hInstance, IDS_LANGUAGE_ID, lang, sizeof(lang));
|
||||
|
||||
/* Set frame caption */
|
||||
LANGUAGE_UpdateWindowCaption();
|
||||
|
||||
/* Change Resource names */
|
||||
lstrcpyn(STRING_MENU_Xx + sizeof(STRING_MENU_Xx) - 3, lang, 3);
|
||||
lstrcpyn(STRING_PAGESETUP_Xx + sizeof(STRING_PAGESETUP_Xx) - 3, lang, 3);
|
||||
|
||||
/* Create menu */
|
||||
hMainMenu = LoadMenu(Globals.hInstance, STRING_MENU_Xx);
|
||||
Globals.hFileMenu = GetSubMenu(hMainMenu, 0);
|
||||
Globals.hEditMenu = GetSubMenu(hMainMenu, 1);
|
||||
Globals.hSearchMenu = GetSubMenu(hMainMenu, 2);
|
||||
Globals.hLanguageMenu = GetSubMenu(hMainMenu, 3);
|
||||
Globals.hHelpMenu = GetSubMenu(hMainMenu, 4);
|
||||
|
||||
/* Remove dummy item */
|
||||
RemoveMenu(Globals.hLanguageMenu, 0, MF_BYPOSITION);
|
||||
/* Add language items */
|
||||
for (i = 0; i <= MAX_LANGUAGE_NUMBER; i++)
|
||||
if (LANGUAGE_LoadStringOther(i, IDS_LANGUAGE_MENU_ITEM, item, sizeof(item)))
|
||||
AppendMenu(Globals.hLanguageMenu, MF_STRING | MF_BYCOMMAND,
|
||||
NP_FIRST_LANGUAGE + i, item);
|
||||
|
||||
SetMenu(Globals.hMainWnd, hMainMenu);
|
||||
|
||||
/* Destroy old menu */
|
||||
if (Globals.hMainMenu) DestroyMenu(Globals.hMainMenu);
|
||||
Globals.hMainMenu = hMainMenu;
|
||||
}
|
||||
|
||||
VOID LANGUAGE_DefaultHandle(WPARAM wParam)
|
||||
{
|
||||
if ((wParam >=NP_FIRST_LANGUAGE) && (wParam<=NP_LAST_LANGUAGE))
|
||||
LANGUAGE_SelectByNumber(wParam - NP_FIRST_LANGUAGE);
|
||||
else printf("Unimplemented menu command %i\n", wParam);
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
/*
|
||||
* Notepad
|
||||
*
|
||||
* Copyright 1997,98 Marcel Baur <mbaur@g26.ethz.ch>
|
||||
* Copyright 1998 Karl Backstr”m <karl_b@geocities.com>
|
||||
*/
|
||||
|
||||
VOID LANGUAGE_UpdateWindowCaption(VOID);
|
||||
VOID LANGUAGE_SelectByNumber(UINT num);
|
||||
VOID LANGUAGE_SelectByName(LPCSTR lang);
|
||||
VOID LANGUAGE_DefaultHandle(WPARAM wParam);
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
/*
|
||||
* lcc.h
|
||||
*
|
||||
* Copyright 1999 by Marcel Baur <mbaur@g26.ethz.ch>
|
||||
* To be distributed under the Wine license
|
||||
*
|
||||
* This file is only required when compiling Notepad using LCC-WIN32
|
||||
*/
|
||||
|
||||
#ifdef LCC
|
||||
|
||||
#include <assert.h>
|
||||
#include "shellapi.h"
|
||||
|
||||
#define HANDLE HANDLE
|
||||
#define INVALID_HANDLE_VALUE INVALID_HANDLE_VALUE
|
||||
|
||||
#define WINE_RELEASE_INFO "Compiled using LCC"
|
||||
#define OIC_WINLOGO 0
|
||||
|
||||
#ifndef LCC_HASASSERT
|
||||
/* prevent multiple inclusion of assert methods */
|
||||
|
||||
int _assertfail(char *__msg, char *__cond, char *__file, int __line) {
|
||||
|
||||
CHAR szMessage[255];
|
||||
|
||||
strcat(szMessage, "Assert failure ");
|
||||
strcat(szMessage, __msg);
|
||||
strcat(szMessage, "\n");
|
||||
strcat(szMessage, "in line ");
|
||||
strcat(szMessage, "of file ");
|
||||
strcat(szMessage, __line);
|
||||
|
||||
MessageBox(0, szMessage, "ERROR: ASSERT FAILURE", MB_ICONEXCLAMATION);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,89 +0,0 @@
|
|||
#
|
||||
# Makefile for LCC-WIN32
|
||||
#
|
||||
# Copyright 1999 Marcel Baur (mbaur@g26.ethz.ch)
|
||||
# To be distributed under the Wine License
|
||||
#
|
||||
# Use lccmake -f lccmake to use this makefile
|
||||
#
|
||||
# See http://www.cs.virgina.edu/~lcc-win32 for
|
||||
# information about LCC-WIN32
|
||||
#
|
||||
|
||||
#
|
||||
# LCC home directory
|
||||
#
|
||||
LCCHOME=C:\LCC
|
||||
|
||||
#
|
||||
# individual flags for LCC, LCCLNK, LRC
|
||||
#
|
||||
CFLAGS=-O -DLCC -g2
|
||||
LNKFLAGS=-O winepad.exe -subsystem windows
|
||||
LRCFLAGS=/r /v /m
|
||||
|
||||
#
|
||||
# available languages
|
||||
#
|
||||
LANGUAGES=Da De En Es Fi Fr Sw
|
||||
|
||||
#
|
||||
# default language
|
||||
#
|
||||
LANGUAGE=En
|
||||
|
||||
#
|
||||
# required include libraries
|
||||
#
|
||||
LIBS=SHELL32.LIB
|
||||
|
||||
#
|
||||
# object files
|
||||
#
|
||||
OBJS=main.obj dialog.obj license.obj license_En.obj language.obj
|
||||
|
||||
#
|
||||
# ---[ it is save not to change anything behind this line ]--- #
|
||||
#
|
||||
|
||||
winepad.exe: $(OBJS) resources
|
||||
$(LCCHOME)\bin\lcclnk $(LNKFLAGS) $(OBJS) notepad.res $(LIBS)
|
||||
@echo *** "winepad.exe" successfully created
|
||||
|
||||
resources: $(RESOURCES)
|
||||
FOR %%i IN ($(LANGUAGES)) DO $(LCCHOME)\bin\lrc $(LRCFLAGS) %%i.rc
|
||||
copy /b $(LANGUAGE).res notepad.res
|
||||
|
||||
clean:
|
||||
if exist winepad.exe erase winepad.exe
|
||||
if exist main.obj erase main.obj
|
||||
if exist dialog.obj erase dialog.obj
|
||||
if exist license.obj erase license.obj
|
||||
if exist license_En.obj erase license_En.obj
|
||||
if exist language.obj erase language.obj
|
||||
if exist notepad.res erase notepad.res
|
||||
FOR %%i IN ($(LANGUAGES)) DO IF EXIST %%i.res erase %%i.res
|
||||
FOR %%i IN ($(LANGUAGES)) DO IF EXIST %%i.map erase %%i.map
|
||||
|
||||
help:
|
||||
@echo lccmake help - display this help
|
||||
@echo lccmake - to compile winepad.exe
|
||||
@echo lccmake resources - to compile .res files
|
||||
@echo lccmake clean - to clean up
|
||||
|
||||
|
||||
#
|
||||
# some more targets (for novice users and compatibility reasons only)
|
||||
#
|
||||
|
||||
distclean: clean
|
||||
@echo *** next time please use "lccmake clean"
|
||||
|
||||
all: winepad.exe
|
||||
@echo *** next time please use "lccmake" (without parameters)
|
||||
|
||||
|
||||
#
|
||||
# please make sure that at least one empty line follows this statement
|
||||
#
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
/*
|
||||
* Notepad (license.h)
|
||||
*
|
||||
* Copyright 1997,98 Marcel Baur <mbaur@g26.ethz.ch>
|
||||
* To be distributed under the Wine License
|
||||
*/
|
||||
|
||||
#include "windows.h"
|
||||
#include "license.h"
|
||||
|
||||
VOID WineLicense(HWND Wnd)
|
||||
{
|
||||
/* FIXME: should load strings from resources */
|
||||
LICENSE *License = &WineLicense_En;
|
||||
MessageBox(Wnd, License->License, License->LicenseCaption,
|
||||
MB_ICONINFORMATION | MB_OK);
|
||||
}
|
||||
|
||||
|
||||
VOID WineWarranty(HWND Wnd)
|
||||
{
|
||||
/* FIXME: should load strings from resources */
|
||||
LICENSE *License = &WineLicense_En;
|
||||
MessageBox(Wnd, License->Warranty, License->WarrantyCaption,
|
||||
MB_ICONEXCLAMATION | MB_OK);
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
/*
|
||||
* Notepad (license.h)
|
||||
*
|
||||
* Copyright 1997,98 Marcel Baur <mbaur@g26.ethz.ch>
|
||||
* To be distributed under the Wine License
|
||||
*/
|
||||
|
||||
VOID WineLicense(HWND hWnd);
|
||||
VOID WineWarranty(HWND hWnd);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
LPCSTR License, LicenseCaption;
|
||||
LPCSTR Warranty, WarrantyCaption;
|
||||
} LICENSE;
|
||||
|
||||
/*
|
||||
extern LICENSE WineLicense_Ca;
|
||||
extern LICENSE WineLicense_Cz;
|
||||
extern LICENSE WineLicense_Da;
|
||||
extern LICENSE WineLicense_De;
|
||||
*/
|
||||
|
||||
extern LICENSE WineLicense_En;
|
||||
|
||||
/*
|
||||
extern LICENSE WineLicense_Eo;
|
||||
extern LICENSE WineLicense_Es;
|
||||
extern LICENSE WineLicense_Fi;
|
||||
extern LICENSE WineLicense_Fr;
|
||||
extern LICENSE WineLicense_Hu;
|
||||
extern LICENSE WineLicense_It;
|
||||
extern LICENSE WineLicense_Ko;
|
||||
extern LICENSE WineLicense_No;
|
||||
extern LICENSE WineLicense_Pl;
|
||||
extern LICENSE WineLicense_Po;
|
||||
extern LICENSE WineLicense_Sw;
|
||||
extern LICENSE WineLicense_Va;
|
||||
*/
|
|
@ -1,982 +0,0 @@
|
|||
/*
|
||||
* Notepad
|
||||
*
|
||||
* Copyright 2000 Mike McCormack <Mike_McCormack@looksmart.com.au>
|
||||
* Copyright 1997,98 Marcel Baur <mbaur@g26.ethz.ch>
|
||||
* To be distributed under the Wine License
|
||||
*
|
||||
* FIXME,TODO list:
|
||||
* - Use wine Heap instead of malloc/free (done)
|
||||
* - use scroll bars (vertical done)
|
||||
* - cut 'n paste (clipboard)
|
||||
* - save file
|
||||
* - print file
|
||||
* - find dialog
|
||||
* - encapsulate data structures (?) - half done
|
||||
* - free unused memory
|
||||
* - solve Open problems
|
||||
* - smoother scrolling
|
||||
* - separate view code and document code
|
||||
*
|
||||
* This program is intended as a testbed for winelib as much as
|
||||
* a useful application.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "windows.h"
|
||||
|
||||
#ifdef LCC
|
||||
#include "lcc.h"
|
||||
#endif
|
||||
|
||||
#include "main.h"
|
||||
#include "license.h"
|
||||
#include "dialog.h"
|
||||
#include "language.h"
|
||||
|
||||
extern BOOL DoCloseFile(void);
|
||||
extern void DoOpenFile(LPCSTR szFileName);
|
||||
|
||||
NOTEPAD_GLOBALS Globals;
|
||||
|
||||
|
||||
/* Using a pointer to pointer data structure to
|
||||
achieve a little more efficiency. Hopefully
|
||||
it will be worth it, because it complicates the
|
||||
code - mjm 26 Jun 2000 */
|
||||
|
||||
#define BUFFERCHUNKSIZE 0xe0
|
||||
typedef struct TAGLine {
|
||||
LPSTR lpLine;
|
||||
DWORD dwWidth;
|
||||
DWORD dwMaxWidth;
|
||||
} LINE, *LPLINE;
|
||||
|
||||
/* FIXME: make this info into a structure */
|
||||
/* typedef struct tagBUFFER { */
|
||||
DWORD dwVOffset=0;
|
||||
DWORD dwLines=0;
|
||||
DWORD dwMaxLines=0;
|
||||
LPLINE lpBuffer=NULL;
|
||||
DWORD dwXpos=0,dwYpos=0; /* position of caret in char coords */
|
||||
DWORD dwCaretXpos=0,dwCaretYpos=0; /* position of caret in pixel coords */
|
||||
TEXTMETRIC tm; /* textmetric for current font */
|
||||
RECT rectClient; /* client rectangle of the window we're drawing in */
|
||||
/* } BUFFER, *LPBUFFER */
|
||||
|
||||
VOID InitFontInfo(HWND hWnd)
|
||||
{
|
||||
HDC hDC = GetDC(hWnd);
|
||||
|
||||
if(hDC)
|
||||
{
|
||||
GetTextMetrics(hDC, &tm);
|
||||
ReleaseDC(hWnd,hDC);
|
||||
}
|
||||
}
|
||||
|
||||
void InitBuffer(void)
|
||||
{
|
||||
lpBuffer = NULL;
|
||||
dwLines = 0;
|
||||
dwMaxLines = 0;
|
||||
dwXpos=0;
|
||||
dwYpos=0;
|
||||
}
|
||||
|
||||
/* convert x,y character co-ords into x pixel co-ord */
|
||||
DWORD CalcStringWidth(HDC hDC, DWORD x, DWORD y)
|
||||
{
|
||||
DWORD len;
|
||||
SIZE size;
|
||||
|
||||
size.cx = 0;
|
||||
size.cy = 0;
|
||||
|
||||
if(y>dwLines)
|
||||
return size.cx;
|
||||
if(lpBuffer == NULL)
|
||||
return size.cx;
|
||||
if(lpBuffer[y].lpLine == NULL)
|
||||
return size.cx;
|
||||
len = (x<lpBuffer[y].dwWidth) ?
|
||||
x : lpBuffer[y].dwWidth;
|
||||
GetTextExtentPoint(hDC, lpBuffer[y].lpLine, len, &size);
|
||||
|
||||
return size.cx;
|
||||
}
|
||||
|
||||
void CalcCaretPos(HDC hDC, DWORD dwXpos, DWORD dwYpos)
|
||||
{
|
||||
dwCaretXpos = CalcStringWidth(hDC, dwXpos, dwYpos);
|
||||
dwCaretYpos = tm.tmHeight*(dwYpos-dwVOffset);
|
||||
SetCaretPos(dwCaretXpos,dwCaretYpos);
|
||||
}
|
||||
|
||||
DWORD GetLinesPerPage(HWND hWnd)
|
||||
{
|
||||
return (rectClient.bottom/tm.tmHeight); /* round down */
|
||||
}
|
||||
|
||||
/* render one line of text and blank space */
|
||||
void RenderLine(HDC hDC, DWORD lineno)
|
||||
{
|
||||
RECT rect;
|
||||
HBRUSH hPrev;
|
||||
|
||||
if(!hDC)
|
||||
return;
|
||||
|
||||
/* erase the space at the end of a line using a white rectangle */
|
||||
rect.top = tm.tmHeight*(lineno-dwVOffset);
|
||||
rect.bottom = tm.tmHeight*(lineno-dwVOffset+1);
|
||||
|
||||
if(lpBuffer && (lineno<dwLines))
|
||||
rect.left = CalcStringWidth(hDC, lpBuffer[lineno].dwWidth,lineno);
|
||||
else
|
||||
rect.left = 0;
|
||||
rect.right = rectClient.right;
|
||||
|
||||
/* use the white pen so there's not outline */
|
||||
hPrev = SelectObject(hDC, GetStockObject(WHITE_PEN));
|
||||
Rectangle(hDC, rect.left, rect.top, rect.right, rect.bottom);
|
||||
SelectObject(hDC, hPrev);
|
||||
|
||||
if(lpBuffer && lpBuffer[lineno].lpLine)
|
||||
{
|
||||
TextOut(hDC, 0, rect.top, lpBuffer[lineno].lpLine,
|
||||
lpBuffer[lineno].dwWidth);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Paint the buffer onto the window.
|
||||
*/
|
||||
void RenderWindow(HDC hDC) {
|
||||
DWORD i;
|
||||
|
||||
if(!hDC)
|
||||
return;
|
||||
|
||||
/* FIXME: render only necessary lines */
|
||||
for(i = dwVOffset; i < (dwVOffset+GetLinesPerPage(0)); i++)
|
||||
{
|
||||
RenderLine(hDC,i);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Check that correct buffers exist to access line y pos x
|
||||
* Only manages memory.
|
||||
*
|
||||
* Returns TRUE if the line is accessable
|
||||
* FALSE if there is a problem
|
||||
*/
|
||||
BOOL ValidateLine(DWORD y,DWORD x)
|
||||
{
|
||||
DWORD max;
|
||||
|
||||
/* check to see that the BUFFER has enough lines */
|
||||
max = dwMaxLines;
|
||||
if( (max<=y) || (lpBuffer == NULL))
|
||||
{
|
||||
while(max<=y)
|
||||
max += BUFFERCHUNKSIZE;
|
||||
/* use GlobalAlloc first time round */
|
||||
if(lpBuffer)
|
||||
lpBuffer = (LPLINE) GlobalReAlloc((HGLOBAL)lpBuffer,GMEM_FIXED,
|
||||
max*sizeof(LINE)) ;
|
||||
else
|
||||
lpBuffer = (LPLINE) GlobalAlloc(GMEM_FIXED, max*sizeof(LINE));
|
||||
if(lpBuffer == NULL)
|
||||
return FALSE;
|
||||
ZeroMemory(&lpBuffer[dwLines], sizeof(LINE)*(max-dwLines) );
|
||||
dwMaxLines = max;
|
||||
}
|
||||
|
||||
/* check to see that the LINE is wide enough */
|
||||
max = lpBuffer[y].dwMaxWidth;
|
||||
if( (max <= x) || (lpBuffer[y].lpLine == NULL) )
|
||||
{
|
||||
while(max <= x)
|
||||
max += BUFFERCHUNKSIZE;
|
||||
/* use GlobalAlloc first */
|
||||
if(lpBuffer[y].lpLine)
|
||||
lpBuffer[y].lpLine = (LPSTR)GlobalReAlloc((HGLOBAL)lpBuffer[y].lpLine,
|
||||
GMEM_FIXED, max) ;
|
||||
else
|
||||
lpBuffer[y].lpLine = (LPSTR)GlobalAlloc( GMEM_FIXED, max);
|
||||
if(lpBuffer[y].lpLine == NULL)
|
||||
return FALSE;
|
||||
lpBuffer[y].dwWidth = 0;
|
||||
lpBuffer[y].dwMaxWidth = max;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* inserts a new line into the buffer */
|
||||
BOOL DoNewLine(HDC hDC)
|
||||
{
|
||||
DWORD i,cnt;
|
||||
LPSTR src,dst;
|
||||
|
||||
/* check to see if we need more memory for the buffer pointers */
|
||||
if(!ValidateLine(dwLines,0))
|
||||
return FALSE;
|
||||
|
||||
/* shuffle up all the lines */
|
||||
for(i=dwLines; i>(dwYpos+1); i--)
|
||||
{
|
||||
lpBuffer[i] = lpBuffer[i-1];
|
||||
RenderLine(hDC,i);
|
||||
}
|
||||
ZeroMemory(&lpBuffer[dwYpos+1],sizeof(LINE));
|
||||
|
||||
/* copy the characters after the carat (if any) to the next line */
|
||||
src = &lpBuffer[dwYpos].lpLine[dwXpos];
|
||||
cnt = lpBuffer[dwYpos].dwWidth-dwXpos;
|
||||
if(!ValidateLine(dwYpos+1,cnt)) /* allocates the buffer */
|
||||
return FALSE; /* FIXME */
|
||||
dst = &lpBuffer[dwYpos+1].lpLine[0];
|
||||
memcpy(dst, src, cnt);
|
||||
lpBuffer[dwYpos+1].dwWidth = cnt;
|
||||
lpBuffer[dwYpos].dwWidth -= cnt;
|
||||
|
||||
/* move the cursor */
|
||||
dwLines++;
|
||||
dwXpos = 0;
|
||||
dwYpos++;
|
||||
|
||||
/* update the window */
|
||||
RenderLine(hDC, dwYpos-1);
|
||||
RenderLine(hDC, dwYpos);
|
||||
CalcCaretPos(hDC, dwXpos, dwYpos);
|
||||
/* FIXME: don't use globals */
|
||||
SetScrollRange(Globals.hMainWnd, SB_VERT, 0, dwLines, TRUE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Attempt a basic edit buffer
|
||||
*/
|
||||
BOOL AddCharToBuffer(HDC hDC, char ch)
|
||||
{
|
||||
/* we can use lpBuffer[dwYpos] */
|
||||
if(!ValidateLine(dwYpos,0))
|
||||
return FALSE;
|
||||
|
||||
/* shuffle the rest of the line*/
|
||||
if(!ValidateLine(dwYpos, lpBuffer[dwYpos].dwWidth))
|
||||
return FALSE;
|
||||
lpBuffer[dwYpos].dwWidth++;
|
||||
memmove(&lpBuffer[dwYpos].lpLine[dwXpos+1],
|
||||
&lpBuffer[dwYpos].lpLine[dwXpos],
|
||||
lpBuffer[dwYpos].dwWidth-dwXpos);
|
||||
|
||||
/* add the character */
|
||||
lpBuffer[dwYpos].lpLine[dwXpos] = ch;
|
||||
if(dwLines == 0)
|
||||
dwLines++;
|
||||
dwXpos++;
|
||||
|
||||
/* update the window and cursor position */
|
||||
RenderLine(hDC,dwYpos);
|
||||
CalcCaretPos(hDC,dwXpos,dwYpos);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/* erase a character */
|
||||
BOOL DoBackSpace(HDC hDC)
|
||||
{
|
||||
DWORD i;
|
||||
|
||||
if(lpBuffer == NULL)
|
||||
return FALSE;
|
||||
if(lpBuffer[dwYpos].lpLine && (dwXpos>0))
|
||||
{
|
||||
dwXpos --;
|
||||
/* FIXME: use memmove */
|
||||
for(i=dwXpos; i<(lpBuffer[dwYpos].dwWidth-1); i++)
|
||||
lpBuffer[dwYpos].lpLine[i]=lpBuffer[dwYpos].lpLine[i+1];
|
||||
|
||||
lpBuffer[dwYpos].dwWidth--;
|
||||
RenderLine(hDC, dwYpos);
|
||||
CalcCaretPos(hDC,dwXpos,dwYpos);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Erase a newline. To do this we join two lines */
|
||||
LPSTR src, dest;
|
||||
DWORD len, oldlen;
|
||||
|
||||
if(dwYpos==0)
|
||||
return FALSE;
|
||||
|
||||
oldlen = lpBuffer[dwYpos-1].dwWidth;
|
||||
if(lpBuffer[dwYpos-1].lpLine&&lpBuffer[dwYpos].lpLine)
|
||||
{
|
||||
/* concatonate to the end of the line above line */
|
||||
src = &lpBuffer[dwYpos].lpLine[0];
|
||||
dest = &lpBuffer[dwYpos-1].lpLine[lpBuffer[dwYpos-1].dwWidth];
|
||||
len = lpBuffer[dwYpos].dwWidth;
|
||||
|
||||
/* check the length of the new line */
|
||||
if(!ValidateLine(dwYpos-1,lpBuffer[dwYpos-1].dwWidth + len))
|
||||
return FALSE;
|
||||
|
||||
memcpy(dest,src,len);
|
||||
lpBuffer[dwYpos-1].dwWidth+=len;
|
||||
GlobalFree( (HGLOBAL)lpBuffer[dwYpos].lpLine);
|
||||
}
|
||||
else if (!lpBuffer[dwYpos-1].lpLine)
|
||||
{
|
||||
lpBuffer[dwYpos-1]=lpBuffer[dwYpos];
|
||||
} /* else both are NULL */
|
||||
RenderLine(hDC,dwYpos-1);
|
||||
|
||||
/* don't zero - it's going to get trashed anyhow */
|
||||
|
||||
/* shuffle up all the lines below this one */
|
||||
for(i=dwYpos; i<(dwLines-1); i++)
|
||||
{
|
||||
lpBuffer[i] = lpBuffer[i+1];
|
||||
RenderLine(hDC,i);
|
||||
}
|
||||
|
||||
/* clear the last line */
|
||||
ZeroMemory(&lpBuffer[dwLines-1],sizeof (LINE));
|
||||
RenderLine(hDC,dwLines-1);
|
||||
dwLines--;
|
||||
|
||||
/* adjust the cursor position to joining point */
|
||||
dwYpos--;
|
||||
dwXpos = oldlen;
|
||||
|
||||
CalcCaretPos(hDC,dwXpos,dwYpos);
|
||||
SetScrollRange(Globals.hMainWnd, SB_VERT, 0, dwLines, TRUE);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* as used by File->New */
|
||||
void TrashBuffer(void)
|
||||
{
|
||||
DWORD i;
|
||||
|
||||
/* variables belonging to the buffer */
|
||||
if(lpBuffer)
|
||||
{
|
||||
for(i=0; i<dwLines; i++)
|
||||
{
|
||||
if(lpBuffer[i].lpLine)
|
||||
GlobalFree ((HGLOBAL)lpBuffer[i].lpLine);
|
||||
ZeroMemory(&lpBuffer[i],sizeof (LINE));
|
||||
}
|
||||
GlobalFree((HGLOBAL)lpBuffer);
|
||||
lpBuffer=NULL;
|
||||
}
|
||||
dwLines = 0;
|
||||
dwMaxLines = 0;
|
||||
|
||||
/* variables belonging to the view */
|
||||
dwXpos = 0;
|
||||
dwYpos = 0;
|
||||
dwVOffset = 0 ;
|
||||
/* FIXME: don't use globals */
|
||||
SetScrollPos(Globals.hMainWnd, SB_VERT, dwVOffset, FALSE);
|
||||
SetScrollRange(Globals.hMainWnd, SB_VERT, 0, dwLines, TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Add a line to the buffer
|
||||
*/
|
||||
/* FIXME: this breaks lines longer than BUFFERCHUNKSIZE */
|
||||
DWORD CreateLine(
|
||||
LPSTR buffer, /* pointer to buffer with file data */
|
||||
DWORD size, /* number of bytes available in buffer */
|
||||
BOOL nomore)
|
||||
{
|
||||
DWORD i;
|
||||
|
||||
if(size == 0)
|
||||
return 0;
|
||||
|
||||
for(i=0; i<size; i++)
|
||||
{
|
||||
if(buffer[i]==0x0a)
|
||||
{
|
||||
if(ValidateLine(dwLines,i))
|
||||
{
|
||||
memcpy(&lpBuffer[dwLines].lpLine[0],&buffer[0],i);
|
||||
lpBuffer[dwLines].dwWidth = i;
|
||||
dwLines++;
|
||||
}
|
||||
return i+1;
|
||||
}
|
||||
}
|
||||
|
||||
/* make a line of the rest */
|
||||
if( (i == BUFFERCHUNKSIZE) || nomore )
|
||||
{
|
||||
if(ValidateLine(dwLines,i))
|
||||
{
|
||||
memcpy(&lpBuffer[dwLines].lpLine[0],&buffer[0],i);
|
||||
lpBuffer[dwLines].dwWidth = i;
|
||||
dwLines++;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* This is probably overcomplicated by lpBuffer data structure...
|
||||
* Read blocks from the file, then add each line from the
|
||||
* block to the buffer until there is none left. If all
|
||||
* a slab isn't used, try load some more data from the file.
|
||||
*/
|
||||
void LoadBufferFromFile(LPCSTR szFileName)
|
||||
{
|
||||
HANDLE hFile;
|
||||
CHAR *pTemp;
|
||||
DWORD size,i,len,bytes_left,bytes_read;
|
||||
|
||||
hFile = CreateFile(szFileName, GENERIC_READ, FILE_SHARE_READ, NULL,
|
||||
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if(hFile == INVALID_HANDLE_VALUE)
|
||||
return;
|
||||
size = BUFFERCHUNKSIZE;
|
||||
pTemp = (LPSTR) GlobalAlloc(GMEM_FIXED, size);
|
||||
if(!pTemp)
|
||||
return;
|
||||
bytes_read = 1; /* anything non-zero */
|
||||
bytes_left = 0;
|
||||
while(bytes_read)
|
||||
{
|
||||
if(!ReadFile(hFile,
|
||||
&pTemp[bytes_left],
|
||||
size-bytes_left,
|
||||
&bytes_read, NULL))
|
||||
break;
|
||||
bytes_left+=bytes_read;
|
||||
|
||||
/* add strings to buffer */
|
||||
for(i = 0;
|
||||
(i<size) &&
|
||||
(len = CreateLine(&pTemp[i], bytes_left, !bytes_read));
|
||||
i+= len,bytes_left-=len );
|
||||
|
||||
/* move leftover to front of buffer */
|
||||
if(bytes_left)
|
||||
memmove(&pTemp[0],&pTemp[i], bytes_left);
|
||||
}
|
||||
CloseHandle(hFile);
|
||||
MessageBox(Globals.hMainWnd, "Finished", "Info", MB_OK);
|
||||
}
|
||||
|
||||
BOOL DoInput(HDC hDC, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(wParam)
|
||||
{
|
||||
case 0x08:
|
||||
return DoBackSpace(hDC);
|
||||
case 0x0d:
|
||||
return DoNewLine(hDC);
|
||||
default:
|
||||
return AddCharToBuffer(hDC,wParam);
|
||||
}
|
||||
}
|
||||
|
||||
BOOL GotoHome(HWND hWnd)
|
||||
{
|
||||
dwXpos = 0;
|
||||
dwYpos = 0;
|
||||
dwVOffset = 0;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL GotoEndOfLine(HWND hWnd)
|
||||
{
|
||||
dwXpos = lpBuffer[dwYpos].dwWidth;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL GotoDown(HWND hWnd)
|
||||
{
|
||||
if((dwYpos+1) >= dwLines)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
dwYpos++;
|
||||
if (dwXpos>lpBuffer[dwYpos].dwWidth)
|
||||
GotoEndOfLine(hWnd);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL GotoUp(HWND hWnd)
|
||||
{
|
||||
if(dwYpos==0)
|
||||
return FALSE;
|
||||
dwYpos--;
|
||||
if (dwXpos>lpBuffer[dwYpos].dwWidth)
|
||||
GotoEndOfLine(hWnd);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL GotoLeft(HWND hWnd)
|
||||
{
|
||||
if(dwXpos > 0)
|
||||
{
|
||||
dwXpos--;
|
||||
return TRUE;
|
||||
}
|
||||
if(GotoUp(hWnd))
|
||||
return GotoEndOfLine(hWnd);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL GotoRight(HWND hWnd)
|
||||
{
|
||||
if(dwXpos<lpBuffer[dwYpos].dwWidth)
|
||||
{
|
||||
dwXpos++;
|
||||
return TRUE;
|
||||
}
|
||||
if(!GotoDown(hWnd))
|
||||
return FALSE;
|
||||
dwXpos=0;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* check the caret is still on the screen */
|
||||
BOOL ScrollABit(HWND hWnd)
|
||||
{
|
||||
if(dwYpos<dwVOffset)
|
||||
{
|
||||
dwVOffset = dwYpos;
|
||||
return TRUE;
|
||||
}
|
||||
if(dwYpos>(dwVOffset+GetLinesPerPage(hWnd)))
|
||||
{
|
||||
dwVOffset = dwYpos - GetLinesPerPage(hWnd) + 1;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* FIXME: move the window around so we can still see the caret */
|
||||
VOID DoEdit(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HDC hDC;
|
||||
|
||||
if(lpBuffer==NULL)
|
||||
return;
|
||||
switch(wParam)
|
||||
{
|
||||
case VK_HOME: GotoHome(hWnd);
|
||||
break;
|
||||
|
||||
case VK_END: GotoEndOfLine(hWnd);
|
||||
break;
|
||||
|
||||
case VK_LEFT: GotoLeft(hWnd);
|
||||
break;
|
||||
|
||||
case VK_RIGHT: GotoRight(hWnd);
|
||||
break;
|
||||
|
||||
case VK_DOWN: GotoDown(hWnd);
|
||||
break;
|
||||
|
||||
case VK_UP: GotoUp(hWnd);
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
hDC = GetDC(hWnd);
|
||||
if(hDC)
|
||||
{
|
||||
CalcCaretPos(hDC, dwXpos, dwYpos);
|
||||
ReleaseDC(hWnd,hDC);
|
||||
}
|
||||
if(ScrollABit(hWnd))
|
||||
InvalidateRect(hWnd, NULL, FALSE);
|
||||
}
|
||||
|
||||
void ButtonDownToCaretPos(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
DWORD x, y, caretx, carety;
|
||||
BOOL refine_guess = TRUE;
|
||||
HDC hDC;
|
||||
|
||||
x = LOWORD(lParam);
|
||||
y = HIWORD(lParam);
|
||||
|
||||
caretx = x/tm.tmAveCharWidth; /* guess */
|
||||
carety = dwVOffset + y/tm.tmHeight;
|
||||
|
||||
hDC = GetDC(hWnd);
|
||||
|
||||
if(lpBuffer == NULL)
|
||||
{
|
||||
caretx = 0;
|
||||
carety = 0;
|
||||
refine_guess = FALSE;
|
||||
}
|
||||
|
||||
/* if the cursor is past the bottom, put it after the last char */
|
||||
if(refine_guess && (carety>=dwLines) )
|
||||
{
|
||||
carety=dwLines-1;
|
||||
caretx=lpBuffer[carety].dwWidth;
|
||||
refine_guess = FALSE;
|
||||
}
|
||||
|
||||
/* cursor past end of line? */
|
||||
if(refine_guess && (x>CalcStringWidth(hDC,lpBuffer[carety].dwWidth,carety)))
|
||||
{
|
||||
caretx = lpBuffer[carety].dwWidth;
|
||||
refine_guess = FALSE;
|
||||
}
|
||||
|
||||
/* FIXME: doesn't round properly */
|
||||
if(refine_guess)
|
||||
{
|
||||
if(CalcStringWidth(hDC,caretx,carety)<x)
|
||||
{
|
||||
while( (caretx<lpBuffer[carety].dwWidth) &&
|
||||
(CalcStringWidth(hDC,caretx+1,carety)<x))
|
||||
caretx++;
|
||||
}
|
||||
else
|
||||
{
|
||||
while((caretx>0)&&(CalcStringWidth(hDC,caretx-1,carety)>x))
|
||||
caretx--;
|
||||
}
|
||||
}
|
||||
|
||||
/* set the caret's position */
|
||||
dwXpos = caretx;
|
||||
dwYpos = carety;
|
||||
CalcCaretPos(hDC, caretx, carety);
|
||||
ReleaseDC(hWnd,hDC);
|
||||
}
|
||||
|
||||
void DoScroll(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
DWORD dy = GetLinesPerPage(hWnd);
|
||||
|
||||
switch(wParam) /* vscroll code */
|
||||
{
|
||||
case SB_LINEUP:
|
||||
if(dwVOffset)
|
||||
dwVOffset--;
|
||||
break;
|
||||
case SB_LINEDOWN:
|
||||
if(dwVOffset<dwLines)
|
||||
dwVOffset++;
|
||||
break;
|
||||
case SB_PAGEUP:
|
||||
if( (dy+dwVOffset) > dwLines)
|
||||
dwVOffset = dwLines - 1;
|
||||
break;
|
||||
case SB_PAGEDOWN:
|
||||
if( dy > dwVOffset)
|
||||
dwVOffset=0;
|
||||
break;
|
||||
}
|
||||
/* position scroll */
|
||||
SetScrollPos(hWnd, SB_VERT, dwVOffset, TRUE);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* NOTEPAD_MenuCommand
|
||||
*
|
||||
* All handling of main menu events
|
||||
*/
|
||||
|
||||
int NOTEPAD_MenuCommand (WPARAM wParam)
|
||||
{
|
||||
switch (wParam) {
|
||||
case NP_FILE_NEW: DIALOG_FileNew(); break;
|
||||
case NP_FILE_OPEN: DIALOG_FileOpen(); break;
|
||||
case NP_FILE_SAVE: DIALOG_FileSave(); break;
|
||||
case NP_FILE_SAVEAS: DIALOG_FileSaveAs(); break;
|
||||
case NP_FILE_PRINT: DIALOG_FilePrint(); break;
|
||||
case NP_FILE_PAGESETUP: DIALOG_FilePageSetup(); break;
|
||||
case NP_FILE_PRINTSETUP: DIALOG_FilePrinterSetup();break;
|
||||
case NP_FILE_EXIT: DIALOG_FileExit(); break;
|
||||
|
||||
case NP_EDIT_UNDO: DIALOG_EditUndo(); break;
|
||||
case NP_EDIT_CUT: DIALOG_EditCut(); break;
|
||||
case NP_EDIT_COPY: DIALOG_EditCopy(); break;
|
||||
case NP_EDIT_PASTE: DIALOG_EditPaste(); break;
|
||||
case NP_EDIT_DELETE: DIALOG_EditDelete(); break;
|
||||
case NP_EDIT_SELECTALL: DIALOG_EditSelectAll(); break;
|
||||
case NP_EDIT_TIMEDATE: DIALOG_EditTimeDate();break;
|
||||
case NP_EDIT_WRAP: DIALOG_EditWrap(); break;
|
||||
|
||||
case NP_SEARCH_SEARCH: DIALOG_Search(); break;
|
||||
case NP_SEARCH_NEXT: DIALOG_SearchNext(); break;
|
||||
|
||||
case NP_HELP_CONTENTS: DIALOG_HelpContents(); break;
|
||||
case NP_HELP_SEARCH: DIALOG_HelpSearch(); break;
|
||||
case NP_HELP_ON_HELP: DIALOG_HelpHelp(); break;
|
||||
case NP_HELP_LICENSE: DIALOG_HelpLicense(); break;
|
||||
case NP_HELP_NO_WARRANTY: DIALOG_HelpNoWarranty(); break;
|
||||
case NP_HELP_ABOUT_WINE: DIALOG_HelpAboutWine(); break;
|
||||
|
||||
/* Handle languages */
|
||||
default:
|
||||
LANGUAGE_DefaultHandle(wParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* NOTEPAD_WndProc
|
||||
*/
|
||||
|
||||
LRESULT WINAPI NOTEPAD_WndProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
HDC hContext;
|
||||
HANDLE hDrop; /* drag & drop */
|
||||
CHAR szFileName[MAX_STRING_LEN];
|
||||
RECT Windowsize;
|
||||
|
||||
lstrcpy(szFileName, "");
|
||||
|
||||
switch (msg) {
|
||||
|
||||
case WM_CREATE:
|
||||
GetClientRect(hWnd, &rectClient);
|
||||
InitFontInfo(hWnd);
|
||||
break;
|
||||
|
||||
case WM_SETFOCUS:
|
||||
CreateCaret(Globals.hMainWnd, 0, 1, tm.tmHeight);
|
||||
SetCaretPos(dwCaretXpos, dwCaretYpos);
|
||||
ShowCaret(Globals.hMainWnd);
|
||||
break;
|
||||
|
||||
case WM_KILLFOCUS:
|
||||
DestroyCaret();
|
||||
break;
|
||||
|
||||
case WM_PAINT:
|
||||
GetClientRect(hWnd, &rectClient);
|
||||
hContext = BeginPaint(hWnd, &ps);
|
||||
RenderWindow(hContext);
|
||||
EndPaint(hWnd, &ps);
|
||||
break;
|
||||
|
||||
case WM_KEYDOWN:
|
||||
DoEdit(hWnd, wParam, lParam);
|
||||
break;
|
||||
|
||||
case WM_CHAR:
|
||||
GetClientRect(hWnd, &rectClient);
|
||||
HideCaret(hWnd);
|
||||
hContext = GetDC(hWnd);
|
||||
DoInput(hContext,wParam,lParam);
|
||||
ReleaseDC(hWnd,hContext);
|
||||
ShowCaret(hWnd);
|
||||
break;
|
||||
|
||||
case WM_LBUTTONDOWN:
|
||||
/* figure out where the mouse was clicked */
|
||||
ButtonDownToCaretPos(hWnd, wParam, lParam);
|
||||
break;
|
||||
|
||||
case WM_VSCROLL:
|
||||
DoScroll(hWnd, wParam, lParam);
|
||||
InvalidateRect(hWnd, NULL, FALSE); /* force a redraw */
|
||||
break;
|
||||
|
||||
case WM_COMMAND:
|
||||
/* FIXME: this is a bit messy */
|
||||
NOTEPAD_MenuCommand(wParam);
|
||||
InvalidateRect(hWnd, NULL, FALSE); /* force a redraw */
|
||||
hContext = GetDC(hWnd);
|
||||
CalcCaretPos(hContext,dwXpos,dwYpos);
|
||||
ReleaseDC(hWnd,hContext);
|
||||
break;
|
||||
|
||||
case WM_DESTROYCLIPBOARD:
|
||||
MessageBox(Globals.hMainWnd, "Empty clipboard", "Debug", MB_ICONEXCLAMATION);
|
||||
break;
|
||||
|
||||
case WM_CLOSE:
|
||||
if (DoCloseFile()) {
|
||||
PostQuitMessage(0);
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage (0);
|
||||
break;
|
||||
|
||||
case WM_SIZE:
|
||||
GetClientRect(Globals.hMainWnd, &Windowsize);
|
||||
break;
|
||||
|
||||
case WM_DROPFILES:
|
||||
/* User has dropped a file into main window */
|
||||
hDrop = (HANDLE) wParam;
|
||||
DragQueryFile(hDrop, 0, (CHAR *) &szFileName, sizeof(szFileName));
|
||||
DragFinish(hDrop);
|
||||
DoOpenFile(szFileName);
|
||||
break;
|
||||
|
||||
default:
|
||||
return DefWindowProc (hWnd, msg, wParam, lParam);
|
||||
}
|
||||
return 0l;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* WinMain
|
||||
*/
|
||||
|
||||
int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show)
|
||||
{
|
||||
MSG msg;
|
||||
WNDCLASS class;
|
||||
char className[] = "NPClass"; /* To make sure className >= 0x10000 */
|
||||
char winName[] = "Notepad";
|
||||
|
||||
/* setup buffer */
|
||||
InitBuffer();
|
||||
|
||||
/* Setup Globals */
|
||||
|
||||
Globals.lpszIniFile = "notepad.ini";
|
||||
Globals.lpszIcoFile = "notepad.ico";
|
||||
|
||||
Globals.hInstance = hInstance;
|
||||
|
||||
#ifndef LCC
|
||||
Globals.hMainIcon = ExtractIcon(Globals.hInstance,
|
||||
Globals.lpszIcoFile, 0);
|
||||
#endif
|
||||
/* icon breakage in ros
|
||||
if (!Globals.hMainIcon) {
|
||||
Globals.hMainIcon = LoadIcon(0, MAKEINTRESOURCE(DEFAULTICON));
|
||||
}
|
||||
*/
|
||||
|
||||
lstrcpy(Globals.szFindText, "");
|
||||
lstrcpy(Globals.szFileName, "");
|
||||
lstrcpy(Globals.szMarginTop, "25 mm");
|
||||
lstrcpy(Globals.szMarginBottom, "25 mm");
|
||||
lstrcpy(Globals.szMarginLeft, "20 mm");
|
||||
lstrcpy(Globals.szMarginRight, "20 mm");
|
||||
lstrcpy(Globals.szHeader, "&n");
|
||||
lstrcpy(Globals.szFooter, "Page &s");
|
||||
lstrcpy(Globals.Buffer, "Hello World");
|
||||
|
||||
if (!prev){
|
||||
class.style = CS_HREDRAW | CS_VREDRAW;
|
||||
class.lpfnWndProc = NOTEPAD_WndProc;
|
||||
class.cbClsExtra = 0;
|
||||
class.cbWndExtra = 0;
|
||||
class.hInstance = Globals.hInstance;
|
||||
class.hIcon = LoadIcon (0, IDI_APPLICATION);
|
||||
class.hCursor = LoadCursor (0, IDC_ARROW);
|
||||
class.hbrBackground = GetStockObject (WHITE_BRUSH);
|
||||
class.lpszMenuName = 0;
|
||||
class.lpszClassName = className;
|
||||
}
|
||||
|
||||
if (!RegisterClass (&class)) return FALSE;
|
||||
|
||||
/* Setup windows */
|
||||
|
||||
|
||||
Globals.hMainWnd = CreateWindow (className, winName,
|
||||
WS_OVERLAPPEDWINDOW + WS_HSCROLL + WS_VSCROLL,
|
||||
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, 0,
|
||||
LoadMenu(Globals.hInstance, STRING_MENU_Xx),
|
||||
Globals.hInstance, 0);
|
||||
|
||||
Globals.hFindReplaceDlg = 0;
|
||||
|
||||
LANGUAGE_SelectByNumber(0);
|
||||
|
||||
SetMenu(Globals.hMainWnd, Globals.hMainMenu);
|
||||
|
||||
ShowWindow (Globals.hMainWnd, show);
|
||||
UpdateWindow (Globals.hMainWnd);
|
||||
|
||||
/* Set up dialogs */
|
||||
|
||||
/* Identify Messages originating from FindReplace */
|
||||
|
||||
Globals.nCommdlgFindReplaceMsg = RegisterWindowMessage("commdlg_FindReplace");
|
||||
if (Globals.nCommdlgFindReplaceMsg==0) {
|
||||
MessageBox(Globals.hMainWnd, "Could not register commdlg_FindReplace window message",
|
||||
"Error", MB_ICONEXCLAMATION);
|
||||
}
|
||||
|
||||
/* now handle command line */
|
||||
|
||||
while (*cmdline && (*cmdline == ' ' || *cmdline == '-'))
|
||||
|
||||
{
|
||||
CHAR option;
|
||||
/* LPCSTR topic_id; */
|
||||
|
||||
if (*cmdline++ == ' ') continue;
|
||||
|
||||
option = *cmdline;
|
||||
if (option) cmdline++;
|
||||
while (*cmdline && *cmdline == ' ') cmdline++;
|
||||
|
||||
switch(option)
|
||||
{
|
||||
case 'p':
|
||||
case 'P': printf("Print file: ");
|
||||
/* Not yet able to print a file */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Set up Drag&Drop */
|
||||
|
||||
DragAcceptFiles(Globals.hMainWnd, TRUE);
|
||||
|
||||
/* now enter mesage loop */
|
||||
|
||||
while (GetMessage (&msg, 0, 0, 0)) {
|
||||
|
||||
/* Message belongs to FindReplace dialog */
|
||||
/* We just let IsDialogMessage handle it */
|
||||
/* BTW - DnD is broken under ROS */
|
||||
|
||||
/* if (IsDialogMessage(Globals.hFindReplaceDlg, &msg)!=0) {
|
||||
}
|
||||
else */
|
||||
{
|
||||
/* Message belongs to the Notepad Main Window */
|
||||
TranslateMessage (&msg);
|
||||
DispatchMessage (&msg);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
|
@ -1,148 +0,0 @@
|
|||
/*
|
||||
* Notepad (notepad.h)
|
||||
*
|
||||
* Copyright 1997,98 Marcel Baur <mbaur@g26.ethz.ch>
|
||||
* To be distributed under the Wine License
|
||||
*/
|
||||
|
||||
#define MAX_STRING_LEN 255
|
||||
#define MAX_PATHNAME_LEN 1024
|
||||
#define MAX_LANGUAGE_NUMBER (NP_LAST_LANGUAGE - NP_FIRST_LANGUAGE)
|
||||
|
||||
#define HELPFILE "notepad.hlp"
|
||||
#define LOGPREFIX ".LOG"
|
||||
#define DEFAULTICON OIC_WINLOGO
|
||||
|
||||
/* hide the following from winerc */
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
typedef struct
|
||||
{
|
||||
HANDLE hInstance;
|
||||
HWND hMainWnd;
|
||||
HWND hFindReplaceDlg;
|
||||
HICON hMainIcon;
|
||||
HICON hDefaultIcon;
|
||||
HMENU hMainMenu;
|
||||
HMENU hFileMenu;
|
||||
HMENU hEditMenu;
|
||||
HMENU hSearchMenu;
|
||||
HMENU hLanguageMenu;
|
||||
HMENU hHelpMenu;
|
||||
LPCSTR lpszIniFile;
|
||||
LPCSTR lpszIcoFile;
|
||||
UINT wStringTableOffset;
|
||||
BOOL bWrapLongLines;
|
||||
CHAR szFindText[MAX_PATHNAME_LEN];
|
||||
CHAR szReplaceText[MAX_PATHNAME_LEN];
|
||||
CHAR szFileName[MAX_PATHNAME_LEN];
|
||||
CHAR szMarginTop[MAX_PATHNAME_LEN];
|
||||
CHAR szMarginBottom[MAX_PATHNAME_LEN];
|
||||
CHAR szMarginLeft[MAX_PATHNAME_LEN];
|
||||
CHAR szMarginRight[MAX_PATHNAME_LEN];
|
||||
CHAR szHeader[MAX_PATHNAME_LEN];
|
||||
CHAR szFooter[MAX_PATHNAME_LEN];
|
||||
|
||||
FINDREPLACE find;
|
||||
WORD nCommdlgFindReplaceMsg;
|
||||
CHAR Buffer[12000];
|
||||
} NOTEPAD_GLOBALS;
|
||||
|
||||
extern NOTEPAD_GLOBALS Globals;
|
||||
|
||||
/* function prototypes */
|
||||
|
||||
void TrashBuffer(void);
|
||||
void LoadBufferFromFile(LPCSTR lpFileName);
|
||||
|
||||
/* class names */
|
||||
|
||||
/* Resource names */
|
||||
extern CHAR STRING_MENU_Xx[];
|
||||
extern CHAR STRING_PAGESETUP_Xx[];
|
||||
|
||||
#define STRINGID(id) (0x##id + Globals.wStringTableOffset)
|
||||
|
||||
#else /* RC_INVOKED */
|
||||
|
||||
#define STRINGID(id) id
|
||||
|
||||
#endif
|
||||
|
||||
/* string table index */
|
||||
#define IDS_LANGUAGE_ID STRINGID(00)
|
||||
#define IDS_LANGUAGE_MENU_ITEM STRINGID(01)
|
||||
#define IDS_NOTEPAD STRINGID(02)
|
||||
#define IDS_TEXT_FILES_TXT STRINGID(03)
|
||||
#define IDS_ALL_FILES STRINGID(04)
|
||||
#define IDS_ERROR STRINGID(05)
|
||||
#define IDS_WARNING STRINGID(06)
|
||||
#define IDS_INFO STRINGID(07)
|
||||
#define IDS_TOOLARGE STRINGID(08)
|
||||
#define IDS_NOTEXT STRINGID(09)
|
||||
#define IDS_NOTSAVED STRINGID(0A)
|
||||
#define IDS_NOTFOUND STRINGID(0B)
|
||||
#define IDS_OUT_OF_MEMORY STRINGID(0C)
|
||||
#define IDS_UNTITLED STRINGID(0D)
|
||||
|
||||
#define IDS_PAGESETUP_HEADERVALUE STRINGID(0E)
|
||||
#define IDS_PAGESETUP_FOOTERVALUE STRINGID(0F)
|
||||
#define IDS_PAGESETUP_LEFTVALUE STRINGID(10)
|
||||
#define IDS_PAGESETUP_RIGHTVALUE STRINGID(11)
|
||||
#define IDS_PAGESETUP_TOPVALUE STRINGID(12)
|
||||
#define IDS_PAGESETUP_BOTTOMVALUE STRINGID(13)
|
||||
|
||||
/* main menu */
|
||||
|
||||
#define NP_FILE_NEW 100
|
||||
#define NP_FILE_OPEN 101
|
||||
#define NP_FILE_SAVE 102
|
||||
#define NP_FILE_SAVEAS 103
|
||||
#define NP_FILE_PRINT 104
|
||||
#define NP_FILE_PAGESETUP 105
|
||||
#define NP_FILE_PRINTSETUP 106
|
||||
#define NP_FILE_EXIT 107
|
||||
|
||||
#define NP_EDIT_UNDO 200
|
||||
#define NP_EDIT_CUT 201
|
||||
#define NP_EDIT_COPY 202
|
||||
#define NP_EDIT_PASTE 203
|
||||
#define NP_EDIT_DELETE 204
|
||||
#define NP_EDIT_SELECTALL 205
|
||||
#define NP_EDIT_TIMEDATE 206
|
||||
#define NP_EDIT_WRAP 207
|
||||
|
||||
#define NP_SEARCH_SEARCH 300
|
||||
#define NP_SEARCH_NEXT 301
|
||||
|
||||
#define NP_FIRST_LANGUAGE 400
|
||||
#define NP_LAST_LANGUAGE 499
|
||||
|
||||
#define NP_HELP_CONTENTS 500
|
||||
#define NP_HELP_SEARCH 501
|
||||
#define NP_HELP_ON_HELP 502
|
||||
#define NP_HELP_LICENSE 503
|
||||
#define NP_HELP_NO_WARRANTY 504
|
||||
#define NP_HELP_ABOUT_WINE 505
|
||||
|
||||
|
||||
/* Dialog `Page Setup' */
|
||||
|
||||
#define NP_PAGESETUP_HEAD 1000
|
||||
#define NP_PAGESETUP_HEAD_TXT 1001
|
||||
#define NP_PAGESETUP_TAIL 1002
|
||||
#define NP_PAGESETUP_TAIL_TXT 1003
|
||||
#define NP_PAGESETUP_LEFT 1004
|
||||
#define NP_PAGESETUP_LEFT_TXT 1005
|
||||
#define NP_PAGESETUP_RIGHT 1006
|
||||
#define NP_PAGESETUP_RIGHT_TXT 1007
|
||||
#define NP_PAGESETUP_TOP 1008
|
||||
#define NP_PAGESETUP_TOP_TXT 1009
|
||||
#define NP_PAGESETUP_BOTTOM 1010
|
||||
#define NP_PAGESETUP_BOTTOM_TXT 1011
|
||||
#define NP_HELP 1012
|
||||
#define NP_PAGESETUP_MARGIN 1013
|
||||
|
||||
/* Local Variables: */
|
||||
/* c-file-style: "GNU" */
|
||||
/* End: */
|
|
@ -1,188 +0,0 @@
|
|||
/*
|
||||
* Notepad (notepad.rc)
|
||||
*
|
||||
* Copyright 1997,98 Marcel Baur <mbaur@g26.ethz.ch>
|
||||
* To be distributed under the Wine License
|
||||
*/
|
||||
|
||||
/* Main Menu */
|
||||
|
||||
CONCAT(MENU_, LANGUAGE_ID) MENU
|
||||
{
|
||||
POPUP MENU_FILE {
|
||||
MENUITEM MENU_FILE_NEW, NP_FILE_NEW
|
||||
MENUITEM MENU_FILE_OPEN, NP_FILE_OPEN
|
||||
MENUITEM MENU_FILE_SAVE, NP_FILE_SAVE
|
||||
MENUITEM MENU_FILE_SAVEAS, NP_FILE_SAVEAS
|
||||
MENUITEM MENU_FILE_PRINT, NP_FILE_PRINT
|
||||
MENUITEM MENU_FILE_PAGESETUP, NP_FILE_PAGESETUP
|
||||
MENUITEM MENU_FILE_PRINTSETUP, NP_FILE_PRINTSETUP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM MENU_FILE_EXIT, NP_FILE_EXIT
|
||||
}
|
||||
POPUP MENU_EDIT {
|
||||
MENUITEM MENU_EDIT_UNDO, NP_EDIT_UNDO
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM MENU_EDIT_CUT, NP_EDIT_CUT
|
||||
MENUITEM MENU_EDIT_COPY, NP_EDIT_COPY
|
||||
MENUITEM MENU_EDIT_PASTE, NP_EDIT_PASTE
|
||||
MENUITEM MENU_EDIT_DELETE, NP_EDIT_DELETE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM MENU_EDIT_SELECTALL, NP_EDIT_SELECTALL
|
||||
MENUITEM MENU_EDIT_TIMEDATE, NP_EDIT_TIMEDATE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM MENU_EDIT_WRAP, NP_EDIT_WRAP
|
||||
}
|
||||
POPUP MENU_SEARCH {
|
||||
MENUITEM MENU_SEARCH_SEARCH, NP_SEARCH_SEARCH
|
||||
MENUITEM MENU_SEARCH_NEXT, NP_SEARCH_NEXT
|
||||
}
|
||||
POPUP MENU_LANGUAGE {
|
||||
/* Dummy item, will be removed */
|
||||
MENUITEM SEPARATOR
|
||||
}
|
||||
POPUP MENU_HELP {
|
||||
MENUITEM MENU_HELP_CONTENTS, NP_HELP_CONTENTS
|
||||
MENUITEM MENU_HELP_SEARCH, NP_HELP_SEARCH
|
||||
MENUITEM MENU_HELP_HELP_ON_HELP, NP_HELP_ON_HELP
|
||||
MENUITEM SEPARATOR
|
||||
|
||||
POPUP MENU_INFO {
|
||||
MENUITEM MENU_INFO_LICENSE, NP_HELP_LICENSE
|
||||
MENUITEM MENU_INFO_NO_WARRANTY, NP_HELP_NO_WARRANTY
|
||||
MENUITEM MENU_INFO_ABOUT_WINE, NP_HELP_ABOUT_WINE
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Dialog `Page setup' */
|
||||
|
||||
CONCAT(DIALOG_PAGESETUP_, LANGUAGE_ID) DIALOG 0, 0, 225, 95
|
||||
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
|
||||
FONT 8, "Helv"
|
||||
CAPTION DIALOG_PAGESETUP_CAPTION
|
||||
{
|
||||
LTEXT DIALOG_PAGESETUP_HEAD, NP_PAGESETUP_HEAD_TXT, 10, 07, 40, 15
|
||||
EDITTEXT NP_PAGESETUP_HEAD, 60, 05,110, 12, WS_BORDER | WS_TABSTOP
|
||||
LTEXT DIALOG_PAGESETUP_TAIL, NP_PAGESETUP_TAIL_TXT, 10, 24, 40, 15
|
||||
EDITTEXT NP_PAGESETUP_TAIL, 60, 22,110, 12, WS_BORDER | WS_TABSTOP
|
||||
|
||||
GROUPBOX DIALOG_PAGESETUP_MARGIN, NP_PAGESETUP_MARGIN, 10, 43,160, 45
|
||||
LTEXT DIALOG_PAGESETUP_LEFT, NP_PAGESETUP_LEFT_TXT, 20, 55, 30, 10, WS_CHILD
|
||||
EDITTEXT /*STRING_PAGESETUP_LEFTVALUE,*/ NP_PAGESETUP_LEFT, 50, 55, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP
|
||||
LTEXT DIALOG_PAGESETUP_TOP, NP_PAGESETUP_TOP_TXT, 20, 73, 30, 10, WS_CHILD
|
||||
EDITTEXT /*STRING_PAGESETUP_TOPVALUE,*/ NP_PAGESETUP_TOP, 50, 73, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP
|
||||
LTEXT DIALOG_PAGESETUP_RIGHT, NP_PAGESETUP_RIGHT_TXT, 100, 55, 30, 10, WS_CHILD
|
||||
EDITTEXT /*STRING_PAGESETUP_RIGHTVALUE,*/ NP_PAGESETUP_RIGHT, 130, 55, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP
|
||||
LTEXT DIALOG_PAGESETUP_BOTTOM, NP_PAGESETUP_BOTTOM_TXT,100, 73, 30, 10, WS_CHILD
|
||||
EDITTEXT /*STRING_PAGESETUP_BOTTOMVALUE,*/ NP_PAGESETUP_BOTTOM, 130, 73, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP
|
||||
|
||||
|
||||
DEFPUSHBUTTON DIALOG_OK, IDOK, 180, 3, 40, 15, WS_TABSTOP
|
||||
PUSHBUTTON DIALOG_CANCEL, IDCANCEL, 180, 21, 40, 15, WS_TABSTOP
|
||||
PUSHBUTTON DIALOG_HELP, NP_HELP, 180, 39, 40, 15, WS_TABSTOP
|
||||
}
|
||||
|
||||
|
||||
/* Strings */
|
||||
|
||||
#define STRING_LANGUAGE_ID STRINGIFY(LANGUAGE_ID)
|
||||
#define STRING_LANGUAGE_MENU_ITEM LANGUAGE_MENU_ITEM
|
||||
|
||||
STRINGTABLE
|
||||
{
|
||||
ADDSTRING(LANGUAGE_ID)
|
||||
ADDSTRING(LANGUAGE_MENU_ITEM)
|
||||
ADDSTRING(NOTEPAD)
|
||||
ADDSTRING(TEXT_FILES_TXT)
|
||||
ADDSTRING(ALL_FILES)
|
||||
ADDSTRING(ERROR)
|
||||
ADDSTRING(WARNING)
|
||||
ADDSTRING(INFO)
|
||||
ADDSTRING(TOOLARGE)
|
||||
ADDSTRING(NOTEXT)
|
||||
ADDSTRING(NOTSAVED)
|
||||
ADDSTRING(NOTFOUND)
|
||||
ADDSTRING(OUT_OF_MEMORY)
|
||||
ADDSTRING(UNTITLED)
|
||||
ADDSTRING(PAGESETUP_HEADERVALUE)
|
||||
ADDSTRING(PAGESETUP_FOOTERVALUE)
|
||||
ADDSTRING(PAGESETUP_LEFTVALUE)
|
||||
ADDSTRING(PAGESETUP_RIGHTVALUE)
|
||||
ADDSTRING(PAGESETUP_TOPVALUE)
|
||||
ADDSTRING(PAGESETUP_BOTTOMVALUE)
|
||||
}
|
||||
|
||||
|
||||
/* Undefine all language-specific strings */
|
||||
|
||||
#undef LANGUAGE_ID
|
||||
#undef LANGUAGE_NUMBER
|
||||
#undef LANGUAGE_MENU_ITEM
|
||||
|
||||
#undef MENU_FILE
|
||||
#undef MENU_FILE_NEW
|
||||
#undef MENU_FILE_OPEN
|
||||
#undef MENU_FILE_SAVE
|
||||
#undef MENU_FILE_SAVEAS
|
||||
#undef MENU_FILE_PRINT
|
||||
#undef MENU_FILE_PAGESETUP
|
||||
#undef MENU_FILE_PRINTSETUP
|
||||
#undef MENU_FILE_EXIT
|
||||
#undef MENU_EDIT
|
||||
#undef MENU_EDIT_UNDO
|
||||
#undef MENU_EDIT_CUT
|
||||
#undef MENU_EDIT_COPY
|
||||
#undef MENU_EDIT_PASTE
|
||||
#undef MENU_EDIT_DELETE
|
||||
#undef MENU_EDIT_SELECTALL
|
||||
#undef MENU_EDIT_TIMEDATE
|
||||
#undef MENU_EDIT_WRAP
|
||||
#undef MENU_SEARCH
|
||||
#undef MENU_SEARCH_SEARCH
|
||||
#undef MENU_SEARCH_NEXT
|
||||
#undef MENU_LANGUAGE
|
||||
#undef MENU_HELP
|
||||
#undef MENU_HELP_CONTENTS
|
||||
#undef MENU_HELP_SEARCH
|
||||
#undef MENU_HELP_HELP_ON_HELP
|
||||
#undef MENU_INFO
|
||||
#undef MENU_INFO_LICENSE
|
||||
#undef MENU_INFO_NO_WARRANTY
|
||||
#undef MENU_INFO_ABOUT_WINE
|
||||
|
||||
#undef DIALOG_OK
|
||||
#undef DIALOG_CANCEL
|
||||
#undef DIALOG_BROWSE
|
||||
#undef DIALOG_HELP
|
||||
#undef DIALOG_PAGESETUP_CAPTION
|
||||
#undef DIALOG_PAGESETUP_HEAD
|
||||
#undef DIALOG_PAGESETUP_TAIL
|
||||
#undef DIALOG_PAGESETUP_MARGIN
|
||||
#undef DIALOG_PAGESETUP_LEFT
|
||||
#undef DIALOG_PAGESETUP_RIGHT
|
||||
#undef DIALOG_PAGESETUP_TOP
|
||||
#undef DIALOG_PAGESETUP_BOTTOM
|
||||
|
||||
#undef STRING_LANGUAGE_ID
|
||||
#undef STRING_LANGUAGE_MENU_ITEM
|
||||
#undef STRING_PAGESETUP_HEADERVALUE
|
||||
#undef STRING_PAGESETUP_FOOTERVALUE
|
||||
#undef STRING_PAGESETUP_LEFTVALUE
|
||||
#undef STRING_PAGESETUP_RIGHTVALUE
|
||||
#undef STRING_PAGESETUP_TOPVALUE
|
||||
#undef STRING_PAGESETUP_BOTTOMVALUE
|
||||
#undef STRING_NOTEPAD
|
||||
#undef STRING_ERROR
|
||||
#undef STRING_WARNING
|
||||
#undef STRING_INFO
|
||||
#undef STRING_UNTITLED
|
||||
#undef STRING_ALL_FILES
|
||||
#undef STRING_TEXT_FILES_TXT
|
||||
#undef STRING_TOOLARGE
|
||||
#undef STRING_NOTEXT
|
||||
#undef STRING_NOTSAVED
|
||||
#undef STRING_NOTFOUND
|
||||
#undef STRING_OUT_OF_MEMORY
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
|
||||
/* Missing Functions in ros */
|
||||
#define HFILE_ERROR ((HFILE)-1) /* Should be in winbase.h */
|
||||
#define SP_APPABORT (-2) /* wingdi.h */
|
|
@ -1,27 +0,0 @@
|
|||
/* This works under windows but were not going to worry about icons under ros yet. */
|
||||
/* 500 ICON MOVEABLE PURE LOADONCALL DISCARDABLE "C:/BIN/COMPILER/Icon/Mainicon.ico" */
|
||||
|
||||
#include "windows.h"
|
||||
#include "main.h"
|
||||
|
||||
#define CONCAT(a, b) CONCAT1(a, b)
|
||||
#define CONCAT1(a, b) a##b
|
||||
|
||||
#define ADDSTRING(str) ADDSTRING1(LANGUAGE_NUMBER, IDS_ ## str) STRING_ ## str
|
||||
#define ADDSTRING1(langnum, ids) ADDSTRING2(langnum, ids)
|
||||
#define ADDSTRING2(langnum, ids) 0x ## langnum ## ids
|
||||
|
||||
#define STRINGIFY(str) STRINGIFY1(str)
|
||||
#define STRINGIFY1(str) #str
|
||||
|
||||
#include "Da.rc"
|
||||
#include "De.rc"
|
||||
#include "En.rc"
|
||||
#include "Es.rc"
|
||||
#include "Fi.rc"
|
||||
#include "Fr.rc"
|
||||
#include "Pt.rc"
|
||||
#include "Sk.rc"
|
||||
#include "Sw.rc"
|
||||
#include "Wa.rc"
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
/*
|
||||
* Notepad (search.c)
|
||||
* Copyright (C) 1999 by Marcel Baur
|
||||
* To be distributed under the Wine license
|
||||
*
|
||||
* This file features Heuristic Boyer-Moore Text Search
|
||||
*
|
||||
* Always: - Buf is the Buffer containing the whole text
|
||||
* ======= - SP is the Search Pattern, which has to be found in Buf.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#define CHARSETSIZE 255
|
||||
|
||||
int delta[CHARSETSIZE];
|
||||
|
||||
/* rightmostpos: return rightmost position of ch in szSP (or -1) */
|
||||
int rightmostpos(char ch, LPSTR szSP, int nSPLen) {
|
||||
int i = nSPLen;
|
||||
while ((i>0) & (szSP[i]!=ch)) i--;
|
||||
return(i);
|
||||
}
|
||||
|
||||
/* setup_delta: setup delta1 cache */
|
||||
void setup_delta(LPSTR szSP, int nSPLen) {
|
||||
int i;
|
||||
|
||||
for (i=0; i<CHARSETSIZE; i++) {
|
||||
delta[i] = nSPLen;
|
||||
}
|
||||
|
||||
for (i=0; i<nSPLen; i++) {
|
||||
delta[(int)szSP[i]] = (nSPLen - rightmostpos(szSP[i], szSP, nSPLen));
|
||||
}
|
||||
}
|
||||
|
||||
int bm_search(LPSTR szBuf, int nBufLen, LPSTR szSP, int nSPLen) {
|
||||
int i = nSPLen;
|
||||
int j = nSPLen;
|
||||
|
||||
do {
|
||||
if ((szBuf[i] = szSP[j])) {
|
||||
i--; j--;
|
||||
} else {
|
||||
if ((nSPLen-j+1) > delta[(int)szBuf[i]]) {
|
||||
i+= (nSPLen-j+1);
|
||||
} else {
|
||||
i+= delta[(int)szBuf[i]];
|
||||
}
|
||||
}
|
||||
} while (j>0 && i<=nBufLen);
|
||||
return(i+1);
|
||||
}
|
||||
|
Loading…
Reference in a new issue