// ----
// ---- file   : shared.tks
// ---- author : Bastian Spiegel <bs@tkscript.de>
// ---- legal  : (c) 2020 by Bastian Spiegel.
// ----           
// ----           This software is provided 'as-is', without any express or implied
// ----           warranty.  In no event will the authors be held liable for any damages
// ----           arising from the use of this software.
// ----           Permission is granted to anyone to use this software for any purpose,
// ----           including commercial applications, and to alter it and redistribute it
// ----           freely, subject to the following restrictions:
// ----           1. The origin of this software must not be misrepresented; you must not
// ----              claim that you wrote the original software. If you use this software
// ----              in a product, an acknowledgment in the product documentation would be
// ----              appreciated but is not required.
// ----           2. Altered source versions must be plainly marked as such, and must not be
// ----              misrepresented as being the original software.
// ----           3. This notice may not be removed or altered from any source distribution.
// ----
// ---- info   : state definitions (shared between org and smmx modules)
// ----
// ---- created: 06Jan2020
// ---- changed: 07Jan2020, 08Jan2020, 09Jan2020, 10Jan2020, 11Jan2020, 15Jan2020, 16Jan2020
// ----          17Jan2020, 19Jan2020, 20Jan2020, 21Jan2020, 22Jan2020, 26Jan2020, 31Jan2020
// ----          02Feb2020, 12Feb2020
// ----
// ----

module MShared;

namespace org;
namespace smmx;
namespace default;


// <class.png>
class StateDefs {
   // node states
   define int ST_NONE =  0;  // unknown state (e.g. project resource)
   define int ST_IDEA =  1;  // "* IDEA" or %
   define int ST_NOTE =  2;  // "* NOTE" or !
   define int ST_TODO =  3;  // "* TODO" or -
   define int ST_ACTV =  4;  // "* ACTV" or "* NEXT" or o
   define int ST_TEST =  5;  // "* TEST" or t
   define int ST_DONT =  6;  // "* DONT" or x
   define int ST_IGNR =  7;  // "* IGNR" or X
   define int ST_DONE =  8;  // "* DONE" or +
   define int ST_QUES =  9;  // "* QUES" or ?
   define int ST_WAIT = 10;  // "* WAIT" or w
}


namespace shared;

boolean b_debug = false;
boolean b_dry_run = false;

boolean b_text_formatting = maybe;

int NUM_SPACES = 3;
String TABS_TO_SPACES = "   ";

int num_separator_chars = 79;

// true==export to SMMX
//  (note) should be false (only useful when converting org-to-org)
boolean b_smmx_export_empty_line_after_node_hdr_property = false;

// true=convert .smmx links to .org (when exporting to org)
boolean b_smmx_to_org_convert_smmx_links = true;

// true=convert .org links to .smmx (when export to smmx)
boolean b_org_to_smmx_convert_org_links = true;

// (note) SimpleMind Pro does not find smmx files in dropbox folder 
//         unless cloudmapref="" syntax is used (instead of urllink="")
boolean b_org_to_smmx_convert_org_links_cloudmapref = true;

// false=convert to CP1252 (western european languages, DEFAULT)
// true=leave UTF8 data unchanged (chinese, japanese, russian, ..)
boolean b_raw_utf8 = true;

// true=ignore 'effortrisk' properties
boolean b_no_risk = false;

// for scheduler, default workinghours per day
//  (note) used for resource availability calculations ('workinghours')
float default_resource_workinghours_per_day = 8.0;

// true=don't export child/subnodes when node b_private field is true
//  (note) set via "private" keyword (on single line)
boolean b_honor_private_flag = false;

// true=use simplified form for effort/allocate/workinghours/resource/... properties
//  (note) when writing .org file
boolean b_prefer_simplified_properties = false;

// true=add auto-reload code to HTML page
boolean b_html_auto_refresh = false;

// true=ignore all timesheet entries
boolean b_ignore_time_tracking = false;

// list all projects other than this as "other" when writing .org file
String time_tracking_project = "";

// true=show (additional) warnings that might not necessarily cause an issue (e.g. unresolved other project tasks)
boolean b_warn = false;

// false=suppress info output (written files, milestone reached, ..)
boolean b_verbose = true;

// true=create project schedule
//  see "-s,--schedule" command line switch
boolean b_schedule = false;

// true=process node text lines as markdown and append below exported HTML plan
//  see "-docs,--docs" command line switch
boolean b_docs = false;

// true=append footer to markdown/HTML documents (TOC, foot notes, w3c validator)
boolean b_docs_footer = true;

// see "-ht,--html-template" command line option
String html_template_pathname;

// true=apply filter per node
// false=filter out child nodes when parent is filtered out
boolean b_filter_recursive = false;
