summaryrefslogtreecommitdiff
path: root/src/modules/lexdict/swld.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/lexdict/swld.cpp')
-rw-r--r--src/modules/lexdict/swld.cpp78
1 files changed, 0 insertions, 78 deletions
diff --git a/src/modules/lexdict/swld.cpp b/src/modules/lexdict/swld.cpp
deleted file mode 100644
index f8421cc..0000000
--- a/src/modules/lexdict/swld.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-/******************************************************************************
- * swld.cpp - code for base class 'SWLD'. SWLD is the basis for all
- * types of Lexicon and Dictionary modules (hence the 'LD').
- */
-
-#include <swld.h>
-
-SWORD_NAMESPACE_START
-
-/******************************************************************************
- * SWLD Constructor - Initializes data for instance of SWLD
- *
- * ENT: imodname - Internal name for module
- * imoddesc - Name to display to user for module
- * idisp - Display object to use for displaying
- */
-
-SWLD::SWLD(const char *imodname, const char *imoddesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang) : SWModule(imodname, imoddesc, idisp, "Lexicons / Dictionaries", enc, dir, mark, ilang)
-{
- delete key;
- key = CreateKey();
- entkeytxt = new char [1];
- *entkeytxt = 0;
-}
-
-
-/******************************************************************************
- * SWLD Destructor - Cleans up instance of SWLD
- */
-
-SWLD::~SWLD()
-{
- if (entkeytxt)
- delete [] entkeytxt;
-}
-
-
-/******************************************************************************
- * SWLD::KeyText - Sets/gets module KeyText, getting from saved text if key is
- * persistent
- *
- * ENT: ikeytext - value which to set keytext
- * [0] - only get
- *
- * RET: pointer to keytext
- */
-
-const char *SWLD::KeyText(const char *ikeytext)
-{
- if (key->Persist() && !ikeytext) {
- getRawEntryBuf(); // force module key to snap to entry
- return entkeytxt;
- }
- else return SWModule::KeyText(ikeytext);
-}
-
-
-/******************************************************************************
- * SWLD::setPosition(SW_POSITION) - Positions this key if applicable
- */
-
-void SWLD::setPosition(SW_POSITION p) {
- if (!key->Traversable()) {
- switch (p) {
- case POS_TOP:
- *key = "";
- break;
- case POS_BOTTOM:
- *key = "zzzzzzzzz";
- break;
- }
- }
- else *key = p;
- getRawEntryBuf();
-}
-
-
-SWORD_NAMESPACE_END