mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.10.3.1
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
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 Xoa_page__commons_mgr {
|
||||
public boolean Xowa_mockup() {return xowa_mockup;} public void Xowa_mockup_(boolean v) {xowa_mockup = v;} private boolean xowa_mockup;
|
||||
public Xow_wiki Source_wiki() {return source_wiki;} public void Source_wiki_(Xow_wiki v) {source_wiki = v;} private Xow_wiki source_wiki;
|
||||
public Xow_wiki Source_wiki_or(Xow_wiki or) {return source_wiki == null ? or : source_wiki;}
|
||||
public void Clear() {
|
||||
this.xowa_mockup = false;
|
||||
this.source_wiki = null;
|
||||
}
|
||||
}
|
||||
93
400_xowa/src/gplx/xowa/wikis/pages/Xopg_html_data.java
Normal file
93
400_xowa/src/gplx/xowa/wikis/pages/Xopg_html_data.java
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
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.*;
|
||||
import gplx.langs.htmls.*; import gplx.xowa.htmls.heads.*; import gplx.xowa.wikis.pages.skins.*; import gplx.xowa.xtns.indicators.*;
|
||||
public class Xopg_html_data {
|
||||
private Ordered_hash ctg_hash;
|
||||
public boolean Html_restricted() {return html_restricted;} private boolean html_restricted = true;
|
||||
public void Html_restricted_(boolean v) {html_restricted = v;} public void Html_restricted_n_() {Html_restricted_(Bool_.N);} public void Html_restricted_y_() {Html_restricted_(Bool_.Y);}
|
||||
public byte[] Display_ttl() {
|
||||
return ( display_ttl_vnt != null // -{T}- was in document
|
||||
&& display_ttl == null // {{DISPLAYTITLE}} does not exist
|
||||
&& lang_convert_content // __NOCONVERTCONTENT__ exists
|
||||
&& lang_convert_title // __NOCONVERTTITLE__ exists
|
||||
)
|
||||
? display_ttl_vnt // return variant title; DATE:2014-08-29
|
||||
: display_ttl // return normal title
|
||||
;
|
||||
}
|
||||
public Xopg_html_data Display_ttl_(byte[] v) {display_ttl = v; return this;} private byte[] display_ttl;
|
||||
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 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;
|
||||
public int Lnke_autonumber_next() {return lnke_autonumber++;} private int lnke_autonumber = 1;
|
||||
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 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;
|
||||
public int Xtn_imap_next_id() {return ++xtn_imap_next_id;} private int xtn_imap_next_id; // NOTE: must keep separate imap_id b/c html_elem_id is not always set;
|
||||
public byte[] Xtn_search_text() {return xtn_search_txt;} public void Xtn_search_text_(byte[] v) {xtn_search_txt = v;} private byte[] xtn_search_txt = Bry_.Empty;
|
||||
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 Xoh_head_mgr Head_mgr() {return module_mgr;} private Xoh_head_mgr module_mgr = new Xoh_head_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_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;}
|
||||
public void Custom_head_end_concat(byte[] v) {
|
||||
if (v == null)
|
||||
custom_head_end = v;
|
||||
else
|
||||
custom_head_end = Bry_.Add(custom_head_end, v);
|
||||
} private byte[] custom_head_end;
|
||||
public void Custom_html_end_concat(byte[] v) {
|
||||
if (v == null)
|
||||
custom_html_end = v;
|
||||
else
|
||||
custom_html_end = Bry_.Add(custom_html_end, v);
|
||||
} private byte[] custom_html_end;
|
||||
public void Clear() {
|
||||
html_restricted = true;
|
||||
display_ttl = content_sub = display_ttl_vnt = null;
|
||||
lang_convert_content = lang_convert_title = true;
|
||||
lnke_autonumber = 1;
|
||||
xtn_skin_mgr.Clear();
|
||||
xtn_gallery_packed_exists = false;
|
||||
xtn_imap_next_id = 0; xtn_gallery_next_id = -1;
|
||||
xtn_imap_exists = false;
|
||||
xtn_search_txt = Bry_.Empty;
|
||||
xtn_scribunto_dbg = Bry_.Empty;
|
||||
module_mgr.Clear();
|
||||
custom_html = custom_html_end = custom_head_end = custom_tab_name = null;
|
||||
if (ctg_hash != null) ctg_hash.Clear();
|
||||
indicators.Clear();
|
||||
this.mode_wtxt_shown = false;
|
||||
}
|
||||
public byte[][] Ctgs_to_ary() {return ctg_hash == null ? Bry_.Ary_empty : (byte[][])ctg_hash.To_ary(byte[].class);}
|
||||
public void Ctgs_add(Xoa_ttl ttl) {
|
||||
if (ctg_hash == null) ctg_hash = Ordered_hash_.New_bry();
|
||||
byte[] ttl_bry = ttl.Page_txt();
|
||||
if (ctg_hash.Has(ttl_bry)) return;
|
||||
ctg_hash.Add(ttl_bry, ttl_bry);
|
||||
}
|
||||
}
|
||||
21
400_xowa/src/gplx/xowa/wikis/pages/Xopg_page_.java
Normal file
21
400_xowa/src/gplx/xowa/wikis/pages/Xopg_page_.java
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
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_page_ {
|
||||
public static final byte Tid_read = 0, Tid_edit = 1, Tid_html = 2;
|
||||
}
|
||||
26
400_xowa/src/gplx/xowa/wikis/pages/Xopg_revision_data.java
Normal file
26
400_xowa/src/gplx/xowa/wikis/pages/Xopg_revision_data.java
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
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_revision_data {
|
||||
public int Id() {return id;} public Xopg_revision_data Id_(int v) {id = v; return this;} private int id;
|
||||
public DateAdp Modified_on() {return modified_on;} public Xopg_revision_data Modified_on_(DateAdp v) {modified_on = v; return this;} private DateAdp modified_on = DateAdp_.MinValue;
|
||||
public byte[] User() {return user;} public Xopg_revision_data User_(byte[] v) {user = v; return this;} private byte[] user = Bry_.Empty;
|
||||
public byte[] Protection_level() {return protection_level;} public Xopg_revision_data Protection_level_(byte[] v) {protection_level = v; return this;} private byte[] protection_level = Bry_.Empty;
|
||||
public int Html_db_id() {return html_db_id;} public void Html_db_id_(int v) {html_db_id = v;} private int html_db_id = -1;
|
||||
public void Clear() {}// NOTE: do not clear data b/c saving in Edit will call clear and id will be reset to 0
|
||||
}
|
||||
29
400_xowa/src/gplx/xowa/wikis/pages/Xopg_tab_data.java
Normal file
29
400_xowa/src/gplx/xowa/wikis/pages/Xopg_tab_data.java
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
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.*;
|
||||
import gplx.xowa.guis.views.*;
|
||||
public class Xopg_tab_data {
|
||||
public Xog_tab_itm Tab() {return tab;} public void Tab_(Xog_tab_itm v) {this.tab = v;} private Xog_tab_itm tab;
|
||||
public boolean Cancel_show() {return cancel_show;} public void Cancel_show_y_() {this.cancel_show = true;} private boolean cancel_show; // used for Special:Search
|
||||
public Xog_tab_close_mgr Close_mgr() {return close_mgr;} private final Xog_tab_close_mgr close_mgr = new Xog_tab_close_mgr();
|
||||
public void Clear() {
|
||||
this.cancel_show = false;
|
||||
this.tab = null;
|
||||
close_mgr.Clear();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
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.*;
|
||||
import gplx.core.btries.*;
|
||||
import gplx.xowa.parsers.*; import gplx.xowa.parsers.tmpls.*;
|
||||
public class Xopg_tmpl_prepend_mgr {
|
||||
private Bry_bfr[] stack = Bry_bfr_.Ary_empty; private int stack_len, stack_max;
|
||||
public void Clear() {
|
||||
stack = Bry_bfr_.Ary_empty; stack_len = stack_max = 0;
|
||||
}
|
||||
public boolean Tmpl_args_parsing() {return tmpl_args_parsing;} public void Tmpl_args_parsing_(boolean v) {tmpl_args_parsing = v;} private boolean tmpl_args_parsing;
|
||||
public Xopg_tmpl_prepend_mgr Bgn(Bry_bfr bfr) {
|
||||
int new_len = stack_len + 1;
|
||||
if (new_len > stack_max) {
|
||||
stack_max += 8;
|
||||
Bry_bfr[] new_stack = new Bry_bfr[stack_max];
|
||||
Array_.Copy_to(stack, new_stack, 0);
|
||||
stack = new_stack;
|
||||
}
|
||||
stack[stack_len] = bfr;
|
||||
stack_len = new_len;
|
||||
return this;
|
||||
}
|
||||
public void End(Xop_ctx ctx, Bry_bfr bfr, byte[] val, int val_len, boolean called_from_tmpl) {
|
||||
if ( val_len > 0 // val is not empty
|
||||
&& tmpl_prepend_nl_trie.Match_bgn(val, 0, val_len) != null // val starts with {| : ; # *; REF.MW:Parser.php|braceSubstitution
|
||||
) {
|
||||
boolean add = true;
|
||||
if (called_from_tmpl) { // called from tmpl
|
||||
for (int i = stack_len - 1; i > -1; --i) { // iterate backwards over tmpl_stack;
|
||||
Bry_bfr stack_bfr = stack[i];
|
||||
switch (stack_bfr.Get_at_last_or_nil_if_empty()) {
|
||||
case Byte_ascii.Null: continue; // bfr is empty; ignore it
|
||||
case Byte_ascii.Nl: add = false; i = -1; break; // bfr ends in \n; don't add and stop; PAGE:bn.w:লিওনেল_মেসি |ko.w:도쿄_지하철_히비야_선|DATE:2014-05-27
|
||||
default: i = -1; break; // bfr has char; stop
|
||||
}
|
||||
}
|
||||
}
|
||||
else // called from func arg; always add \n; EX:vi.w:Friedrich_II_của_Phổ; DATE:2014-04-26
|
||||
add = true;
|
||||
if (add)
|
||||
bfr.Add_byte(Byte_ascii.Nl);
|
||||
}
|
||||
if (called_from_tmpl) --stack_len;
|
||||
}
|
||||
private static final Btrie_fast_mgr tmpl_prepend_nl_trie = Xop_curly_bgn_lxr.tmpl_bgn_trie_();
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
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.skins; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.pages.*;
|
||||
public class Xopg_xtn_skin_fmtr_arg implements Bry_fmtr_arg {
|
||||
private Xoae_page page; private byte xtn_skin_tid;
|
||||
public Xopg_xtn_skin_fmtr_arg(Xoae_page page, byte xtn_skin_tid) {
|
||||
this.page = page; this.xtn_skin_tid = xtn_skin_tid;
|
||||
}
|
||||
public void Fmt__do(Bry_bfr bfr) {
|
||||
Xopg_xtn_skin_mgr mgr = page.Html_data().Xtn_skin_mgr();
|
||||
int len = mgr.Count();
|
||||
for (int i = 0; i < len; ++i) {
|
||||
Xopg_xtn_skin_itm itm = mgr.Get_at(i);
|
||||
if (itm.Tid() == xtn_skin_tid)
|
||||
itm.Write(bfr, page);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
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.skins; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.pages.*;
|
||||
public interface Xopg_xtn_skin_itm {
|
||||
byte Tid();
|
||||
byte[] Key();
|
||||
void Write(Bry_bfr bfr, Xoae_page page);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
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.skins; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.pages.*;
|
||||
public class Xopg_xtn_skin_itm_stub implements Xopg_xtn_skin_itm {
|
||||
private final byte[] val;
|
||||
public Xopg_xtn_skin_itm_stub(byte[] val) {this.val = val;}
|
||||
public byte Tid() {return Xopg_xtn_skin_itm_tid.Tid_sidebar;}
|
||||
public byte[] Key() {return Bry_.Empty;}
|
||||
public void Write(Bry_bfr bfr, Xoae_page page) {bfr.Add(val);}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
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.skins; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.pages.*;
|
||||
public class Xopg_xtn_skin_itm_tid {
|
||||
public static final byte Tid_sidebar = 0;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
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.skins; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.pages.*;
|
||||
public class Xopg_xtn_skin_mgr {
|
||||
private Ordered_hash hash = Ordered_hash_.New_bry();
|
||||
public int Count() {return hash.Count();}
|
||||
public void Add(Xopg_xtn_skin_itm itm) {hash.Add_if_dupe_use_1st(itm.Key(), itm);}
|
||||
public Xopg_xtn_skin_itm Get_at(int i) {return (Xopg_xtn_skin_itm)hash.Get_at(i);}
|
||||
public Xopg_xtn_skin_itm Get_or_null(byte[] key) {return (Xopg_xtn_skin_itm)hash.Get_by(key);}
|
||||
public void Clear() {hash.Clear();}
|
||||
}
|
||||
Reference in New Issue
Block a user