1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

'v3.4.2.1'

This commit is contained in:
gnosygnu
2016-04-11 00:12:19 -04:00
parent b2a06b8125
commit 14471ca656
197 changed files with 1918 additions and 1275 deletions

View File

@@ -36,7 +36,7 @@ public class Xopg_html_data {
public boolean Mode_wtxt_shown() {synchronized (this) {return mode_wtxt_shown;}} public void Mode_wtxt_shown_y_() {synchronized (this) {this.mode_wtxt_shown = true;}} private boolean mode_wtxt_shown;
public byte[] Display_ttl_vnt() {return display_ttl_vnt;} public void Display_ttl_vnt_(byte[] v) {display_ttl_vnt = v;} private byte[] display_ttl_vnt;
public byte[] Content_sub() {return content_sub;} public void Content_sub_(byte[] v) {content_sub = v;} private byte[] content_sub;
public Xopg_page_heading Page_heading() {return page_heading;} private final Xopg_page_heading page_heading = new Xopg_page_heading();
public Xopg_page_heading Page_heading() {return page_heading;} private final Xopg_page_heading page_heading = new Xopg_page_heading();
public String Bmk_pos() {return html_bmk_pos;} public void Bmk_pos_(String v) {html_bmk_pos = v;} private String html_bmk_pos;
public Bry_bfr Portal_div_xtn() {return portal_div_xtn;} private Bry_bfr portal_div_xtn = Bry_bfr.reset_(255);
public byte[] Edit_preview_w_dbg() {return Bry_.Add(xtn_scribunto_dbg, edit_preview);} public void Edit_preview_(byte[] v) {edit_preview = v;} private byte[] edit_preview = Bry_.Empty;
@@ -45,7 +45,7 @@ public class Xopg_html_data {
public boolean Lang_convert_content() {return lang_convert_content;} public void Lang_convert_content_(boolean v) {lang_convert_content = v;} private boolean lang_convert_content = true;
public boolean Lang_convert_title() {return lang_convert_title;} public void Lang_convert_title_(boolean v) {lang_convert_title = v;} private boolean lang_convert_title = true;
public Xopg_xtn_skin_mgr Xtn_skin_mgr() {return xtn_skin_mgr;} private Xopg_xtn_skin_mgr xtn_skin_mgr = new Xopg_xtn_skin_mgr();
public Indicator_html_bldr Indicators() {return indicators;} private final Indicator_html_bldr indicators = new Indicator_html_bldr();
public Indicator_html_bldr Indicators() {return indicators;} private final Indicator_html_bldr indicators = new Indicator_html_bldr();
public int Xtn_gallery_next_id() {return ++xtn_gallery_next_id;} private int xtn_gallery_next_id = -1;
public boolean Xtn_gallery_packed_exists() {return xtn_gallery_packed_exists;} public void Xtn_gallery_packed_exists_y_() {xtn_gallery_packed_exists = true;} private boolean xtn_gallery_packed_exists;
public boolean Xtn_imap_exists() {return xtn_imap_exists;} public void Xtn_imap_exists_y_() {xtn_imap_exists = true;} private boolean xtn_imap_exists;
@@ -54,7 +54,11 @@ public class Xopg_html_data {
public byte[] Xtn_scribunto_dbg() {return xtn_scribunto_dbg;} public void Xtn_scribunto_dbg_(byte[] v) {xtn_scribunto_dbg = Bry_.Add(xtn_scribunto_dbg, v);} private byte[] xtn_scribunto_dbg = Bry_.Empty;
public Pgbnr_itm Xtn_pgbnr() {return xtn_pgbnr;} public void Xtn_pgbnr_(Pgbnr_itm v) {xtn_pgbnr = v;} private Pgbnr_itm xtn_pgbnr;
public Xoh_head_mgr Head_mgr() {return module_mgr;} private Xoh_head_mgr module_mgr = new Xoh_head_mgr();
public boolean Skip_parse() {return skip_parse;} public void Skip_parse_(boolean v) {skip_parse = v;} private boolean skip_parse;
public Xopg_tag_mgr Custom_head_tags() {return head_tags;} private final Xopg_tag_mgr head_tags = new Xopg_tag_mgr();
public Xopg_tag_mgr Custom_tail_tags() {return tail_tags;} private final Xopg_tag_mgr tail_tags = new Xopg_tag_mgr();
public byte[] Custom_html() {return custom_html;} public Xopg_html_data Custom_html_(byte[] v) {custom_html = v; return this;} private byte[] custom_html;
public byte[] Custom_body() {return custom_body;} public Xopg_html_data Custom_body_(byte[] v) {custom_body = v; return this;} private byte[] custom_body;
public byte[] Custom_tab_name() {return custom_tab_name;} public Xopg_html_data Custom_tab_name_(byte[] v) {custom_tab_name = v; return this;} private byte[] custom_tab_name;
public byte[] Custom_head_end() {return custom_head_end;}
public byte[] Custom_html_end() {return custom_html_end;}

View File

@@ -0,0 +1,58 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.wikis.pages; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
public class Xopg_tag_itm {
public Xopg_tag_itm(String name, String text, Keyval... atrs_ary) {
this.Name = name;
this.Text = text;
this.Atrs_ary = atrs_ary;
}
public final String Name;
public final String Text;
public final Keyval[] Atrs_ary;
public void To_html(Bry_bfr bfr) {
bfr.Add_byte(Byte_ascii.Angle_bgn);
bfr.Add_str_a7(Name);
int len = Atrs_ary.length;
for (int i = 0; i < len; ++i) {
bfr.Add_byte_space();
Keyval atr = Atrs_ary[i];
bfr.Add_str_a7(atr.Key());
bfr.Add_byte(Byte_ascii.Eq);
bfr.Add_byte(Byte_ascii.Quote);
bfr.Add_str_a7(atr.Val_to_str_or_empty());
bfr.Add_byte(Byte_ascii.Quote);
}
bfr.Add_byte(Byte_ascii.Angle_end);
if (String_.Eq(Name, "link")) return;
if (Text != null) bfr.Add_str_u8(Text);
bfr.Add_byte(Byte_ascii.Angle_bgn).Add_byte(Byte_ascii.Slash);
bfr.Add_str_a7(Name);
bfr.Add_byte(Byte_ascii.Angle_end);
}
public static Xopg_tag_itm New_css(Io_url href) {
return new Xopg_tag_itm("link" , null, Keyval_.new_("type", "text/css"), Keyval_.new_("rel", "stylesheet"), Keyval_.new_("href", href.To_http_file_str()));
}
public static Xopg_tag_itm New_script_file(Io_url src) {
return new Xopg_tag_itm("script", null, Keyval_.new_("type", "text/javascript"), Keyval_.new_("src", src.To_http_file_str()));
}
public static Xopg_tag_itm New_script_code(String code) {
return new Xopg_tag_itm("script", code, Keyval_.new_("type", "text/javascript"));
}
}

View File

@@ -0,0 +1,38 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.wikis.pages; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
public class Xopg_tag_mgr {
private final List_adp list = List_adp_.new_();
public int Len() {return list.Len();}
public Xopg_tag_itm Get_at(int i) {return (Xopg_tag_itm)list.Get_at(i);}
public void Add(Xopg_tag_itm... ary) {for (Xopg_tag_itm itm : ary) list.Add(itm);}
public void Copy(Xopg_tag_mgr src) {
int len = src.Len();
for (int i = 0; i < len; ++i)
this.Add(src.Get_at(i));
}
public byte[] To_html(Bry_bfr bfr) {
int len = this.Len();
for (int i = 0; i < len; ++i) {
Xopg_tag_itm tag = this.Get_at(i);
tag.To_html(bfr);
bfr.Add_byte_nl();
}
return bfr.To_bry_and_clear();
}
}