summaryrefslogtreecommitdiff
path: root/src/GF/Shell/JGF.hs
diff options
context:
space:
mode:
authorpeb <unknown>2005-02-24 10:46:37 +0000
committerpeb <unknown>2005-02-24 10:46:37 +0000
commitbf436aebaa5b84bbb50e305e8f7dc9ca4ae34299 (patch)
tree346ac1e13a90d7b2c992c69f45b3e19c22f4bfe2 /src/GF/Shell/JGF.hs
parent0137dd5511a83ea4672619ad3dc22fe7c51ab4bf (diff)
"Committed_by_peb"
Diffstat (limited to 'src/GF/Shell/JGF.hs')
-rw-r--r--src/GF/Shell/JGF.hs22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/GF/Shell/JGF.hs b/src/GF/Shell/JGF.hs
index 17bd563e9..9404ababc 100644
--- a/src/GF/Shell/JGF.hs
+++ b/src/GF/Shell/JGF.hs
@@ -1,15 +1,15 @@
----------------------------------------------------------------------
-- |
--- Module : (Module)
--- Maintainer : (Maintainer)
+-- Module : JGF
+-- Maintainer : AR
-- Stability : (stable)
-- Portability : (portable)
--
--- > CVS $Date: 2005/02/18 19:21:20 $
+-- > CVS $Date: 2005/02/24 11:46:37 $
-- > CVS $Author: peb $
--- > CVS $Revision: 1.9 $
+-- > CVS $Revision: 1.10 $
--
--- (Description of the module)
+-- GF editing session controlled by e.g. a Java program. AR 16\/11\/2001
-----------------------------------------------------------------------------
module JGF where
@@ -31,16 +31,16 @@ import UTF8
-- GF editing session controlled by e.g. a Java program. AR 16/11/2001
----- the Boolean is a temporary hack to have two parallel GUIs
+-- | the Boolean is a temporary hack to have two parallel GUIs
sessionLineJ :: Bool -> ShellState -> IO ()
sessionLineJ isNew env = do
putStrLnFlush $ initEditMsgJavaX env
let env' = addGlobalOptions (options [sizeDisplay "short",beSilent]) env
editLoopJnewX isNew env' (initSState)
--- this is the real version, with XML
-
----- the Boolean is a temporary hack to have two parallel GUIs
+-- | this is the real version, with XML
+--
+-- the Boolean is a temporary hack to have two parallel GUIs
editLoopJnewX :: Bool -> CEnv -> SState -> IO ()
editLoopJnewX isNew env state = do
c <- getCommandUTF (isCEnvUTF8 env state) ----
@@ -60,10 +60,12 @@ editLoopJnewX isNew env state = do
putStrLnFlush package
editLoopJnewX isNew env' state'
+welcome :: String
welcome =
"An experimental GF Editor for Java." ++
"(c) Kristofer Johannisson, Janna Khegai, and Aarne Ranta 2002 under CNU GPL."
+initEditMsgJavaX :: CEnv -> String
initEditMsgJavaX env = encodeUTF8 $ mkUnicode $ unlines $ tagXML "gfinit" $
tagsXML "newcat" [["n" +++ cat] | (_,cat) <- newCatMenu env] ++
tagXML "topic" [abstractName env] ++
@@ -71,5 +73,7 @@ initEditMsgJavaX env = encodeUTF8 $ mkUnicode $ unlines $ tagXML "gfinit" $
concat [tagAttrXML "language" ("file",file) [prLanguage lang] |
(file,lang) <- zip (allGrammarFileNames env) (allLanguages env)]
+
+initAndEditMsgJavaX :: Bool -> CEnv -> SState -> String
initAndEditMsgJavaX isNew env state =
initEditMsgJavaX env ++++ displaySStateJavaX isNew env state