code
stringlengths
3
1.05M
repo_name
stringlengths
4
116
path
stringlengths
4
991
language
stringclasses
9 values
license
stringclasses
15 values
size
int32
3
1.05M
//############################################################################# //# # //# Copyright (C) <2015> <IMS MAXIMS> # //# # //# 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/>. # //# # //# IMS MAXIMS provides absolutely NO GUARANTEE OF THE CLINICAL SAFTEY of # //# this program. Users of this software do so entirely at their own risk. # //# IMS MAXIMS only ensures the Clinical Safety of unaltered run-time # //# software that it builds, deploys and maintains. # //# # //############################################################################# //#EOH // This code was generated by Barbara Worwood using IMS Development Environment (version 1.80 build 5589.25814) // Copyright (C) 1995-2015 IMS MAXIMS. All rights reserved. // WARNING: DO NOT MODIFY the content of this file package ims.therapies.treatment.vo; /** * Linked to therapies.treatment.SportsActivitySession business object (ID: 1019100055). */ public class SportsActivitySessionRefVo extends ims.vo.ValueObjectRef implements ims.domain.IDomainGetter { private static final long serialVersionUID = 1L; public SportsActivitySessionRefVo() { } public SportsActivitySessionRefVo(Integer id, int version) { super(id, version); } public final boolean getID_SportsActivitySessionIsNotNull() { return this.id != null; } public final Integer getID_SportsActivitySession() { return this.id; } public final void setID_SportsActivitySession(Integer value) { this.id = value; } public final int getVersion_SportsActivitySession() { return this.version; } public Object clone() { return new SportsActivitySessionRefVo(this.id, this.version); } public final SportsActivitySessionRefVo toSportsActivitySessionRefVo() { if(this.id == null) return this; return new SportsActivitySessionRefVo(this.id, this.version); } public boolean equals(Object obj) { if(!(obj instanceof SportsActivitySessionRefVo)) return false; SportsActivitySessionRefVo compareObj = (SportsActivitySessionRefVo)obj; if(this.id != null && compareObj.getBoId() != null) return this.id.equals(compareObj.getBoId()); if(this.id != null && compareObj.getBoId() == null) return false; if(this.id == null && compareObj.getBoId() != null) return false; return super.equals(obj); } public int hashCode() { if(this.id != null) return this.id.intValue(); return super.hashCode(); } public boolean isValidated() { return true; } public String[] validate() { return null; } public String getBoClassName() { return "ims.therapies.treatment.domain.objects.SportsActivitySession"; } public Class getDomainClass() { return ims.therapies.treatment.domain.objects.SportsActivitySession.class; } public String getIItemText() { return toString(); } public String toString() { return this.getClass().toString() + " (ID: " + (this.id == null ? "null" : this.id.toString()) + ")"; } public int compareTo(Object obj) { if (obj == null) return -1; if (!(obj instanceof SportsActivitySessionRefVo)) throw new ClassCastException("A SportsActivitySessionRefVo object cannot be compared an Object of type " + obj.getClass().getName()); if (this.id == null) return 1; if (((SportsActivitySessionRefVo)obj).getBoId() == null) return -1; return this.id.compareTo(((SportsActivitySessionRefVo)obj).getBoId()); } // this method is not needed. It is here for compatibility purpose only. public int compareTo(Object obj, boolean caseInsensitive) { if(caseInsensitive); // this is to avoid Eclipse warning return compareTo(obj); } public Object getFieldValueByFieldName(String fieldName) { if(fieldName == null) throw new ims.framework.exceptions.CodingRuntimeException("Invalid field name"); fieldName = fieldName.toUpperCase(); if(fieldName.equals("ID_SPORTSACTIVITYSESSION")) return getID_SportsActivitySession(); return super.getFieldValueByFieldName(fieldName); } }
IMS-MAXIMS/openMAXIMS
Source Library/openmaxims_workspace/ValueObjects/src/ims/therapies/treatment/vo/SportsActivitySessionRefVo.java
Java
agpl-3.0
5,356
<?php /********************************************************************************* * SugarCRM Community Edition is a customer relationship management program developed by * SugarCRM, Inc. Copyright (C) 2004-2012 SugarCRM Inc. * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License version 3 as published by the * Free Software Foundation with the addition of the following permission added * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. * * 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 or write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. * * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. * * The interactive user interfaces in modified source and object code versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU Affero General Public License version 3. * * In accordance with Section 7(b) of the GNU Affero General Public License version 3, * these Appropriate Legal Notices must retain the display of the "Powered by * SugarCRM" logo. If the display of the logo is not reasonably feasible for * technical reasons, the Appropriate Legal Notices must display the words * "Powered by SugarCRM". ********************************************************************************/ $dictionary['pos_Sessions'] = array( 'table'=>'pos_sessions', 'audited'=>true, 'duplicate_merge'=>true, 'fields'=>array ( 'status' => array ( 'required' => true, 'name' => 'status', 'vname' => 'LBL_STATUS', 'type' => 'enum', 'massupdate' => '1', 'default' => 'In Review', 'comments' => '', 'help' => '', 'importable' => 'true', 'duplicate_merge' => 'disabled', 'duplicate_merge_dom_value' => '0', 'audited' => true, 'reportable' => true, 'len' => 100, 'size' => '20', 'options' => 'status_list', 'studio' => 'visible', 'dependency' => false, ), ), 'relationships'=>array ( ), 'optimistic_locking'=>true, 'unified_search'=>true, ); if (!class_exists('VardefManager')){ require_once('include/SugarObjects/VardefManager.php'); } VardefManager::createVardef('pos_Sessions','pos_Sessions', array('basic','assignable'));
jmertic/sugarplatformdemo
custom/modulebuilder/builds/POSSCON/SugarModules/modules/pos_Sessions/vardefs.php
PHP
agpl-3.0
2,934
package org.cbioportal.service.impl; import org.cbioportal.model.AlterationEnrichment; import org.cbioportal.model.Mutation; import org.cbioportal.model.MutationCountByGene; import org.cbioportal.service.MutationService; import org.cbioportal.service.util.AlterationEnrichmentUtil; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.runners.MockitoJUnitRunner; import java.util.ArrayList; import java.util.List; @RunWith(MockitoJUnitRunner.class) public class MutationEnrichmentServiceImplTest extends BaseServiceImplTest { @InjectMocks private MutationEnrichmentServiceImpl mutationEnrichmentService; @Mock private MutationService mutationService; @Mock private AlterationEnrichmentUtil alterationEnrichmentUtil; @Test public void getMutationEnrichments() throws Exception { List<String> alteredSampleIds = new ArrayList<>(); alteredSampleIds.add("sample_id_1"); alteredSampleIds.add("sample_id_2"); List<String> unalteredSampleIds = new ArrayList<>(); unalteredSampleIds.add("sample_id_3"); unalteredSampleIds.add("sample_id_4"); List<String> allSampleIds = new ArrayList<>(alteredSampleIds); allSampleIds.addAll(unalteredSampleIds); List<MutationCountByGene> mutationSampleCountByGeneList = new ArrayList<>(); Mockito.when(mutationService.getSampleCountByEntrezGeneIdsAndSampleIds(MOLECULAR_PROFILE_ID, allSampleIds, null)) .thenReturn(mutationSampleCountByGeneList); List<Mutation> mutations = new ArrayList<>(); Mockito.when(mutationService.fetchMutationsInMolecularProfile(MOLECULAR_PROFILE_ID, alteredSampleIds, null, null, "ID", null, null, null, null)).thenReturn(mutations); List<AlterationEnrichment> expectedAlterationEnrichments = new ArrayList<>(); Mockito.when(alterationEnrichmentUtil.createAlterationEnrichments(2, 2, mutationSampleCountByGeneList, mutations, "SAMPLE")).thenReturn(expectedAlterationEnrichments); List<AlterationEnrichment> result = mutationEnrichmentService.getMutationEnrichments(MOLECULAR_PROFILE_ID, alteredSampleIds, unalteredSampleIds, "SAMPLE"); Assert.assertEquals(result, expectedAlterationEnrichments); } }
inodb/cbioportal
service/src/test/java/org/cbioportal/service/impl/MutationEnrichmentServiceImplTest.java
Java
agpl-3.0
2,453
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license from eve.utils import ParsedRequest import json import os from apps.content_filters.content_filter.content_filter_service import ContentFilterService from superdesk import get_backend, get_resource_service from superdesk.errors import SuperdeskApiError from superdesk.publish import SubscribersService from superdesk.tests import TestCase from superdesk.vocabularies.commands import VocabulariesPopulateCommand class ContentFilterTests(TestCase): def setUp(self): self.req = ParsedRequest() with self.app.test_request_context(self.app.config.get('URL_PREFIX')): self.f = ContentFilterService(datasource='content_filters', backend=get_backend()) self.s = SubscribersService(datasource='subscribers', backend=get_backend()) self.articles = [{'_id': '1', 'urgency': 1, 'headline': 'story', 'state': 'fetched'}, {'_id': '2', 'headline': 'prtorque', 'state': 'fetched'}, {'_id': '3', 'urgency': 3, 'headline': 'creator', 'state': 'fetched'}, {'_id': '4', 'urgency': 4, 'state': 'fetched'}, {'_id': '5', 'urgency': 2, 'state': 'fetched'}, {'_id': '6', 'state': 'fetched'}, {'_id': '7', 'subject': [{'scheme': 'my_vocabulary', 'qcode': 'MV:01'}]}, {'_id': '8', 'extra': {'custom_text': 'my text'}}] self.app.data.insert('archive', self.articles) self.app.data.insert('vocabularies', [{'_id': 'my_vocabulary', 'display_name': 'My Vocabulary', 'type': 'manageable', 'field_type': None, 'schema': {'name': {}, 'qcode': {}, 'parent': {}}, 'items': [{'name': 'option 1', 'qcode': 'MV:01', 'is_active': True}] }, {'_id': 'custom_text', 'display_name': 'Custom Text', 'type': 'manageable', 'field_type': 'text'}]) self.app.data.insert('filter_conditions', [{'_id': 1, 'field': 'headline', 'operator': 'like', 'value': 'tor', 'name': 'test-1'}]) self.app.data.insert('filter_conditions', [{'_id': 2, 'field': 'urgency', 'operator': 'in', 'value': '2', 'name': 'test-2'}]) self.app.data.insert('filter_conditions', [{'_id': 3, 'field': 'headline', 'operator': 'endswith', 'value': 'tor', 'name': 'test-3'}]) self.app.data.insert('filter_conditions', [{'_id': 4, 'field': 'urgency', 'operator': 'in', 'value': '2,3,4', 'name': 'test-4'}]) self.app.data.insert('filter_conditions', [{'_id': 5, 'field': 'headline', 'operator': 'startswith', 'value': 'sto', 'name': 'test-5'}]) self.app.data.insert('filter_conditions', [{'_id': 6, 'field': 'my_vocabulary', 'operator': 'in', 'value': 'MV:01', 'name': 'test-6'}]) self.app.data.insert('filter_conditions', [{'_id': 7, 'field': 'custom_text', 'operator': 'eq', 'value': 'my text', 'name': 'test-7'}]) self.app.data.insert('content_filters', [{"_id": 1, "content_filter": [{"expression": {"fc": [1]}}], "name": "soccer-only"}]) self.app.data.insert('content_filters', [{"_id": 2, "content_filter": [{"expression": {"fc": [4, 3]}}], "name": "soccer-only2"}]) self.app.data.insert('content_filters', [{"_id": 3, "content_filter": [{"expression": {"pf": [1], "fc": [2]}}], "name": "soccer-only3"}]) self.app.data.insert('content_filters', [{"_id": 4, "content_filter": [{"expression": {"fc": [3]}}, {"expression": {"fc": [5]}}], "name": "soccer-only4"}]) self.app.data.insert('content_filters', [{"_id": 5, "content_filter": [{"expression": {"fc": [6]}}], "name": "my-vocabulary"}]) self.app.data.insert('content_filters', [{"_id": 6, "content_filter": [{"expression": {"fc": [7]}}], "name": "custom-text"}]) self.app.data.insert('products', [{"_id": 1, "content_filter": {"filter_id": 3, "filter_type": "blocking"}, "name": "p-1"}]) self.app.data.insert('products', [{"_id": 2, "content_filter": {"filter_id": 1, "filter_type": "blocking"}, "name": "p-2"}]) self.app.data.insert('subscribers', [{"_id": 1, "products": [1], "name": "sub1"}]) self.app.data.insert('subscribers', [{"_id": 2, "products": [2], "name": "sub2"}]) self.app.data.insert('routing_schemes', [ { "_id": 1, "name": "routing_scheme_1", "rules": [{ "filter": 4, "name": "routing_rule_4", "schedule": { "day_of_week": ["MON"], "hour_of_day_from": "0000", "hour_of_day_to": "2355", }, "actions": { "fetch": [], "publish": [], "exit": False } }] } ]) class RetrievingDataTests(ContentFilterTests): def test_build_mongo_query_using_like_filter_single_fc(self): doc = {'content_filter': [{"expression": {"fc": [1]}}], 'name': 'pf-1'} with self.app.app_context(): query = self.f.build_mongo_query(doc) docs = get_resource_service('archive').\ get_from_mongo(req=self.req, lookup=query) doc_ids = [d['_id'] for d in docs] self.assertEqual(3, docs.count()) self.assertTrue('1' in doc_ids) self.assertTrue('2' in doc_ids) self.assertTrue('3' in doc_ids) def test_build_mongo_query_using_like_filter_single_pf(self): doc = {'content_filter': [{"expression": {"pf": [1]}}], 'name': 'pf-1'} with self.app.app_context(): query = self.f.build_mongo_query(doc) docs = get_resource_service('archive').\ get_from_mongo(req=self.req, lookup=query) doc_ids = [d['_id'] for d in docs] self.assertEqual(3, docs.count()) self.assertTrue('1' in doc_ids) self.assertTrue('2' in doc_ids) self.assertTrue('3' in doc_ids) def test_build_mongo_query_using_like_filter_multi_filter_condition(self): doc = {'content_filter': [{"expression": {"fc": [1]}}, {"expression": {"fc": [2]}}], 'name': 'pf-1'} with self.app.app_context(): query = self.f.build_mongo_query(doc) docs = get_resource_service('archive').\ get_from_mongo(req=self.req, lookup=query) doc_ids = [d['_id'] for d in docs] self.assertEqual(4, docs.count()) self.assertTrue('1' in doc_ids) self.assertTrue('2' in doc_ids) self.assertTrue('5' in doc_ids) def test_build_mongo_query_using_like_filter_multi_pf(self): doc = {'content_filter': [{"expression": {"pf": [1]}}, {"expression": {"fc": [2]}}], 'name': 'pf-1'} with self.app.app_context(): query = self.f.build_mongo_query(doc) docs = get_resource_service('archive').\ get_from_mongo(req=self.req, lookup=query) doc_ids = [d['_id'] for d in docs] self.assertEqual(4, docs.count()) self.assertTrue('1' in doc_ids) self.assertTrue('2' in doc_ids) self.assertTrue('5' in doc_ids) def test_build_mongo_query_using_like_filter_multi_filter_condition2(self): doc = {'content_filter': [{"expression": {"fc": [3, 4]}}], 'name': 'pf-1'} with self.app.app_context(): query = self.f.build_mongo_query(doc) docs = get_resource_service('archive').\ get_from_mongo(req=self.req, lookup=query) doc_ids = [d['_id'] for d in docs] self.assertEqual(1, docs.count()) self.assertTrue('3' in doc_ids) def test_build_mongo_query_using_like_filter_multi_pf2(self): doc = {'content_filter': [{"expression": {"pf": [2]}}], 'name': 'pf-1'} with self.app.app_context(): query = self.f.build_mongo_query(doc) docs = get_resource_service('archive').\ get_from_mongo(req=self.req, lookup=query) doc_ids = [d['_id'] for d in docs] self.assertEqual(1, docs.count()) self.assertTrue('3' in doc_ids) def test_build_mongo_query_using_like_filter_multi_condition3(self): doc = {'content_filter': [{"expression": {"fc": [3, 4]}}, {"expression": {"fc": [1, 2]}}], 'name': 'pf-1'} with self.app.app_context(): query = self.f.build_mongo_query(doc) docs = get_resource_service('archive').\ get_from_mongo(req=self.req, lookup=query) doc_ids = [d['_id'] for d in docs] self.assertEqual(1, docs.count()) self.assertTrue('3' in doc_ids) def test_build_mongo_query_using_like_filter_multi_pf3(self): doc = {'content_filter': [{"expression": {"pf": [2]}}, {"expression": {"pf": [1], "fc": [2]}}], 'name': 'pf-1'} with self.app.app_context(): query = self.f.build_mongo_query(doc) docs = get_resource_service('archive').\ get_from_mongo(req=self.req, lookup=query) doc_ids = [d['_id'] for d in docs] self.assertEqual(1, docs.count()) self.assertTrue('3' in doc_ids) def test_build_elastic_query_using_like_filter_single_filter_condition(self): doc = {'content_filter': [{"expression": {"fc": [1]}}], 'name': 'pf-1'} with self.app.app_context(): query = {'query': {'filtered': {'query': self.f._get_elastic_query(doc)}}} self.req.args = {'source': json.dumps(query)} docs = get_resource_service('archive').get(req=self.req, lookup=None) doc_ids = [d['_id'] for d in docs] self.assertEqual(3, docs.count()) self.assertTrue('1' in doc_ids) self.assertTrue('2' in doc_ids) self.assertTrue('3' in doc_ids) def test_build_elastic_query_using_like_filter_single_content_filter(self): doc = {'content_filter': [{"expression": {"pf": [1]}}], 'name': 'pf-1'} with self.app.app_context(): query = {'query': {'filtered': {'query': self.f._get_elastic_query(doc)}}} self.req.args = {'source': json.dumps(query)} docs = get_resource_service('archive').get(req=self.req, lookup=None) doc_ids = [d['_id'] for d in docs] self.assertEqual(3, docs.count()) self.assertTrue('1' in doc_ids) self.assertTrue('2' in doc_ids) self.assertTrue('3' in doc_ids) def test_build_elastic_query_using_like_filter_multi_filter_condition(self): doc = {'content_filter': [{"expression": {"fc": [1]}}, {"expression": {"fc": [2]}}], 'name': 'pf-1'} with self.app.app_context(): query = {'query': {'filtered': {'query': self.f._get_elastic_query(doc)}}} self.req.args = {'source': json.dumps(query)} docs = get_resource_service('archive').get(req=self.req, lookup=None) doc_ids = [d['_id'] for d in docs] self.assertEqual(4, docs.count()) self.assertTrue('1' in doc_ids) self.assertTrue('2' in doc_ids) self.assertTrue('3' in doc_ids) self.assertTrue('5' in doc_ids) def test_build_mongo_query_using_like_filter_multi_content_filter(self): doc = {'content_filter': [{"expression": {"pf": [1]}}, {"expression": {"fc": [2]}}], 'name': 'pf-1'} with self.app.app_context(): query = {'query': {'filtered': {'query': self.f._get_elastic_query(doc)}}} self.req.args = {'source': json.dumps(query)} docs = get_resource_service('archive').get(req=self.req, lookup=None) doc_ids = [d['_id'] for d in docs] self.assertEqual(4, docs.count()) self.assertTrue('1' in doc_ids) self.assertTrue('2' in doc_ids) self.assertTrue('3' in doc_ids) self.assertTrue('5' in doc_ids) def test_build_elastic_query_using_like_filter_multi_filter_condition2(self): doc = {'content_filter': [{"expression": {"fc": [3, 4]}}, {"expression": {"fc": [1, 2]}}], 'name': 'pf-1'} with self.app.app_context(): query = {'query': {'filtered': {'query': self.f._get_elastic_query(doc)}}} self.req.args = {'source': json.dumps(query)} docs = get_resource_service('archive').get(req=self.req, lookup=None) doc_ids = [d['_id'] for d in docs] self.assertEqual(1, docs.count()) self.assertTrue('3' in doc_ids) def test_build_elastic_query_using_like_filter_multi_content_filter2(self): doc = {'content_filter': [{"expression": {"fc": [4, 3]}}, {"expression": {"pf": [1], "fc": [2]}}], 'name': 'pf-1'} with self.app.app_context(): query = {'query': {'filtered': {'query': self.f._get_elastic_query(doc)}}} self.req.args = {'source': json.dumps(query)} docs = get_resource_service('archive').get(req=self.req, lookup=None) doc_ids = [d['_id'] for d in docs] self.assertEqual(1, docs.count()) self.assertTrue('3' in doc_ids) def test_build_elastic_query_using_like_filter_multi_content_filter3(self): doc = {'content_filter': [{"expression": {"pf": [2]}}, {"expression": {"pf": [1], "fc": [2]}}], 'name': 'pf-1'} with self.app.app_context(): query = {'query': {'filtered': {'query': self.f._get_elastic_query(doc)}}} self.req.args = {'source': json.dumps(query)} docs = get_resource_service('archive').get(req=self.req, lookup=None) doc_ids = [d['_id'] for d in docs] self.assertEqual(1, docs.count()) self.assertTrue('3' in doc_ids) def test_build_elastic_query_using_like_filter_multi_content_filter4(self): doc = {'content_filter': [{"expression": {"pf": [2]}}, {"expression": {"pf": [3]}}], 'name': 'pf-1'} with self.app.app_context(): query = {'query': {'filtered': {'query': self.f._get_elastic_query(doc)}}} self.req.args = {'source': json.dumps(query)} docs = get_resource_service('archive').get(req=self.req, lookup=None) doc_ids = [d['_id'] for d in docs] self.assertEqual(1, docs.count()) self.assertTrue('3' in doc_ids) def test_build_elastic_query_using_like_filter_multi_content_filter5(self): doc = {'content_filter': [{"expression": {"pf": [4], "fc": [4]}}], 'name': 'pf-1'} with self.app.app_context(): query = {'query': {'filtered': {'query': self.f._get_elastic_query(doc)}}} self.req.args = {'source': json.dumps(query)} docs = get_resource_service('archive').get(req=self.req, lookup=None) doc_ids = [d['_id'] for d in docs] self.assertEqual(1, docs.count()) self.assertTrue('3' in doc_ids) class FilteringDataTests(ContentFilterTests): def test_does_match_returns_true_for_nonexisting_filter(self): for article in self.articles: self.assertTrue(self.f.does_match(None, article)) def test_does_match_custom_vocabularies(self): doc1 = {'content_filter': [{"expression": {"fc": [6]}}], 'name': 'mv-1'} doc2 = {'content_filter': [{"expression": {"fc": [7]}}], 'name': 'ct-1'} with self.app.app_context(): self.assertTrue(self.f.does_match(doc1, self.articles[6])) self.assertTrue(self.f.does_match(doc2, self.articles[7])) def test_does_match_using_like_filter_single_fc(self): doc = {'content_filter': [{"expression": {"fc": [1]}}], 'name': 'pf-1'} with self.app.app_context(): self.assertTrue(self.f.does_match(doc, self.articles[0])) self.assertTrue(self.f.does_match(doc, self.articles[1])) self.assertTrue(self.f.does_match(doc, self.articles[2])) self.assertFalse(self.f.does_match(doc, self.articles[3])) self.assertFalse(self.f.does_match(doc, self.articles[4])) self.assertFalse(self.f.does_match(doc, self.articles[5])) def test_does_match_using_like_filter_single_pf(self): doc = {'content_filter': [{"expression": {"pf": [1]}}], 'name': 'pf-1'} with self.app.app_context(): self.assertTrue(self.f.does_match(doc, self.articles[0])) self.assertTrue(self.f.does_match(doc, self.articles[1])) self.assertTrue(self.f.does_match(doc, self.articles[2])) self.assertFalse(self.f.does_match(doc, self.articles[3])) self.assertFalse(self.f.does_match(doc, self.articles[4])) self.assertFalse(self.f.does_match(doc, self.articles[5])) def test_does_match_using_like_filter_multi_fc(self): doc = {'content_filter': [{"expression": {"fc": [1]}}, {"expression": {"fc": [2]}}], 'name': 'pf-1'} with self.app.app_context(): self.assertTrue(self.f.does_match(doc, self.articles[0])) self.assertTrue(self.f.does_match(doc, self.articles[1])) self.assertTrue(self.f.does_match(doc, self.articles[2])) self.assertFalse(self.f.does_match(doc, self.articles[3])) self.assertTrue(self.f.does_match(doc, self.articles[4])) self.assertFalse(self.f.does_match(doc, self.articles[5])) def test_does_match_using_like_filter_multi_pf(self): doc = {'content_filter': [{"expression": {"pf": [1]}}, {"expression": {"fc": [2]}}], 'name': 'pf-1'} with self.app.app_context(): self.assertTrue(self.f.does_match(doc, self.articles[0])) self.assertTrue(self.f.does_match(doc, self.articles[1])) self.assertTrue(self.f.does_match(doc, self.articles[2])) self.assertFalse(self.f.does_match(doc, self.articles[3])) self.assertTrue(self.f.does_match(doc, self.articles[4])) self.assertFalse(self.f.does_match(doc, self.articles[5])) def test_does_match_using_like_filter_multi_fc2(self): doc = {'content_filter': [{"expression": {"fc": [3, 4]}}], 'name': 'pf-1'} with self.app.app_context(): self.assertFalse(self.f.does_match(doc, self.articles[0])) self.assertFalse(self.f.does_match(doc, self.articles[1])) self.assertTrue(self.f.does_match(doc, self.articles[2])) self.assertFalse(self.f.does_match(doc, self.articles[3])) self.assertFalse(self.f.does_match(doc, self.articles[4])) self.assertFalse(self.f.does_match(doc, self.articles[5])) def test_does_match_using_like_filter_multi_pf2(self): doc = {'content_filter': [{"expression": {"pf": [2]}}], 'name': 'pf-1'} with self.app.app_context(): self.assertFalse(self.f.does_match(doc, self.articles[0])) self.assertFalse(self.f.does_match(doc, self.articles[1])) self.assertTrue(self.f.does_match(doc, self.articles[2])) self.assertFalse(self.f.does_match(doc, self.articles[3])) self.assertFalse(self.f.does_match(doc, self.articles[4])) self.assertFalse(self.f.does_match(doc, self.articles[5])) def test_does_match_using_like_filter_multi_fc3(self): doc = {'content_filter': [{"expression": {"fc": [3, 4]}}, {"expression": {"fc": [1, 2]}}], 'name': 'pf-1'} with self.app.app_context(): self.assertFalse(self.f.does_match(doc, self.articles[0])) self.assertFalse(self.f.does_match(doc, self.articles[1])) self.assertTrue(self.f.does_match(doc, self.articles[2])) self.assertFalse(self.f.does_match(doc, self.articles[3])) self.assertFalse(self.f.does_match(doc, self.articles[4])) self.assertFalse(self.f.does_match(doc, self.articles[5])) def test_does_match_using_like_filter_multi_pf3(self): doc = {'content_filter': [{"expression": {"pf": [4], "fc": [4]}}], 'name': 'pf-1'} with self.app.app_context(): self.assertFalse(self.f.does_match(doc, self.articles[0])) self.assertFalse(self.f.does_match(doc, self.articles[1])) self.assertTrue(self.f.does_match(doc, self.articles[2])) self.assertFalse(self.f.does_match(doc, self.articles[3])) self.assertFalse(self.f.does_match(doc, self.articles[4])) self.assertFalse(self.f.does_match(doc, self.articles[5])) def test_if_pf_is_used(self): with self.app.app_context(): self.assertTrue(self.f._get_content_filters_by_content_filter(1).count() == 1) self.assertTrue(self.f._get_content_filters_by_content_filter(4).count() == 0) def test_if_fc_is_used(self): with self.app.app_context(): self.assertTrue(len(self.f.get_content_filters_by_filter_condition(1)) == 2) self.assertTrue(len(self.f.get_content_filters_by_filter_condition(3)) == 2) self.assertTrue(len(self.f.get_content_filters_by_filter_condition(2)) == 1) def test_get_subscribers_by_filter_condition(self): filter_condition1 = {'field': 'urgency', 'operator': 'in', 'value': '2'} filter_condition2 = {'field': 'urgency', 'operator': 'in', 'value': '1'} filter_condition3 = {'field': 'headline', 'operator': 'like', 'value': 'tor'} filter_condition4 = {'field': 'urgency', 'operator': 'nin', 'value': '3'} with self.app.app_context(): cmd = VocabulariesPopulateCommand() filename = os.path.join(os.path.abspath( os.path.dirname("apps/prepopulate/data_init/vocabularies.json")), "vocabularies.json") cmd.run(filename) r1 = self.s._get_subscribers_by_filter_condition(filter_condition1) r2 = self.s._get_subscribers_by_filter_condition(filter_condition2) r3 = self.s._get_subscribers_by_filter_condition(filter_condition3) r4 = self.s._get_subscribers_by_filter_condition(filter_condition4) self.assertTrue(len(r1[0]['selected_subscribers']) == 1) self.assertTrue(len(r2[0]['selected_subscribers']) == 0) self.assertTrue(len(r3[0]['selected_subscribers']) == 2) self.assertTrue(len(r4[0]['selected_subscribers']) == 1) class DeleteMethodTestCase(ContentFilterTests): """Tests for the delete() method.""" def test_raises_error_if_filter_referenced_by_subscribers(self): with self.assertRaises(SuperdeskApiError) as ctx: self.f.delete({'_id': 1}) self.assertEqual(ctx.exception.status_code, 400) # bad request error def test_raises_error_if_filter_referenced_by_routing_rules(self): with self.assertRaises(SuperdeskApiError) as ctx: self.f.delete({'_id': 4}) self.assertEqual(ctx.exception.status_code, 400) # bad request error
mugurrus/superdesk-core
apps/content_filters/content_filter/tests.py
Python
agpl-3.0
26,062
require File.dirname(__FILE__) + '/../spec_helper' describe ClientApplication do fixtures :people, :client_applications, :oauth_tokens before(:each) do @application = ClientApplication.create :name => "Agree2", :url => "http://agree2.com", :person => people(:quentin) end it "should be valid" do @application.should be_valid end it "should not have errors" do @application.errors.full_messages.should == [] end it "should have key and secret" do @application.key.should_not be_nil @application.secret.should_not be_nil end it "should have credentials" do @application.credentials.should_not be_nil @application.credentials.key.should == @application.key @application.credentials.secret.should == @application.secret end end
cgorringe/oscurrency
spec/models/client_application_spec.rb
Ruby
agpl-3.0
796
# frozen_string_literal: true module MedicationRefillHelper include CalendarHelper # Save refill date to Google calendar def save_refill_to_google_calendar(medication) return true unless current_user.google_oauth2_enabled? && new_cal_refill_reminder_needed?(medication) begin args = calendar_uploader_params(medication) CalendarUploader.new(args).upload_event rescue return_to_sign_in else true end end def calendar_uploader_params(medication) { summary: "Refill for #{medication.name}", date: medication.refill, access_token: current_user.google_access_token, email: current_user.email } end end
HashNotAdam/ifme
app/helpers/medication_refill_helper.rb
Ruby
agpl-3.0
700
//############################################################################# //# # //# Copyright (C) <2015> <IMS MAXIMS> # //# # //# 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/>. # //# # //# IMS MAXIMS provides absolutely NO GUARANTEE OF THE CLINICAL SAFTEY of # //# this program. Users of this software do so entirely at their own risk. # //# IMS MAXIMS only ensures the Clinical Safety of unaltered run-time # //# software that it builds, deploys and maintains. # //# # //############################################################################# //#EOH // This code was generated by Barbara Worwood using IMS Development Environment (version 1.80 build 5589.25814) // Copyright (C) 1995-2015 IMS MAXIMS. All rights reserved. // WARNING: DO NOT MODIFY the content of this file package ims.ccosched.forms.lkupselect; public final class FormInfo extends ims.framework.FormInfo { private static final long serialVersionUID = 1L; public FormInfo(Integer formId) { super(formId); } public String getNamespaceName() { return "CcoSched"; } public String getFormName() { return "LkupSelect"; } public int getWidth() { return 296; } public int getHeight() { return 112; } public String[] getContextVariables() { return new String[] { "_cv_Core.LkupSelect.LkupID", "_cv_CcoSched.LkupSelect.LkupTypeID", "_cv_CcoSched.LkupSelect.LkupID" }; } public String getLocalVariablesPrefix() { return "_lv_CcoSched.LkupSelect.__internal_x_context__" + String.valueOf(getFormId()); } public ims.framework.FormInfo[] getComponentsFormInfo() { ims.framework.FormInfo[] componentsInfo = new ims.framework.FormInfo[0]; return componentsInfo; } public String getImagePath() { return "Images/Admin/square_48.png"; } }
FreudianNM/openMAXIMS
Source Library/openmaxims_workspace/CcoSched/src/ims/ccosched/forms/lkupselect/FormInfo.java
Java
agpl-3.0
3,105
package edu.mit.kc.alert.service; import org.springframework.stereotype.Component; import edu.mit.kc.alert.AlertType; @Component("finalTechnicalReportAlertService") public class FinalTechnicalReportAlertServiceImpl extends AlertServiceBaseImpl implements SystemAlertService { @Override public void createAlerts(AlertType alertType, String userName) { } @Override public void updateAlerts(AlertType alertType, String userName) { } @Override public void cleanUpAlerts(AlertType alertType, String userName) { deactivateAllAlerts(alertType); } }
rashikpolus/MIT_KC
coeus-impl/src/main/java/edu/mit/kc/alert/service/FinalTechnicalReportAlertServiceImpl.java
Java
agpl-3.0
561
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'PoliticianInfo' db.create_table('core_politicianinfo', ( ('politician', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['core.Politician'])), ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), ('value', self.gf('django.db.models.fields.CharField')(max_length=500)), ('schema', self.gf('django.db.models.fields.CharField')(max_length=40, db_index=True)), )) db.send_create_signal('core', ['PoliticianInfo']) # Adding index on 'InternalXref', fields ['int_value'] db.create_index('core_internalxref', ['int_value']) # Adding index on 'InternalXref', fields ['text_value'] db.create_index('core_internalxref', ['text_value']) # Adding index on 'InternalXref', fields ['target_id'] db.create_index('core_internalxref', ['target_id']) # Adding index on 'InternalXref', fields ['schema'] db.create_index('core_internalxref', ['schema']) # Deleting field 'Party.colour' db.delete_column('core_party', 'colour') def backwards(self, orm): # Deleting model 'PoliticianInfo' db.delete_table('core_politicianinfo') # Removing index on 'InternalXref', fields ['int_value'] db.delete_index('core_internalxref', ['int_value']) # Removing index on 'InternalXref', fields ['text_value'] db.delete_index('core_internalxref', ['text_value']) # Removing index on 'InternalXref', fields ['target_id'] db.delete_index('core_internalxref', ['target_id']) # Removing index on 'InternalXref', fields ['schema'] db.delete_index('core_internalxref', ['schema']) # Adding field 'Party.colour' db.add_column('core_party', 'colour', self.gf('django.db.models.fields.CharField')(default='', max_length=7, blank=True), keep_default=False) models = { 'core.electedmember': { 'Meta': {'object_name': 'ElectedMember'}, 'end_date': ('django.db.models.fields.DateField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'party': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.Party']"}), 'politician': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.Politician']"}), 'riding': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.Riding']"}), 'sessions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['core.Session']"}), 'start_date': ('django.db.models.fields.DateField', [], {'db_index': 'True'}) }, 'core.internalxref': { 'Meta': {'object_name': 'InternalXref'}, 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'int_value': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), 'schema': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}), 'target_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), 'text_value': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '50', 'blank': 'True'}) }, 'core.party': { 'Meta': {'object_name': 'Party'}, 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 'short_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), 'slug': ('django.db.models.fields.CharField', [], {'max_length': '10', 'blank': 'True'}) }, 'core.politician': { 'Meta': {'object_name': 'Politician'}, 'dob': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), 'gender': ('django.db.models.fields.CharField', [], {'max_length': '1', 'blank': 'True'}), 'headshot': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 'name_family': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), 'name_given': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), 'parlpage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}), 'site': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) }, 'core.politicianinfo': { 'Meta': {'object_name': 'PoliticianInfo'}, 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'politician': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.Politician']"}), 'schema': ('django.db.models.fields.CharField', [], {'max_length': '40', 'db_index': 'True'}), 'value': ('django.db.models.fields.CharField', [], {'max_length': '500'}) }, 'core.riding': { 'Meta': {'object_name': 'Riding'}, 'edid': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '60'}), 'province': ('django.db.models.fields.CharField', [], {'max_length': '2'}), 'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '60'}) }, 'core.session': { 'Meta': {'object_name': 'Session'}, 'end': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 'parliamentnum': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), 'sessnum': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), 'start': ('django.db.models.fields.DateField', [], {}) } } complete_apps = ['core']
twhyte/openparliament
parliament/core/migrations/0008_politician_info.py
Python
agpl-3.0
6,821
//############################################################################# //# # //# Copyright (C) <2015> <IMS MAXIMS> # //# # //# 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/>. # //# # //# IMS MAXIMS provides absolutely NO GUARANTEE OF THE CLINICAL SAFTEY of # //# this program. Users of this software do so entirely at their own risk. # //# IMS MAXIMS only ensures the Clinical Safety of unaltered run-time # //# software that it builds, deploys and maintains. # //# # //############################################################################# //#EOH // This code was generated by Vasile Purdila using IMS Development Environment (version 1.20 build 40820.730) // Copyright (C) 1995-2004 IMS MAXIMS plc. All rights reserved. package ims.nursing.domain.impl; import java.util.ArrayList; import java.util.List; import ims.nursing.domain.BradenScaleDialog; import ims.nursing.vo.BradenScale; import ims.nursing.vo.BradenScaleCollection; import ims.nursing.vo.domain.BradenScaleAssembler; import ims.core.admin.vo.CareContextRefVo; import ims.core.domain.Reports; import ims.core.domain.impl.ReportsImpl; import ims.domain.DomainFactory; import ims.domain.exceptions.DomainInterfaceException; import ims.domain.impl.DomainImpl; import ims.framework.utils.Date; public class BradenScaleVIEWImpl extends DomainImpl implements ims.nursing.domain.BradenScaleVIEW, ims.domain.impl.Transactional { public Boolean isPartOfSkinAssessment(BradenScale bradenRecord) throws DomainInterfaceException { BradenScaleDialog impl = (BradenScaleDialog) getDomainImpl(BradenScaleDialogImpl.class); return impl.isPartOfSkinAssessment(bradenRecord); } /** * lists Assessments */ public BradenScaleCollection listAssessments(Date dateFrom, Date dateTo, CareContextRefVo voCareContextRef) throws DomainInterfaceException { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(" "); String query = "from BradenScale bs "; ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); String andStr = " "; boolean conditionFound = false; if (dateFrom != null && dateTo != null) { hql.append(" bs.dateTimeInitiated > :fromDate and bs.dateTimeInitiated < :toDate "); conditionFound = true; markers.add("fromDate"); markers.add("toDate"); values.add(dateFrom.addDay(-1).getDate()); values.add(dateTo.addDay(1).getDate()); // andStr = " and "; } else if (dateFrom != null) { hql.append(" bs.dateTimeInitiated > :fromDate "); conditionFound = true; markers.add("fromDate"); values.add(dateFrom.addDay(-1).getDate()); // andStr = " and "; } if (voCareContextRef != null) { if (conditionFound) hql.append(" and "); hql.append(andStr + " bs.careContext.id = :cc"); markers.add("cc"); values.add(voCareContextRef.getID_CareContext()); andStr = " and "; } if (markers.size() > 0) query += " where "; query += hql.toString(); List braden = factory.find(query, markers, values); return (BradenScaleAssembler.createBradenScaleCollectionFromBradenScale(braden).sort()); } public BradenScale getLastCompletedBradenScale(CareContextRefVo voCareContextRef) { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer("from BradenScale bs"); ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); if (voCareContextRef != null) { hql.append(" where "); hql.append(" bs.careContext.id = :cc"); markers.add("cc"); values.add(voCareContextRef.getID_CareContext()); } hql.append(" order by bs.dateTimeInitiated desc "); List list = factory.find(hql.toString(), markers, values); //Get only the first record (to optimise the work of the assembler) if(list != null && list.size() > 1) { Object firstItem = list.get(0); list.removeAll(list); list.add(firstItem); } BradenScaleCollection voBradenScaleColl = BradenScaleAssembler.createBradenScaleCollectionFromBradenScale(list); if (voBradenScaleColl != null && voBradenScaleColl.size() > 0) return voBradenScaleColl.get(0); return null; } /** * call getReportAndTemplate form Core.Reports domainImpl */ public String[] getReportAndTemplate(Integer nReportId, Integer nTemplateId) throws DomainInterfaceException { Reports impl = (Reports) getDomainImpl(ReportsImpl.class); return impl.getReportAndTemplate(nReportId, nTemplateId); } }
IMS-MAXIMS/openMAXIMS
Source Library/openmaxims_workspace/Nursing/src/ims/nursing/domain/impl/BradenScaleVIEWImpl.java
Java
agpl-3.0
5,857
//############################################################################# //# # //# Copyright (C) <2014> <IMS MAXIMS> # //# # //# 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/>. # //# # //############################################################################# //#EOH // This code was generated by Barbara Worwood using IMS Development Environment (version 1.80 build 5007.25751) // Copyright (C) 1995-2014 IMS MAXIMS. All rights reserved. // WARNING: DO NOT MODIFY the content of this file package ims.scheduling.domain.base.impl; import ims.domain.impl.DomainImpl; public abstract class BasePatientAppointmentsImpl extends DomainImpl implements ims.scheduling.domain.PatientAppointments, ims.domain.impl.Transactional { private static final long serialVersionUID = 1L; @SuppressWarnings("unused") public void validatelistBookingAppointmentByPatientAndDates(ims.core.patient.vo.PatientRefVo patient, ims.framework.utils.Date apptFromDate, ims.framework.utils.Date appToDate) { } @SuppressWarnings("unused") public void validatesaveBookingAppt(ims.scheduling.vo.Booking_AppointmentShortVo appt) { } @SuppressWarnings("unused") public void validategetServiceAndActivityByAppt(ims.scheduling.vo.Booking_AppointmentRefVo appt, Boolean isFlexible) { } @SuppressWarnings("unused") public void validategetCatsReferralForAppointment(ims.scheduling.vo.Booking_AppointmentRefVo appt) { } @SuppressWarnings("unused") public void validateupdateCatsReferralForCancelledAppt(ims.careuk.vo.CatsReferralRefVo catsRef) { if(catsRef == null) throw new ims.domain.exceptions.DomainRuntimeException("The parameter 'catsRef' of type 'ims.careuk.vo.CatsReferralRefVo' cannot be null."); } @SuppressWarnings("unused") public void validategetServiceProcedureConsultantByAppt(ims.scheduling.vo.Booking_AppointmentShortVo appt) { } @SuppressWarnings("unused") public void validategetSession(ims.scheduling.vo.Sch_SessionRefVo sessionRef) { } @SuppressWarnings("unused") public void validategetTheatreAppointment(ims.scheduling.vo.Booking_AppointmentRefVo appt) { } @SuppressWarnings("unused") public void validatelistAppointmentHistory(ims.scheduling.vo.Booking_AppointmentRefVo appointment) { } @SuppressWarnings("unused") public void validateisReferralICPCompleted(ims.careuk.vo.CatsReferralRefVo catsReferral) { } @SuppressWarnings("unused") public void validategetCatsReferralStatus(ims.scheduling.vo.Booking_AppointmentRefVo appointmentRef) { } @SuppressWarnings("unused") public void validatecancelTCIAndReferralEROD(ims.careuk.vo.CatsReferralRefVo catsReferral, ims.scheduling.vo.Booking_AppointmentRefVo apptRef, Boolean isProviderCancellation, Boolean isPatientCancellation) { } }
open-health-hub/openmaxims-linux
openmaxims_workspace/Scheduling/src/ims/scheduling/domain/base/impl/BasePatientAppointmentsImpl.java
Java
agpl-3.0
4,007
package com.plugin.gcm; import org.json.JSONException; import org.json.JSONObject; import android.annotation.SuppressLint; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.NotificationCompat; import android.util.Log; import com.google.android.gcm.GCMBaseIntentService; @SuppressLint("NewApi") public class GCMIntentService extends GCMBaseIntentService { private static final String TAG = "GCMIntentService"; public GCMIntentService() { super("GCMIntentService"); } @Override public void onRegistered(Context context, String regId) { Log.v(TAG, "onRegistered: "+ regId); JSONObject json; try { json = new JSONObject().put("event", "registered"); json.put("regid", regId); Log.v(TAG, "onRegistered: " + json.toString()); // Send this JSON data to the JavaScript application above EVENT should be set to the msg type // In this case this is the registration ID PushPlugin.sendJavascript( json ); } catch( JSONException e) { // No message to the user is sent, JSON failed Log.e(TAG, "onRegistered: JSON exception"); } } @Override public void onUnregistered(Context context, String regId) { Log.d(TAG, "onUnregistered - regId: " + regId); } @Override protected void onMessage(Context context, Intent intent) { Log.d(TAG, "onMessage - context: " + context); // Extract the payload from the message Bundle extras = intent.getExtras(); if (extras != null) { // if we are in the foreground, just surface the payload, else post it to the statusbar if (PushPlugin.isInForeground()) { extras.putBoolean("foreground", true); PushPlugin.sendExtras(extras); } else { extras.putBoolean("foreground", false); // Send a notification if there is a message // Added condition for messages with special payloads. if (extras.getString("message") != null && extras.getString("message").length() != 0 && extras.getString("title") != "Data") { createNotification(context, extras); } } } } public void createNotification(Context context, Bundle extras) { NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); String appName = getAppName(this); Intent notificationIntent = new Intent(this, PushHandlerActivity.class); notificationIntent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP); notificationIntent.putExtra("pushBundle", extras); PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT); int defaults = Notification.DEFAULT_ALL; if (extras.getString("defaults") != null) { try { defaults = Integer.parseInt(extras.getString("defaults")); } catch (NumberFormatException e) {} } NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context) .setDefaults(defaults) .setSmallIcon(context.getApplicationInfo().icon) .setWhen(System.currentTimeMillis()) .setContentTitle(extras.getString("title")) .setTicker(extras.getString("title")) .setContentIntent(contentIntent) .setAutoCancel(true); String message = extras.getString("message"); if (message != null) { mBuilder.setContentText(message); } else { mBuilder.setContentText("<missing message content>"); } String msgcnt = extras.getString("msgcnt"); if (msgcnt != null) { mBuilder.setNumber(Integer.parseInt(msgcnt)); } int notId = 0; try { notId = Integer.parseInt(extras.getString("notId")); } catch(NumberFormatException e) { Log.e(TAG, "Number format exception - Error parsing Notification ID: " + e.getMessage()); } catch(Exception e) { Log.e(TAG, "Number format exception - Error parsing Notification ID" + e.getMessage()); } mNotificationManager.notify((String) appName, notId, mBuilder.build()); } private static String getAppName(Context context) { CharSequence appName = context .getPackageManager() .getApplicationLabel(context.getApplicationInfo()); return (String)appName; } @Override public void onError(Context context, String errorId) { Log.e(TAG, "onError - errorId: " + errorId); } }
sensorlab/OsuSmartphoneApp
plugins/com.phonegap.plugins.PushPlugin/src/android/com/plugin/gcm/GCMIntentService.java
Java
agpl-3.0
4,448
<div style="font-family: Verdana, Arial, sans-serif; font-size: 12px;"> <?php echo lang('hi john doe', $new_account->getDisplayName()) ?>,<br><br> <?php echo lang('user created your account', $new_account->getCreatedByDisplayName()) ?>.<br><br> <?php echo lang('visit and login', ROOT_URL) ?>:<br><br> &nbsp;&nbsp;&nbsp;&nbsp;<?php echo lang('username') ?>: <?php echo $new_account->getUsername() ?><br><br> &nbsp;&nbsp;&nbsp;&nbsp;<?php echo lang('password') ?>: <?php echo $raw_password ?><br><br> <br><br> <div style="color: #818283; font-style: italic; border-top: 2px solid #818283; padding-top: 2px; font-family: Verdana, Arial, sans-serif; font-size: 12px;"> <?php echo lang('system notification email'); ?><br> <a href="<?php echo ROOT_URL; ?>" target="_blank" style="font-family: Verdana, Arial, sans-serif; font-size: 12px;"><?php echo ROOT_URL; ?></a> </div> </div>
awebtech/bpmProject
application/views/notifier/new_account.php
PHP
agpl-3.0
899
/* * RapidMiner * * Copyright (C) 2001-2014 by RapidMiner and the contributors * * Complete list of developers available at our web site: * * http://rapidminer.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 com.rapidminer.gui.tools.dialogs; import javax.swing.Icon; import javax.swing.JComponent; import com.rapidminer.gui.tools.SwingTools; import com.rapidminer.tools.I18N; /** * * @author Tobias Malbrecht */ public class MessageDialog extends ButtonDialog { private static final long serialVersionUID = -5825873580778775409L; public MessageDialog(String i18nKey, Object...i18nArgs) { this(i18nKey, null, i18nArgs); } public MessageDialog(String i18nKey, JComponent c, Object...i18nArgs) { super("message." + i18nKey, true, i18nArgs); layoutDefault(c, makeOkButton()); } @Override protected Icon getInfoIcon() { String iconName = I18N.getMessageOrNull(I18N.getGUIBundle(), getKey() + ".icon"); if (iconName == null || "".equals(iconName)) { return SwingTools.createIcon("48/" + I18N.getMessage(I18N.getGUIBundle(), "gui.dialog.message.icon")); } else { return SwingTools.createIcon("48/" + iconName); } } }
rapidminer/rapidminer-5
src/com/rapidminer/gui/tools/dialogs/MessageDialog.java
Java
agpl-3.0
1,819
/* Omega User JS Representation * * Copyright (C) 2013 Mohammed Morsi <mo@morsi.org> * Licensed under the AGPLv3 http://www.gnu.org/licenses/agpl.txt */ Omega.User = function(parameters){ $.extend(this, parameters); }; Omega.User.prototype = { json_class : 'Users::User' };
movitto/omega
site/source/javascripts/omega/user.js
JavaScript
agpl-3.0
285
<?php // Copyright (C) 2010-2012 Combodo SARL // // This file is part of iTop. // // iTop 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. // // iTop 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 iTop. If not, see <http://www.gnu.org/licenses/> /** * Does load data from XML files (currently used in the setup only) * * @copyright Copyright (C) 2010-2012 Combodo SARL * @license http://opensource.org/licenses/AGPL-3.0 */ /** * This page is called to perform "asynchronously" the setup actions * parameters * 'operation': one of 'compile_data_model', 'update_db_schema', 'after_db_creation', 'file' * * if 'operation' == 'update_db_schema': * 'mode': install | upgrade * * if 'operation' == 'after_db_creation': * 'mode': install | upgrade * * if 'operation' == 'file': * 'file': string Name of the file to load * 'session_status': string 'start', 'continue' or 'end' * 'percent': integer 0..100 the percentage of completion once the file has been loaded */ define('SAFE_MINIMUM_MEMORY', 64*1024*1024); require_once('../approot.inc.php'); require_once(APPROOT.'/application/utils.inc.php'); require_once(APPROOT.'/setup/setuppage.class.inc.php'); require_once(APPROOT.'/setup/moduleinstaller.class.inc.php'); ini_set('max_execution_time', max(3600, ini_get('max_execution_time'))); // Under Windows SQL/backup operations are part of the timeout and require extra time $sMemoryLimit = trim(ini_get('memory_limit')); if (empty($sMemoryLimit)) { // On some PHP installations, memory_limit does not exist as a PHP setting! // (encountered on a 5.2.0 under Windows) // In that case, ini_set will not work, let's keep track of this and proceed with the data load SetupPage::log_info("No memory limit has been defined in this instance of PHP"); } else { // Check that the limit will allow us to load the data // $iMemoryLimit = utils::ConvertToBytes($sMemoryLimit); if ($iMemoryLimit < SAFE_MINIMUM_MEMORY) { if (ini_set('memory_limit', SAFE_MINIMUM_MEMORY) === FALSE) { SetupPage::log_error("memory_limit is too small: $iMemoryLimit and can not be increased by the script itself."); } else { SetupPage::log_info("memory_limit increased from $iMemoryLimit to ".SAFE_MINIMUM_MEMORY."."); } } } function FatalErrorCatcher($sOutput) { if ( preg_match('|<phpfatalerror>.*</phpfatalerror>|s', $sOutput, $aMatches) ) { header("HTTP/1.0 500 Internal server error."); $errors = ''; foreach ($aMatches as $sMatch) { $errors .= strip_tags($sMatch)."\n"; } $sOutput = "$errors\n"; // Logging to a file does not work if the whole memory is exhausted... //SetupPage::log_error("Fatal error - in $__FILE__ , $errors"); } return $sOutput; } //Define some bogus, invalid HTML tags that no sane //person would ever put in an actual document and tell //PHP to delimit fatal error warnings with them. ini_set('error_prepend_string', '<phpfatalerror>'); ini_set('error_append_string', '</phpfatalerror>'); // Starts the capture of the ouput, and sets a filter to capture the fatal errors. ob_start('FatalErrorCatcher'); // Start capturing the output, and pass it through the fatal error catcher require_once(APPROOT.'/core/config.class.inc.php'); require_once(APPROOT.'/core/log.class.inc.php'); require_once(APPROOT.'/core/kpi.class.inc.php'); require_once(APPROOT.'/core/cmdbsource.class.inc.php'); require_once('./xmldataloader.class.inc.php'); require_once(APPROOT.'/application/ajaxwebpage.class.inc.php'); // Never cache this page header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Fri, 17 Jul 1970 05:00:00 GMT"); // Date in the past /** * Main program */ $sOperation = Utils::ReadParam('operation', ''); try { switch($sOperation) { case 'async_action': ini_set('max_execution_time', max(240, ini_get('max_execution_time'))); // While running the setup it is desirable to see any error that may happen ini_set('display_errors', true); ini_set('display_startup_errors', true); require_once(APPROOT.'/setup/wizardcontroller.class.inc.php'); require_once(APPROOT.'/setup/wizardsteps.class.inc.php'); $sClass = utils::ReadParam('step_class', ''); $sState = utils::ReadParam('step_state', ''); $sActionCode = utils::ReadParam('code', ''); $aParams = utils::ReadParam('params', array(), false, 'raw_data'); $oPage = new ajax_page(''); $oDummyController = new WizardController(''); if (is_subclass_of($sClass, 'WizardStep')) { $oStep = new $sClass($oDummyController, $sState); $sConfigFile = utils::GetConfigFilePath(); if (file_exists($sConfigFile) && !is_writable($sConfigFile) && $oStep->RequiresWritableConfig()) { $oPage->error("<b>Error:</b> the configuration file '".$sConfigFile."' already exists and cannot be overwritten."); $oPage->p("The wizard cannot modify the configuration file for you. If you want to upgrade ".ITOP_APPLICATION.", make sure that the file '<b>".realpath($sConfigFile)."</b>' can be modified by the web server."); $oPage->output(); } else { $oStep->AsyncAction($oPage, $sActionCode, $aParams); } } $oPage->output(); break; default: throw(new Exception("Error unsupported operation '$sOperation'")); } } catch(Exception $e) { header("HTTP/1.0 500 Internal server error."); echo "<p>An error happened while processing the installation:</p>\n"; echo '<p>'.$e."</p>\n"; SetupPage::log_error("An error happened while processing the installation: ".$e); } if (function_exists('memory_get_peak_usage')) { if ($sOperation == 'file') { SetupPage::log_info("loading file '$sFileName', peak memory usage. ".memory_get_peak_usage()); } else { SetupPage::log_info("operation '$sOperation', peak memory usage. ".memory_get_peak_usage()); } } ?>
ucbpi/itop
setup/ajax.dataloader.php
PHP
agpl-3.0
6,467
/* * RapidMiner * * Copyright (C) 2001-2013 by Rapid-I and the contributors * * Complete list of developers available at our web site: * * http://rapid-i.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 com.rapidminer.gui.properties.celleditors.value; import java.awt.Component; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.FocusEvent; import java.awt.event.FocusListener; import javax.swing.AbstractCellEditor; import javax.swing.JButton; import javax.swing.JPanel; import javax.swing.JTable; import javax.swing.JTextField; import com.rapidminer.gui.tools.ResourceAction; import com.rapidminer.operator.Operator; import com.rapidminer.parameter.ParameterTypeRepositoryLocation; import com.rapidminer.repository.RepositoryLocation; import com.rapidminer.repository.gui.RepositoryLocationChooser; /** Cell editor that allows to select a repository entry by pressing a button. * * @author Simon Fischer * */ public class RepositoryLocationValueCellEditor extends AbstractCellEditor implements PropertyValueCellEditor { private static final long serialVersionUID = 1L; private final JPanel panel = new JPanel(); private final JTextField textField = new JTextField(12); private Operator operator; public RepositoryLocationValueCellEditor(final ParameterTypeRepositoryLocation type) { GridBagLayout gridBagLayout = new GridBagLayout(); panel.setLayout(gridBagLayout); panel.setToolTipText(type.getDescription()); textField.setToolTipText(type.getDescription()); textField.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { fireEditingStopped(); } }); GridBagConstraints c = new GridBagConstraints(); c.fill = GridBagConstraints.BOTH; c.weightx = 1; c.weighty = 1; c.gridwidth = GridBagConstraints.RELATIVE; panel.add(textField, c); final JButton button = new JButton(new ResourceAction(true, "repository_select_location") { private static final long serialVersionUID = 1L; { putValue(NAME, null); } @Override public void actionPerformed(ActionEvent e) { com.rapidminer.Process process = (RepositoryLocationValueCellEditor.this.operator != null) ? RepositoryLocationValueCellEditor.this.operator.getProcess() : null; RepositoryLocation processLocation = null; if (process != null) { processLocation = process.getRepositoryLocation(); if (processLocation != null) { processLocation = processLocation.parent(); } } String locationName = RepositoryLocationChooser.selectLocation(processLocation, textField.getText(), panel, type.isAllowEntries(), type.isAllowFolders(), false, type.isEnforceValidRepositoryEntryName(), type.isOnlyWriteableLocations()); // if (locationName != null) { // if ((operator != null) && (operator.getProcess() != null)) { // try { // RepositoryLocation loc = new RepositoryLocation(processLocation, locationName); // locationName = operator.getProcess().makeRelativeRepositoryLocation(loc); // } catch (Exception ex) { // LogService.getRoot().log(Level.WARNING, "Cannot make relative process location for '"+locationName+"': "+ex, ex); // } // } // } if (locationName != null) { textField.setText(locationName); } fireEditingStopped(); } }); button.addFocusListener(new FocusListener() { @Override public void focusLost(FocusEvent e) { // fire only if the focus didn't move to the textField. If this check // would not be included, fireEditingStopped() would remove the // table from this RepositoryLocationValeCellEditor's listenerList, // and thus the call to fireEditingStopped() in the event handler of // the textField would be without effect, and thus the user's choice // would be dismissed. // Additionally, the event is only fired if the focus loss is permamently, // i.e. it is not fired if the user e.g. just switched to another window. // Otherwise any changes made after switching back to rapidminer would // not be saved for the same reasons as stated above. if (e.getOppositeComponent() != textField && !e.isTemporary()) { fireEditingStopped(); } } @Override public void focusGained(FocusEvent e) { } }); button.setMargin(new Insets(0, 0, 0, 0)); c.gridwidth = GridBagConstraints.REMAINDER; c.weightx = 0; panel.add(button, c); textField.addFocusListener(new FocusListener() { @Override public void focusLost(FocusEvent e) { // fire only if the focus didn't move to the button. If this check // would not be included, fireEditingStopped() would remove the // table from this RepositoryLocationValeCellEditor's listenerList, // and thus the call to fireEditingStopped() in the event handler of // the button would be without effect, and thus the user's choice // in the RepositoryBrowser dialog would be dismissed. // Additionally, the event is only fired if the focus loss is permamently, // i.e. it is not fired if the user e.g. just switched to another window. // Otherwise any changes made after switching back to rapidminer would // not be saved for the same reasons as stated above. if (e.getOppositeComponent() != button && !e.isTemporary()) { fireEditingStopped(); } } @Override public void focusGained(FocusEvent e) { } }); } @Override public Object getCellEditorValue() { return (textField.getText().trim().length() == 0) ? null : textField.getText().trim(); } @Override public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int col) { textField.setText((value == null) ? "" : value.toString()); return panel; } @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { return getTableCellEditorComponent(table, value, isSelected, row, column); } @Override public boolean useEditorAsRenderer() { return true; } @Override public boolean rendersLabel() { return false; } @Override public void setOperator(Operator operator) { this.operator = operator; } }
aborg0/RapidMiner-Unuk
src/com/rapidminer/gui/properties/celleditors/value/RepositoryLocationValueCellEditor.java
Java
agpl-3.0
7,059
/* Copyright (C) 1999-2017 Claude SIMON (http://q37.info/contact/). This file is part of the Epeios framework. The Epeios framework 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. The Epeios framework 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 the Epeios framework. If not, see <http://www.gnu.org/licenses/> */ #define LST__COMPILATION #include "lst.h" #include "flf.h" #include "str.h" // Retourne l'lment succdant 'Element', ou LST_INEXISTANT si inexistant. sdr::row_t__ lst::Successeur_( sdr::row_t__ Element, sdr::size__ Amount, const dStore &Libres ) { while( ( ++Element < Amount ) && Libres.IsAvailable( Element ) ) {}; if ( Element >= Amount ) return qNIL; else return Element; } // Retourne l'lment prcdent 'Element', ou LST_INEXISTANT si inexistant. sdr::row_t__ lst::Predecesseur_( sdr::row_t__ Element, const dStore &Libres ) { bso::bool__ Trouve = false; while( ( Element > 0 ) && !( Trouve = !Libres.IsAvailable( --Element ) ) ) {}; if ( Trouve ) return Element; else return qNIL; } void lst::MarkAsReleased_( sdr::row_t__ First, sdr::row_t__ Last, dStore &Store ) { while ( First < Last ) Store.RestorationRelease( Last-- ); Store.RestorationRelease( First ); }
epeios-q37/esketch-cli
src/epeios/lst.cpp
C++
agpl-3.0
1,687
angular.module("viradapp.programacao", []) .factory('Programacao', function() { return { init: function(){console.log("stub service")}, } }) .filter('newlefilter', function(){ /** * This filter receives 3 objects: * 1 - Events Lazy sequence * 2 - Spaces Lazy sequence * 3 - And a Filter object * * Returns the Filtered Lazy Sequence * */ return function(events, spaces, filters){ var lefilter = function (event){ var hasSpace = false; var space = spaces.findWhere({ id: event.spaceId.toString() }); if(typeof space !== 'undefined'){ if(filters.places.data.length > 0){ // If the places array is not empty, // test if the event belongs to one of the places if(!Lazy(filters.places.data).contains(space.id)){ return false; } } var lm = new RegExp((filters.query), 'ig'); hasSpace = lm.test(space.name.substring(filters.query)); event.spaceData = space; } var date = moment(event.startsOn + " " + event.startsAt, "YYYY-MM-DD hh:mm").format('x'); return (date <= filters.ending && date >= filters.starting) && (event.name.indexOf(filters.query) >= 0 || hasSpace); }; // MOVE TO INIT events.groupBy('spaceId').sortBy(); return events.filter(lefilter); }; }) .filter('lefilter', function(){ var projects = { '865': 'Virada Coral', '857': 'Viradinha', '794': 'II Mostra de Teatros e Espaços Independentes', '855': '19º Cultura Inglesa Festival' }; /** * This filter receives 3 objects: * 1 - Events Lazy sequence * 2 - Spaces Lazy sequence * 3 - And a Filter object * * Returns the Filtered Lazy Sequence * */ return function(events, spaces, filters){ events.source.forEach(function(event){ if(!event.incProject && event.project && event.project.id && projects[event.project.id]){ event.name += ' [' + projects[event.project.id] + ']'; event.incProject = true; } }); var lefilter = function (event){ var hasSpace = false; var lm = new RegExp((filters.query), 'ig'); var belongsTo = true; var space = spaces.findWhere({ id: event.spaceId.toString() }); event.space = space; if(typeof space !== 'undefined'){ if(filters.places.data.length > 0){ // If the places array is not empty, // test if the event belongs to one of the places if(!Lazy(filters.places.data).contains(space.id.toString())){ belongsTo = false; } } hasSpace = lm.test(space.name.substring(filters.query)); } else if(filters.places.data.length > 0){ belongsTo = false; } var date = moment(event.startsOn + " " + event.startsAt, "YYYY-MM-DD hh:mm").format('x'); var hasInTitle = false; if(typeof space !== 'undefined'){ hasInTitle = lm.test(event.name.substring(filters.query)); } return belongsTo && (date <= filters.ending && date >= filters.starting) && (hasInTitle || hasSpace); }; return events.filter(lefilter); }; }) .filter('toSpaces', function(){ /** * This filter receives a: * 1 - Filtered Lazy sequence as data * * Returns an array with filtered spaces * */ return function(data, spaces){ var currSpaces = []; var toSpaces = function(event){ var space = spaces.findWhere({ id: event.spaceId.toString() }); if(typeof space !== 'undefined'){ var curr = Lazy(currSpaces) .findWhere({id : event.spaceId.toString()}); if(typeof curr !== 'undefined'){ curr.events.push(event); } else { curr = space; curr.events = []; curr.events.push(event); currSpaces.push(curr); } } return true; }; var flattened = []; var flattenList = function(space){ var spc = space.data; spc.index = space.index; flattened.push(spc); Lazy(space.events).each(function(event){ flattened.push(event); }); } data.each(toSpaces); Lazy(currSpaces).sortBy('index').each(flattenList); return flattened; }; }) .filter('searchPlaces', function(){ return function (items, query) { if(typeof items === 'undefined') return; var filtered = []; var letterMatch = new RegExp((query), 'ig'); for (var i = 0; i < items.length; i++) { var item = items[i]; if (query) { if (letterMatch.test(item.name.substring(query.length))) { filtered.push(item); } } else { filtered.push(item); } } return filtered; }; });
hacklabr/emergencias-app-bkp
www/js/programacao.js
JavaScript
agpl-3.0
5,591
class Question < ApplicationRecord belongs_to :creator, :class_name => "Person" belongs_to :modified_by, :class_name => "Person" has_many :answers end
agustinrhcp/advocacycommons
app/models/question.rb
Ruby
agpl-3.0
160
/* * Copyright (C) 2018 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas 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, version 3 of the License. * * Canvas 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/>. */ import React, {PureComponent} from 'react' import {View} from '@instructure/ui-layout' import CreatorEventGroup from './CreatorEventGroup' import * as propTypes from './propTypes' export default class AuditTrail extends PureComponent { static propTypes = { auditTrail: propTypes.auditTrail.isRequired } render() { const {creatorEventGroups} = this.props.auditTrail return ( <View as="div" id="assessment-audit-trail"> {creatorEventGroups.map(group => ( <CreatorEventGroup key={group.creator.key} creatorEventGroup={group} /> ))} </View> ) } }
djbender/canvas-lms
app/jsx/speed_grader/AssessmentAuditTray/components/AuditTrail/index.js
JavaScript
agpl-3.0
1,309
/** * Copyright (c) 2011-2015 libbitcoin developers (see AUTHORS) * * This file is part of libbitcoin-explorer. * * libbitcoin-explorer is free software: you can redistribute it and/or * modify it under the terms of the GNU Affero General Public License with * additional permissions to the one published by the Free Software * Foundation, either version 3 of the License, or (at your option) * any later version. For more information see LICENSE. * * 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/>. */ #ifndef BX_CERT_NEW_HPP #define BX_CERT_NEW_HPP #include <cstdint> #include <iostream> #include <string> #include <vector> #include <boost/program_options.hpp> #include <bitcoin/bitcoin.hpp> #include <bitcoin/explorer/command.hpp> #include <bitcoin/explorer/define.hpp> #include <bitcoin/explorer/generated.hpp> #include <bitcoin/explorer/primitives/address.hpp> #include <bitcoin/explorer/primitives/base16.hpp> #include <bitcoin/explorer/primitives/base2.hpp> #include <bitcoin/explorer/primitives/base58.hpp> #include <bitcoin/explorer/primitives/base64.hpp> #include <bitcoin/explorer/primitives/base85.hpp> #include <bitcoin/explorer/primitives/btc.hpp> #include <bitcoin/explorer/primitives/btc160.hpp> #include <bitcoin/explorer/primitives/btc256.hpp> #include <bitcoin/explorer/primitives/byte.hpp> #include <bitcoin/explorer/primitives/cert_key.hpp> #include <bitcoin/explorer/primitives/ec_private.hpp> #include <bitcoin/explorer/primitives/ec_public.hpp> #include <bitcoin/explorer/primitives/encoding.hpp> #include <bitcoin/explorer/primitives/endorsement.hpp> #include <bitcoin/explorer/primitives/hashtype.hpp> #include <bitcoin/explorer/primitives/hd_key.hpp> #include <bitcoin/explorer/primitives/hd_priv.hpp> #include <bitcoin/explorer/primitives/hd_pub.hpp> #include <bitcoin/explorer/primitives/header.hpp> #include <bitcoin/explorer/primitives/input.hpp> #include <bitcoin/explorer/primitives/language.hpp> #include <bitcoin/explorer/primitives/output.hpp> #include <bitcoin/explorer/primitives/point.hpp> #include <bitcoin/explorer/primitives/raw.hpp> #include <bitcoin/explorer/primitives/script.hpp> #include <bitcoin/explorer/primitives/signature.hpp> #include <bitcoin/explorer/primitives/stealth.hpp> #include <bitcoin/explorer/primitives/transaction.hpp> #include <bitcoin/explorer/primitives/uri.hpp> #include <bitcoin/explorer/primitives/wif.hpp> #include <bitcoin/explorer/primitives/wrapper.hpp> #include <bitcoin/explorer/utility.hpp> /********* GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY **********/ namespace libbitcoin { namespace explorer { namespace commands { /** * Various localizable strings. */ #define BX_CERT_NEW_SAVE_FAIL \ "Failed to save certificate file: %1%." /** * Class to implement the cert-new command. */ class cert_new : public command { public: /** * The symbolic (not localizable) command name, lower case. */ BCX_API static const char* symbol() { return "cert-new"; } /** * The member symbolic (not localizable) command name, lower case. */ BCX_API virtual const char* name() { return cert_new::symbol(); } /** * The localizable command category name, upper case. */ BCX_API virtual const char* category() { return "MATH"; } /** * The localizable command description. */ BCX_API virtual const char* description() { return "Create a private Curve ZMQ certificate for use with a Libbitcoin/Obelisk server. WARNING: entropy is obtained from the underlying platform."; } /** * Load program argument definitions. * A value of -1 indicates that the number of instances is unlimited. * @return The loaded program argument definitions. */ BCX_API virtual arguments_metadata& load_arguments() { return get_argument_metadata() .add("PRIVATE_CERT", 1); } /** * Load parameter fallbacks from file or input as appropriate. * @param[in] input The input stream for loading the parameters. * @param[in] The loaded variables. */ BCX_API virtual void load_fallbacks(std::istream& input, po::variables_map& variables) { } /** * Load program option definitions. * BUGBUG: see boost bug/fix: svn.boost.org/trac/boost/ticket/8009 * @return The loaded program option definitions. */ BCX_API virtual options_metadata& load_options() { using namespace po; options_description& options = get_option_metadata(); options.add_options() ( BX_HELP_VARIABLE ",h", value<bool>()->zero_tokens(), "Get a description and instructions for this command." ) ( BX_CONFIG_VARIABLE ",c", value<boost::filesystem::path>(), "The path to the configuration settings file." ) ( "metadata,m", value<std::vector<std::string>>(&option_.metadatas), "The set of name-value pairs to add as metadata to the certificate, encoded as NAME:VALUE." ) ( "PRIVATE_CERT", value<boost::filesystem::path>(&argument_.private_cert)->required(), "The path to write the certificate file." ); return options; } /** * Invoke the command. * @param[out] output The input stream for the command execution. * @param[out] error The input stream for the command execution. * @return The appropriate console return code { -1, 0, 1 }. */ BCX_API virtual console_result invoke(std::ostream& output, std::ostream& cerr); /* Properties */ /** * Get the value of the PRIVATE_CERT argument. */ BCX_API virtual boost::filesystem::path& get_private_cert_argument() { return argument_.private_cert; } /** * Set the value of the PRIVATE_CERT argument. */ BCX_API virtual void set_private_cert_argument( const boost::filesystem::path& value) { argument_.private_cert = value; } /** * Get the value of the metadata options. */ BCX_API virtual std::vector<std::string>& get_metadatas_option() { return option_.metadatas; } /** * Set the value of the metadata options. */ BCX_API virtual void set_metadatas_option( const std::vector<std::string>& value) { option_.metadatas = value; } private: /** * Command line argument bound variables. * Uses cross-compiler safe constructor-based zeroize. * Zeroize for unit test consistency with program_options initialization. */ struct argument { argument() : private_cert() { } boost::filesystem::path private_cert; } argument_; /** * Command line option bound variables. * Uses cross-compiler safe constructor-based zeroize. * Zeroize for unit test consistency with program_options initialization. */ struct option { option() : metadatas() { } std::vector<std::string> metadatas; } option_; }; } // namespace commands } // namespace explorer } // namespace libbitcoin #endif
tuomassiren/libbitcoin-explorer
include/bitcoin/explorer/commands/cert-new.hpp
C++
agpl-3.0
7,697
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2018-01-15 08:13 from __future__ import unicode_literals import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('attribution', '0021_attributionnew_substitute'), ] operations = [ migrations.AlterField( model_name='attributionnew', name='substitute', field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='base.Person'), ), ]
uclouvain/OSIS-Louvain
attribution/migrations/0022_auto_20180115_0913.py
Python
agpl-3.0
579
/* * Funambol is a mobile platform developed by Funambol, Inc. * Copyright (C) 2003 - 2007 Funambol, Inc. * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License version 3 as published by * the Free Software Foundation with the addition of the following permission * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED * WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. * * 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 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 or write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301 USA. * * You can contact Funambol, Inc. headquarters at 643 Bair Island Road, Suite * 305, Redwood City, CA 94063, USA, or at email address info@funambol.com. * * The interactive user interfaces in modified source and object code versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU Affero General Public License version 3. * * In accordance with Section 7(b) of the GNU Affero General Public License * version 3, these Appropriate Legal Notices must retain the display of the * "Powered by Funambol" logo. If the display of the logo is not reasonably * feasible for technical reasons, the Appropriate Legal Notices must display * the words "Powered by Funambol". */ package com.funambol.server.engine; import com.funambol.framework.core.ModificationCommand; import com.funambol.framework.engine.SyncOperation; import com.funambol.framework.engine.source.SyncSource; import com.funambol.server.engine.Sync4jOperationStatus; /** * This class represents a SyncOperation excecuted without problems. * * * * @version $Id: Sync4jOperationStatusConflict.java,v 1.1.1.1 2008-02-21 23:35:46 stefano_fornari Exp $ */ public class Sync4jOperationStatusConflict extends Sync4jOperationStatus { /** * The code identifying how the conflict has been resolved */ private int conflictResolution; /** Creates a new instance of Sync4jOperationStatus */ public Sync4jOperationStatusConflict(SyncOperation operation , SyncSource syncSource, ModificationCommand cmd , int resolution) { super(operation, syncSource); this.cmd = cmd; this.conflictResolution = resolution; } /** Which SyncML status code this condition corresponds to? * */ public int getStatusCode() { return conflictResolution; } }
accesstest3/cfunambol
ds/ds-server/src/main/java/com/funambol/server/engine/Sync4jOperationStatusConflict.java
Java
agpl-3.0
3,079
<?php // created: 2014-04-22 11:18:12 $searchFields['quote_Quotations'] = array ( 'name' => array ( 'query_type' => 'default', ), 'amount' => array ( 'query_type' => 'default', ), 'next_step' => array ( 'query_type' => 'default', ), 'probability' => array ( 'query_type' => 'default', ), 'lead_source' => array ( 'query_type' => 'default', 'operator' => '=', 'options' => 'lead_source_dom', 'template_var' => 'LEAD_SOURCE_OPTIONS', ), 'quote_quotations_type' => array ( 'query_type' => 'default', 'operator' => '=', 'options' => 'opportunity_type_dom', 'template_var' => 'TYPE_OPTIONS', ), 'sales_stage' => array ( 'query_type' => 'default', 'operator' => '=', 'options' => 'sales_stage_dom', 'template_var' => 'SALES_STAGE_OPTIONS', 'options_add_blank' => true, ), 'current_user_only' => array ( 'query_type' => 'default', 'db_field' => array ( 0 => 'assigned_user_id', ), 'my_items' => true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool', ), 'assigned_user_id' => array ( 'query_type' => 'default', ), 'open_only' => array ( 'query_type' => 'default', 'db_field' => array ( 0 => 'sales_stage', ), 'operator' => 'not in', 'closed_values' => array ( 0 => 'Closed Won', 1 => 'Closed Lost', ), 'type' => 'bool', ), 'range_date_entered' => array ( 'query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true, ), 'start_range_date_entered' => array ( 'query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true, ), 'end_range_date_entered' => array ( 'query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true, ), 'range_date_modified' => array ( 'query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true, ), 'start_range_date_modified' => array ( 'query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true, ), 'end_range_date_modified' => array ( 'query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true, ), 'range_date_closed' => array ( 'query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true, ), 'start_range_date_closed' => array ( 'query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true, ), 'end_range_date_closed' => array ( 'query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true, ), 'range_total_amt' => array ( 'query_type' => 'default', 'enable_range_search' => true, ), 'start_range_total_amt' => array ( 'query_type' => 'default', 'enable_range_search' => true, ), 'end_range_total_amt' => array ( 'query_type' => 'default', 'enable_range_search' => true, ), );
chip1exchange/xchangecrm
custom/working/modules/quote_Quotations/metadata/SearchFields.php
PHP
agpl-3.0
3,045
# -*- coding: utf-8 -*- from openerp import models, fields, api, SUPERUSER_ID, exceptions import uuid class Volunteer(models.Model): _inherit = 'res.users' REASONS = [ ('no_time', u'Nie mam czasu.'), ('location_change', u'Zmieniam miejsce zamieszkania.'), ('personal_change', u'Zmienia się moja sytuacja osobista (np. kończę studia).'), ('bad_offers', u'Oferty nie spełniły moich oczekiwań.'), ('no_satisfaction', u'Wolontariat nie sprawia mi już satysfakcji.'), ('else', u'Inny (wpisz powód)'), ] active_state = fields.Selection(selection_add=[('deleted', 'usunięty')]) reason_for_deleting_account = fields.Selection(REASONS, string=u"Dlaczego chcesz usunąć konto?") reason_other_description = fields.Text() @api.multi def get_deletion_reason(self): self.ensure_one() return dict(Volunteer.REASONS).get(self.reason_for_deleting_account) @api.one def delete_account(self): if not (self.env.uid == SUPERUSER_ID or self.user_has_groups('bestja_base.instance_admin')): raise exceptions.AccessError("Nie masz uprawnień do usuwania użytkowników!") self.sudo().write({ 'login': uuid.uuid1(), 'name': 'Konto usunięte', 'street_gov': '', 'street_number_gov': '', 'apt_number_gov': '', 'zip_code_gov': '', 'email': '', 'phone': '', 'street': '', 'street_number': '', 'apt_number': '', 'zip_code': '', 'curriculum_vitae': None, 'cv_filename': '', 'active_state': 'deleted', 'active': False, 'pesel': '', 'document_id_kind': None, 'document_id': '', })
EE/bestja
addons/bestja_account_deletion/models.py
Python
agpl-3.0
1,832
import React from 'react' import { shallow, configure } from 'enzyme' import Adapter from 'enzyme-adapter-react-16' import configureStore from 'redux-mock-store' import GeneBreakdown from './GeneBreakdown' import { STATE1, SEARCH_HASH } from '../fixtures' configure({ adapter: new Adapter() }) test('shallow-render without crashing', () => { const store = configureStore()(STATE1) shallow(<GeneBreakdown store={store} searchHash={SEARCH_HASH} />) })
macarthur-lab/seqr
ui/shared/components/panel/search/GeneBreakdown.test.js
JavaScript
agpl-3.0
459
//############################################################################# //# # //# Copyright (C) <2015> <IMS MAXIMS> # //# # //# 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/>. # //# # //# IMS MAXIMS provides absolutely NO GUARANTEE OF THE CLINICAL SAFTEY of # //# this program. Users of this software do so entirely at their own risk. # //# IMS MAXIMS only ensures the Clinical Safety of unaltered run-time # //# software that it builds, deploys and maintains. # //# # //############################################################################# //#EOH // This code was generated by Barbara Worwood using IMS Development Environment (version 1.80 build 5589.25814) // Copyright (C) 1995-2015 IMS MAXIMS. All rights reserved. // WARNING: DO NOT MODIFY the content of this file package ims.core.vo.lookups; import ims.framework.cn.data.TreeNode; import java.util.ArrayList; import ims.framework.utils.Image; import ims.framework.utils.Color; public class TransferStatus extends ims.vo.LookupInstVo implements TreeNode { private static final long serialVersionUID = 1L; public TransferStatus() { super(); } public TransferStatus(int id) { super(id, "", true); } public TransferStatus(int id, String text, boolean active) { super(id, text, active, null, null, null); } public TransferStatus(int id, String text, boolean active, TransferStatus parent, Image image) { super(id, text, active, parent, image); } public TransferStatus(int id, String text, boolean active, TransferStatus parent, Image image, Color color) { super(id, text, active, parent, image, color); } public TransferStatus(int id, String text, boolean active, TransferStatus parent, Image image, Color color, int order) { super(id, text, active, parent, image, color, order); } public static TransferStatus buildLookup(ims.vo.LookupInstanceBean bean) { return new TransferStatus(bean.getId(), bean.getText(), bean.isActive()); } public String toString() { if(getText() != null) return getText(); return ""; } public TreeNode getParentNode() { return (TransferStatus)super.getParentInstance(); } public TransferStatus getParent() { return (TransferStatus)super.getParentInstance(); } public void setParent(TransferStatus parent) { super.setParentInstance(parent); } public TreeNode[] getChildren() { ArrayList children = super.getChildInstances(); TransferStatus[] typedChildren = new TransferStatus[children.size()]; for (int i = 0; i < children.size(); i++) { typedChildren[i] = (TransferStatus)children.get(i); } return typedChildren; } public int addChild(TreeNode child) { if (child instanceof TransferStatus) { super.addChild((TransferStatus)child); } return super.getChildInstances().size(); } public int removeChild(TreeNode child) { if (child instanceof TransferStatus) { super.removeChild((TransferStatus)child); } return super.getChildInstances().size(); } public Image getExpandedImage() { return super.getImage(); } public Image getCollapsedImage() { return super.getImage(); } public static ims.framework.IItemCollection getNegativeInstancesAsIItemCollection() { TransferStatusCollection result = new TransferStatusCollection(); result.add(PENDING); result.add(TRANSFERRED); result.add(REJECTED); return result; } public static TransferStatus[] getNegativeInstances() { TransferStatus[] instances = new TransferStatus[3]; instances[0] = PENDING; instances[1] = TRANSFERRED; instances[2] = REJECTED; return instances; } public static String[] getNegativeInstanceNames() { String[] negativeInstances = new String[3]; negativeInstances[0] = "PENDING"; negativeInstances[1] = "TRANSFERRED"; negativeInstances[2] = "REJECTED"; return negativeInstances; } public static TransferStatus getNegativeInstance(String name) { if(name == null) return null; String[] negativeInstances = getNegativeInstanceNames(); for (int i = 0; i < negativeInstances.length; i++) { if(negativeInstances[i].equals(name)) return getNegativeInstances()[i]; } return null; } public static TransferStatus getNegativeInstance(Integer id) { if(id == null) return null; TransferStatus[] negativeInstances = getNegativeInstances(); for (int i = 0; i < negativeInstances.length; i++) { if(negativeInstances[i].getID() == id) return negativeInstances[i]; } return null; } public int getTypeId() { return TYPE_ID; } public static final int TYPE_ID = 1021232; public static final TransferStatus PENDING = new TransferStatus(-1624, "Pending", true, null, null, Color.Default); public static final TransferStatus TRANSFERRED = new TransferStatus(-1625, "Transferred", true, null, null, Color.Default); public static final TransferStatus REJECTED = new TransferStatus(-1626, "Rejected", true, null, null, Color.Default); }
IMS-MAXIMS/openMAXIMS
Source Library/openmaxims_workspace/ValueObjects/src/ims/core/vo/lookups/TransferStatus.java
Java
agpl-3.0
6,344
/* * digitalpetri OPC-UA SDK * * Copyright (C) 2015 Kevin Herron * * 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 com.digitalpetri.opcua.sdk.server.model.objects; import java.util.Optional; import com.digitalpetri.opcua.sdk.core.model.objects.AggregateConfigurationType; import com.digitalpetri.opcua.sdk.server.api.UaNamespace; import com.digitalpetri.opcua.sdk.server.util.UaObjectType; import com.digitalpetri.opcua.stack.core.types.builtin.DataValue; import com.digitalpetri.opcua.stack.core.types.builtin.LocalizedText; import com.digitalpetri.opcua.stack.core.types.builtin.NodeId; import com.digitalpetri.opcua.stack.core.types.builtin.QualifiedName; import com.digitalpetri.opcua.stack.core.types.builtin.Variant; import com.digitalpetri.opcua.stack.core.types.builtin.unsigned.UByte; import com.digitalpetri.opcua.stack.core.types.builtin.unsigned.UInteger; @UaObjectType(name = "AggregateConfigurationType") public class AggregateConfigurationNode extends BaseObjectNode implements AggregateConfigurationType { public AggregateConfigurationNode( UaNamespace namespace, NodeId nodeId, QualifiedName browseName, LocalizedText displayName, Optional<LocalizedText> description, Optional<UInteger> writeMask, Optional<UInteger> userWriteMask, UByte eventNotifier) { super(namespace, nodeId, browseName, displayName, description, writeMask, userWriteMask, eventNotifier); } public Boolean getTreatUncertainAsBad() { Optional<Boolean> treatUncertainAsBad = getProperty("TreatUncertainAsBad"); return treatUncertainAsBad.orElse(null); } public UByte getPercentDataBad() { Optional<UByte> percentDataBad = getProperty("PercentDataBad"); return percentDataBad.orElse(null); } public UByte getPercentDataGood() { Optional<UByte> percentDataGood = getProperty("PercentDataGood"); return percentDataGood.orElse(null); } public Boolean getUseSlopedExtrapolation() { Optional<Boolean> useSlopedExtrapolation = getProperty("UseSlopedExtrapolation"); return useSlopedExtrapolation.orElse(null); } public synchronized void setTreatUncertainAsBad(Boolean treatUncertainAsBad) { getPropertyNode("TreatUncertainAsBad").ifPresent(n -> { n.setValue(new DataValue(new Variant(treatUncertainAsBad))); }); } public synchronized void setPercentDataBad(UByte percentDataBad) { getPropertyNode("PercentDataBad").ifPresent(n -> { n.setValue(new DataValue(new Variant(percentDataBad))); }); } public synchronized void setPercentDataGood(UByte percentDataGood) { getPropertyNode("PercentDataGood").ifPresent(n -> { n.setValue(new DataValue(new Variant(percentDataGood))); }); } public synchronized void setUseSlopedExtrapolation(Boolean useSlopedExtrapolation) { getPropertyNode("UseSlopedExtrapolation").ifPresent(n -> { n.setValue(new DataValue(new Variant(useSlopedExtrapolation))); }); } }
bencaldwell/ua-server-sdk
ua-server/src/main/java/com/digitalpetri/opcua/sdk/server/model/objects/AggregateConfigurationNode.java
Java
agpl-3.0
3,779
<?php /** * @author Joas Schilling <coding@schilljs.com> * * @copyright Copyright (c) 2017, ownCloud GmbH * @license AGPL-3.0 * * This code is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * 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, version 3, * along with this program. If not, see <http://www.gnu.org/licenses/> * */ namespace OC\DB\QueryBuilder; use OCP\DB\QueryBuilder\IParameter; class Parameter implements IParameter { /** @var mixed */ protected $name; public function __construct($name) { $this->name = $name; } /** * @return string */ public function __toString() { return (string) $this->name; } }
sharidas/core
lib/private/DB/QueryBuilder/Parameter.php
PHP
agpl-3.0
1,060
/* * Copyright (C) 2011-2012 DarkCore <http://www.darkpeninsula.eu/> * Copyright (C) 2011-2012 Project SkyFire <http://www.projectskyfire.org/> * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2012 MaNGOS <http://getmangos.com/> * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU 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 General Public License for * more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see <http://www.gnu.org/licenses/>. */ /* Script Data Start SDName: Boss_Skadi SDAuthor: LordVanMartin, JohnHoliver SD%Complete: 90% SDComment: <Known Bugs> After Unmount() he appears to still be flying even with SetFlying(false) </Known Bugs> SDCategory: Utgarde Pinnacle Script Data End */ #include "ScriptPCH.h" #include "utgarde_pinnacle.h" //Yell enum eYells { SAY_AGGRO = -1575004, SAY_KILL_1 = -1575005, SAY_KILL_2 = -1575006, EMOTE_RANGE = -1575007, //Skadi SAY_DEATH = -1575008, SAY_DRAKE_DEATH = -1575009, EMOTE_BREATH = -1575010, //Grauf SAY_DRAKE_BREATH_1 = -1575011, SAY_DRAKE_BREATH_2 = -1575012, SAY_DRAKE_BREATH_3 = -1575013, }; static Position SpawnLoc = {468.931f, -513.555f, 104.723f, 0}; static Position Location[]= { // Boss {341.740997f, -516.955017f, 104.66900f, 0}, // 0 {293.299f, -505.95f, 142.03f, 0}, // 1 {301.664f, -535.164f, 146.097f, 0}, // 2 {521.031006f, -544.667847f, 128.80064f, 0}, // 3 {477.311981f, -509.296814f, 104.72308f, 0}, // 4 {341.740997f, -516.955017f, 104.66900f, 0}, // 5 {341.740997f, -516.955017f, 104.66900f, 0}, // 6 {341.740997f, -516.955017f, 104.66900f, 0}, // 7 // Triggers Left {469.661f, -484.546f, 104.712f, 0}, // 8 {483.315f, -485.028f, 104.718f, 0}, // 9 {476.87f, -487.994f, 104.735f, 0}, //10 {477.512f, -497.772f, 104.728f, 0}, //11 {486.287f, -500.759f, 104.722f, 0}, //12 {480.1f, -503.895f, 104.722f, 0}, //13 {472.391f, -505.103f, 104.723f, 0}, //14 {478.885f, -510.803f, 104.723f, 0}, //15 {489.529f, -508.615f, 104.723f, 0}, //16 {484.272f, -508.589f, 104.723f, 0}, //17 {465.328f, -506.495f, 104.427f, 0}, //18 {456.885f, -508.104f, 104.447f, 0}, //19 {450.177f, -507.989f, 105.247f, 0}, //20 {442.273f, -508.029f, 104.813f, 0}, //21 {434.225f, -508.19f, 104.787f, 0}, //22 {423.902f, -508.525f, 104.274f, 0}, //23 {414.551f, -508.645f, 105.136f, 0}, //24 {405.787f, -508.755f, 104.988f, 0}, //25 {398.812f, -507.224f, 104.82f, 0}, //26 {389.702f, -506.846f, 104.729f, 0}, //27 {381.856f, -506.76f, 104.756f, 0}, //28 {372.881f, -507.254f, 104.779f, 0}, //29 {364.978f, -508.182f, 104.673f, 0}, //30 {357.633f, -508.075f, 104.647f, 0}, //31 {350.008f, -506.826f, 104.588f, 0}, //32 {341.69f, -506.77f, 104.499f, 0}, //33 {335.31f, -505.745f, 105.18f, 0}, //34 {471.178f, -510.74f, 104.723f, 0}, //35 {461.759f, -510.365f, 104.199f, 0}, //36 {424.07287f, -510.082916f, 104.711082f, 0}, //37 // Triggers Right {489.46f, -513.297f, 105.413f, 0}, //38 {485.706f, -517.175f, 104.724f, 0}, //39 {480.98f, -519.313f, 104.724f, 0}, //40 {475.05f, -520.52f, 104.724f, 0}, //41 {482.97f, -512.099f, 104.724f, 0}, //42 {477.082f, -514.172f, 104.724f, 0}, //43 {468.991f, -516.691f, 104.724f, 0}, //44 {461.722f, -517.063f, 104.627f, 0}, //45 {455.88f, -517.681f, 104.707f, 0}, //46 {450.499f, -519.099f, 104.701f, 0}, //47 {444.889f, -518.963f, 104.82f, 0}, //48 {440.181f, -518.893f, 104.861f, 0}, //49 {434.393f, -518.758f, 104.891f, 0}, //50 {429.328f, -518.583f, 104.904f, 0}, //51 {423.844f, -518.394f, 105.004f, 0}, //52 {418.707f, -518.266f, 105.135f, 0}, //53 {413.377f, -518.085f, 105.153f, 0}, //54 {407.277f, -517.844f, 104.893f, 0}, //55 {401.082f, -517.443f, 104.723f, 0}, //56 {394.933f, -514.64f, 104.724f, 0}, //57 {388.917f, -514.688f, 104.734f, 0}, //58 {383.814f, -515.834f, 104.73f, 0}, //59 {377.887f, -518.653f, 104.777f, 0}, //60 {371.376f, -518.289f, 104.781f, 0}, //61 {365.669f, -517.822f, 104.758f, 0}, //62 {359.572f, -517.314f, 104.706f, 0}, //63 {353.632f, -517.146f, 104.647f, 0}, //64 {347.998f, -517.038f, 104.538f, 0}, //65 {341.803f, -516.98f, 104.584f, 0}, //66 {335.879f, -516.674f, 104.628f, 0}, //67 {329.871f, -515.92f, 104.711f, 0}, //68 // Breach Zone {485.4577f, -511.2515f, 115.3011f, 0}, //69 {435.1892f, -514.5232f, 118.6719f, 0}, //70 {413.9327f, -540.9407f, 138.2614f, 0}, //71 }; enum eCombatPhase { FLYING, SKADI }; enum eSpells { //Skadi Spells SPELL_CRUSH = 50234, SPELL_POISONED_SPEAR = 50225, //isn't being casted =/ SPELL_WHIRLWIND = 50228, //random target, but not the tank approx. every 20s SPELL_RAPID_FIRE = 56570, SPELL_HARPOON_DAMAGE = 56578, SPELL_FREEZING_CLOUD = 47579, }; enum eCreature { CREATURE_YMIRJAR_WARRIOR = 26690, CREATURE_YMIRJAR_WITCH_DOCTOR = 26691, CREATURE_YMIRJAR_HARPOONER = 26692, CREATURE_GRAUF = 26893, CREATURE_TRIGGER = 28351, DATA_MOUNT = 27043, }; enum eAchievments { ACHIEV_TIMED_START_EVENT = 17726, }; class boss_skadi : public CreatureScript { public: boss_skadi() : CreatureScript("boss_skadi") { } CreatureAI* GetAI(Creature* creature) const { return new boss_skadiAI (creature); } struct boss_skadiAI : public ScriptedAI { boss_skadiAI(Creature* creature) : ScriptedAI(creature), Summons(me) { m_pInstance = creature->GetInstanceScript(); } InstanceScript* m_pInstance; SummonList Summons; uint64 m_uiGraufGUID; std::vector<uint64> triggersGUID; uint32 m_uiCrushTimer; uint32 m_uiPoisonedSpearTimer; uint32 m_uiWhirlwindTimer; uint32 m_uiWaypointId; uint32 m_uiMovementTimer; uint32 m_uiMountTimer; uint32 m_uiSummonTimer; uint8 m_uiSpellHitCount; bool m_bSaidEmote; eCombatPhase Phase; void Reset() { triggersGUID.clear(); m_uiCrushTimer = 8000; m_uiPoisonedSpearTimer = 10000; m_uiWhirlwindTimer = 20000; m_uiMountTimer = 3000; m_uiWaypointId = 0; m_bSaidEmote = false; m_uiSpellHitCount = 0; Phase = SKADI; Summons.DespawnAll(); me->SetSpeed(MOVE_FLIGHT, 3.0f); if ((Unit::GetCreature((*me), m_uiGraufGUID) == NULL) && !me->IsMounted()) me->SummonCreature(CREATURE_GRAUF, Location[0].GetPositionX(), Location[0].GetPositionY(), Location[0].GetPositionZ(), 3.0f); if (m_pInstance) { m_pInstance->SetData(DATA_SKADI_THE_RUTHLESS_EVENT, NOT_STARTED); m_pInstance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT); } } void JustReachedHome() { me->SetFlying(false); me->Dismount(); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); if (Unit::GetCreature((*me), m_uiGraufGUID) == NULL) me->SummonCreature(CREATURE_GRAUF, Location[0].GetPositionX(), Location[0].GetPositionY(), Location[0].GetPositionZ(), 3.0f); } void EnterCombat(Unit* /*who*/) { DoScriptText(SAY_AGGRO, me); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); Phase = FLYING; m_uiMovementTimer = 1000; m_uiSummonTimer = 10000; me->SetInCombatWithZone(); if (m_pInstance) { m_pInstance->SetData(DATA_SKADI_THE_RUTHLESS_EVENT, IN_PROGRESS); m_pInstance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT); me->GetMotionMaster()->MoveJump(Location[0].GetPositionX(), Location[0].GetPositionY(), Location[0].GetPositionZ(), 5.0f, 10.0f); me->SetWalk(false); m_uiMountTimer = 1000; Summons.DespawnEntry(CREATURE_GRAUF); } } void JustSummoned(Creature* summoned) { switch (summoned->GetEntry()) { case CREATURE_GRAUF: m_uiGraufGUID = summoned->GetGUID(); break; case CREATURE_YMIRJAR_WARRIOR: case CREATURE_YMIRJAR_WITCH_DOCTOR: case CREATURE_YMIRJAR_HARPOONER: summoned->setActive(true); summoned->SetInCombatWithZone(); if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) summoned->AI()->AttackStart(target); break; case CREATURE_TRIGGER: summoned->CastSpell((Unit*)NULL, SPELL_FREEZING_CLOUD, true); summoned->DespawnOrUnsummon(10*IN_MILLISECONDS); break; } Summons.Summon(summoned); } void SummonedCreatureDespawn(Creature* summoned) { if (summoned->GetEntry() == CREATURE_GRAUF) m_uiGraufGUID = 0; Summons.Despawn(summoned); } void SpellHit(Unit* /*caster*/, const SpellInfo* spell) { if (spell->Id == SPELL_HARPOON_DAMAGE) { m_uiSpellHitCount++; if (m_uiSpellHitCount >= 3) { Phase = SKADI; me->SetFlying(false); me->Dismount(); if (Creature* pGrauf = me->SummonCreature(CREATURE_GRAUF, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 3*IN_MILLISECONDS)) { pGrauf->GetMotionMaster()->MoveFall(); pGrauf->HandleEmoteCommand(EMOTE_ONESHOT_FLYDEATH); } me->GetMotionMaster()->MoveJump(Location[4].GetPositionX(), Location[4].GetPositionY(), Location[4].GetPositionZ(), 5.0f, 10.0f); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); DoScriptText(SAY_DRAKE_DEATH, me); m_uiCrushTimer = 8000; m_uiPoisonedSpearTimer = 10000; m_uiWhirlwindTimer = 20000; me->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM)); } } } void UpdateAI(const uint32 diff) { switch (Phase) { case FLYING: if (!UpdateVictim()) return; if (me->GetPositionX() >= 519) { me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); if (!m_bSaidEmote) { DoScriptText(EMOTE_RANGE, me); m_bSaidEmote = true; } } else { me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); m_bSaidEmote = false; } if (m_uiMountTimer && m_uiMountTimer <= diff) { me->Mount(DATA_MOUNT); me->SetFlying(true); m_uiMountTimer = 0; } else m_uiMountTimer -= diff; if (m_uiSummonTimer <= diff) { SpawnMobs(); m_uiSummonTimer = 25000; } else m_uiSummonTimer -= diff; if (m_uiMovementTimer <= diff) { switch (m_uiWaypointId) { case 0: me->GetMotionMaster()->MovePoint(0, Location[1].GetPositionX(), Location[1].GetPositionY(), Location[1].GetPositionZ()); m_uiMovementTimer = 5000; break; case 1: me->GetMotionMaster()->MovePoint(0, Location[2].GetPositionX(), Location[2].GetPositionY(), Location[2].GetPositionZ()); m_uiMovementTimer = 2000; break; case 2: me->GetMotionMaster()->MovePoint(0, Location[3].GetPositionX(), Location[3].GetPositionY(), Location[3].GetPositionZ()); m_uiMovementTimer = 15000; break; case 3: me->GetMotionMaster()->MovePoint(0, Location[69].GetPositionX(), Location[69].GetPositionY(), Location[69].GetPositionZ()); DoScriptText(RAND(SAY_DRAKE_BREATH_1, SAY_DRAKE_BREATH_2), me); DoScriptText(EMOTE_BREATH, me); m_uiMovementTimer = 2500; break; case 4: me->GetMotionMaster()->MovePoint(0, Location[70].GetPositionX(), Location[70].GetPositionY(), Location[70].GetPositionZ()); m_uiMovementTimer = 2000; SpawnTrigger(); break; case 5: me->GetMotionMaster()->MovePoint(0, Location[71].GetPositionX(), Location[71].GetPositionY(), Location[71].GetPositionZ()); m_uiMovementTimer = 3000; break; case 6: me->GetMotionMaster()->MovePoint(0, Location[3].GetPositionX(), Location[3].GetPositionY(), Location[3].GetPositionZ()); m_uiWaypointId = 2; m_uiMovementTimer = 15000; break; } m_uiWaypointId++; } else m_uiMovementTimer -= diff; break; case SKADI: //Return since we have no target if (!UpdateVictim()) return; if (m_uiCrushTimer <= diff) { DoCastVictim(SPELL_CRUSH); m_uiCrushTimer = 8000; } else m_uiCrushTimer -= diff; if (m_uiPoisonedSpearTimer <= diff) { if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM)) DoCast(target, SPELL_POISONED_SPEAR); m_uiPoisonedSpearTimer = 10000; } else m_uiPoisonedSpearTimer -= diff; if (m_uiWhirlwindTimer <= diff) { DoCastAOE(SPELL_WHIRLWIND); m_uiWhirlwindTimer = 20000; } else m_uiWhirlwindTimer -= diff; DoMeleeAttackIfReady(); break; } } void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); Summons.DespawnAll(); if (m_pInstance) m_pInstance->SetData(DATA_SKADI_THE_RUTHLESS_EVENT, DONE); } void KilledUnit(Unit* /*victim*/) { DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me); } void SpawnMobs() { for (uint8 i = 0; i < DUNGEON_MODE(5, 6); ++i) { switch (urand(0, 2)) { case 0: me->SummonCreature(CREATURE_YMIRJAR_WARRIOR, SpawnLoc.GetPositionX()+rand()%5, SpawnLoc.GetPositionY()+rand()%5, SpawnLoc.GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); break; case 1: me->SummonCreature(CREATURE_YMIRJAR_WITCH_DOCTOR, SpawnLoc.GetPositionX()+rand()%5, SpawnLoc.GetPositionY()+rand()%5, SpawnLoc.GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); break; case 2: me->SummonCreature(CREATURE_YMIRJAR_HARPOONER, SpawnLoc.GetPositionX()+rand()%5, SpawnLoc.GetPositionY()+rand()%5, SpawnLoc.GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); break; } } } void SpawnTrigger() { uint8 iStart = 0, iEnd = 0; switch (urand(0, 1)) { case 0: iStart = 8; iEnd = 37; break; case 1: iStart = 38; iEnd = 68; break; default: break; } for (uint32 i = iStart; i < iEnd; ++i) me->SummonCreature(CREATURE_TRIGGER, Location[i]); } }; }; class go_harpoon_launcher : public GameObjectScript { public: go_harpoon_launcher() : GameObjectScript("go_harpoon_launcher") { } bool OnGossipHello(Player* player, GameObject* pGO) { InstanceScript* m_pInstance = pGO->GetInstanceScript(); if (!m_pInstance) return false; if (Creature* pSkadi = Unit::GetCreature((*pGO), m_pInstance->GetData64(DATA_SKADI_THE_RUTHLESS))) { if (((boss_skadi::boss_skadiAI*)pSkadi->GetAI())->Phase != FLYING) return false; player->CastSpell(pSkadi, SPELL_RAPID_FIRE, true); } return false; } }; void AddSC_boss_skadi() { new boss_skadi(); new go_harpoon_launcher(); }
Darkpeninsula/Darkcore
src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp
C++
agpl-3.0
19,460
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # 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/>. # ############################################################################## import math import re import time from _common import ceiling from openerp import SUPERUSER_ID from openerp import tools from openerp.osv import osv, fields, expression from openerp.tools.translate import _ from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT import psycopg2 import openerp.addons.decimal_precision as dp from openerp.tools.float_utils import float_round def ean_checksum(eancode): """returns the checksum of an ean string of length 13, returns -1 if the string has the wrong length""" if len(eancode) != 13: return -1 oddsum=0 evensum=0 total=0 eanvalue=eancode reversevalue = eanvalue[::-1] finalean=reversevalue[1:] for i in range(len(finalean)): if i % 2 == 0: oddsum += int(finalean[i]) else: evensum += int(finalean[i]) total=(oddsum * 3) + evensum check = int(10 - math.ceil(total % 10.0)) %10 return check def check_ean(eancode): """returns True if eancode is a valid ean13 string, or null""" if not eancode: return True if len(eancode) != 13: return False try: int(eancode) except: return False return ean_checksum(eancode) == int(eancode[-1]) def sanitize_ean13(ean13): """Creates and returns a valid ean13 from an invalid one""" if not ean13: return "0000000000000" ean13 = re.sub("[A-Za-z]","0",ean13); ean13 = re.sub("[^0-9]","",ean13); ean13 = ean13[:13] if len(ean13) < 13: ean13 = ean13 + '0' * (13-len(ean13)) return ean13[:-1] + str(ean_checksum(ean13)) #---------------------------------------------------------- # UOM #---------------------------------------------------------- class product_uom_categ(osv.osv): _name = 'product.uom.categ' _description = 'Product uom categ' _columns = { 'name': fields.char('Name', required=True, translate=True), } class product_uom(osv.osv): _name = 'product.uom' _description = 'Product Unit of Measure' def _compute_factor_inv(self, factor): return factor and (1.0 / factor) or 0.0 def _factor_inv(self, cursor, user, ids, name, arg, context=None): res = {} for uom in self.browse(cursor, user, ids, context=context): res[uom.id] = self._compute_factor_inv(uom.factor) return res def _factor_inv_write(self, cursor, user, id, name, value, arg, context=None): return self.write(cursor, user, id, {'factor': self._compute_factor_inv(value)}, context=context) def name_create(self, cr, uid, name, context=None): """ The UoM category and factor are required, so we'll have to add temporary values for imported UoMs """ uom_categ = self.pool.get('product.uom.categ') # look for the category based on the english name, i.e. no context on purpose! # TODO: should find a way to have it translated but not created until actually used categ_misc = 'Unsorted/Imported Units' categ_id = uom_categ.search(cr, uid, [('name', '=', categ_misc)]) if categ_id: categ_id = categ_id[0] else: categ_id, _ = uom_categ.name_create(cr, uid, categ_misc) uom_id = self.create(cr, uid, {self._rec_name: name, 'category_id': categ_id, 'factor': 1}) return self.name_get(cr, uid, [uom_id], context=context)[0] def create(self, cr, uid, data, context=None): if 'factor_inv' in data: if data['factor_inv'] != 1: data['factor'] = self._compute_factor_inv(data['factor_inv']) del(data['factor_inv']) return super(product_uom, self).create(cr, uid, data, context) _order = "name" _columns = { 'name': fields.char('Unit of Measure', required=True, translate=True), 'category_id': fields.many2one('product.uom.categ', 'Product Category', required=True, ondelete='cascade', help="Conversion between Units of Measure can only occur if they belong to the same category. The conversion will be made based on the ratios."), 'factor': fields.float('Ratio', required=True, digits=0, # force NUMERIC with unlimited precision help='How much bigger or smaller this unit is compared to the reference Unit of Measure for this category:\n'\ '1 * (reference unit) = ratio * (this unit)'), 'factor_inv': fields.function(_factor_inv, digits=0, # force NUMERIC with unlimited precision fnct_inv=_factor_inv_write, string='Bigger Ratio', help='How many times this Unit of Measure is bigger than the reference Unit of Measure in this category:\n'\ '1 * (this unit) = ratio * (reference unit)', required=True), 'rounding': fields.float('Rounding Precision', digits_compute=dp.get_precision('Product Unit of Measure'), required=True, help="The computed quantity will be a multiple of this value. "\ "Use 1.0 for a Unit of Measure that cannot be further split, such as a piece."), 'active': fields.boolean('Active', help="By unchecking the active field you can disable a unit of measure without deleting it."), 'uom_type': fields.selection([('bigger','Bigger than the reference Unit of Measure'), ('reference','Reference Unit of Measure for this category'), ('smaller','Smaller than the reference Unit of Measure')],'Type', required=1), } _defaults = { 'active': 1, 'rounding': 0.01, 'uom_type': 'reference', } _sql_constraints = [ ('factor_gt_zero', 'CHECK (factor!=0)', 'The conversion ratio for a unit of measure cannot be 0!') ] def _compute_qty(self, cr, uid, from_uom_id, qty, to_uom_id=False, round=True): if not from_uom_id or not qty or not to_uom_id: return qty uoms = self.browse(cr, uid, [from_uom_id, to_uom_id]) if uoms[0].id == from_uom_id: from_unit, to_unit = uoms[0], uoms[-1] else: from_unit, to_unit = uoms[-1], uoms[0] return self._compute_qty_obj(cr, uid, from_unit, qty, to_unit, round=round) def _compute_qty_obj(self, cr, uid, from_unit, qty, to_unit, round=True, context=None): if context is None: context = {} if from_unit.category_id.id != to_unit.category_id.id: if context.get('raise-exception', True): raise osv.except_osv(_('Error!'), _('Conversion from Product UoM %s to Default UoM %s is not possible as they both belong to different Category!.') % (from_unit.name,to_unit.name,)) else: return qty # First round to the precision of the original unit, so that # float representation errors do not bias the following ceil() # e.g. with 1 / (1/12) we could get 12.0000048, ceiling to 13! amount = float_round(qty/from_unit.factor, precision_rounding=from_unit.rounding) if to_unit: amount = amount * to_unit.factor if round: amount = ceiling(amount, to_unit.rounding) return amount def _compute_price(self, cr, uid, from_uom_id, price, to_uom_id=False): if not from_uom_id or not price or not to_uom_id: return price from_unit, to_unit = self.browse(cr, uid, [from_uom_id, to_uom_id]) if from_unit.category_id.id != to_unit.category_id.id: return price amount = price * from_unit.factor if to_uom_id: amount = amount / to_unit.factor return amount def onchange_type(self, cursor, user, ids, value): if value == 'reference': return {'value': {'factor': 1, 'factor_inv': 1}} return {} def write(self, cr, uid, ids, vals, context=None): if isinstance(ids, (int, long)): ids = [ids] if 'category_id' in vals: for uom in self.browse(cr, uid, ids, context=context): if uom.category_id.id != vals['category_id']: raise osv.except_osv(_('Warning!'),_("Cannot change the category of existing Unit of Measure '%s'.") % (uom.name,)) return super(product_uom, self).write(cr, uid, ids, vals, context=context) class product_ul(osv.osv): _name = "product.ul" _description = "Logistic Unit" _columns = { 'name' : fields.char('Name', select=True, required=True, translate=True), 'type' : fields.selection([('unit','Unit'),('pack','Pack'),('box', 'Box'), ('pallet', 'Pallet')], 'Type', required=True), 'height': fields.float('Height', help='The height of the package'), 'width': fields.float('Width', help='The width of the package'), 'length': fields.float('Length', help='The length of the package'), 'weight': fields.float('Empty Package Weight'), } #---------------------------------------------------------- # Categories #---------------------------------------------------------- class product_category(osv.osv): def name_get(self, cr, uid, ids, context=None): if isinstance(ids, (list, tuple)) and not len(ids): return [] if isinstance(ids, (long, int)): ids = [ids] reads = self.read(cr, uid, ids, ['name','parent_id'], context=context) res = [] for record in reads: name = record['name'] if record['parent_id']: name = record['parent_id'][1]+' / '+name res.append((record['id'], name)) return res def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=100): if not args: args = [] if not context: context = {} if name: # Be sure name_search is symetric to name_get name = name.split(' / ')[-1] ids = self.search(cr, uid, [('name', operator, name)] + args, limit=limit, context=context) else: ids = self.search(cr, uid, args, limit=limit, context=context) return self.name_get(cr, uid, ids, context) def _name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None): res = self.name_get(cr, uid, ids, context=context) return dict(res) _name = "product.category" _description = "Product Category" _columns = { 'name': fields.char('Name', required=True, translate=True, select=True), 'complete_name': fields.function(_name_get_fnc, type="char", string='Name'), 'parent_id': fields.many2one('product.category','Parent Category', select=True, ondelete='cascade'), 'child_id': fields.one2many('product.category', 'parent_id', string='Child Categories'), 'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of product categories."), 'type': fields.selection([('view','View'), ('normal','Normal')], 'Category Type', help="A category of the view type is a virtual category that can be used as the parent of another category to create a hierarchical structure."), 'parent_left': fields.integer('Left Parent', select=1), 'parent_right': fields.integer('Right Parent', select=1), } _defaults = { 'type' : 'normal', } _parent_name = "parent_id" _parent_store = True _parent_order = 'sequence, name' _order = 'parent_left' _constraints = [ (osv.osv._check_recursion, 'Error ! You cannot create recursive categories.', ['parent_id']) ] class produce_price_history(osv.osv): """ Keep track of the ``product.template`` standard prices as they are changed. """ _name = 'product.price.history' _rec_name = 'datetime' _order = 'datetime desc' _columns = { 'company_id': fields.many2one('res.company', required=True), 'product_template_id': fields.many2one('product.template', 'Product Template', required=True, ondelete='cascade'), 'datetime': fields.datetime('Historization Time'), 'cost': fields.float('Historized Cost'), } def _get_default_company(self, cr, uid, context=None): if 'force_company' in context: return context['force_company'] else: company = self.pool['res.users'].browse(cr, uid, uid, context=context).company_id return company.id if company else False _defaults = { 'datetime': fields.datetime.now, 'company_id': _get_default_company, } #---------------------------------------------------------- # Product Attributes #---------------------------------------------------------- class product_attribute(osv.osv): _name = "product.attribute" _description = "Product Attribute" _columns = { 'name': fields.char('Name', translate=True, required=True), 'value_ids': fields.one2many('product.attribute.value', 'attribute_id', 'Values', copy=True), } class product_attribute_value(osv.osv): _name = "product.attribute.value" _order = 'sequence' def _get_price_extra(self, cr, uid, ids, name, args, context=None): result = dict.fromkeys(ids, 0) if not context.get('active_id'): return result for obj in self.browse(cr, uid, ids, context=context): for price_id in obj.price_ids: if price_id.product_tmpl_id.id == context.get('active_id'): result[obj.id] = price_id.price_extra break return result def _set_price_extra(self, cr, uid, id, name, value, args, context=None): if context is None: context = {} if 'active_id' not in context: return None p_obj = self.pool['product.attribute.price'] p_ids = p_obj.search(cr, uid, [('value_id', '=', id), ('product_tmpl_id', '=', context['active_id'])], context=context) if p_ids: p_obj.write(cr, uid, p_ids, {'price_extra': value}, context=context) else: p_obj.create(cr, uid, { 'product_tmpl_id': context['active_id'], 'value_id': id, 'price_extra': value, }, context=context) _columns = { 'sequence': fields.integer('Sequence', help="Determine the display order"), 'name': fields.char('Value', translate=True, required=True), 'attribute_id': fields.many2one('product.attribute', 'Attribute', required=True, ondelete='cascade'), 'product_ids': fields.many2many('product.product', id1='att_id', id2='prod_id', string='Variants', readonly=True), 'price_extra': fields.function(_get_price_extra, type='float', string='Attribute Price Extra', fnct_inv=_set_price_extra, digits_compute=dp.get_precision('Product Price'), help="Price Extra: Extra price for the variant with this attribute value on sale price. eg. 200 price extra, 1000 + 200 = 1200."), 'price_ids': fields.one2many('product.attribute.price', 'value_id', string='Attribute Prices', readonly=True), } _sql_constraints = [ ('value_company_uniq', 'unique (name,attribute_id)', 'This attribute value already exists !') ] _defaults = { 'price_extra': 0.0, } def unlink(self, cr, uid, ids, context=None): ctx = dict(context or {}, active_test=False) product_ids = self.pool['product.product'].search(cr, uid, [('attribute_value_ids', 'in', ids)], context=ctx) if product_ids: raise osv.except_osv(_('Integrity Error!'), _('The operation cannot be completed:\nYou trying to delete an attribute value with a reference on a product variant.')) return super(product_attribute_value, self).unlink(cr, uid, ids, context=context) class product_attribute_price(osv.osv): _name = "product.attribute.price" _columns = { 'product_tmpl_id': fields.many2one('product.template', 'Product Template', required=True, ondelete='cascade'), 'value_id': fields.many2one('product.attribute.value', 'Product Attribute Value', required=True, ondelete='cascade'), 'price_extra': fields.float('Price Extra', digits_compute=dp.get_precision('Product Price')), } class product_attribute_line(osv.osv): _name = "product.attribute.line" _rec_name = 'attribute_id' _columns = { 'product_tmpl_id': fields.many2one('product.template', 'Product Template', required=True, ondelete='cascade'), 'attribute_id': fields.many2one('product.attribute', 'Attribute', required=True, ondelete='restrict'), 'value_ids': fields.many2many('product.attribute.value', id1='line_id', id2='val_id', string='Product Attribute Value'), } #---------------------------------------------------------- # Products #---------------------------------------------------------- class product_template(osv.osv): _name = "product.template" _inherit = ['mail.thread'] _description = "Product Template" _order = "name" def _get_image(self, cr, uid, ids, name, args, context=None): result = dict.fromkeys(ids, False) for obj in self.browse(cr, uid, ids, context=context): result[obj.id] = tools.image_get_resized_images(obj.image, avoid_resize_medium=True) return result def _set_image(self, cr, uid, id, name, value, args, context=None): return self.write(cr, uid, [id], {'image': tools.image_resize_image_big(value)}, context=context) def _is_product_variant(self, cr, uid, ids, name, arg, context=None): return self._is_product_variant_impl(cr, uid, ids, name, arg, context=context) def _is_product_variant_impl(self, cr, uid, ids, name, arg, context=None): return dict.fromkeys(ids, False) def _product_template_price(self, cr, uid, ids, name, arg, context=None): plobj = self.pool.get('product.pricelist') res = {} quantity = context.get('quantity') or 1.0 pricelist = context.get('pricelist', False) partner = context.get('partner', False) if pricelist: # Support context pricelists specified as display_name or ID for compatibility if isinstance(pricelist, basestring): pricelist_ids = plobj.name_search( cr, uid, pricelist, operator='=', context=context, limit=1) pricelist = pricelist_ids[0][0] if pricelist_ids else pricelist if isinstance(pricelist, (int, long)): products = self.browse(cr, uid, ids, context=context) qtys = map(lambda x: (x, quantity, partner), products) pl = plobj.browse(cr, uid, pricelist, context=context) price = plobj._price_get_multi(cr,uid, pl, qtys, context=context) for id in ids: res[id] = price.get(id, 0.0) for id in ids: res.setdefault(id, 0.0) return res def get_history_price(self, cr, uid, product_tmpl, company_id, date=None, context=None): if context is None: context = {} if date is None: date = time.strftime(DEFAULT_SERVER_DATETIME_FORMAT) price_history_obj = self.pool.get('product.price.history') history_ids = price_history_obj.search(cr, uid, [('company_id', '=', company_id), ('product_template_id', '=', product_tmpl), ('datetime', '<=', date)], limit=1) if history_ids: return price_history_obj.read(cr, uid, history_ids[0], ['cost'], context=context)['cost'] return 0.0 def _set_standard_price(self, cr, uid, product_tmpl_id, value, context=None): ''' Store the standard price change in order to be able to retrieve the cost of a product template for a given date''' if context is None: context = {} price_history_obj = self.pool['product.price.history'] user_company = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id company_id = context.get('force_company', user_company) price_history_obj.create(cr, uid, { 'product_template_id': product_tmpl_id, 'cost': value, 'company_id': company_id, }, context=context) def _get_product_variant_count(self, cr, uid, ids, name, arg, context=None): res = {} for product in self.browse(cr, uid, ids): res[product.id] = len(product.product_variant_ids) return res _columns = { 'name': fields.char('Name', required=True, translate=True, select=True), 'product_manager': fields.many2one('res.users','Product Manager'), 'description': fields.text('Description',translate=True, help="A precise description of the Product, used only for internal information purposes."), 'description_purchase': fields.text('Purchase Description',translate=True, help="A description of the Product that you want to communicate to your suppliers. " "This description will be copied to every Purchase Order, Receipt and Supplier Invoice/Refund."), 'description_sale': fields.text('Sale Description',translate=True, help="A description of the Product that you want to communicate to your customers. " "This description will be copied to every Sale Order, Delivery Order and Customer Invoice/Refund"), 'type': fields.selection([('consu', 'Consumable'),('service','Service')], 'Product Type', required=True, help="Consumable are product where you don't manage stock, a service is a non-material product provided by a company or an individual."), 'rental': fields.boolean('Can be Rent'), 'categ_id': fields.many2one('product.category','Internal Category', required=True, change_default=True, domain="[('type','=','normal')]" ,help="Select category for the current product"), 'price': fields.function(_product_template_price, type='float', string='Price', digits_compute=dp.get_precision('Product Price')), 'list_price': fields.float('Sale Price', digits_compute=dp.get_precision('Product Price'), help="Base price to compute the customer price. Sometimes called the catalog price."), 'lst_price' : fields.related('list_price', type="float", string='Public Price', digits_compute=dp.get_precision('Product Price')), 'standard_price': fields.property(type = 'float', digits_compute=dp.get_precision('Product Price'), help="Cost price of the product template used for standard stock valuation in accounting and used as a base price on purchase orders.", groups="base.group_user", string="Cost Price"), 'volume': fields.float('Volume', help="The volume in m3."), 'weight': fields.float('Gross Weight', digits_compute=dp.get_precision('Stock Weight'), help="The gross weight in Kg."), 'weight_net': fields.float('Net Weight', digits_compute=dp.get_precision('Stock Weight'), help="The net weight in Kg."), 'warranty': fields.float('Warranty'), 'sale_ok': fields.boolean('Can be Sold', help="Specify if the product can be selected in a sales order line."), 'pricelist_id': fields.dummy(string='Pricelist', relation='product.pricelist', type='many2one'), 'state': fields.selection([('',''), ('draft', 'In Development'), ('sellable','Normal'), ('end','End of Lifecycle'), ('obsolete','Obsolete')], 'Status'), 'uom_id': fields.many2one('product.uom', 'Unit of Measure', required=True, help="Default Unit of Measure used for all stock operation."), 'uom_po_id': fields.many2one('product.uom', 'Purchase Unit of Measure', required=True, help="Default Unit of Measure used for purchase orders. It must be in the same category than the default unit of measure."), 'uos_id' : fields.many2one('product.uom', 'Unit of Sale', help='Specify a unit of measure here if invoicing is made in another unit of measure than inventory. Keep empty to use the default unit of measure.'), 'uos_coeff': fields.float('Unit of Measure -> UOS Coeff', digits_compute= dp.get_precision('Product UoS'), help='Coefficient to convert default Unit of Measure to Unit of Sale\n' ' uos = uom * coeff'), 'mes_type': fields.selection((('fixed', 'Fixed'), ('variable', 'Variable')), 'Measure Type'), 'company_id': fields.many2one('res.company', 'Company', select=1), # image: all image fields are base64 encoded and PIL-supported 'image': fields.binary("Image", help="This field holds the image used as image for the product, limited to 1024x1024px."), 'image_medium': fields.function(_get_image, fnct_inv=_set_image, string="Medium-sized image", type="binary", multi="_get_image", store={ 'product.template': (lambda self, cr, uid, ids, c={}: ids, ['image'], 10), }, help="Medium-sized image of the product. It is automatically "\ "resized as a 128x128px image, with aspect ratio preserved, "\ "only when the image exceeds one of those sizes. Use this field in form views or some kanban views."), 'image_small': fields.function(_get_image, fnct_inv=_set_image, string="Small-sized image", type="binary", multi="_get_image", store={ 'product.template': (lambda self, cr, uid, ids, c={}: ids, ['image'], 10), }, help="Small-sized image of the product. It is automatically "\ "resized as a 64x64px image, with aspect ratio preserved. "\ "Use this field anywhere a small image is required."), 'packaging_ids': fields.one2many( 'product.packaging', 'product_tmpl_id', 'Logistical Units', help="Gives the different ways to package the same product. This has no impact on " "the picking order and is mainly used if you use the EDI module."), 'seller_ids': fields.one2many('product.supplierinfo', 'product_tmpl_id', 'Supplier'), 'seller_delay': fields.related('seller_ids','delay', type='integer', string='Supplier Lead Time', help="This is the average delay in days between the purchase order confirmation and the receipts for this product and for the default supplier. It is used by the scheduler to order requests based on reordering delays."), 'seller_qty': fields.related('seller_ids','qty', type='float', string='Supplier Quantity', help="This is minimum quantity to purchase from Main Supplier."), 'seller_id': fields.related('seller_ids','name', type='many2one', relation='res.partner', string='Main Supplier', help="Main Supplier who has highest priority in Supplier List."), 'active': fields.boolean('Active', help="If unchecked, it will allow you to hide the product without removing it."), 'color': fields.integer('Color Index'), 'is_product_variant': fields.function( _is_product_variant, type='boolean', string='Is product variant'), 'attribute_line_ids': fields.one2many('product.attribute.line', 'product_tmpl_id', 'Product Attributes'), 'product_variant_ids': fields.one2many('product.product', 'product_tmpl_id', 'Products', required=True), 'product_variant_count': fields.function( _get_product_variant_count, type='integer', string='# of Product Variants'), # related to display product product information if is_product_variant 'ean13': fields.related('product_variant_ids', 'ean13', type='char', string='EAN13 Barcode'), 'default_code': fields.related('product_variant_ids', 'default_code', type='char', string='Internal Reference'), } def _price_get_list_price(self, product): return 0.0 def _price_get(self, cr, uid, products, ptype='list_price', context=None): if context is None: context = {} if 'currency_id' in context: pricetype_obj = self.pool.get('product.price.type') price_type_id = pricetype_obj.search(cr, uid, [('field','=',ptype)])[0] price_type_currency_id = pricetype_obj.browse(cr,uid,price_type_id).currency_id.id res = {} product_uom_obj = self.pool.get('product.uom') for product in products: # standard_price field can only be seen by users in base.group_user # Thus, in order to compute the sale price from the cost price for users not in this group # We fetch the standard price as the superuser if ptype != 'standard_price': res[product.id] = product[ptype] or 0.0 else: res[product.id] = product.sudo()[ptype] if ptype == 'list_price': res[product.id] += product._name == "product.product" and product.price_extra or 0.0 if 'uom' in context: uom = product.uom_id or product.uos_id res[product.id] = product_uom_obj._compute_price(cr, uid, uom.id, res[product.id], context['uom']) # Convert from price_type currency to asked one if 'currency_id' in context: # Take the price_type currency from the product field # This is right cause a field cannot be in more than one currency res[product.id] = self.pool.get('res.currency').compute(cr, uid, price_type_currency_id, context['currency_id'], res[product.id],context=context) return res def _get_uom_id(self, cr, uid, *args): return self.pool["product.uom"].search(cr, uid, [], limit=1, order='id')[0] def _default_category(self, cr, uid, context=None): if context is None: context = {} if 'categ_id' in context and context['categ_id']: return context['categ_id'] md = self.pool.get('ir.model.data') res = False try: res = md.get_object_reference(cr, uid, 'product', 'product_category_all')[1] except ValueError: res = False return res def onchange_uom(self, cursor, user, ids, uom_id, uom_po_id): if uom_id: return {'value': {'uom_po_id': uom_id}} return {} def create_variant_ids(self, cr, uid, ids, context=None): product_obj = self.pool.get("product.product") ctx = context and context.copy() or {} if ctx.get("create_product_variant"): return None ctx.update(active_test=False, create_product_variant=True) tmpl_ids = self.browse(cr, uid, ids, context=ctx) for tmpl_id in tmpl_ids: # list of values combination all_variants = [[]] for variant_id in tmpl_id.attribute_line_ids: if len(variant_id.value_ids) > 1: temp_variants = [] for value_id in variant_id.value_ids: for variant in all_variants: temp_variants.append(variant + [int(value_id)]) all_variants = temp_variants # check product variant_ids_to_active = [] variants_active_ids = [] variants_inactive = [] for product_id in tmpl_id.product_variant_ids: variants = map(int,product_id.attribute_value_ids) if variants in all_variants: variants_active_ids.append(product_id.id) all_variants.pop(all_variants.index(variants)) if not product_id.active: variant_ids_to_active.append(product_id.id) else: variants_inactive.append(product_id) if variant_ids_to_active: product_obj.write(cr, uid, variant_ids_to_active, {'active': True}, context=ctx) # create new product for variant_ids in all_variants: values = { 'product_tmpl_id': tmpl_id.id, 'attribute_value_ids': [(6, 0, variant_ids)] } id = product_obj.create(cr, uid, values, context=ctx) variants_active_ids.append(id) # unlink or inactive product for variant_id in map(int,variants_inactive): try: with cr.savepoint(): product_obj.unlink(cr, uid, [variant_id], context=ctx) except (psycopg2.Error, osv.except_osv): product_obj.write(cr, uid, [variant_id], {'active': False}, context=ctx) pass return True def create(self, cr, uid, vals, context=None): ''' Store the initial standard price in order to be able to retrieve the cost of a product template for a given date''' product_template_id = super(product_template, self).create(cr, uid, vals, context=context) if not context or "create_product_product" not in context: self.create_variant_ids(cr, uid, [product_template_id], context=context) self._set_standard_price(cr, uid, product_template_id, vals.get('standard_price', 0.0), context=context) # TODO: this is needed to set given values to first variant after creation # these fields should be moved to product as lead to confusion related_vals = {} if vals.get('ean13'): related_vals['ean13'] = vals['ean13'] if vals.get('default_code'): related_vals['default_code'] = vals['default_code'] if related_vals: self.write(cr, uid, product_template_id, related_vals, context=context) return product_template_id def write(self, cr, uid, ids, vals, context=None): ''' Store the standard price change in order to be able to retrieve the cost of a product template for a given date''' if isinstance(ids, (int, long)): ids = [ids] if 'uom_po_id' in vals: new_uom = self.pool.get('product.uom').browse(cr, uid, vals['uom_po_id'], context=context) for product in self.browse(cr, uid, ids, context=context): old_uom = product.uom_po_id if old_uom.category_id.id != new_uom.category_id.id: raise osv.except_osv(_('Unit of Measure categories Mismatch!'), _("New Unit of Measure '%s' must belong to same Unit of Measure category '%s' as of old Unit of Measure '%s'. If you need to change the unit of measure, you may deactivate this product from the 'Procurements' tab and create a new one.") % (new_uom.name, old_uom.category_id.name, old_uom.name,)) if 'standard_price' in vals: for prod_template_id in ids: self._set_standard_price(cr, uid, prod_template_id, vals['standard_price'], context=context) res = super(product_template, self).write(cr, uid, ids, vals, context=context) if 'attribute_line_ids' in vals or vals.get('active'): self.create_variant_ids(cr, uid, ids, context=context) if 'active' in vals and not vals.get('active'): ctx = context and context.copy() or {} ctx.update(active_test=False) product_ids = [] for product in self.browse(cr, uid, ids, context=ctx): product_ids = map(int,product.product_variant_ids) self.pool.get("product.product").write(cr, uid, product_ids, {'active': vals.get('active')}, context=ctx) return res def copy(self, cr, uid, id, default=None, context=None): if default is None: default = {} template = self.browse(cr, uid, id, context=context) default['name'] = _("%s (copy)") % (template['name']) return super(product_template, self).copy(cr, uid, id, default=default, context=context) _defaults = { 'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'product.template', context=c), 'list_price': 1, 'standard_price': 0.0, 'sale_ok': 1, 'uom_id': _get_uom_id, 'uom_po_id': _get_uom_id, 'uos_coeff': 1.0, 'mes_type': 'fixed', 'categ_id' : _default_category, 'type' : 'consu', 'active': True, } def _check_uom(self, cursor, user, ids, context=None): for product in self.browse(cursor, user, ids, context=context): if product.uom_id.category_id.id != product.uom_po_id.category_id.id: return False return True def _check_uos(self, cursor, user, ids, context=None): for product in self.browse(cursor, user, ids, context=context): if product.uos_id \ and product.uos_id.category_id.id \ == product.uom_id.category_id.id: return False return True _constraints = [ (_check_uom, 'Error: The default Unit of Measure and the purchase Unit of Measure must be in the same category.', ['uom_id']), ] def name_get(self, cr, user, ids, context=None): if context is None: context = {} if 'partner_id' in context: pass return super(product_template, self).name_get(cr, user, ids, context) class product_product(osv.osv): _name = "product.product" _description = "Product" _inherits = {'product.template': 'product_tmpl_id'} _inherit = ['mail.thread'] _order = 'default_code,name_template' def _product_price(self, cr, uid, ids, name, arg, context=None): plobj = self.pool.get('product.pricelist') res = {} if context is None: context = {} quantity = context.get('quantity') or 1.0 pricelist = context.get('pricelist', False) partner = context.get('partner', False) if pricelist: # Support context pricelists specified as display_name or ID for compatibility if isinstance(pricelist, basestring): pricelist_ids = plobj.name_search( cr, uid, pricelist, operator='=', context=context, limit=1) pricelist = pricelist_ids[0][0] if pricelist_ids else pricelist if isinstance(pricelist, (int, long)): products = self.browse(cr, uid, ids, context=context) qtys = map(lambda x: (x, quantity, partner), products) pl = plobj.browse(cr, uid, pricelist, context=context) price = plobj._price_get_multi(cr,uid, pl, qtys, context=context) for id in ids: res[id] = price.get(id, 0.0) for id in ids: res.setdefault(id, 0.0) return res def view_header_get(self, cr, uid, view_id, view_type, context=None): if context is None: context = {} res = super(product_product, self).view_header_get(cr, uid, view_id, view_type, context) if (context.get('categ_id', False)): return _('Products: ') + self.pool.get('product.category').browse(cr, uid, context['categ_id'], context=context).name return res def _product_lst_price(self, cr, uid, ids, name, arg, context=None): product_uom_obj = self.pool.get('product.uom') res = dict.fromkeys(ids, 0.0) for product in self.browse(cr, uid, ids, context=context): if 'uom' in context: uom = product.uos_id or product.uom_id res[product.id] = product_uom_obj._compute_price(cr, uid, uom.id, product.list_price, context['uom']) else: res[product.id] = product.list_price res[product.id] = res[product.id] + product.price_extra return res def _set_product_lst_price(self, cr, uid, id, name, value, args, context=None): product_uom_obj = self.pool.get('product.uom') product = self.browse(cr, uid, id, context=context) if 'uom' in context: uom = product.uos_id or product.uom_id value = product_uom_obj._compute_price(cr, uid, context['uom'], value, uom.id) value = value - product.price_extra return product.write({'list_price': value}, context=context) def _get_partner_code_name(self, cr, uid, ids, product, partner_id, context=None): for supinfo in product.seller_ids: if supinfo.name.id == partner_id: return {'code': supinfo.product_code or product.default_code, 'name': supinfo.product_name or product.name} res = {'code': product.default_code, 'name': product.name} return res def _product_code(self, cr, uid, ids, name, arg, context=None): res = {} if context is None: context = {} for p in self.browse(cr, uid, ids, context=context): res[p.id] = self._get_partner_code_name(cr, uid, [], p, context.get('partner_id', None), context=context)['code'] return res def _product_partner_ref(self, cr, uid, ids, name, arg, context=None): res = {} if context is None: context = {} for p in self.browse(cr, uid, ids, context=context): data = self._get_partner_code_name(cr, uid, [], p, context.get('partner_id', None), context=context) if not data['code']: data['code'] = p.code if not data['name']: data['name'] = p.name res[p.id] = (data['code'] and ('['+data['code']+'] ') or '') + (data['name'] or '') return res def _is_product_variant_impl(self, cr, uid, ids, name, arg, context=None): return dict.fromkeys(ids, True) def _get_name_template_ids(self, cr, uid, ids, context=None): result = set() template_ids = self.pool.get('product.product').search(cr, uid, [('product_tmpl_id', 'in', ids)]) for el in template_ids: result.add(el) return list(result) def _get_image_variant(self, cr, uid, ids, name, args, context=None): result = dict.fromkeys(ids, False) for obj in self.browse(cr, uid, ids, context=context): result[obj.id] = obj.image_variant or getattr(obj.product_tmpl_id, name) return result def _set_image_variant(self, cr, uid, id, name, value, args, context=None): image = tools.image_resize_image_big(value) res = self.write(cr, uid, [id], {'image_variant': image}, context=context) product = self.browse(cr, uid, id, context=context) if not product.product_tmpl_id.image: product.write({'image_variant': None}, context=context) product.product_tmpl_id.write({'image': image}, context=context) return res def _get_price_extra(self, cr, uid, ids, name, args, context=None): result = dict.fromkeys(ids, False) for product in self.browse(cr, uid, ids, context=context): price_extra = 0.0 for variant_id in product.attribute_value_ids: for price_id in variant_id.price_ids: if price_id.product_tmpl_id.id == product.product_tmpl_id.id: price_extra += price_id.price_extra result[product.id] = price_extra return result _columns = { 'price': fields.function(_product_price, type='float', string='Price', digits_compute=dp.get_precision('Product Price')), 'price_extra': fields.function(_get_price_extra, type='float', string='Variant Extra Price', help="This is the sum of the extra price of all attributes"), 'lst_price': fields.function(_product_lst_price, fnct_inv=_set_product_lst_price, type='float', string='Public Price', digits_compute=dp.get_precision('Product Price')), 'code': fields.function(_product_code, type='char', string='Internal Reference'), 'partner_ref' : fields.function(_product_partner_ref, type='char', string='Customer ref'), 'default_code' : fields.char('Internal Reference', select=True), 'active': fields.boolean('Active', help="If unchecked, it will allow you to hide the product without removing it."), 'product_tmpl_id': fields.many2one('product.template', 'Product Template', required=True, ondelete="cascade", select=True, auto_join=True), 'ean13': fields.char('EAN13 Barcode', size=13, help="International Article Number used for product identification."), 'name_template': fields.related('product_tmpl_id', 'name', string="Template Name", type='char', store={ 'product.template': (_get_name_template_ids, ['name'], 10), 'product.product': (lambda self, cr, uid, ids, c=None: ids, [], 10), }, select=True), 'attribute_value_ids': fields.many2many('product.attribute.value', id1='prod_id', id2='att_id', string='Attributes', readonly=True, ondelete='restrict'), 'is_product_variant': fields.function( _is_product_variant_impl, type='boolean', string='Is product variant'), # image: all image fields are base64 encoded and PIL-supported 'image_variant': fields.binary("Variant Image", help="This field holds the image used as image for the product variant, limited to 1024x1024px."), 'image': fields.function(_get_image_variant, fnct_inv=_set_image_variant, string="Big-sized image", type="binary", help="Image of the product variant (Big-sized image of product template if false). It is automatically "\ "resized as a 1024x1024px image, with aspect ratio preserved."), 'image_small': fields.function(_get_image_variant, fnct_inv=_set_image_variant, string="Small-sized image", type="binary", help="Image of the product variant (Small-sized image of product template if false)."), 'image_medium': fields.function(_get_image_variant, fnct_inv=_set_image_variant, string="Medium-sized image", type="binary", help="Image of the product variant (Medium-sized image of product template if false)."), } _defaults = { 'active': 1, 'color': 0, } def unlink(self, cr, uid, ids, context=None): unlink_ids = [] unlink_product_tmpl_ids = [] for product in self.browse(cr, uid, ids, context=context): # Check if product still exists, in case it has been unlinked by unlinking its template if not product.exists(): continue tmpl_id = product.product_tmpl_id.id # Check if the product is last product of this template other_product_ids = self.search(cr, uid, [('product_tmpl_id', '=', tmpl_id), ('id', '!=', product.id)], context=context) if not other_product_ids: unlink_product_tmpl_ids.append(tmpl_id) unlink_ids.append(product.id) res = super(product_product, self).unlink(cr, uid, unlink_ids, context=context) # delete templates after calling super, as deleting template could lead to deleting # products due to ondelete='cascade' self.pool.get('product.template').unlink(cr, uid, unlink_product_tmpl_ids, context=context) return res def onchange_uom(self, cursor, user, ids, uom_id, uom_po_id): if uom_id and uom_po_id: uom_obj=self.pool.get('product.uom') uom=uom_obj.browse(cursor,user,[uom_id])[0] uom_po=uom_obj.browse(cursor,user,[uom_po_id])[0] if uom.category_id.id != uom_po.category_id.id: return {'value': {'uom_po_id': uom_id}} return False def _check_ean_key(self, cr, uid, ids, context=None): for product in self.read(cr, uid, ids, ['ean13'], context=context): if not check_ean(product['ean13']): return False return True _constraints = [(_check_ean_key, 'You provided an invalid "EAN13 Barcode" reference. You may use the "Internal Reference" field instead.', ['ean13'])] def on_order(self, cr, uid, ids, orderline, quantity): pass def name_get(self, cr, user, ids, context=None): if context is None: context = {} if isinstance(ids, (int, long)): ids = [ids] if not len(ids): return [] def _name_get(d): name = d.get('name','') code = context.get('display_default_code', True) and d.get('default_code',False) or False if code: name = '[%s] %s' % (code,name) return (d['id'], name) partner_id = context.get('partner_id', False) if partner_id: partner_ids = [partner_id, self.pool['res.partner'].browse(cr, user, partner_id, context=context).commercial_partner_id.id] else: partner_ids = [] # all user don't have access to seller and partner # check access and use superuser self.check_access_rights(cr, user, "read") self.check_access_rule(cr, user, ids, "read", context=context) result = [] for product in self.browse(cr, SUPERUSER_ID, ids, context=context): variant = ", ".join([v.name for v in product.attribute_value_ids]) name = variant and "%s (%s)" % (product.name, variant) or product.name sellers = [] if partner_ids: sellers = filter(lambda x: x.name.id in partner_ids, product.seller_ids) if sellers: for s in sellers: seller_variant = s.product_name and "%s (%s)" % (s.product_name, variant) or False mydict = { 'id': product.id, 'name': seller_variant or name, 'default_code': s.product_code or product.default_code, } result.append(_name_get(mydict)) else: mydict = { 'id': product.id, 'name': name, 'default_code': product.default_code, } result.append(_name_get(mydict)) return result def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=100): if not args: args = [] if name: positive_operators = ['=', 'ilike', '=ilike', 'like', '=like'] ids = [] if operator in positive_operators: ids = self.search(cr, user, [('default_code','=',name)]+ args, limit=limit, context=context) if not ids: ids = self.search(cr, user, [('ean13','=',name)]+ args, limit=limit, context=context) if not ids and operator not in expression.NEGATIVE_TERM_OPERATORS: # Do not merge the 2 next lines into one single search, SQL search performance would be abysmal # on a database with thousands of matching products, due to the huge merge+unique needed for the # OR operator (and given the fact that the 'name' lookup results come from the ir.translation table # Performing a quick memory merge of ids in Python will give much better performance ids = set(self.search(cr, user, args + [('default_code', operator, name)], limit=limit, context=context)) if not limit or len(ids) < limit: # we may underrun the limit because of dupes in the results, that's fine limit2 = (limit - len(ids)) if limit else False ids.update(self.search(cr, user, args + [('name', operator, name)], limit=limit2, context=context)) ids = list(ids) elif not ids and operator in expression.NEGATIVE_TERM_OPERATORS: ids = self.search(cr, user, args + ['&', ('default_code', operator, name), ('name', operator, name)], limit=limit, context=context) if not ids and operator in positive_operators: ptrn = re.compile('(\[(.*?)\])') res = ptrn.search(name) if res: ids = self.search(cr, user, [('default_code','=', res.group(2))] + args, limit=limit, context=context) else: ids = self.search(cr, user, args, limit=limit, context=context) result = self.name_get(cr, user, ids, context=context) return result # # Could be overrided for variants matrices prices # def price_get(self, cr, uid, ids, ptype='list_price', context=None): products = self.browse(cr, uid, ids, context=context) return self.pool.get("product.template")._price_get(cr, uid, products, ptype=ptype, context=context) def copy(self, cr, uid, id, default=None, context=None): if context is None: context={} product = self.browse(cr, uid, id, context) if context.get('variant'): # if we copy a variant or create one, we keep the same template default['product_tmpl_id'] = product.product_tmpl_id.id elif 'name' not in default: default['name'] = _("%s (copy)") % (product.name,) return super(product_product, self).copy(cr, uid, id, default=default, context=context) def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False): if context is None: context = {} if context.get('search_default_categ_id'): args.append((('categ_id', 'child_of', context['search_default_categ_id']))) return super(product_product, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=count) def open_product_template(self, cr, uid, ids, context=None): """ Utility method used to add an "Open Template" button in product views """ product = self.browse(cr, uid, ids[0], context=context) return {'type': 'ir.actions.act_window', 'res_model': 'product.template', 'view_mode': 'form', 'res_id': product.product_tmpl_id.id, 'target': 'new'} def create(self, cr, uid, vals, context=None): if context is None: context = {} ctx = dict(context or {}, create_product_product=True) return super(product_product, self).create(cr, uid, vals, context=ctx) def need_procurement(self, cr, uid, ids, context=None): return False def _compute_uos_qty(self, cr, uid, ids, uom, qty, uos, context=None): ''' Computes product's invoicing quantity in UoS from quantity in UoM. Takes into account the :param uom: Source unit :param qty: Source quantity :param uos: Target UoS unit. ''' if not uom or not qty or not uos: return qty uom_obj = self.pool['product.uom'] product_id = ids[0] if isinstance(ids, (list, tuple)) else ids product = self.browse(cr, uid, product_id, context=context) if isinstance(uos, (int, long)): uos = uom_obj.browse(cr, uid, uos, context=context) if isinstance(uom, (int, long)): uom = uom_obj.browse(cr, uid, uom, context=context) if product.uos_id: # Product has UoS defined # We cannot convert directly between units even if the units are of the same category # as we need to apply the conversion coefficient which is valid only between quantities # in product's default UoM/UoS qty_default_uom = uom_obj._compute_qty_obj(cr, uid, uom, qty, product.uom_id) # qty in product's default UoM qty_default_uos = qty_default_uom * product.uos_coeff return uom_obj._compute_qty_obj(cr, uid, product.uos_id, qty_default_uos, uos) else: return uom_obj._compute_qty_obj(cr, uid, uom, qty, uos) class product_packaging(osv.osv): _name = "product.packaging" _description = "Packaging" _rec_name = 'ean' _order = 'sequence' _columns = { 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of packaging."), 'name' : fields.text('Description'), 'qty' : fields.float('Quantity by Package', help="The total number of products you can put by pallet or box."), 'ul' : fields.many2one('product.ul', 'Package Logistic Unit', required=True), 'ul_qty' : fields.integer('Package by layer', help='The number of packages by layer'), 'ul_container': fields.many2one('product.ul', 'Pallet Logistic Unit'), 'rows' : fields.integer('Number of Layers', required=True, help='The number of layers on a pallet or box'), 'product_tmpl_id' : fields.many2one('product.template', 'Product', select=1, ondelete='cascade', required=True), 'ean' : fields.char('EAN', size=14, help="The EAN code of the package unit."), 'code' : fields.char('Code', help="The code of the transport unit."), 'weight': fields.float('Total Package Weight', help='The weight of a full package, pallet or box.'), } def _check_ean_key(self, cr, uid, ids, context=None): for pack in self.browse(cr, uid, ids, context=context): if not check_ean(pack.ean): return False return True _constraints = [(_check_ean_key, 'Error: Invalid ean code', ['ean'])] def name_get(self, cr, uid, ids, context=None): if not len(ids): return [] res = [] for pckg in self.browse(cr, uid, ids, context=context): p_name = pckg.ean and '[' + pckg.ean + '] ' or '' p_name += pckg.ul.name res.append((pckg.id,p_name)) return res def _get_1st_ul(self, cr, uid, context=None): cr.execute('select id from product_ul order by id asc limit 1') res = cr.fetchone() return (res and res[0]) or False _defaults = { 'rows' : 3, 'sequence' : 1, 'ul' : _get_1st_ul, } def checksum(ean): salt = '31' * 6 + '3' sum = 0 for ean_part, salt_part in zip(ean, salt): sum += int(ean_part) * int(salt_part) return (10 - (sum % 10)) % 10 checksum = staticmethod(checksum) class product_supplierinfo(osv.osv): _name = "product.supplierinfo" _description = "Information about a product supplier" def _calc_qty(self, cr, uid, ids, fields, arg, context=None): result = {} for supplier_info in self.browse(cr, uid, ids, context=context): for field in fields: result[supplier_info.id] = {field:False} qty = supplier_info.min_qty result[supplier_info.id]['qty'] = qty return result _columns = { 'name' : fields.many2one('res.partner', 'Supplier', required=True,domain = [('supplier','=',True)], ondelete='cascade', help="Supplier of this product"), 'product_name': fields.char('Supplier Product Name', help="This supplier's product name will be used when printing a request for quotation. Keep empty to use the internal one."), 'product_code': fields.char('Supplier Product Code', help="This supplier's product code will be used when printing a request for quotation. Keep empty to use the internal one."), 'sequence' : fields.integer('Sequence', help="Assigns the priority to the list of product supplier."), 'product_uom': fields.related('product_tmpl_id', 'uom_po_id', type='many2one', relation='product.uom', string="Supplier Unit of Measure", readonly="1", help="This comes from the product form."), 'min_qty': fields.float('Minimal Quantity', required=True, help="The minimal quantity to purchase to this supplier, expressed in the supplier Product Unit of Measure if not empty, in the default unit of measure of the product otherwise."), 'qty': fields.function(_calc_qty, store=True, type='float', string='Quantity', multi="qty", help="This is a quantity which is converted into Default Unit of Measure."), 'product_tmpl_id' : fields.many2one('product.template', 'Product Template', required=True, ondelete='cascade', select=True, oldname='product_id'), 'delay' : fields.integer('Delivery Lead Time', required=True, help="Lead time in days between the confirmation of the purchase order and the receipt of the products in your warehouse. Used by the scheduler for automatic computation of the purchase order planning."), 'pricelist_ids': fields.one2many('pricelist.partnerinfo', 'suppinfo_id', 'Supplier Pricelist', copy=True), 'company_id':fields.many2one('res.company','Company',select=1), } _defaults = { 'min_qty': 0.0, 'sequence': 1, 'delay': 1, 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'product.supplierinfo', context=c), } _order = 'sequence' class pricelist_partnerinfo(osv.osv): _name = 'pricelist.partnerinfo' _columns = { 'name': fields.char('Description'), 'suppinfo_id': fields.many2one('product.supplierinfo', 'Partner Information', required=True, ondelete='cascade'), 'min_quantity': fields.float('Quantity', required=True, help="The minimal quantity to trigger this rule, expressed in the supplier Unit of Measure if any or in the default Unit of Measure of the product otherrwise."), 'price': fields.float('Unit Price', required=True, digits_compute=dp.get_precision('Product Price'), help="This price will be considered as a price for the supplier Unit of Measure if any or the default Unit of Measure of the product otherwise"), } _order = 'min_quantity asc' class res_currency(osv.osv): _inherit = 'res.currency' def _check_main_currency_rounding(self, cr, uid, ids, context=None): cr.execute('SELECT digits FROM decimal_precision WHERE name like %s',('Account',)) digits = cr.fetchone() if digits and len(digits): digits = digits[0] main_currency = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.currency_id for currency_id in ids: if currency_id == main_currency.id: if main_currency.rounding < 10 ** -digits: return False return True _constraints = [ (_check_main_currency_rounding, 'Error! You cannot define a rounding factor for the company\'s main currency that is smaller than the decimal precision of \'Account\'.', ['rounding']), ] class decimal_precision(osv.osv): _inherit = 'decimal.precision' def _check_main_currency_rounding(self, cr, uid, ids, context=None): cr.execute('SELECT id, digits FROM decimal_precision WHERE name like %s',('Account',)) res = cr.fetchone() if res and len(res): account_precision_id, digits = res main_currency = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.currency_id for decimal_precision in ids: if decimal_precision == account_precision_id: if main_currency.rounding < 10 ** -digits: return False return True _constraints = [ (_check_main_currency_rounding, 'Error! You cannot define the decimal precision of \'Account\' as greater than the rounding factor of the company\'s main currency', ['digits']), ] # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
nicobustillos/odoo
addons/product/product.py
Python
agpl-3.0
64,968
<?php namespace SPHERE\Application\Platform\Gatekeeper\Authorization\Consumer; use SPHERE\Application\Platform\Gatekeeper\Authorization\Consumer\Service\Entity\TblConsumer; use SPHERE\Common\Frontend\Form\Repository\Button\Primary; use SPHERE\Common\Frontend\Form\Repository\Field\TextField; use SPHERE\Common\Frontend\Form\Structure\Form; use SPHERE\Common\Frontend\Form\Structure\FormColumn; use SPHERE\Common\Frontend\Form\Structure\FormGroup; use SPHERE\Common\Frontend\Form\Structure\FormRow; use SPHERE\Common\Frontend\Table\Repository\Title; use SPHERE\Common\Frontend\Table\Structure\TableData; use SPHERE\Common\Window\Stage; /** * Class Frontend * * @package SPHERE\Application\System\Gatekeeper\Authorization\Consumer */ class Frontend { /** * @param string $ConsumerAcronym * @param string $ConsumerName * @param $ConsumerAlias * * @return Stage */ public static function frontendConsumer($ConsumerAcronym, $ConsumerName, $ConsumerAlias) { $Stage = new Stage('Mandanten'); $tblConsumerAll = Consumer::useService()->getConsumerAll(); $TableContent = array(); array_walk($tblConsumerAll, function(TblConsumer $tblConsumer) use (&$TableContent){ $Item['Acronym'] = $tblConsumer->getAcronym(); $Item['Name'] = $tblConsumer->getName(); $Item['Alias'] = $tblConsumer->getAlias(); array_push($TableContent, $Item); }); $Stage->setContent( new TableData($TableContent, new Title('Bestehende Mandanten'), array( 'Acronym' => 'Mandanten-Kürzel', 'Name' => 'Mandanten-Name', 'Alias' => 'Mandanten-Alias' )) .Consumer::useService()->createConsumer( new Form(new FormGroup( new FormRow(array( new FormColumn( new TextField( 'ConsumerAcronym', 'Kürzel des Mandanten', 'Kürzel des Mandanten' ) , 2), new FormColumn( new TextField( 'ConsumerName', 'Name des Mandanten', 'Name des Mandanten' ) , 6), new FormColumn( new TextField( 'ConsumerAlias', 'Alias des Mandanten', 'Alias des Mandanten' ) , 4), )), new \SPHERE\Common\Frontend\Form\Repository\Title('Mandant anlegen')) , new Primary('Hinzufügen') ), $ConsumerAcronym, $ConsumerName, $ConsumerAlias ) ); return $Stage; } }
DerDu/SPHERE-Framework
Application/Platform/Gatekeeper/Authorization/Consumer/Frontend.php
PHP
agpl-3.0
2,922
/*----------------------------------------------------------------------*/ /* Fonction qui verifie si la valeur d'un element est vide ou pas */ /*----------------------------------------------------------------------*/ function isEmpty(element) { var tmp; if(element.value == "") { tmp = true; } else { tmp = false; } return tmp; } /*-------------------------------------------------------*/ /* Fonction qui verifie la bonne saisie d'un email */ /*------------------------------------------------------ */ function verifMail(element) { var tmp; var arobase = element.value.indexOf("@",1); var point = element.value.indexOf(".", arobase+1); if((arobase > -1) && (element.value.length > 2) && (point > 1)) { tmp = true; } else { tmp = false; } return tmp; } /*-------------------------------------------------------*/ /* Verification de la bonne saisie du formulaire */ /*------------------------------------------------------ */ function verifForm(myForm) { var tmp = false; if(isEmpty(myForm.nom)) { alert("Veuillez entrer votre nom !"); myForm.nom.focus(); tmp = false; } else { if(isEmpty(myForm.email) || !verifMail(myForm.email)) { alert("Veuillez entrer une adresse email correcte !"); myForm.email.focus(); tmp = false; } else { if(isEmpty(myForm.url)) { alert("Veuillez entrer l'adresse de votre site web !"); myForm.url.focus(); tmp = false; } else { if(isEmpty(myForm.rss)) { alert("Veuillez entrer au moin une categorie !"); myForm.rss.focus(); tmp = false; } else { if(!myForm.ok.checked) { alert("Veuillez accepter le reglement !"); myForm.ok.focus(); tmp = false; } else { tmp = true; } } } } } return tmp; }
theclimber/Bilboplanet
javascript/functions.js
JavaScript
agpl-3.0
1,871
# # Copyright (C) 2014 - present Instructure, Inc. # # This file is part of Canvas. # # Canvas 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, version 3 of the License. # # Canvas 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/>. module Importers def self.register_content_importer(klass) @content_importers ||= {} @content_importers[klass.item_class.to_s] = klass end def self.content_importer_for(context_type) klass = @content_importers[context_type] raise "No content importer registered for #{context_type}" unless klass klass end class Importer class << self attr_accessor :item_class # forward translations to CalendarEvent; they used to live there. def translate(*args) raise "Needs self.item_class to be set in #{self}" unless self.item_class self.item_class.translate(*args) end alias :t :translate def logger(*args) raise "Needs self.item_class to be set in #{self}" unless self.item_class self.item_class.logger(*args) end end end end require_dependency 'importers/account_content_importer' require_dependency 'importers/course_content_importer'
venturehive/canvas-lms
app/models/importers.rb
Ruby
agpl-3.0
1,627
<?php /** * Mno Organization Interface */ class MnoSoaBaseOrganization extends MnoSoaBaseEntity { protected $_mno_entity_name = "organizations"; protected $_create_rest_entity_name = "organizations"; protected $_create_http_operation = "POST"; protected $_update_rest_entity_name = "organizations"; protected $_update_http_operation = "POST"; protected $_receive_rest_entity_name = "organizations"; protected $_receive_http_operation = "GET"; protected $_delete_rest_entity_name = "organizations"; protected $_delete_http_operation = "DELETE"; protected $_id; protected $_name; protected $_industry; protected $_annual_revenue; protected $_capital; protected $_number_of_employees; protected $_address; protected $_email; protected $_telephone; protected $_website; protected $_entity; protected function pushId() { throw new Exception('Function '. __FUNCTION__ . ' must be overriden in MnoOrganization class!'); } /** * Translate Maestrano identifier to local identifier * * @return Status code * STATUS_ERROR -> Error * STATUS_NEW_ID -> New identifier * STATUS_EXISTING_ID -> Existing identifier * STATUS_DELETED_ID -> Deleted identifier */ protected function pullId() { throw new Exception('Function '. __FUNCTION__ . ' must be overriden in MnoOrganization class!'); } protected function pushName() { throw new Exception('Function '. __FUNCTION__ . ' must be overriden in MnoOrganization class!'); } protected function pullName() { throw new Exception('Function '. __FUNCTION__ . ' must be overriden in MnoOrganization class!'); } protected function pushIndustry() { throw new Exception('Function '. __FUNCTION__ . ' must be overriden in MnoOrganization class!'); } protected function pullIndustry() { throw new Exception('Function '. __FUNCTION__ . ' must be overriden in MnoOrganization class!'); } protected function pushAnnualRevenue() { throw new Exception('Function '. __FUNCTION__ . ' must be overriden in MnoOrganization class!'); } protected function pullAnnualRevenue() { throw new Exception('Function '. __FUNCTION__ . ' must be overriden in MnoOrganization class!'); } protected function pushCapital() { throw new Exception('Function '. __FUNCTION__ . ' must be overriden in MnoOrganization class!'); } protected function pullCapital() { throw new Exception('Function '. __FUNCTION__ . ' must be overriden in MnoOrganization class!'); } protected function pushNumberOfEmployees() { throw new Exception('Function '. __FUNCTION__ . ' must be overriden in MnoOrganization class!'); } protected function pullNumberOfEmployees() { throw new Exception('Function '. __FUNCTION__ . ' must be overriden in MnoOrganization class!'); } protected function pushAddresses() { throw new Exception('Function '. __FUNCTION__ . ' must be overriden in MnoOrganization class!'); } protected function pullAddresses() { throw new Exception('Function '. __FUNCTION__ . ' must be overriden in MnoOrganization class!'); } protected function pushEmails() { throw new Exception('Function '. __FUNCTION__ . ' must be overriden in MnoOrganization class!'); } protected function pullEmails() { throw new Exception('Function '. __FUNCTION__ . ' must be overriden in MnoOrganization class!'); } protected function pushTelephones() { throw new Exception('Function '. __FUNCTION__ . ' must be overriden in MnoOrganization class!'); } protected function pullTelephones() { throw new Exception('Function '. __FUNCTION__ . ' must be overriden in MnoOrganization class!'); } protected function pushWebsites() { throw new Exception('Function '. __FUNCTION__ . ' must be overriden in MnoOrganization class!'); } protected function pullWebsites() { throw new Exception('Function '. __FUNCTION__ . ' must be overriden in MnoOrganization class!'); } protected function pushEntity() { throw new Exception('Function '. __FUNCTION__ . ' must be overriden in MnoOrganization class!'); } protected function pullEntity() { throw new Exception('Function '. __FUNCTION__ . ' must be overriden in MnoOrganization class!'); } protected function saveLocalEntity($push_to_maestrano, $status) { throw new Exception('Function '. __FUNCTION__ . ' must be overriden in MnoOrganization class!'); } public function getLocalEntityIdentifier() { throw new Exception('Function '. __FUNCTION__ . ' must be overriden in MnoOrganization class!'); } /** * Build a Maestrano organization message * * @return Organization the organization json object */ protected function build() { $this->_log->debug(__FUNCTION__ . " start build function"); $this->pushId(); $this->_log->debug(__FUNCTION__ . " after Id"); $this->pushName(); $this->_log->debug(__FUNCTION__ . " after Name"); $this->pushIndustry(); $this->_log->debug(__FUNCTION__ . " after Industry"); $this->pushAnnualRevenue(); $this->_log->debug(__FUNCTION__ . " after Annual Revenue"); $this->pushCapital(); $this->_log->debug(__FUNCTION__ . " after Capital"); $this->pushNumberOfEmployees(); $this->_log->debug(__FUNCTION__ . " after Number of Employees"); $this->pushAddresses(); $this->_log->debug(__FUNCTION__ . " after Addresses"); $this->pushEmails(); $this->_log->debug(__FUNCTION__ . " after Emails"); $this->pushTelephones(); $this->_log->debug(__FUNCTION__ . " after Telephones"); $this->pushWebsites(); $this->_log->debug(__FUNCTION__ . " after Websites"); $this->pushEntity(); $this->_log->debug(__FUNCTION__ . " after Entity"); if ($this->_name != null) { $msg['organization']->name = $this->_name; } if ($this->_industry != null) { $msg['organization']->industry = $this->_industry; } if ($this->_annual_revenue != null) { $msg['organization']->annualRevenue = $this->_annual_revenue; } if ($this->_capital != null) { $msg['organization']->capital = $this->_capital; } if ($this->_number_of_employees != null) { $msg['organization']->numberOfEmployees = $this->_number_of_employees; } if ($this->_address != null) { $msg['organization']->contacts->address = $this->_address; } if ($this->_email != null) { $msg['organization']->contacts->email = $this->_email; } if ($this->_telephone != null) { $msg['organization']->contacts->telephone = $this->_telephone; } if ($this->_website != null) { $msg['organization']->contacts->website = $this->_website; } if ($this->_entity != null) { $msg['organization']->entity = $this->_entity; } $this->_log->debug(__FUNCTION__ . " after creating message array"); $result = json_encode($msg['organization']); $this->_log->debug(__FUNCTION__ . " result = " . $result); return json_encode($msg['organization']); } protected function persist($mno_entity) { $this->_log->debug(__CLASS__ . " " . __FUNCTION__ . " mno_entity = " . json_encode($mno_entity)); if (!empty($mno_entity->organization)) { $mno_entity = $mno_entity->organization; } if (!empty($mno_entity->id)) { $this->_id = $mno_entity->id; $this->_log->debug(__FUNCTION__ . " after id"); $this->set_if_array_key_has_value($this->_name, 'name', $mno_entity); $this->_log->debug(__FUNCTION__ . " after name"); $this->set_if_array_key_has_value($this->_industry, 'industry', $mno_entity); $this->set_if_array_key_has_value($this->_annual_revenue, 'annualRevenue', $mno_entity); $this->set_if_array_key_has_value($this->_capital, 'capital', $mno_entity); $this->set_if_array_key_has_value($this->_number_of_employees, 'numberOfEmployees', $mno_entity); $this->_log->debug(__FUNCTION__ . " before contacts"); if (!empty($mno_entity->contacts)) { $this->set_if_array_key_has_value($this->_address, 'address', $mno_entity->contacts); $this->set_if_array_key_has_value($this->_email, 'email', $mno_entity->contacts); $this->set_if_array_key_has_value($this->_telephone, 'telephone', $mno_entity->contacts); $this->set_if_array_key_has_value($this->_website, 'website', $mno_entity->contacts); } $this->_log->debug(__FUNCTION__ . " after contacts"); $this->set_if_array_key_has_value($this->_entity, 'entity', $mno_entity); $this->_log->debug(__FUNCTION__ . " persist organization id = " . $this->_id); $status = $this->pullId(); $this->_log->debug(__FUNCTION__ . " after id"); $is_new_id = $status == constant('MnoSoaBaseEntity::STATUS_NEW_ID'); $is_existing_id = $status == constant('MnoSoaBaseEntity::STATUS_EXISTING_ID'); if ($is_new_id || $is_existing_id) { $this->pullName(); $this->pullIndustry(); $this->pullAnnualRevenue(); $this->pullCapital(); $this->pullNumberOfEmployees(); $this->pullAddresses(); $this->pullEmails(); $this->pullTelephones(); $this->pullWebsites(); $this->pullEntity(); $this->saveLocalEntity(false, $status); } $local_entity_id = $this->getLocalEntityIdentifier(); $mno_entity_id = $this->_id; if ($is_new_id && !empty($local_entity_id) && !empty($mno_entity_id)) { $this->addIdMapEntry($local_entity_id, $mno_entity_id); } } $this->_log->debug(__FUNCTION__ . " end"); } /** * Helper functions * */ } ?>
maestrano/fengoffice
maestrano/lib/mno-php/src/soa/MnoSoaBaseOrganization.php
PHP
agpl-3.0
10,140
require 'spec_helper' RSpec.describe PeopleParams do let(:params) do { name: 'Bruce Lee', street: 'Leestreet 12a', zip: '1234567', city: 'China City', phone_numbers: [ { type: 'office', number: '1234556778', } ] } end let(:instance) { described_class.new(params) } describe '#to_h' do subject { instance.to_h } context 'customer exists' do let(:customer) { FactoryGirl.create(:customer) } let(:hash) do { direct_debit_enabled: nil, bank_account: nil, clearing: nil, vcard_attributes: { id: customer.id, full_name: 'Bruce Lee', address_attributes: { extended_address: nil, street_address: 'Leestreet 12a', post_office_box: nil, postal_code: '1234567', locality: 'China City', }, contacts_attributes: { 0 => { id: nil, phone_number_type: 'Tel. geschäft', number: '1234556778', } }, } } end before do params[:id] = customer.id end it { is_expected.to eq(hash) } context "customer doesn't have a phone number" do specify { expect(subject[:vcard_attributes][:contacts_attributes][0][:id]).to eq(nil) } end context 'customer has a phone number' do let!(:phone_id) do customer.vcard.contacts.create!(phone_number_type: 'Tel. geschäft', number: '123').id end specify { expect(subject[:vcard_attributes][:contacts_attributes][0][:id]).to eq(phone_id) } end end context 'customer does not exist' do let(:hash) do { direct_debit_enabled: nil, bank_account: nil, clearing: nil, vcard_attributes: { full_name: 'Bruce Lee', address_attributes: { extended_address: nil, street_address: 'Leestreet 12a', post_office_box: nil, postal_code: '1234567', locality: 'China City', }, contacts_attributes: { 0 => { phone_number_type: 'Tel. geschäft', number: '1234556778', } }, } } end it { is_expected.to eq(hash) } end end end
wtag/bookyt
spec/services/people_params_spec.rb
Ruby
agpl-3.0
2,495
// // Copyright (C) 2013-2018 University of Amsterdam // // 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/>. // #include "jaspdoublevalidator.h" #include <math.h> QValidator::State JASPDoubleValidator::validate(QString& s, int& pos) const { if (s.isEmpty() || (s.startsWith("-") && s.length() == 1 && bottom() < 0)) { // allow empty field or standalone minus sign return QValidator::Intermediate; } if (s.contains("-") && bottom() >= 0) return QValidator::Invalid; // check length of decimal places QChar point = locale().decimalPoint(); if (s.indexOf(point) != -1) { if (decimals() == 0) return QValidator::Invalid; int lengthDecimals = s.length() - s.indexOf(point) - 1; if (lengthDecimals > decimals()) return QValidator::Invalid; } // check range of value bool isNumber; double value = locale().toDouble(s, &isNumber); if (!isNumber) { if (s.length() == 1 && s[0] == point) { isNumber = true; value = 0; } else return QValidator::Invalid; } bool isMaxExclusive = _inclusive == JASPControlBase::Inclusive::None || _inclusive == JASPControlBase::Inclusive::MinOnly; bool isMinExclusive = _inclusive == JASPControlBase::Inclusive::None || _inclusive == JASPControlBase::Inclusive::MaxOnly; if (value >= 0) { if (value > top() || (isMaxExclusive && value == top())) return QValidator::Intermediate; else if (value < bottom() || (isMinExclusive && value == bottom())) return QValidator::Intermediate; } else { if (value < bottom() || (isMinExclusive && value == bottom())) return QValidator::Intermediate; else if (value > top() || (isMaxExclusive && value == top())) return QValidator::Intermediate; } return QValidator::Acceptable; } QString JASPDoubleValidator::validationMessage(const QString& fieldName) { QString message = tr("The value must be "); bool hasValidation = false; if (!_isInf(bottom())) { hasValidation = true; if (_inclusive == JASPControlBase::Inclusive::MinMax || _inclusive == JASPControlBase::Inclusive::MinOnly) message += tr("&#8805; %1").arg(bottom()); else message += tr("&gt; %1").arg(bottom()); } if (!_isInf(top())) { if (hasValidation) message += tr(" and "); hasValidation = true; if (_inclusive == JASPControlBase::Inclusive::MinMax || _inclusive == JASPControlBase::Inclusive::MaxOnly) message += tr("&#8804; %1").arg(top()); else message += tr("&lt; %1").arg(top()); } if (!hasValidation) message = tr("No validation error"); return message; } bool JASPDoubleValidator::_isInf(double value) { static int intInfinity = 2147483647; // 2 ^ 32 - 1 return isinf(value) || int(value) == intInfinity || int(value) == -intInfinity; }
vankesteren/jasp-desktop
JASP-Desktop/analysis/jaspdoublevalidator.cpp
C++
agpl-3.0
3,317
/** * PUSH Notification server * (c) Telefonica Digital, 2012 - All rights reserved * License: GNU Affero V3 (see LICENSE file) * Fernando Rodríguez Sela <frsela@tid.es> * Guillermo Lopez Leal <gll@tid.es> */ var mn = require('../../src/common/MobileNetwork.js'), assert = require('assert'), vows = require('vows'); mn.start(); vows.describe('MobileNetwork tests').addBatch({ 'Ready.': { topic: function() { mn.callbackReady(this.callback); }, 'is ready': function(ready) { assert.isTrue(ready); }, 'Searching for 214-007.': { topic: function() { mn.getNetwork('214', '007', this.callback); }, 'error is null': function(error, data, where)  { assert.isNull(error); }, 'data received is an object': function(error, data, where)  { assert.isObject(data); }, 'data._id is 214-007': function(error, data, where)  { assert.equal(data._id, "214-007"); }, 'data.country is Spain': function(error, data, where)  { assert.equal(data.country, "Spain"); }, 'data.operator is "Telefónica Móviles España, SAU"': function(error, data, where)  { assert.equal(data.operator, "Telefónica Móviles España, SAU"); }, 'data.mcc is 214': function(error, data, where)  { assert.equal(data.mcc, "214"); }, 'data.mnc is 007': function(error, data, where)  { assert.equal(data.mnc, "007"); }, 'where it comes is ddbb': function(error, data, where)  { assert.equal(where, "ddbb"); }, 'Searching (came from cache).': { topic: function() { mn.getNetwork("214", "007", this.callback); }, 'error is null': function(error, data, where)  { assert.isNull(error); }, 'data received is an object': function(error, data, where)  { assert.isObject(data); }, 'data._id is 214-007': function(error, data, where)  { assert.equal(data._id, "214-007"); }, 'data.country is Spain': function(error, data, where)  { assert.equal(data.country, "Spain"); }, 'data.operator is "Telefónica Móviles España, SAU"': function(error, data, where)  { assert.equal(data.operator, "Telefónica Móviles España, SAU"); }, 'data.mcc is 214': function(error, data, where)  { assert.equal(data.mcc, "214"); }, 'data.mnc is 007': function(error, data, where)  { assert.equal(data.mnc, "007"); }, 'where it comes is cache': function(error, data, where)  { assert.equal(where, (mn.isCacheEnabled == true ? "cache" : "ddbb")); }, 'Cache cleared.': { topic: function() { mn.resetCache(this.callback); }, 'Searching again (from DDBB).': { topic: function() { mn.getNetwork("214", "007", this.callback); }, 'error is null': function(error, data, where)  { assert.isNull(error); }, 'data received is an object': function(error, data, where)  { assert.isObject(data); }, 'data._id is 214-007': function(error, data, where)  { assert.equal(data._id, "214-007"); }, 'data.country is Spain': function(error, data, where)  { assert.equal(data.country, "Spain"); }, 'data.operator is "Telefónica Móviles España, SAU"': function(error, data, where)  { assert.equal(data.operator, "Telefónica Móviles España, SAU"); }, 'data.mcc is 214': function(error, data, where)  { assert.equal(data.mcc, "214"); }, 'data.mnc is 007': function(error, data, where)  { assert.equal(data.mnc, "007"); }, 'where it comes is ddbb': function(error, data, where)  { assert.equal(where, "ddbb"); } } } } } }, 'Ready2.': { topic: function() { mn.callbackReady(this.callback); }, 'is ready': function(ready) { assert.isTrue(ready); }, 'Recovering non existing.': { topic: function() { mn.getNetwork("999", "99", this.callback); }, 'error is null': function(error, data, where)  { assert.isNull(error); }, 'data is null': function(error, data, where)  { assert.isNull(error); }, 'where it comes is ddbb': function(error, data, where)  { assert.equal(where, 'ddbb'); } } }, 'Ready3.': { topic: function() { mn.callbackReady(this.callback); }, 'is ready': function(ready) { assert.isTrue(ready); }, 'Cache cleared.': { topic: function() { mn.resetCache(this.callback); }, 'Recovering 214-007 (testing padding).': { topic: function() { mn.getNetwork(214, 7, this.callback); }, 'error is null': function(error, data, where)  { assert.isNull(error); }, 'data received is an object': function(error, data, where)  { assert.isObject(data); }, 'data._id is 214-007': function(error, data, where)  { assert.equal(data._id, "214-007"); }, 'data.country is Spain': function(error, data, where)  { assert.equal(data.country, "Spain"); }, 'data.operator is "Telefónica Móviles España, SAU"': function(error, data, where)  { assert.equal(data.operator, "Telefónica Móviles España, SAU"); }, 'data.mcc is 214': function(error, data, where)  { assert.equal(data.mcc, "214"); }, 'data.mnc is 007': function(error, data, where)  { assert.equal(data.mnc, "007"); }, 'where it comes is ddbb': function(error, data, where)  { assert.equal(where, "ddbb"); } } } }, 'Close': { topic: mn.stop() } }).export(module);
frsela/notification_server
test/unit/mobilenetwork-test-disabled.js
JavaScript
agpl-3.0
7,485
<?php if (!defined('WFWAF_VIEW_RENDERING')) { exit; } /** @var wfWAF $waf */ /** @var wfWAFView $this */ /* * IMPORTANT: * * If the form variables below change name or format, admin.ajaxWatcher.js in the main plugin also needs changed. It * processes these to generate its whitelist button. */ $method = wfWAFUtils::strtolower($waf->getRequest()->getMethod()); $urlParamsToWhitelist = array(); foreach ($waf->getFailedRules() as $paramKey => $categories) { foreach ($categories as $category => $failedRules) { foreach ($failedRules as $failedRule) { /** * @var wfWAFRule $rule * @var wfWAFRuleComparisonFailure $failedComparison */ $rule = $failedRule['rule']; $failedComparison = $failedRule['failedComparison']; $urlParamsToWhitelist[] = array( 'path' => $waf->getRequest()->getPath(), 'paramKey' => $failedComparison->getParamKey(), 'ruleID' => $rule->getRuleID(), ); } } } ?> <!DOCTYPE html> <html> <head> <title>403 Forbidden</title> <style> html { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 0.875rem; line-height: 1.42857143; color: #333; background-color: #fff; padding: 0; margin: 0; } body { padding: 0; margin: 0; } a { color:#00709e; } h1, h2, h3, h4, h5, h6 { font-weight: 200; line-height: 1.1; } h1, .h1 { font-size: 3rem; } h2, .h2 { font-size: 2.5rem; } h3, .h3 { font-size: 1.5rem; } h4, .h4 { font-size: 1rem; } h5, .h5 { font-size: 0.875rem; } h6, .h6 { font-size: 0.75rem; } h1, h2, h3 { margin-top: 20px; margin-bottom: 10px; } h4, h5, h6 { margin-top: 10px; margin-bottom: 10px; } .wf-btn { display: inline-block; margin-bottom: 0; font-weight: normal; text-align: center; vertical-align: middle; touch-action: manipulation; cursor: pointer; background-image: none; border: 1px solid transparent; white-space: nowrap; text-transform: uppercase; padding: .4rem 1rem; font-size: .875rem; line-height: 1.3125rem; border-radius: 4px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none } @media (min-width: 768px) { .wf-btn { padding: .5rem 1.25rem; font-size: .875rem; line-height: 1.3125rem; border-radius: 4px } } .wf-btn:focus, .wf-btn.wf-focus, .wf-btn:active:focus, .wf-btn:active.wf-focus, .wf-btn.wf-active:focus, .wf-btn.wf-active.wf-focus { outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px } .wf-btn:hover, .wf-btn:focus, .wf-btn.wf-focus { color: #00709e; text-decoration: none } .wf-btn:active, .wf-btn.wf-active { outline: 0; background-image: none; -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125) } .wf-btn.wf-disabled, .wf-btn[disabled], .wf-btn[readonly], fieldset[disabled] .wf-btn { cursor: not-allowed; -webkit-box-shadow: none; box-shadow: none } a.wf-btn { text-decoration: none } a.wf-btn.wf-disabled, fieldset[disabled] a.wf-btn { cursor: not-allowed; pointer-events: none } .wf-btn-default { color: #00709e; background-color: #fff; border-color: #00709e } .wf-btn-default:focus, .wf-btn-default.focus { color: #00709e; background-color: #e6e6e6; border-color: #00161f } .wf-btn-default:hover { color: #00709e; background-color: #e6e6e6; border-color: #004561 } .wf-btn-default:active, .wf-btn-default.active { color: #00709e; background-color: #e6e6e6; border-color: #004561 } .wf-btn-default:active:hover, .wf-btn-default:active:focus, .wf-btn-default:active.focus, .wf-btn-default.active:hover, .wf-btn-default.active:focus, .wf-btn-default.active.focus { color: #00709e; background-color: #d4d4d4; border-color: #00161f } .wf-btn-default:active, .wf-btn-default.wf-active { background-image: none } .wf-btn-default.wf-disabled, .wf-btn-default[disabled], .wf-btn-default[readonly], fieldset[disabled] .wf-btn-default { color: #777; background-color: #fff; border-color: #e2e2e2; cursor: not-allowed } .wf-btn-default.wf-disabled:hover, .wf-btn-default.wf-disabled:focus, .wf-btn-default.wf-disabled.wf-focus, .wf-btn-default[disabled]:hover, .wf-btn-default[disabled]:focus, .wf-btn-default[disabled].wf-focus, .wf-btn-default[readonly]:hover, .wf-btn-default[readonly]:focus, .wf-btn-default[readonly].wf-focus, fieldset[disabled] .wf-btn-default:hover, fieldset[disabled] .wf-btn-default:focus, fieldset[disabled] .wf-btn-default.wf-focus { background-color: #fff; border-color: #00709e } input[type="text"], input.wf-input-text { text-align: left; max-width: 200px; height: 30px; border-radius: 0; border: 0; background-color: #ffffff; box-shadow: 0px 0px 0px 1px rgba(215,215,215,0.65); padding: 0.25rem; } hr { margin-top: 1rem; margin-bottom: 1rem; border: 0; border-top: 4px solid #eee } p { font-size: 1.4rem; font-weight: 300; } p.medium, div.medium p { font-size: 1.1rem; } p.small, div.small p { font-size: 1rem; } .container { max-width: 900px; padding: 0 1rem; margin: 0 auto; } .top-accent { height: 25px; background-color: #00709e; } .block-data { width: 100%; border-top: 6px solid #00709e; } .block-data tr:nth-child(odd) th, .block-data tr:nth-child(odd) td { background-color: #eeeeee; } .block-data th, .block-data td { text-align: left; padding: 1rem; font-size: 1.1rem; } .block-data th.reason, .block-data td.reason { color: #930000; } .block-data th { font-weight: 300; } .block-data td { font-weight: 500; } .about { margin-top: 2rem; display: flex; flex-direction: row; align-items: stretch; } .about .badge { flex-basis: 116px; flex-grow: 0; flex-shrink: 0; display: flex; align-items: center; justify-content: flex-start; } .about svg { width: 100px; height: 100px; } .about-text { background-color: #00709e; color: #ffffff; padding: 1rem; } .about-text .h4 { font-weight: 500; margin-top: 0; margin-bottom: 0.25rem; font-size: 0.875rem; } .about-text p { font-size: 0.875rem; font-weight: 200; margin-top: 0.3rem; margin-bottom: 0.3rem; } .about-text p:first-of-type { margin-top: 0; } .about-text p:last-of-type { margin-bottom: 0; } .st0{fill:#00709e;} .st1{fill:#FFFFFF;} .generated { color: #999999; margin-top: 2rem; } </style> </head> <body> <?php if (!empty($errorNonce)) { echo '<!-- WFWAF NONCE: ' . htmlspecialchars($errorNonce) . ' -->'; } ?> <div class="top-accent"></div> <div class="container"> <h1>A potentially unsafe operation has been detected in your request to this site</h1> <p>Your access to this service has been limited. (HTTP response code 403)</p> <p>If you think you have been blocked in error, contact the owner of this site for assistance.</p> <?php if (!empty($customText)): ?> <hr> <div class="medium"><?php echo $customText; ?></div> <?php endif; ?> <?php if ($urlParamsToWhitelist): ?> <hr> <p>If you are an administrator and you are certain this is a false positive, you can automatically whitelist this request and repeat the same action.</p> <form id="whitelist-form" action="<?php echo htmlentities($waf->getRequest()->getPath(), ENT_QUOTES, 'utf-8') ?>" method="post"> <input type="hidden" name="wfwaf-false-positive-params" value="<?php echo htmlentities(wfWAFUtils::json_encode($urlParamsToWhitelist), ENT_QUOTES, 'utf-8') ?>"> <input type="hidden" name="wfwaf-false-positive-nonce" value="<?php echo htmlentities($waf->getAuthCookieValue('nonce', ''), ENT_QUOTES, 'utf-8') ?>"> <div id="whitelist-actions"> <p><label><input id="verified-false-positive-checkbox" type="checkbox" name="wfwaf-false-positive-verified" value="1"> <em>I am certain this is a false positive.</em></label></p> <p><button id="whitelist-button" type="submit">Whitelist This Action</button></p> </div> <p id="success" style="color: #35b13a; font-weight: bold; display: none"><em>All set! You can refresh the page to try this action again.</em></p> <p id="error" style="color: #dd422c; font-weight: bold; display: none"><em>Something went wrong whitelisting this request. You can try setting the Firewall Status to Learning Mode under Web App Firewall in the Wordfence menu, and retry this same action.</em></p> </form> <script> var whitelistButton = document.getElementById('whitelist-button'); var verified = document.getElementById('verified-false-positive-checkbox'); verified.checked = false; verified.onclick = function() { whitelistButton.disabled = !this.checked; }; verified.onclick(); document.getElementById('whitelist-form').onsubmit = function(evt) { evt.preventDefault(); var request = new XMLHttpRequest(); request.addEventListener("load", function() { if (this.status === 200 && this.responseText.indexOf('Successfully whitelisted') > -1) { document.getElementById('whitelist-actions').style.display = 'none'; document.getElementById('success').style.display = 'block'; } else { document.getElementById('error').style.display = 'block'; } }); request.open("POST", this.action, true); request.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); var inputs = this.querySelectorAll('input[name]'); var data = ''; for (var i = 0; i < inputs.length; i++) { data += encodeURIComponent(inputs[i].name) + '=' + encodeURIComponent(inputs[i].value) + '&'; } request.send(data); return false; }; </script> <hr> <?php endif ?> <h2 class="h3">Block Technical Data</h2> <table border="0" cellspacing="0" cellpadding="0" class="block-data"> <tr> <th class="reason">Block Reason:</th> <td class="reason">A potentially unsafe operation has been detected in your request to this site</td> </tr> <tr> <th class="time">Time:</th> <td class="time"><?php echo htmlspecialchars(gmdate('D, j M Y G:i:s T', wfWAFUtils::normalizedTime())); ?></td> </tr> </table> <div class="about"> <div class="badge"> <?php $contents = file_get_contents(dirname(__FILE__) . '/../../../../../images/wf-error-badge.svg'); $contents = preg_replace('/^<\?xml.+?\?>\s*/i', '', $contents); $contents = preg_replace('/^<!DOCTYPE.+?>\s*/i', '', $contents); $contents = preg_replace('/<svg\s+xmlns="[^"]*"/i', '<svg', $contents); echo $contents; ?> </div> <div class="about-text"> <h3 class="h4">About Wordfence</h3> <p>Wordfence is a security plugin installed on over 3 million WordPress sites. The owner of this site is using Wordfence to manage access to their site.</p> <p>You can also read the documentation to learn about Wordfence's blocking tools, or visit wordfence.com to learn more about Wordfence.</p> </div> </div> <p class="documentation small">Click here to learn more: <a href="https://www.wordfence.com/help/?query=locked-out" target="_blank" rel="noopener noreferrer">Documentation</a></p> <p class="generated small"><em>Generated by Wordfence at <?php echo gmdate('D, j M Y G:i:s T', wfWAFUtils::normalizedTime()); ?>.<br>Your computer's time: <script type="application/javascript">document.write(new Date().toUTCString());</script>.</em></p> </div> </body> </html>
akvo/akvo-sites-zz-template
code/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/views/403-roadblock.php
PHP
agpl-3.0
11,617
/* * Data HUb Service (DHuS) - For Space data distribution. * Copyright (C) 2013,2014,2015,2016 European Space Agency (ESA) * Copyright (C) 2013,2014,2015,2016 GAEL Systems * Copyright (C) 2013,2014,2015,2016 Serco Spa * * This file is part of DHuS software sources. * * 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/>. */ 'use strict'; angular .module('DHuS-webclient') .factory('AuthenticationService', function($q, $injector){ //var http = $injector.get('$http'); var UserService = $injector.get('UserService');//{}; return { loginUrl: '/login', logoutUrl: '/logout', odataAuthTest: function(){ http({ url: ApplicationConfig.baseUrl +"odata/v1/", headers: {'Authorization' :"Basic " +ApplicationService.basicAuth } }); }, login: function(username, password, delegate){ var self = this; return http({ url: ApplicationConfig.baseUrl + self.loginUrl, method: "POST", contentType: 'application/x-www-form-urlencoded', data: $.param({"login_username": username, "login_password": password}), headers: {'Content-Type': 'application/x-www-form-urlencoded', 'Authorization' :"Basic " +window.btoa(username+':'+password) } }) .success(function(response){ window.user = self.username; ApplicationService.logged = true; ApplicationService.basicAuth = window.btoa(username+':'+password); UserService.getUser().then(function(model){ UserService.model = model; }); window.location.replace("#/home"); self.odataAuthTest(); }) .error(function(){ //delegate.showMessage("The email and password you entered don't match."); }); }, showLogin: function(){}, setLoginMethod: function(method){ this.showLogin = method; }, logout: function(){ var self = this; ApplicationService.basicAuth = ''; ApplicationService.logged = false; return http({ url: ApplicationConfig.baseUrl + self.logoutUrl, method: "POST" }) ; } }; });
calogera/DataHubSystem
client/webclient/src/main/frontend/app/scripts/services/authentication-service.js
JavaScript
agpl-3.0
2,781
/* Copyright (C) 2014-2016 Leosac This file is part of Leosac. Leosac 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. Leosac 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/>. */ #include "GroupEvent.hpp" #include "core/audit/GroupEvent_odb.h" #include "core/auth/Group.hpp" #include "tools/JSONUtils.hpp" #include "tools/db/OptionalTransaction.hpp" #include "tools/log.hpp" using namespace Leosac; using namespace Leosac::Audit; std::shared_ptr<GroupEvent> GroupEvent::create(const DBPtr &database, Auth::GroupPtr target_group, AuditEntryPtr parent) { ASSERT_LOG(database, "Database cannot be null."); ASSERT_LOG(target_group, "Target group must be non null."); ASSERT_LOG(target_group->id(), "Target group must be already persisted."); ASSERT_LOG(parent, "Parent must be non null."); ASSERT_LOG(parent->id(), "Parent must be already persisted."); db::OptionalTransaction t(database->begin()); Audit::GroupEventPtr audit = std::shared_ptr<Audit::GroupEvent>(new Audit::GroupEvent()); audit->database_ = database; audit->target(target_group); database->persist(audit); audit->set_parent(parent); database->update(audit); t.commit(); return audit; } void GroupEvent::target(Auth::GroupPtr grp) { ASSERT_LOG(!finalized(), "Audit entry is already finalized."); if (grp) ASSERT_LOG(grp->id(), "Group has no id."); target_ = grp; target_group_id_ = grp->id(); } void GroupEvent::before(const std::string &repr) { ASSERT_LOG(!finalized(), "Audit entry is already finalized."); before_ = repr; } void GroupEvent::after(const std::string &repr) { ASSERT_LOG(!finalized(), "Audit entry is already finalized."); after_ = repr; } Auth::GroupId GroupEvent::target_id() const { if (target_.lock()) { return target_.object_id(); } return target_group_id_; } const std::string &GroupEvent::before() const { return before_; } const std::string &GroupEvent::after() const { return after_; } std::string GroupEvent::generate_description() const { using namespace FlagSetOperator; std::stringstream ss; if (event_mask_ & Audit::EventType::GROUP_CREATED) ss << "Group " << generate_target_description() << " has been created."; else if (event_mask_ & Audit::EventType::GROUP_UPDATED) ss << "Group " << generate_target_description() << " has been edited."; else if (event_mask_ & Audit::EventType::GROUP_DELETED) ss << "Group " << generate_target_description() << " has been deleted."; return ss.str(); } std::string GroupEvent::generate_target_description() const { Leosac::json desc; desc["id"] = target_id(); auto t = target_.load(); if (t) desc["name"] = t->name(); return desc.dump(); } std::shared_ptr<GroupEvent> GroupEvent::create_empty() { return GroupEventPtr(new GroupEvent()); }
islog/leosac
src/core/audit/GroupEvent.cpp
C++
agpl-3.0
3,569
# Include the specified classes # For documentation see the 3.x stub Puppet::Functions.create_function(:include, Puppet::Functions::InternalFunction) do dispatch :include do scope_param # The function supports what the type system sees as Ruby runtime objects, and # they cannot be parameterized to find what is actually valid instances. # The validation is instead done in the function body itself via a call to # `transform_and_assert_classnames` on the calling scope. required_repeated_param 'Any', :names end def include(scope, *classes) classes = scope.transform_and_assert_classnames(classes.flatten) result = classes.map {|name| Puppet::Pops::Types::TypeFactory.host_class(name) } scope.compiler.evaluate_classes(classes, scope, false) # Result is an Array[Class, 1, n] which allows chaining other operations result end end
nwops/puppet-retrospec
vendor/pup410/lib/puppet/functions/include.rb
Ruby
agpl-3.0
885
//############################################################################# //# # //# Copyright (C) <2015> <IMS MAXIMS> # //# # //# 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/>. # //# # //# IMS MAXIMS provides absolutely NO GUARANTEE OF THE CLINICAL SAFTEY of # //# this program. Users of this software do so entirely at their own risk. # //# IMS MAXIMS only ensures the Clinical Safety of unaltered run-time # //# software that it builds, deploys and maintains. # //# # //############################################################################# //#EOH // This code was generated by Barbara Worwood using IMS Development Environment (version 1.80 build 5589.25814) // Copyright (C) 1995-2015 IMS MAXIMS. All rights reserved. // WARNING: DO NOT MODIFY the content of this file package ims.correspondence.vo; /** * Linked to correspondence.configuration.TemplateAssociations business object (ID: 1053100000). */ public class TemplateAssociationsVo extends ims.correspondence.configuration.vo.TemplateAssociationsRefVo implements ims.vo.ImsCloneable, Comparable { private static final long serialVersionUID = 1L; public TemplateAssociationsVo() { } public TemplateAssociationsVo(Integer id, int version) { super(id, version); } public TemplateAssociationsVo(ims.correspondence.vo.beans.TemplateAssociationsVoBean bean) { this.id = bean.getId(); this.version = bean.getVersion(); this.template = bean.getTemplate() == null ? null : new ims.core.admin.vo.TemplateBoRefVo(new Integer(bean.getTemplate().getId()), bean.getTemplate().getVersion()); this.clinics = ims.core.vo.ClinicLiteVoCollection.buildFromBeanCollection(bean.getClinics()); this.specialties = ims.core.vo.lookups.SpecialtyCollection.buildFromBeanCollection(bean.getSpecialties()); this.consultants = ims.core.vo.MedicLiteVoCollection.buildFromBeanCollection(bean.getConsultants()); } public void populate(ims.vo.ValueObjectBeanMap map, ims.correspondence.vo.beans.TemplateAssociationsVoBean bean) { this.id = bean.getId(); this.version = bean.getVersion(); this.template = bean.getTemplate() == null ? null : new ims.core.admin.vo.TemplateBoRefVo(new Integer(bean.getTemplate().getId()), bean.getTemplate().getVersion()); this.clinics = ims.core.vo.ClinicLiteVoCollection.buildFromBeanCollection(bean.getClinics()); this.specialties = ims.core.vo.lookups.SpecialtyCollection.buildFromBeanCollection(bean.getSpecialties()); this.consultants = ims.core.vo.MedicLiteVoCollection.buildFromBeanCollection(bean.getConsultants()); } public ims.vo.ValueObjectBean getBean() { return this.getBean(new ims.vo.ValueObjectBeanMap()); } public ims.vo.ValueObjectBean getBean(ims.vo.ValueObjectBeanMap map) { ims.correspondence.vo.beans.TemplateAssociationsVoBean bean = null; if(map != null) bean = (ims.correspondence.vo.beans.TemplateAssociationsVoBean)map.getValueObjectBean(this); if (bean == null) { bean = new ims.correspondence.vo.beans.TemplateAssociationsVoBean(); map.addValueObjectBean(this, bean); bean.populate(map, this); } return bean; } public Object getFieldValueByFieldName(String fieldName) { if(fieldName == null) throw new ims.framework.exceptions.CodingRuntimeException("Invalid field name"); fieldName = fieldName.toUpperCase(); if(fieldName.equals("TEMPLATE")) return getTemplate(); if(fieldName.equals("CLINICS")) return getClinics(); if(fieldName.equals("SPECIALTIES")) return getSpecialties(); if(fieldName.equals("CONSULTANTS")) return getConsultants(); return super.getFieldValueByFieldName(fieldName); } public boolean getTemplateIsNotNull() { return this.template != null; } public ims.core.admin.vo.TemplateBoRefVo getTemplate() { return this.template; } public void setTemplate(ims.core.admin.vo.TemplateBoRefVo value) { this.isValidated = false; this.template = value; } public boolean getClinicsIsNotNull() { return this.clinics != null; } public ims.core.vo.ClinicLiteVoCollection getClinics() { return this.clinics; } public void setClinics(ims.core.vo.ClinicLiteVoCollection value) { this.isValidated = false; this.clinics = value; } public boolean getSpecialtiesIsNotNull() { return this.specialties != null; } public ims.core.vo.lookups.SpecialtyCollection getSpecialties() { return this.specialties; } public void setSpecialties(ims.core.vo.lookups.SpecialtyCollection value) { this.isValidated = false; this.specialties = value; } public boolean getConsultantsIsNotNull() { return this.consultants != null; } public ims.core.vo.MedicLiteVoCollection getConsultants() { return this.consultants; } public void setConsultants(ims.core.vo.MedicLiteVoCollection value) { this.isValidated = false; this.consultants = value; } public boolean isValidated() { if(this.isBusy) return true; this.isBusy = true; if(!this.isValidated) { this.isBusy = false; return false; } if(this.clinics != null) { if(!this.clinics.isValidated()) { this.isBusy = false; return false; } } if(this.consultants != null) { if(!this.consultants.isValidated()) { this.isBusy = false; return false; } } this.isBusy = false; return true; } public String[] validate() { return validate(null); } public String[] validate(String[] existingErrors) { if(this.isBusy) return null; this.isBusy = true; java.util.ArrayList<String> listOfErrors = new java.util.ArrayList<String>(); if(existingErrors != null) { for(int x = 0; x < existingErrors.length; x++) { listOfErrors.add(existingErrors[x]); } } if(this.template == null) listOfErrors.add("template is mandatory"); if(this.clinics != null) { String[] listOfOtherErrors = this.clinics.validate(); if(listOfOtherErrors != null) { for(int x = 0; x < listOfOtherErrors.length; x++) { listOfErrors.add(listOfOtherErrors[x]); } } } if(this.consultants != null) { String[] listOfOtherErrors = this.consultants.validate(); if(listOfOtherErrors != null) { for(int x = 0; x < listOfOtherErrors.length; x++) { listOfErrors.add(listOfOtherErrors[x]); } } } int errorCount = listOfErrors.size(); if(errorCount == 0) { this.isBusy = false; this.isValidated = true; return null; } String[] result = new String[errorCount]; for(int x = 0; x < errorCount; x++) result[x] = (String)listOfErrors.get(x); this.isBusy = false; this.isValidated = false; return result; } public void clearIDAndVersion() { this.id = null; this.version = 0; } public Object clone() { if(this.isBusy) return this; this.isBusy = true; TemplateAssociationsVo clone = new TemplateAssociationsVo(this.id, this.version); clone.template = this.template; if(this.clinics == null) clone.clinics = null; else clone.clinics = (ims.core.vo.ClinicLiteVoCollection)this.clinics.clone(); if(this.specialties == null) clone.specialties = null; else clone.specialties = (ims.core.vo.lookups.SpecialtyCollection)this.specialties.clone(); if(this.consultants == null) clone.consultants = null; else clone.consultants = (ims.core.vo.MedicLiteVoCollection)this.consultants.clone(); clone.isValidated = this.isValidated; this.isBusy = false; return clone; } public int compareTo(Object obj) { return compareTo(obj, true); } public int compareTo(Object obj, boolean caseInsensitive) { if (obj == null) { return -1; } if(caseInsensitive); // this is to avoid eclipse warning only. if (!(TemplateAssociationsVo.class.isAssignableFrom(obj.getClass()))) { throw new ClassCastException("A TemplateAssociationsVo object cannot be compared an Object of type " + obj.getClass().getName()); } TemplateAssociationsVo compareObj = (TemplateAssociationsVo)obj; int retVal = 0; if (retVal == 0) { if(this.getID_TemplateAssociations() == null && compareObj.getID_TemplateAssociations() != null) return -1; if(this.getID_TemplateAssociations() != null && compareObj.getID_TemplateAssociations() == null) return 1; if(this.getID_TemplateAssociations() != null && compareObj.getID_TemplateAssociations() != null) retVal = this.getID_TemplateAssociations().compareTo(compareObj.getID_TemplateAssociations()); } return retVal; } public synchronized static int generateValueObjectUniqueID() { return ims.vo.ValueObject.generateUniqueID(); } public int countFieldsWithValue() { int count = 0; if(this.template != null) count++; if(this.clinics != null) count++; if(this.specialties != null) count++; if(this.consultants != null) count++; return count; } public int countValueObjectFields() { return 4; } protected ims.core.admin.vo.TemplateBoRefVo template; protected ims.core.vo.ClinicLiteVoCollection clinics; protected ims.core.vo.lookups.SpecialtyCollection specialties; protected ims.core.vo.MedicLiteVoCollection consultants; private boolean isValidated = false; private boolean isBusy = false; }
IMS-MAXIMS/openMAXIMS
Source Library/openmaxims_workspace/ValueObjects/src/ims/correspondence/vo/TemplateAssociationsVo.java
Java
agpl-3.0
10,695
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from django.utils.translation import ugettext_lazy as _ from enumfields import Enum class StockAdjustmentType(Enum): INVENTORY = 1 RESTOCK = 2 RESTOCK_LOGICAL = 3 class Labels: INVENTORY = _("inventory") RESTOCK = _("restock") RESTOCK_LOGICAL = _("restock logical")
shawnadelic/shuup
shuup/core/suppliers/enums.py
Python
agpl-3.0
553
'use strict'; var q = require('q'); var fs = require('fs-extra'); var mongoose = require('mongoose'); var path = require('path'); function connect(config) { var defer = q.defer(); mongoose.connect(config.connectionString, function(err) { if (err) { return defer.reject(err); } console.log('Connected to MongoDB at', config.connectionString); defer.resolve(); }); return defer.promise; } module.exports.connect = connect; module.exports.connectFromFileConfig = function() { var dbPath = path.resolve(__dirname + '/config/data/db.json'); var dbConf = fs.readJsonSync(dbPath); return connect(dbConf); }; module.exports.disconnect = function() { var defer = q.defer(); console.log('Disconnecting from MongoDB'); mongoose.disconnect(function() { defer.resolve(); }); return defer.promise; };
heroandtn3/openpaas-esn
fixtures/db.js
JavaScript
agpl-3.0
842
Networkx MultiGraph API: (Adjacency dict is the main data structure) G.adj = G.edge # Adjacency dict with {node1: {node2: {edge_key: {edge attr dict}}}} G.edge[node1][node2] = G[node1][node2] = {edge_key: {edge attr dict}} G.node[node1] = {dict with node attr} G.edges(nbunch, keys=True) => [list with (source, target, key) tuples], uses G.adj Note: We really do not expect there to be more than one edge from source to target, in fact that would be an error, so it might be better to use a normal DiGraph rather than a MultiDiGraph?
scholer/nascent
notes/Networkx_notes.py
Python
agpl-3.0
538
/******************************************************************************* * HELIUM V, Open Source ERP software for sustained success * at small and medium-sized enterprises. * Copyright (C) 2004 - 2014 HELIUM V IT-Solutions GmbH * * 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 theLicense, or * (at your option) any later version. * * According to sec. 7 of the GNU Affero General Public License, version 3, * the terms of the AGPL are supplemented with the following terms: * * "HELIUM V" and "HELIUM 5" are registered trademarks of * HELIUM V IT-Solutions GmbH. The licensing of the program under the * AGPL does not imply a trademark license. Therefore any rights, title and * interest in our trademarks remain entirely with us. If you want to propagate * modified versions of the Program under the name "HELIUM V" or "HELIUM 5", * you may only do so if you have a written permission by HELIUM V IT-Solutions * GmbH (to acquire a permission please contact HELIUM V IT-Solutions * at trademark@heliumv.com). * * 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/>. * * Contact: developers@heliumv.com ******************************************************************************/ package com.heliumv.calltrace; /** * Created with IntelliJ IDEA. * User: gp * Date: 24.10.13 * Time: 22:20 * To change this template use File | Settings | File Templates. */ public class TraceData { private long firstTimestamp ; private long timestamp ; private int count ; public TraceData() { clear() ; } public int incrementCount() { timestamp = System.currentTimeMillis() ; return ++count ; } public int getCount() { return count; } public void setCount(int count) { this.count = count; } public long getTimestamp() { return timestamp; } public void setTimestamp(long lastTimestamp) { this.timestamp = lastTimestamp; } public long getFirstTimestamp() { return firstTimestamp; } public long getTimespan() { return Math.abs(timestamp - firstTimestamp) ; } public void clear() { timestamp = firstTimestamp = System.currentTimeMillis() ; count = 0 ; } }
heliumv/restapi
src/com/heliumv/calltrace/TraceData.java
Java
agpl-3.0
2,781
/** * Copyright (c) 2011-2015 libbitcoin developers (see AUTHORS) * * This file is part of libbitcoin-explorer. * * libbitcoin-explorer is free software: you can redistribute it and/or * modify it under the terms of the GNU Affero General Public License with * additional permissions to the one published by the Free Software * Foundation, either version 3 of the License, or (at your option) * any later version. For more information see LICENSE. * * 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/>. */ #ifndef BX_GENPRIV_HPP #define BX_GENPRIV_HPP #include <cstdint> #include <iostream> #include <string> #include <vector> #include <boost/program_options.hpp> #include <bitcoin/bitcoin.hpp> #include <bitcoin/explorer/command.hpp> #include <bitcoin/explorer/define.hpp> #include <bitcoin/explorer/generated.hpp> #include <bitcoin/explorer/primitives/address.hpp> #include <bitcoin/explorer/primitives/base16.hpp> #include <bitcoin/explorer/primitives/base2.hpp> #include <bitcoin/explorer/primitives/base58.hpp> #include <bitcoin/explorer/primitives/base64.hpp> #include <bitcoin/explorer/primitives/base85.hpp> #include <bitcoin/explorer/primitives/btc.hpp> #include <bitcoin/explorer/primitives/btc160.hpp> #include <bitcoin/explorer/primitives/btc256.hpp> #include <bitcoin/explorer/primitives/byte.hpp> #include <bitcoin/explorer/primitives/cert_key.hpp> #include <bitcoin/explorer/primitives/ec_private.hpp> #include <bitcoin/explorer/primitives/ec_public.hpp> #include <bitcoin/explorer/primitives/encoding.hpp> #include <bitcoin/explorer/primitives/endorsement.hpp> #include <bitcoin/explorer/primitives/hashtype.hpp> #include <bitcoin/explorer/primitives/hd_key.hpp> #include <bitcoin/explorer/primitives/hd_priv.hpp> #include <bitcoin/explorer/primitives/hd_pub.hpp> #include <bitcoin/explorer/primitives/header.hpp> #include <bitcoin/explorer/primitives/input.hpp> #include <bitcoin/explorer/primitives/language.hpp> #include <bitcoin/explorer/primitives/output.hpp> #include <bitcoin/explorer/primitives/point.hpp> #include <bitcoin/explorer/primitives/raw.hpp> #include <bitcoin/explorer/primitives/script.hpp> #include <bitcoin/explorer/primitives/signature.hpp> #include <bitcoin/explorer/primitives/stealth.hpp> #include <bitcoin/explorer/primitives/transaction.hpp> #include <bitcoin/explorer/primitives/uri.hpp> #include <bitcoin/explorer/primitives/wif.hpp> #include <bitcoin/explorer/primitives/wrapper.hpp> #include <bitcoin/explorer/utility.hpp> /********* GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY **********/ namespace libbitcoin { namespace explorer { namespace commands { /** * Various localizable strings. */ #define BX_GENPRIV_OBSOLETE \ "Electrum style key functions are obsolete. Use HD (BIP32) commands instead." /** * Class to implement the genpriv command. */ class genpriv : public command { public: /** * The symbolic (not localizable) command name, lower case. */ BCX_API static const char* symbol() { return "genpriv"; } /** * The member symbolic (not localizable) command name, lower case. */ BCX_API virtual const char* name() { return genpriv::symbol(); } /** * The localizable command category name, upper case. */ BCX_API virtual const char* category() { return "ELECTRUM"; } /** * The localizable command description. */ BCX_API virtual const char* description() { return "Create a private key deterministically from an Electrum seed."; } /** * Declare whether the command has been obsoleted. * @return True if the command is obsolete */ BCX_API virtual bool obsolete() { return true; } /** * Load program argument definitions. * A value of -1 indicates that the number of instances is unlimited. * @return The loaded program argument definitions. */ BCX_API virtual arguments_metadata& load_arguments() { return get_argument_metadata(); } /** * Load parameter fallbacks from file or input as appropriate. * @param[in] input The input stream for loading the parameters. * @param[in] The loaded variables. */ BCX_API virtual void load_fallbacks(std::istream& input, po::variables_map& variables) { } /** * Load program option definitions. * BUGBUG: see boost bug/fix: svn.boost.org/trac/boost/ticket/8009 * @return The loaded program option definitions. */ BCX_API virtual options_metadata& load_options() { using namespace po; options_description& options = get_option_metadata(); options.add_options() ( BX_HELP_VARIABLE ",h", value<bool>()->zero_tokens(), "Get a description and instructions for this command." ) ( BX_CONFIG_VARIABLE ",c", value<boost::filesystem::path>(), "The path to the configuration settings file." ); return options; } /** * Invoke the command. * @param[out] output The input stream for the command execution. * @param[out] error The input stream for the command execution. * @return The appropriate console return code { -1, 0, 1 }. */ BCX_API virtual console_result invoke(std::ostream& output, std::ostream& cerr); /* Properties */ private: /** * Command line argument bound variables. * Uses cross-compiler safe constructor-based zeroize. * Zeroize for unit test consistency with program_options initialization. */ struct argument { argument() { } } argument_; /** * Command line option bound variables. * Uses cross-compiler safe constructor-based zeroize. * Zeroize for unit test consistency with program_options initialization. */ struct option { option() { } } option_; }; } // namespace commands } // namespace explorer } // namespace libbitcoin #endif
tuomassiren/libbitcoin-explorer
include/bitcoin/explorer/commands/genpriv.hpp
C++
agpl-3.0
6,475
from dependencies.dependency import ClassSecurityInfo from lims import bikaMessageFactory as _, logger from lims.idserver import renameAfterCreation from lims.utils import t, tmpID, changeWorkflowState from lims.utils import to_utf8 as _c from lims.browser.fields import HistoryAwareReferenceField from lims.config import PROJECTNAME from lims.content.bikaschema import BikaSchema from lims.interfaces import IWorksheet from lims.permissions import EditWorksheet, ManageWorksheets from lims.workflow import doActionFor from lims.workflow import skip from dependencies.dependency import DateTime from operator import itemgetter from dependencies.dependency import indexer from dependencies.dependency import REFERENCE_CATALOG from dependencies.dependency import * from dependencies.dependency import HoldingReference from dependencies.dependency import HistoryAwareMixin from dependencies.dependency import RecordsField from dependencies.dependency import getToolByName from dependencies.dependency import safe_unicode, _createObjectByType from dependencies.dependency import implements @indexer(IWorksheet) def Priority(instance): priority = instance.getPriority() if priority: return priority.getSortKey() schema = BikaSchema.copy() + Schema(( HistoryAwareReferenceField('WorksheetTemplate', allowed_types=('WorksheetTemplate',), relationship='WorksheetAnalysisTemplate', ), ComputedField('WorksheetTemplateTitle', searchable=True, expression="context.getWorksheetTemplate() and context.getWorksheetTemplate().Title() or ''", widget=ComputedWidget( visible=False, ), ), RecordsField('Layout', required=1, subfields=('position', 'type', 'container_uid', 'analysis_uid'), subfield_types={'position': 'int'}, ), # all layout info lives in Layout; Analyses is used for back references. ReferenceField('Analyses', required=1, multiValued=1, allowed_types=('Analysis', 'DuplicateAnalysis', 'ReferenceAnalysis', 'RejectAnalysis'), relationship = 'WorksheetAnalysis', ), StringField('Analyst', searchable = True, ), # TODO Remove. Instruments must be assigned directly to each analysis. ReferenceField('Instrument', required = 0, allowed_types = ('Instrument',), relationship = 'WorksheetInstrument', referenceClass = HoldingReference, ), TextField('Remarks', searchable = True, default_content_type = 'text/plain', allowed_content_types= ('text/plain', ), default_output_type="text/plain", widget = TextAreaWidget( macro="bika_widgets/remarks", label=_("Remarks"), append_only=True, ), ), ), ) schema['id'].required = 0 schema['id'].widget.visible = False schema['title'].required = 0 schema['title'].widget.visible = {'edit': 'hidden', 'view': 'invisible'} class Worksheet(BaseFolder, HistoryAwareMixin): security = ClassSecurityInfo() implements(IWorksheet) displayContentsTab = False schema = schema _at_rename_after_creation = True def _renameAfterCreation(self, check_auto_id=False): from lims.idserver import renameAfterCreation renameAfterCreation(self) def Title(self): return safe_unicode(self.getId()).encode('utf-8') def getFolderContents(self, contentFilter): # The bika_listing machine passes contentFilter to all # contentsMethod methods. We ignore it. return list(self.getAnalyses()) security.declareProtected(EditWorksheet, 'addAnalysis') def addAnalysis(self, analysis, position=None): """- add the analysis to self.Analyses(). - position is overruled if a slot for this analysis' parent exists - if position is None, next available pos is used. """ workflow = getToolByName(self, 'portal_workflow') analysis_uid = analysis.UID() parent_uid = analysis.aq_parent.UID() analyses = self.getAnalyses() layout = self.getLayout() # check if this analysis is already in the layout if analysis_uid in [l['analysis_uid'] for l in layout]: return # If the ws has an instrument assigned for which the analysis # is allowed, set it instr = self.getInstrument() if instr and analysis.isInstrumentAllowed(instr): # Set the method assigned to the selected instrument analysis.setMethod(instr.getMethod()) analysis.setInstrument(instr) self.setAnalyses(analyses + [analysis, ]) # if our parent has a position, use that one. if analysis.aq_parent.UID() in [slot['container_uid'] for slot in layout]: position = [int(slot['position']) for slot in layout if slot['container_uid'] == analysis.aq_parent.UID()][0] else: # prefer supplied position parameter if not position: used_positions = [0, ] + [int(slot['position']) for slot in layout] position = [pos for pos in range(1, max(used_positions) + 2) if pos not in used_positions][0] self.setLayout(layout + [{'position': position, 'type': 'a', 'container_uid': parent_uid, 'analysis_uid': analysis.UID()}, ]) allowed_transitions = [t['id'] for t in workflow.getTransitionsFor(analysis)] if 'assign' in allowed_transitions: workflow.doActionFor(analysis, 'assign') # If a dependency of DryMatter service is added here, we need to # make sure that the dry matter analysis itself is also # present. Otherwise WS calculations refer to the DB version # of the DM analysis, which is out of sync with the form. dms = self.bika_setup.getDryMatterService() if dms: dmk = dms.getKeyword() deps = analysis.getDependents() # if dry matter service in my dependents: if dmk in [a.getService().getKeyword() for a in deps]: # get dry matter analysis from AR dma = analysis.aq_parent.getAnalyses(getKeyword=dmk, full_objects=True)[0] # add it. if dma not in self.getAnalyses(): self.addAnalysis(dma) security.declareProtected(EditWorksheet, 'removeAnalysis') def removeAnalysis(self, analysis): """ delete an analyses from the worksheet and un-assign it """ workflow = getToolByName(self, 'portal_workflow') # overwrite saved context UID for event subscriber self.REQUEST['context_uid'] = self.UID() workflow.doActionFor(analysis, 'unassign') # Note: subscriber might unassign the AR and/or promote the worksheet # remove analysis from context.Analyses *after* unassign, # (doActionFor requires worksheet in analysis.getBackReferences) Analyses = self.getAnalyses() if analysis in Analyses: Analyses.remove(analysis) self.setAnalyses(Analyses) layout = [slot for slot in self.getLayout() if slot['analysis_uid'] != analysis.UID()] self.setLayout(layout) if analysis.portal_type == "DuplicateAnalysis": self._delObject(analysis.id) def addReferences(self, position, reference, service_uids): """ Add reference analyses to reference, and add to worksheet layout """ workflow = getToolByName(self, 'portal_workflow') rc = getToolByName(self, REFERENCE_CATALOG) layout = self.getLayout() wst = self.getWorksheetTemplate() wstlayout = wst and wst.getLayout() or [] ref_type = reference.getBlank() and 'b' or 'c' ref_uid = reference.UID() if position == 'new': highest_existing_position = len(wstlayout) for pos in [int(slot['position']) for slot in layout]: if pos > highest_existing_position: highest_existing_position = pos position = highest_existing_position + 1 postfix = 1 for refa in reference.getReferenceAnalyses(): grid = refa.getReferenceAnalysesGroupID() try: cand = int(grid.split('-')[2]) if cand >= postfix: postfix = cand + 1 except: pass postfix = str(postfix).zfill(int(3)) refgid = '%s-%s' % (reference.id, postfix) for service_uid in service_uids: # services with dependents don't belong in references service = rc.lookupObject(service_uid) calc = service.getCalculation() if calc and calc.getDependentServices(): continue ref_uid = reference.addReferenceAnalysis(service_uid, ref_type) ref_analysis = rc.lookupObject(ref_uid) # Set ReferenceAnalysesGroupID (same id for the analyses from # the same Reference Sample and same Worksheet) # https://github.com/bikalabs/Bika-LIMS/issues/931 ref_analysis.setReferenceAnalysesGroupID(refgid) ref_analysis.reindexObject(idxs=["getReferenceAnalysesGroupID"]) # copy the interimfields if calc: ref_analysis.setInterimFields(calc.getInterimFields()) self.setLayout( self.getLayout() + [{'position': position, 'type': ref_type, 'container_uid': reference.UID(), 'analysis_uid': ref_analysis.UID()}]) self.setAnalyses( self.getAnalyses() + [ref_analysis, ]) workflow.doActionFor(ref_analysis, 'assign') security.declareProtected(EditWorksheet, 'addDuplicateAnalyses') def addDuplicateAnalyses(self, src_slot, dest_slot): """ add duplicate analyses to worksheet """ rc = getToolByName(self, REFERENCE_CATALOG) workflow = getToolByName(self, 'portal_workflow') layout = self.getLayout() wst = self.getWorksheetTemplate() wstlayout = wst and wst.getLayout() or [] src_ar = [slot['container_uid'] for slot in layout if slot['position'] == src_slot] if src_ar: src_ar = src_ar[0] if not dest_slot or dest_slot == 'new': highest_existing_position = len(wstlayout) for pos in [int(slot['position']) for slot in layout]: if pos > highest_existing_position: highest_existing_position = pos dest_slot = highest_existing_position + 1 src_analyses = [rc.lookupObject(slot['analysis_uid']) for slot in layout if int(slot['position']) == int(src_slot)] dest_analyses = [rc.lookupObject(slot['analysis_uid']).getAnalysis().UID() for slot in layout if int(slot['position']) == int(dest_slot)] refgid = None for analysis in src_analyses: if analysis.UID() in dest_analyses: continue # services with dependents don't belong in duplicates service = analysis.getService() calc = service.getCalculation() if calc and calc.getDependentServices(): continue service = analysis.getService() _id = self._findUniqueId(service.getKeyword()) duplicate = _createObjectByType("DuplicateAnalysis", self, _id) duplicate.setAnalysis(analysis) # Set ReferenceAnalysesGroupID (same id for the analyses from # the same Reference Sample and same Worksheet) # https://github.com/bikalabs/Bika-LIMS/issues/931 if not refgid and not analysis.portal_type == 'ReferenceAnalysis': part = analysis.getSamplePartition().id dups = [an.getReferenceAnalysesGroupID() for an in self.getAnalyses() if an.portal_type == 'DuplicateAnalysis' and an.getSamplePartition().id == part] dups = list(set(dups)) postfix = dups and len(dups) + 1 or 1 postfix = str(postfix).zfill(int(2)) refgid = '%s-D%s' % (part, postfix) duplicate.setReferenceAnalysesGroupID(refgid) duplicate.reindexObject(idxs=["getReferenceAnalysesGroupID"]) duplicate.processForm() if calc: duplicate.setInterimFields(calc.getInterimFields()) self.setLayout( self.getLayout() + [{'position': dest_slot, 'type': 'd', 'container_uid': analysis.aq_parent.UID(), 'analysis_uid': duplicate.UID()}, ] ) self.setAnalyses(self.getAnalyses() + [duplicate, ]) workflow.doActionFor(duplicate, 'assign') # In case there are more than one analyses for an 'analysis_uid' # https://jira.bikalabs.com/browse/LIMS-1745 break def applyWorksheetTemplate(self, wst): """ Add analyses to worksheet according to wst's layout. Will not overwrite slots which are filled already. If the selected template has an instrument assigned, it will only be applied to those analyses for which the instrument is allowed """ rc = getToolByName(self, REFERENCE_CATALOG) bac = getToolByName(self, "bika_analysis_catalog") bc = getToolByName(self, 'bika_catalog') layout = self.getLayout() wstlayout = wst.getLayout() services = wst.getService() wst_service_uids = [s.UID() for s in services] analyses = bac(portal_type='Analysis', getServiceUID=wst_service_uids, review_state='sample_received', worksheetanalysis_review_state='unassigned', cancellation_state = 'active') sortedans = [] for an in analyses: sortedans.append({'uid': an.UID, 'duedate': an.getObject().getDueDate() or (DateTime() + 365), 'brain': an}); sortedans.sort(key=itemgetter('duedate'), reverse=False) # collect analyses from the first X ARs. ar_analyses = {} # ar_uid : [analyses] ars = [] # for sorting wst_slots = [row['pos'] for row in wstlayout if row['type'] == 'a'] ws_slots = [row['position'] for row in layout if row['type'] == 'a'] nr_slots = len(wst_slots) - len(ws_slots) instr = self.getInstrument() if self.getInstrument() else wst.getInstrument() for analysis in sortedans: analysis = analysis['brain'] if instr and analysis.getObject().isInstrumentAllowed(instr) == False: # Exclude those analyses for which the ws selected # instrument is not allowed continue ar = analysis.getRequestID if ar in ar_analyses: ar_analyses[ar].append(analysis.getObject()) else: if len(ar_analyses.keys()) < nr_slots: ars.append(ar) ar_analyses[ar] = [analysis.getObject(), ] positions = [pos for pos in wst_slots if pos not in ws_slots] for ar in ars: for analysis in ar_analyses[ar]: self.addAnalysis(analysis, position=positions[ars.index(ar)]) # find best maching reference samples for Blanks and Controls for t in ('b', 'c'): form_key = t == 'b' and 'blank_ref' or 'control_ref' ws_slots = [row['position'] for row in layout if row['type'] == t] for row in [r for r in wstlayout if r['type'] == t and r['pos'] not in ws_slots]: reference_definition_uid = row[form_key] samples = bc(portal_type='ReferenceSample', review_state='current', inactive_state='active', getReferenceDefinitionUID=reference_definition_uid) if not samples: break samples = [s.getObject() for s in samples] if t == 'b': samples = [s for s in samples if s.getBlank()] else: samples = [s for s in samples if not s.getBlank()] complete_reference_found = False references = {} for reference in samples: reference_uid = reference.UID() references[reference_uid] = {} references[reference_uid]['services'] = [] references[reference_uid]['count'] = 0 specs = reference.getResultsRangeDict() for service_uid in wst_service_uids: if service_uid in specs: references[reference_uid]['services'].append(service_uid) references[reference_uid]['count'] += 1 if references[reference_uid]['count'] == len(wst_service_uids): complete_reference_found = True break if complete_reference_found: supported_uids = wst_service_uids self.addReferences(int(row['pos']), reference, supported_uids) else: # find the most complete reference sample instead reference_keys = references.keys() no_of_services = 0 reference = None for key in reference_keys: if references[key]['count'] > no_of_services: no_of_services = references[key]['count'] reference = key if reference: reference = rc.lookupObject(reference) supported_uids = [s.UID() for s in reference.getServices() if s.UID() in wst_service_uids] self.addReferences(int(row['pos']), reference, supported_uids) # fill duplicate positions layout = self.getLayout() ws_slots = [row['position'] for row in layout if row['type'] == 'd'] for row in [r for r in wstlayout if r['type'] == 'd' and r['pos'] not in ws_slots]: dest_pos = int(row['pos']) src_pos = int(row['dup']) if src_pos in [int(slot['position']) for slot in layout]: self.addDuplicateAnalyses(src_pos, dest_pos) # Apply the wst instrument to all analyses and ws if instr: self.setInstrument(instr, True) def exportAnalyses(self, REQUEST=None, RESPONSE=None): """ Export analyses from this worksheet """ import bika.lims.InstrumentExport as InstrumentExport instrument = REQUEST.form['getInstrument'] try: func = getattr(InstrumentExport, "%s_export" % instrument) except: return func(self, REQUEST, RESPONSE) return security.declarePublic('getWorksheetServices') def getWorksheetServices(self): """ get list of analysis services present on this worksheet """ services = [] for analysis in self.getAnalyses(): service = analysis.getService() if service not in services: services.append(service) return services security.declareProtected(EditWorksheet, 'resequenceWorksheet') def resequenceWorksheet(self, REQUEST=None, RESPONSE=None): """ Reset the sequence of analyses in the worksheet """ """ sequence is [{'pos': , 'type': , 'uid', 'key'},] """ old_seq = self.getLayout() new_dict = {} new_seq = [] other_dict = {} for seq in old_seq: if seq['key'] == '': if seq['pos'] not in other_dict: other_dict[seq['pos']] = [] other_dict[seq['pos']].append(seq) continue if seq['key'] not in new_dict: new_dict[seq['key']] = [] analyses = new_dict[seq['key']] analyses.append(seq) new_dict[seq['key']] = analyses new_keys = sorted(new_dict.keys()) rc = getToolByName(self, REFERENCE_CATALOG) seqno = 1 for key in new_keys: analyses = {} if len(new_dict[key]) == 1: new_dict[key][0]['pos'] = seqno new_seq.append(new_dict[key][0]) else: for item in new_dict[key]: item['pos'] = seqno analysis = rc.lookupObject(item['uid']) service = analysis.Title() analyses[service] = item a_keys = sorted(analyses.keys()) for a_key in a_keys: new_seq.append(analyses[a_key]) seqno += 1 other_keys = other_dict.keys() other_keys.sort() for other_key in other_keys: for item in other_dict[other_key]: item['pos'] = seqno new_seq.append(item) seqno += 1 self.setLayout(new_seq) RESPONSE.redirect('%s/manage_results' % self.absolute_url()) security.declarePublic('current_date') def current_date(self): """ return current date """ return DateTime() def setInstrument(self, instrument, override_analyses=False): """ Sets the specified instrument to the Analysis from the Worksheet. Only sets the instrument if the Analysis allows it, according to its Analysis Service and Method. If an analysis has already assigned an instrument, it won't be overriden. The Analyses that don't allow the instrument specified will not be modified. Returns the number of analyses affected """ analyses = [an for an in self.getAnalyses() if (not an.getInstrument() or override_analyses) and an.isInstrumentAllowed(instrument)] total = 0 for an in analyses: # An analysis can be done using differents Methods. # Un method can be supported by more than one Instrument, # but not all instruments support one method. # We must force to set the instrument's method too. Otherwise, # the WS manage results view will display the an's default # method and its instruments displaying, only the instruments # for the default method in the picklist. meth = instrument.getMethod() if an.isMethodAllowed(meth): an.setMethod(meth) success = an.setInstrument(instrument) if success is True: total += 1 self.getField('Instrument').set(self, instrument) return total def workflow_script_submit(self): # Don't cascade. Shouldn't be submitting WSs directly for now, # except edge cases where all analyses are already submitted, # but self was held back until an analyst was assigned. workflow = getToolByName(self, 'portal_workflow') self.reindexObject(idxs=["review_state", ]) can_attach = True for a in self.getAnalyses(): if workflow.getInfoFor(a, 'review_state') in \ ('to_be_sampled', 'to_be_preserved', 'sample_due', 'sample_received', 'attachment_due', 'assigned',): # Note: referenceanalyses and duplicateanalyses can still # have review_state = "assigned". can_attach = False break if can_attach: doActionFor(self, 'attach') def workflow_script_attach(self): if skip(self, "attach"): return self.reindexObject(idxs=["review_state", ]) # Don't cascade. Shouldn't be attaching WSs for now (if ever). return def workflow_script_retract(self): if skip(self, "retract"): return workflow = getToolByName(self, 'portal_workflow') self.reindexObject(idxs=["review_state", ]) if not "retract all analyses" in self.REQUEST['workflow_skiplist']: # retract all analyses in this self. # (NB: don't retract if it's verified) analyses = self.getAnalyses() for analysis in analyses: state = workflow.getInfoFor(analysis, 'review_state', '') if state not in ('attachment_due', 'to_be_verified',): continue doActionFor(analysis, 'retract') def workflow_script_verify(self): if skip(self, "verify"): return workflow = getToolByName(self, 'portal_workflow') self.reindexObject(idxs=["review_state", ]) if not "verify all analyses" in self.REQUEST['workflow_skiplist']: # verify all analyses in this self. analyses = self.getAnalyses() for analysis in analyses: state = workflow.getInfoFor(analysis, 'review_state', '') if state != 'to_be_verified': continue doActionFor(analysis, "verify") def workflow_script_reject(self): """Copy real analyses to RejectAnalysis, with link to real create a new worksheet, with the original analyses, and new duplicates and references to match the rejected worksheet. """ if skip(self, "reject"): return utils = getToolByName(self, 'plone_utils') workflow = self.portal_workflow def copy_src_fields_to_dst(src, dst): # These will be ignored when copying field values between analyses ignore_fields = ['UID', 'id', 'title', 'allowDiscussion', 'subject', 'description', 'location', 'contributors', 'creators', 'effectiveDate', 'expirationDate', 'language', 'rights', 'creation_date', 'modification_date', 'Layout', # ws 'Analyses', # ws ] fields = src.Schema().fields() for field in fields: fieldname = field.getName() if fieldname in ignore_fields: continue getter = getattr(src, 'get'+fieldname, src.Schema().getField(fieldname).getAccessor(src)) setter = getattr(dst, 'set'+fieldname, dst.Schema().getField(fieldname).getMutator(dst)) if getter is None or setter is None: # ComputedField continue setter(getter()) analysis_positions = {} for item in self.getLayout(): analysis_positions[item['analysis_uid']] = item['position'] old_layout = [] new_layout = [] # New worksheet worksheets = self.aq_parent new_ws = _createObjectByType('Worksheet', worksheets, tmpID()) new_ws.unmarkCreationFlag() new_ws_id = renameAfterCreation(new_ws) copy_src_fields_to_dst(self, new_ws) new_ws.edit( Number = new_ws_id, Remarks = self.getRemarks() ) # Objects are being created inside other contexts, but we want their # workflow handlers to be aware of which worksheet this is occurring in. # We save the worksheet in request['context_uid']. # We reset it again below.... be very sure that this is set to the # UID of the containing worksheet before invoking any transitions on # analyses. self.REQUEST['context_uid'] = new_ws.UID() # loop all analyses analyses = self.getAnalyses() new_ws_analyses = [] old_ws_analyses = [] for analysis in analyses: # Skip published or verified analyses review_state = workflow.getInfoFor(analysis, 'review_state', '') if review_state in ['published', 'verified', 'retracted']: old_ws_analyses.append(analysis.UID()) old_layout.append({'position': position, 'type':'a', 'analysis_uid':analysis.UID(), 'container_uid':analysis.aq_parent.UID()}) continue # Normal analyses: # - Create matching RejectAnalysis inside old WS # - Link analysis to new WS in same position # - Copy all field values # - Clear analysis result, and set Retested flag if analysis.portal_type == 'Analysis': reject = _createObjectByType('RejectAnalysis', self, tmpID()) reject.unmarkCreationFlag() reject_id = renameAfterCreation(reject) copy_src_fields_to_dst(analysis, reject) reject.setAnalysis(analysis) reject.reindexObject() analysis.edit( Result = None, Retested = True, ) analysis.reindexObject() position = analysis_positions[analysis.UID()] old_ws_analyses.append(reject.UID()) old_layout.append({'position': position, 'type':'r', 'analysis_uid':reject.UID(), 'container_uid':self.UID()}) new_ws_analyses.append(analysis.UID()) new_layout.append({'position': position, 'type':'a', 'analysis_uid':analysis.UID(), 'container_uid':analysis.aq_parent.UID()}) # Reference analyses # - Create a new reference analysis in the new worksheet # - Transition the original analysis to 'rejected' state if analysis.portal_type == 'ReferenceAnalysis': service_uid = analysis.getService().UID() reference = analysis.aq_parent reference_type = analysis.getReferenceType() new_analysis_uid = reference.addReferenceAnalysis(service_uid, reference_type) position = analysis_positions[analysis.UID()] old_ws_analyses.append(analysis.UID()) old_layout.append({'position': position, 'type':reference_type, 'analysis_uid':analysis.UID(), 'container_uid':reference.UID()}) new_ws_analyses.append(new_analysis_uid) new_layout.append({'position': position, 'type':reference_type, 'analysis_uid':new_analysis_uid, 'container_uid':reference.UID()}) workflow.doActionFor(analysis, 'reject') new_reference = reference.uid_catalog(UID=new_analysis_uid)[0].getObject() workflow.doActionFor(new_reference, 'assign') analysis.reindexObject() # Duplicate analyses # - Create a new duplicate inside the new worksheet # - Transition the original analysis to 'rejected' state if analysis.portal_type == 'DuplicateAnalysis': src_analysis = analysis.getAnalysis() ar = src_analysis.aq_parent service = src_analysis.getService() duplicate_id = new_ws.generateUniqueId('DuplicateAnalysis') new_duplicate = _createObjectByType('DuplicateAnalysis', new_ws, duplicate_id) new_duplicate.unmarkCreationFlag() copy_src_fields_to_dst(analysis, new_duplicate) workflow.doActionFor(new_duplicate, 'assign') new_duplicate.reindexObject() position = analysis_positions[analysis.UID()] old_ws_analyses.append(analysis.UID()) old_layout.append({'position': position, 'type':'d', 'analysis_uid':analysis.UID(), 'container_uid':self.UID()}) new_ws_analyses.append(new_duplicate.UID()) new_layout.append({'position': position, 'type':'d', 'analysis_uid':new_duplicate.UID(), 'container_uid':new_ws.UID()}) workflow.doActionFor(analysis, 'reject') analysis.reindexObject() new_ws.setAnalyses(new_ws_analyses) new_ws.setLayout(new_layout) new_ws.replaces_rejected_worksheet = self.UID() for analysis in new_ws.getAnalyses(): review_state = workflow.getInfoFor(analysis, 'review_state', '') if review_state == 'to_be_verified': changeWorkflowState(analysis, "bika_analysis_workflow", "sample_received") self.REQUEST['context_uid'] = self.UID() self.setLayout(old_layout) self.setAnalyses(old_ws_analyses) self.replaced_by = new_ws.UID() def checkUserManage(self): """ Checks if the current user has granted access to this worksheet and if has also privileges for managing it. """ granted = False can_access = self.checkUserAccess() if can_access == True: pm = getToolByName(self, 'portal_membership') edit_allowed = pm.checkPermission(EditWorksheet, self) if edit_allowed: # Check if the current user is the WS's current analyst member = pm.getAuthenticatedMember() analyst = self.getAnalyst().strip() if analyst != _c(member.getId()): # Has management privileges? if pm.checkPermission(ManageWorksheets, self): granted = True else: granted = True return granted def checkUserAccess(self): """ Checks if the current user has granted access to this worksheet. Returns False if the user has no access, otherwise returns True """ # Deny access to foreign analysts allowed = True pm = getToolByName(self, "portal_membership") member = pm.getAuthenticatedMember() analyst = self.getAnalyst().strip() if analyst != _c(member.getId()): roles = member.getRoles() restrict = 'Manager' not in roles \ and 'LabManager' not in roles \ and 'LabClerk' not in roles \ and 'RegulatoryInspector' not in roles \ and self.bika_setup.getRestrictWorksheetUsersAccess() allowed = not restrict return allowed def setAnalyst(self,analyst): for analysis in self.getAnalyses(): analysis.setAnalyst(analyst) self.Schema().getField('Analyst').set(self, analyst) security.declarePublic('getPriority') def getPriority(self): """ get highest priority from all analyses """ analyses = self.getAnalyses() priorities = [] for analysis in analyses: if not hasattr(analysis, 'getPriority'): continue if analysis.getPriority(): priorities.append(analysis.getPriority()) priorities = sorted(priorities, key = itemgetter('sortKey')) if priorities: return priorities[-1] registerType(Worksheet, PROJECTNAME)
sciCloud/OLiMS
lims/content/worksheet.py
Python
agpl-3.0
37,347
<?php /********************************************************************************* * Zurmo is a customer relationship management program developed by * Zurmo, Inc. Copyright (C) 2013 Zurmo Inc. * * Zurmo is free software; you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License version 3 as published by the * Free Software Foundation with the addition of the following permission added * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK * IN WHICH THE COPYRIGHT IS OWNED BY ZURMO, ZURMO DISCLAIMS THE WARRANTY * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. * * Zurmo 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 or write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. * * You can contact Zurmo, Inc. with a mailing address at 27 North Wacker Drive * Suite 370 Chicago, IL 60606. or at email address contact@zurmo.com. * * The interactive user interfaces in original and modified versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU Affero General Public License version 3. * * In accordance with Section 7(b) of the GNU Affero General Public License version 3, * these Appropriate Legal Notices must retain the display of the Zurmo * logo and Zurmo copyright notice. If the display of the logo is not reasonably * feasible for technical reasons, the Appropriate Legal Notices must display the words * "Copyright Zurmo Inc. 2013. All rights reserved". ********************************************************************************/ /** * View that renders missions module breadcrumb content */ class MissionBreadCrumbView extends BreadCrumbView { protected function getHomeLinkLabel() { return Zurmo::t('ConversationsModule', 'Inbox'); } protected function getHomeUrl() { return Yii::app()->createUrl('mashableInbox/' . $this->controllerId . '/list'); } } ?>
sandeep1027/zurmo_
app/protected/modules/missions/views/MissionBreadCrumbView.php
PHP
agpl-3.0
2,549
/* * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc. * License: AGPLv3 s.t. "Commons Clause" – see LICENSE.md for details */ import { Editor, Range, Transforms } from "slate"; import { ReactEditor } from "../slate-react"; import { selectNextMatch } from "./find-matches"; import { nextMatch } from "./search-control"; import { alert_message } from "@cocalc/frontend/alerts"; function lowestNode(editor: Editor) { for (const [node] of Editor.nodes(editor, { mode: "lowest" })) { return node; } } export function replaceOne( editor: ReactEditor, decorate, replace: string, noScroll: boolean = false ): boolean { // collapse selection to the starting edge if (editor.selection) { const edges = Range.edges(editor.selection); Transforms.setSelection(editor, { focus: edges[0], anchor: edges[0] }); } // find next match if (selectNextMatch(editor, decorate)) { const node = lowestNode(editor); if (node != null) { if (!Editor.isVoid(editor, node)) { Transforms.insertText(editor, replace); // Important -- note that insertText puts the focus **after** // the inserted text. It's important to keep this in mind so that // the result of replace=search string isn't to make something // that we immediately replace again thus blowing up the document! // Make sure to preserve this invariant when implementing this for // voids. } else { // TODO: need to handle void elements differently via a plugin mechanism. alert_message({ type: "info", message: "Replacing nodes of this type not yet implemented. Please use source view.", }); // At least move to next one no matter what. if (noScroll) { selectNextMatch(editor, decorate); } } } if (!noScroll) { // Now select and focus whatever is next after what we just // replaced, in preparation for doing the *next* replace. nextMatch(editor, decorate); } return true; } return false; } export function replaceAll( editor: ReactEditor, decorate, replace: string ): void { // Keep replacing until nothing left to replace. However, we also keep // of focus points after doing selection so that if for some crazy reason // this would loop around forever -- e.g., a replace doesn't work properly, // or maybe the goal of the replace is to add a copy of what is being searched // for into the document -- in that case, we immediately bail. const pastSelections = new Set<string>([]); while (replaceOne(editor, decorate, replace, true)) { const cur = JSON.stringify(editor.selection?.focus ?? {}); if (pastSelections.has(cur)) return; pastSelections.add(cur); } }
DrXyzzy/cocalc
src/packages/frontend/editors/slate/search/replace-matches.ts
TypeScript
agpl-3.0
2,799
/* * Copyright (C) 2012 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas 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, version 3 of the License. * * Canvas 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/>. */ import $ from 'jquery' import NotificationPreferences from 'compiled/notifications/NotificationPreferences' import initPrivacyNotice from 'compiled/notifications/privacyNotice' import ready from '@instructure/ready' import 'compiled/profile/confirmEmail' ready(() => new NotificationPreferences(ENV.NOTIFICATION_PREFERENCES_OPTIONS)) $(() => initPrivacyNotice())
djbender/canvas-lms
app/jsx/bundles/notification_preferences.js
JavaScript
agpl-3.0
1,065
/* * Copyright (C) 2000 - 2015 Silverpeas * * 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. * * As a special exception to the terms and conditions of version 3.0 of * the GPL, you may redistribute this Program in connection with Free/Libre * Open Source Software ("FLOSS") applications as described in Silverpeas's * FLOSS exception. You should have received a copy of the text describing * the FLOSS exception, and it is also available here: * "https://www.silverpeas.org/legal/floss_exception.html" * * 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 org.silverpeas.components.delegatednews.control; import org.silverpeas.components.delegatednews.DelegatedNewsRuntimeException; import org.silverpeas.components.delegatednews.model.DelegatedNews; import org.silverpeas.components.delegatednews.service.DelegatedNewsService; import org.silverpeas.components.delegatednews.service.DelegatedNewsServiceProvider; import org.silverpeas.components.delegatednews.web.DelegatedNewsEntity; import org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController; import org.silverpeas.core.web.mvc.controller.ComponentContext; import org.silverpeas.core.web.mvc.controller.MainSessionController; import org.silverpeas.core.util.JSONCodec; import org.silverpeas.core.exception.EncodingException; import org.silverpeas.core.exception.SilverpeasRuntimeException; import java.util.ArrayList; import java.util.Date; import java.util.List; import static org.silverpeas.core.admin.user.model.SilverpeasRole.admin; import static org.silverpeas.core.admin.user.model.SilverpeasRole.user; public class DelegatedNewsSessionController extends AbstractComponentSessionController { private DelegatedNewsService service = null; /** * Standard Session Controller Constructeur * @param mainSessionCtrl The user's profile * @param componentContext The component's profile */ public DelegatedNewsSessionController(MainSessionController mainSessionCtrl, ComponentContext componentContext) { super(mainSessionCtrl, componentContext, "org.silverpeas.delegatednews.multilang.DelegatedNewsBundle", "org.silverpeas.delegatednews.settings.DelegatedNewsIcons"); service = DelegatedNewsServiceProvider.getDelegatedNewsService(); } public boolean isUser() { String[] profiles = getUserRoles(); for (String profile : profiles) { if (user.isInRole(profile)) { return true; } } return false; } public boolean isAdmin() { String[] profiles = getUserRoles(); for (String profile : profiles) { if (admin.isInRole(profile)) { return true; } } return false; } /** * Is component instance available * @return boolean : true si l'instanceId passsée en paramètre appartient au tableau passé en * paramètre 2 */ private boolean isAvailComponentId(String instanceId, String[] allowedComponentIds) { if (instanceId == null) { return false; } for (String element : allowedComponentIds) { if (instanceId.equals(element)) { return true; } } return false; } /** * Récupère toutes les actualités déléguées inter Theme Tracker dont l'utilisateur courant a des * droits * @return List<DelegatedNews> : liste d'actualités déléguées */ public List<DelegatedNews> getAllAvailDelegatedNews() { List<DelegatedNews> listResult = new ArrayList<>(); String[] allowedComponentIds = this.getUserAvailComponentIds(); List<DelegatedNews> list = service.getAllDelegatedNews(); for (DelegatedNews delegatedNews : list) { String instanceId = delegatedNews.getInstanceId(); if (isAvailComponentId(instanceId, allowedComponentIds)) { listResult.add(delegatedNews); } } return listResult; } /** * Validate delegated news identified by pubId * @param pubId the delegated news identifier to validate */ public void validateDelegatedNews(int pubId) { service.validateDelegatedNews(pubId, getUserId()); } /** * Refuse delegated news identified by pubId * @param pubId the delegated news identifer to refuse * @param refuseReasonText the reason why delegated news has been refused */ public void refuseDelegatedNews(int pubId, String refuseReasonText) { // refuse l'actualité service.refuseDelegatedNews(pubId, this.getUserId(), refuseReasonText); } /** * Met à jour les dates de visibilité de l'actualité déléguée passée en paramètre */ public void updateDateDelegatedNews(int pubId, Date beginDate, Date endDate) { service.updateDateDelegatedNews(pubId, beginDate, endDate); } /** * Converts the list of Delegated News into its JSON representation. * @return a JSON representation of the list of Delegated News (as string) * @throws DelegatedNewsRuntimeException */ public String getListDelegatedNewsJSON(List<DelegatedNews> listDelegatedNews) throws DelegatedNewsRuntimeException { List<DelegatedNewsEntity> listDelegatedNewsEntity = new ArrayList<>(); for (DelegatedNews delegatedNews : listDelegatedNews) { DelegatedNewsEntity delegatedNewsEntity = DelegatedNewsEntity.fromDelegatedNews(delegatedNews); listDelegatedNewsEntity.add(delegatedNewsEntity); } return listAsJSON(listDelegatedNewsEntity); } /** * Converts the list of Delegated News Entity into its JSON representation. * @param listDelegatedNewsEntity the list of delegated news to convert into JSON representation * @return a JSON representation of the list of Delegated News Entity (as string) * @throws DelegatedNewsRuntimeException */ private String listAsJSON(List<DelegatedNewsEntity> listDelegatedNewsEntity) throws DelegatedNewsRuntimeException { DelegatedNewsEntity[] entities = listDelegatedNewsEntity.toArray(new DelegatedNewsEntity[listDelegatedNewsEntity.size()]); try { return JSONCodec.encode(entities); } catch (EncodingException ex) { throw new DelegatedNewsRuntimeException("DelegatedNewsSessionController.listAsJSON()", SilverpeasRuntimeException.ERROR, "root.EX_NO_MESSAGE", ex); } } }
auroreallibe/Silverpeas-Components
delegatednews/delegatednews-war/src/main/java/org/silverpeas/components/delegatednews/control/DelegatedNewsSessionController.java
Java
agpl-3.0
6,784
"""A moving-window filter for smoothing the signals within certain time interval.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import gin import numpy as np @gin.configurable class TimeBasedMovingWindowFilter: """A moving-window filter for smoothing the signals within certain time interval.""" def __init__( self, filter_window: float = 0.1, ): """Initializes the class. Args: filter_window: The filtering window (in time) used to smooth the input signal. """ self._filter_window = filter_window self.reset() def reset(self): self._timestamp_buffer = [] self._value_buffer = [] def calculate_average(self, new_value, timestamp): """Compute the filtered signals based on the time-based moving window.""" self._timestamp_buffer.append(timestamp) self._value_buffer.append(new_value) while len(self._value_buffer) > 1: if self._timestamp_buffer[ 0] < timestamp - self._filter_window: self._timestamp_buffer.pop(0) self._value_buffer.pop(0) else: break return np.mean(self._value_buffer, axis=0)
nrz/ylikuutio
external/bullet3/examples/pybullet/gym/pybullet_envs/minitaur/agents/baseline_controller/time_based_moving_window_filter.py
Python
agpl-3.0
1,200
//############################################################################# //# # //# Copyright (C) <2015> <IMS MAXIMS> # //# # //# 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/>. # //# # //# IMS MAXIMS provides absolutely NO GUARANTEE OF THE CLINICAL SAFTEY of # //# this program. Users of this software do so entirely at their own risk. # //# IMS MAXIMS only ensures the Clinical Safety of unaltered run-time # //# software that it builds, deploys and maintains. # //# # //############################################################################# //#EOH // This code was generated by Barbara Worwood using IMS Development Environment (version 1.80 build 5589.25814) // Copyright (C) 1995-2015 IMS MAXIMS. All rights reserved. // WARNING: DO NOT MODIFY the content of this file package ims.correspondence.forms.nongpselect; public final class FormInfo extends ims.framework.FormInfo { private static final long serialVersionUID = 1L; public FormInfo(Integer formId) { super(formId); } public String getNamespaceName() { return "Correspondence"; } public String getFormName() { return "NonGPSelect"; } public int getWidth() { return 848; } public int getHeight() { return 560; } public String[] getContextVariables() { return new String[] { "_cv_Correspondence.ExternalPerson" }; } public String getLocalVariablesPrefix() { return "_lv_Correspondence.NonGPSelect.__internal_x_context__" + String.valueOf(getFormId()); } public ims.framework.FormInfo[] getComponentsFormInfo() { ims.framework.FormInfo[] componentsInfo = new ims.framework.FormInfo[0]; return componentsInfo; } public String getImagePath() { return "Images/Correspondence/non_gp_48.png"; } }
FreudianNM/openMAXIMS
Source Library/openmaxims_workspace/Correspondence/src/ims/correspondence/forms/nongpselect/FormInfo.java
Java
agpl-3.0
3,070
//############################################################################# //# # //# Copyright (C) <2015> <IMS MAXIMS> # //# # //# 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/>. # //# # //# IMS MAXIMS provides absolutely NO GUARANTEE OF THE CLINICAL SAFTEY of # //# this program. Users of this software do so entirely at their own risk. # //# IMS MAXIMS only ensures the Clinical Safety of unaltered run-time # //# software that it builds, deploys and maintains. # //# # //############################################################################# //#EOH // This code was generated by Barbara Worwood using IMS Development Environment (version 1.80 build 5589.25814) // Copyright (C) 1995-2015 IMS MAXIMS. All rights reserved. // WARNING: DO NOT MODIFY the content of this file package ims.clinical.forms.documentgeneration; import ims.framework.*; import ims.framework.controls.*; import ims.framework.enumerations.*; import ims.framework.utils.RuntimeAnchoring; public class GenForm extends FormBridge { private static final long serialVersionUID = 1L; public boolean canProvideData(IReportSeed[] reportSeeds) { return new ReportDataProvider(reportSeeds, this.getFormReportFields()).canProvideData(); } public boolean hasData(IReportSeed[] reportSeeds) { return new ReportDataProvider(reportSeeds, this.getFormReportFields()).hasData(); } public IReportField[] getData(IReportSeed[] reportSeeds) { return getData(reportSeeds, false); } public IReportField[] getData(IReportSeed[] reportSeeds, boolean excludeNulls) { return new ReportDataProvider(reportSeeds, this.getFormReportFields(), excludeNulls).getData(); } public static class lyrDetailsLayer extends Layer { private static final long serialVersionUID = 1L; public static class tabRecipentsContainer extends LayerBridge { private static final long serialVersionUID = 1L; public static class cmbStatusComboBox extends ComboBoxBridge { private static final long serialVersionUID = 1L; public void newRow(ims.clinical.vo.lookups.CorrespondenceStatus value, String text) { super.control.newRow(value, text); } public void newRow(ims.clinical.vo.lookups.CorrespondenceStatus value, String text, ims.framework.utils.Image image) { super.control.newRow(value, text, image); } public void newRow(ims.clinical.vo.lookups.CorrespondenceStatus value, String text, ims.framework.utils.Color textColor) { super.control.newRow(value, text, textColor); } public void newRow(ims.clinical.vo.lookups.CorrespondenceStatus value, String text, ims.framework.utils.Image image, ims.framework.utils.Color textColor) { super.control.newRow(value, text, image, textColor); } public boolean removeRow(ims.clinical.vo.lookups.CorrespondenceStatus value) { return super.control.removeRow(value); } public ims.clinical.vo.lookups.CorrespondenceStatus getValue() { return (ims.clinical.vo.lookups.CorrespondenceStatus)super.control.getValue(); } public void setValue(ims.clinical.vo.lookups.CorrespondenceStatus value) { super.control.setValue(value); } } public static class qmbVerifyingHCPComboBox extends ComboBoxBridge { private static final long serialVersionUID = 1L; public void newRow(ims.core.vo.HcpLiteVo value, String text) { super.control.newRow(value, text); } public void newRow(ims.core.vo.HcpLiteVo value, String text, ims.framework.utils.Image image) { super.control.newRow(value, text, image); } public void newRow(ims.core.vo.HcpLiteVo value, String text, ims.framework.utils.Color textColor) { super.control.newRow(value, text, textColor); } public void newRow(ims.core.vo.HcpLiteVo value, String text, ims.framework.utils.Image image, ims.framework.utils.Color textColor) { super.control.newRow(value, text, image, textColor); } public boolean removeRow(ims.core.vo.HcpLiteVo value) { return super.control.removeRow(value); } public ims.core.vo.HcpLiteVo getValue() { return (ims.core.vo.HcpLiteVo)super.control.getValue(); } public void setValue(ims.core.vo.HcpLiteVo value) { super.control.setValue(value); } public void setEditedText(String text) { super.control.setEditedText(text); } public String getEditedText() { return super.control.getEditedText(); } } public static class grdRecipientsRow extends GridRowBridge { private static final long serialVersionUID = 1L; protected grdRecipientsRow(GridRow row) { super(row); } public void showOpened(int column) { super.row.showOpened(column); } public void setcolNameReadOnly(boolean value) { super.row.setReadOnly(0, value); } public boolean iscolNameReadOnly() { return super.row.isReadOnly(0); } public void showcolNameOpened() { super.row.showOpened(0); } public String getcolName() { return (String)super.row.get(0); } public void setcolName(String value) { super.row.set(0, value); } public void setCellcolNameTooltip(String value) { super.row.setTooltip(0, value); } public void setcolPrimaryReadOnly(boolean value) { super.row.setReadOnly(1, value); } public boolean iscolPrimaryReadOnly() { return super.row.isReadOnly(1); } public void showcolPrimaryOpened() { super.row.showOpened(1); } public boolean getcolPrimary() { return ((Boolean)super.row.get(1)).booleanValue(); } public void setcolPrimary(boolean value) { super.row.set(1, new Boolean(value)); } public void setCellcolPrimaryTooltip(String value) { super.row.setTooltip(1, value); } public ims.clinical.vo.ClinicalCorrespondenceRecipientsVo getValue() { return (ims.clinical.vo.ClinicalCorrespondenceRecipientsVo)super.row.getValue(); } public void setValue(ims.clinical.vo.ClinicalCorrespondenceRecipientsVo value) { super.row.setValue(value); } } public static class grdRecipientsRowCollection extends GridRowCollectionBridge { private static final long serialVersionUID = 1L; private grdRecipientsRowCollection(GridRowCollection collection) { super(collection); } public grdRecipientsRow get(int index) { return new grdRecipientsRow(super.collection.get(index)); } public grdRecipientsRow newRow() { return new grdRecipientsRow(super.collection.newRow()); } public grdRecipientsRow newRow(boolean autoSelect) { return new grdRecipientsRow(super.collection.newRow(autoSelect)); } public grdRecipientsRow newRowAt(int index) { return new grdRecipientsRow(super.collection.newRowAt(index)); } public grdRecipientsRow newRowAt(int index, boolean autoSelect) { return new grdRecipientsRow(super.collection.newRowAt(index, autoSelect)); } } public static class grdRecipientsGrid extends GridBridge { private static final long serialVersionUID = 1L; private void addStringColumn(String caption, int captionAlignment, int alignment, int width, boolean readOnly, boolean bold, int sortOrder, int maxLength, boolean canGrow, ims.framework.enumerations.CharacterCasing casing) { super.grid.addStringColumn(caption, captionAlignment, alignment, width, readOnly, bold, sortOrder, maxLength, canGrow, casing); } private void addBoolColumn(String caption, int captionAlignment, int alignment, int width, boolean readOnly, boolean autoPostBack, int sortOrder, boolean canGrow) { super.grid.addBoolColumn(caption, captionAlignment, alignment, width, readOnly, autoPostBack, sortOrder, canGrow); } public ims.clinical.vo.ClinicalCorrespondenceRecipientsVoCollection getValues() { ims.clinical.vo.ClinicalCorrespondenceRecipientsVoCollection listOfValues = new ims.clinical.vo.ClinicalCorrespondenceRecipientsVoCollection(); for(int x = 0; x < this.getRows().size(); x++) { listOfValues.add(this.getRows().get(x).getValue()); } return listOfValues; } public ims.clinical.vo.ClinicalCorrespondenceRecipientsVo getValue() { return (ims.clinical.vo.ClinicalCorrespondenceRecipientsVo)super.grid.getValue(); } public void setValue(ims.clinical.vo.ClinicalCorrespondenceRecipientsVo value) { super.grid.setValue(value); } public grdRecipientsRow getSelectedRow() { return super.grid.getSelectedRow() == null ? null : new grdRecipientsRow(super.grid.getSelectedRow()); } public int getSelectedRowIndex() { return super.grid.getSelectedRowIndex(); } public grdRecipientsRowCollection getRows() { return new grdRecipientsRowCollection(super.grid.getRows()); } public grdRecipientsRow getRowByValue(ims.clinical.vo.ClinicalCorrespondenceRecipientsVo value) { GridRow row = super.grid.getRowByValue(value); return row == null?null:new grdRecipientsRow(row); } public void setcolNameHeaderTooltip(String value) { super.grid.setColumnHeaderTooltip(0, value); } public String getcolNameHeaderTooltip() { return super.grid.getColumnHeaderTooltip(0); } public void setcolPrimaryHeaderTooltip(String value) { super.grid.setColumnHeaderTooltip(1, value); } public String getcolPrimaryHeaderTooltip() { return super.grid.getColumnHeaderTooltip(1); } } public void setTabActivatedEvent(ims.framework.delegates.TabActivated delegate) { super.container.setTabActivatedEvent(delegate); } public boolean isInitialized() { return super.container.isInitialized(); } protected void setContext(Form form, ims.framework.interfaces.IAppForm appForm, Control control, FormLoader loader, Images form_images_local, ContextMenus contextMenus, Integer startControlID, ims.framework.utils.SizeInfo designSize, ims.framework.utils.SizeInfo runtimeSize, Integer startTabIndex, boolean skipContextValidation) throws Exception { if(form == null) throw new RuntimeException("Invalid form"); if(appForm == null) throw new RuntimeException("Invalid application form"); if(control == null); // this is to avoid eclipse warning only. if(loader == null); // this is to avoid eclipse warning only. if(form_images_local == null); // this is to avoid eclipse warning only. if(contextMenus == null); // this is to avoid eclipse warning only. if(startControlID == null) throw new RuntimeException("Invalid startControlID"); if(designSize == null); // this is to avoid eclipse warning only. if(runtimeSize == null); // this is to avoid eclipse warning only. if(startTabIndex == null) throw new RuntimeException("Invalid startTabIndex"); // Custom Controls ims.framework.CustomComponent instance1 = factory.getEmptyCustomComponent(); RuntimeAnchoring anchoringHelper1 = new RuntimeAnchoring(designSize, runtimeSize, 8, 432, 432, 56, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT); ims.framework.FormUiLogic m_customControlAuthoringInfoForm = loader.loadComponent(102228, appForm, startControlID * 10 + 1000, anchoringHelper1.getSize(), instance1, -1, skipContextValidation); //ims.framework.Control m_customControlAuthoringInfoControl = factory.getControl(CustomComponent.class, new Object[] { control, new Integer(startControlID.intValue() + 1000), new Integer(8), new Integer(432), new Integer(432), new Integer(56), ControlState.DISABLED, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT, new Integer(-1), m_customControlAuthoringInfoForm, instance1 } ); ims.framework.Control m_customControlAuthoringInfoControl = factory.getControl(CustomComponent.class, new Object[] { control, new Integer(startControlID.intValue() + 1001), new Integer(anchoringHelper1.getX()), new Integer(anchoringHelper1.getY()), new Integer(anchoringHelper1.getWidth()), new Integer(anchoringHelper1.getHeight()), ControlState.DISABLED, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT, new Integer(-1), m_customControlAuthoringInfoForm, instance1, Boolean.FALSE } ); super.addControl(m_customControlAuthoringInfoControl); Menu[] menus1 = m_customControlAuthoringInfoForm.getForm().getRegisteredMenus(); for(int x = 0; x < menus1.length; x++) { form.registerMenu(menus1[x]); } // Label Controls RuntimeAnchoring anchoringHelper2 = new RuntimeAnchoring(designSize, runtimeSize, 440, 522, 210, 17, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT); super.addControl(factory.getControl(Label.class, new Object[] { control, new Integer(startControlID.intValue() + 1002), new Integer(anchoringHelper2.getX()), new Integer(anchoringHelper2.getY()), new Integer(anchoringHelper2.getWidth()), new Integer(anchoringHelper2.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT, "Recording Date/Time (Verification):", new Integer(1), null, new Integer(0)})); RuntimeAnchoring anchoringHelper3 = new RuntimeAnchoring(designSize, runtimeSize, 440, 490, 174, 17, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT); super.addControl(factory.getControl(Label.class, new Object[] { control, new Integer(startControlID.intValue() + 1003), new Integer(anchoringHelper3.getX()), new Integer(anchoringHelper3.getY()), new Integer(anchoringHelper3.getWidth()), new Integer(anchoringHelper3.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT, "Recording User (Verification):", new Integer(1), null, new Integer(0)})); RuntimeAnchoring anchoringHelper4 = new RuntimeAnchoring(designSize, runtimeSize, 16, 522, 124, 17, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT); super.addControl(factory.getControl(Label.class, new Object[] { control, new Integer(startControlID.intValue() + 1004), new Integer(anchoringHelper4.getX()), new Integer(anchoringHelper4.getY()), new Integer(anchoringHelper4.getWidth()), new Integer(anchoringHelper4.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT, "Verifying Date/Time:", new Integer(1), null, new Integer(0)})); RuntimeAnchoring anchoringHelper5 = new RuntimeAnchoring(designSize, runtimeSize, 16, 498, 87, 17, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT); super.addControl(factory.getControl(Label.class, new Object[] { control, new Integer(startControlID.intValue() + 1005), new Integer(anchoringHelper5.getX()), new Integer(anchoringHelper5.getY()), new Integer(anchoringHelper5.getWidth()), new Integer(anchoringHelper5.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT, "Verifying HCP:", new Integer(1), null, new Integer(0)})); RuntimeAnchoring anchoringHelper6 = new RuntimeAnchoring(designSize, runtimeSize, 16, 410, 106, 17, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT); super.addControl(factory.getControl(Label.class, new Object[] { control, new Integer(startControlID.intValue() + 1006), new Integer(anchoringHelper6.getX()), new Integer(anchoringHelper6.getY()), new Integer(anchoringHelper6.getWidth()), new Integer(anchoringHelper6.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT, "Document Status:", new Integer(1), null, new Integer(0)})); RuntimeAnchoring anchoringHelper7 = new RuntimeAnchoring(designSize, runtimeSize, 432, 16, 314, 17, ims.framework.enumerations.ControlAnchoring.TOPLEFT); super.addControl(factory.getControl(Label.class, new Object[] { control, new Integer(startControlID.intValue() + 1007), new Integer(anchoringHelper7.getX()), new Integer(anchoringHelper7.getY()), new Integer(anchoringHelper7.getWidth()), new Integer(anchoringHelper7.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.TOPLEFT, "Select Clinical Data Items to be included in Document:", new Integer(1), null, new Integer(0)})); RuntimeAnchoring anchoringHelper8 = new RuntimeAnchoring(designSize, runtimeSize, 16, 16, 68, 17, ims.framework.enumerations.ControlAnchoring.TOPLEFT); super.addControl(factory.getControl(Label.class, new Object[] { control, new Integer(startControlID.intValue() + 1008), new Integer(anchoringHelper8.getX()), new Integer(anchoringHelper8.getY()), new Integer(anchoringHelper8.getWidth()), new Integer(anchoringHelper8.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.TOPLEFT, "Recipients:", new Integer(1), null, new Integer(0)})); // TextBox Controls RuntimeAnchoring anchoringHelper9 = new RuntimeAnchoring(designSize, runtimeSize, 656, 520, 160, 21, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFTRIGHT); super.addControl(factory.getControl(TextBox.class, new Object[] { control, new Integer(startControlID.intValue() + 1009), new Integer(anchoringHelper9.getX()), new Integer(anchoringHelper9.getY()), new Integer(anchoringHelper9.getWidth()), new Integer(anchoringHelper9.getHeight()), new Integer(-1), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFTRIGHT,Boolean.FALSE, new Integer(0), Boolean.TRUE, Boolean.FALSE, null, null, Boolean.FALSE, ims.framework.enumerations.CharacterCasing.NORMAL, ims.framework.enumerations.TextTrimming.NONE, "", ""})); RuntimeAnchoring anchoringHelper10 = new RuntimeAnchoring(designSize, runtimeSize, 608, 488, 208, 21, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFTRIGHT); super.addControl(factory.getControl(TextBox.class, new Object[] { control, new Integer(startControlID.intValue() + 1010), new Integer(anchoringHelper10.getX()), new Integer(anchoringHelper10.getY()), new Integer(anchoringHelper10.getWidth()), new Integer(anchoringHelper10.getHeight()), new Integer(-1), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFTRIGHT,Boolean.FALSE, new Integer(0), Boolean.TRUE, Boolean.FALSE, null, null, Boolean.FALSE, ims.framework.enumerations.CharacterCasing.NORMAL, ims.framework.enumerations.TextTrimming.NONE, "", ""})); // Date Time Controls RuntimeAnchoring anchoringHelper11 = new RuntimeAnchoring(designSize, runtimeSize, 144, 520, 280, 20, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT); super.addControl(factory.getControl(DateTimeControl.class, new Object[] { control, new Integer(startControlID.intValue() + 1011), new Integer(anchoringHelper11.getX()), new Integer(anchoringHelper11.getY()), new Integer(anchoringHelper11.getWidth()), new Integer(anchoringHelper11.getHeight()), new Integer(startTabIndex.intValue() + 4), ControlState.DISABLED, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT,Boolean.TRUE, null, Boolean.FALSE, null, Boolean.FALSE, null})); // ComboBox Controls RuntimeAnchoring anchoringHelper12 = new RuntimeAnchoring(designSize, runtimeSize, 144, 408, 240, 21, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT); ComboBox m_cmbStatusTemp = (ComboBox)factory.getControl(ComboBox.class, new Object[] { control, new Integer(startControlID.intValue() + 1012), new Integer(anchoringHelper12.getX()), new Integer(anchoringHelper12.getY()), new Integer(anchoringHelper12.getWidth()), new Integer(anchoringHelper12.getHeight()), new Integer(startTabIndex.intValue() + 2), ControlState.DISABLED, ControlState.UNKNOWN,ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT ,Boolean.TRUE, Boolean.TRUE, SortOrder.NONE, Boolean.FALSE, new Integer(1), null, Boolean.TRUE, new Integer(-1)}); addControl(m_cmbStatusTemp); cmbStatusComboBox cmbStatus = (cmbStatusComboBox)ComboBoxFlyweightFactory.getInstance().createComboBoxBridge(cmbStatusComboBox.class, m_cmbStatusTemp); super.addComboBox(cmbStatus); // Query ComboBox Controls RuntimeAnchoring anchoringHelper13 = new RuntimeAnchoring(designSize, runtimeSize, 144, 496, 280, 21, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT); ComboBox m_qmbVerifyingHCPTemp = (ComboBox)factory.getControl(ComboBox.class, new Object[] { control, new Integer(startControlID.intValue() + 1013), new Integer(anchoringHelper13.getX()), new Integer(anchoringHelper13.getY()), new Integer(anchoringHelper13.getWidth()), new Integer(anchoringHelper13.getHeight()), new Integer(startTabIndex.intValue() + 3), ControlState.DISABLED, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT,Boolean.TRUE, Boolean.FALSE, SortOrder.NONE, Boolean.TRUE, new Integer(1), null, Boolean.FALSE, new Integer(-1), Boolean.FALSE}); addControl(m_qmbVerifyingHCPTemp); qmbVerifyingHCPComboBox qmbVerifyingHCP = (qmbVerifyingHCPComboBox)ComboBoxFlyweightFactory.getInstance().createComboBoxBridge(qmbVerifyingHCPComboBox.class, m_qmbVerifyingHCPTemp); super.addComboBox(qmbVerifyingHCP); // Grid Controls RuntimeAnchoring anchoringHelper14 = new RuntimeAnchoring(designSize, runtimeSize, 16, 32, 408, 368, ims.framework.enumerations.ControlAnchoring.TOPBOTTOMLEFT); Grid m_grdRecipientsTemp = (Grid)factory.getControl(Grid.class, new Object[] { control, new Integer(startControlID.intValue() + 1014), new Integer(anchoringHelper14.getX()), new Integer(anchoringHelper14.getY()), new Integer(anchoringHelper14.getWidth()), new Integer(anchoringHelper14.getHeight()), new Integer(startTabIndex.intValue() + 1), ControlState.READONLY, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.TOPBOTTOMLEFT,Boolean.TRUE, Boolean.FALSE, new Integer(24), Boolean.TRUE, contextMenus.contextMenuRecipientsOperations, Boolean.FALSE, Boolean.FALSE, new Integer(0), null, Boolean.FALSE, Boolean.TRUE}); addControl(m_grdRecipientsTemp); grdRecipientsGrid grdRecipients = (grdRecipientsGrid)GridFlyweightFactory.getInstance().createGridBridge(grdRecipientsGrid.class, m_grdRecipientsTemp); grdRecipients.addStringColumn("Name", 0, 0, 330, true, false, 0, 0, true, ims.framework.enumerations.CharacterCasing.NORMAL); grdRecipients.addBoolColumn("Primary", 1, 1, -1, false, true, 0, true); super.addGrid(grdRecipients); // Tree Controls RuntimeAnchoring anchoringHelper15 = new RuntimeAnchoring(designSize, runtimeSize, 432, 32, 384, 368, ims.framework.enumerations.ControlAnchoring.ALL); super.addControl(factory.getControl(TreeView.class, new Object[] { control, new Integer(startControlID.intValue() + 1015), new Integer(anchoringHelper15.getX()), new Integer(anchoringHelper15.getY()), new Integer(anchoringHelper15.getWidth()), new Integer(anchoringHelper15.getHeight()), new Integer(-1), ControlState.DISABLED, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.ALL,Boolean.FALSE, Boolean.TRUE, Boolean.FALSE, null, Boolean.TRUE, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE})); // Image Buttons Controls RuntimeAnchoring anchoringHelper16 = new RuntimeAnchoring(designSize, runtimeSize, 398, 405, 26, 26, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT); super.addControl(factory.getControl(ImageButton.class, new Object[] { control, new Integer(startControlID.intValue() + 1016), new Integer(anchoringHelper16.getX()), new Integer(anchoringHelper16.getY()), new Integer(anchoringHelper16.getWidth()), new Integer(anchoringHelper16.getHeight()), new Integer(-1), ControlState.DISABLED, ControlState.DISABLED, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT, form_images_local.Core.InfoEnabled24, form_images_local.Core.InfoDisabled24, null, Boolean.FALSE, Boolean.FALSE, Boolean.TRUE, Boolean.FALSE, null})); } public ims.core.forms.authoringinfo.IComponent customControlAuthoringInfo() { return (ims.core.forms.authoringinfo.IComponent)((ims.framework.cn.controls.CustomComponent)super.getControl(0)).getLogic(); } public void setcustomControlAuthoringInfoValueChangedEvent(ims.framework.delegates.ValueChanged delegate) { ((CustomComponent)super.getControl(0)).setValueChangedEvent(delegate); } public void setcustomControlAuthoringInfoVisible(boolean value) { ((ims.framework.Control)super.getControl(0)).setVisible(value); } public boolean iscustomControlAuthoringInfoVisible() { return ((ims.framework.Control)super.getControl(0)).isVisible(); } public void setcustomControlAuthoringInfoEnabled(boolean value) { ((ims.framework.Control)super.getControl(0)).setEnabled(value); } public boolean iscustomControlAuthoringInfoEnabled() { return ((ims.framework.Control)super.getControl(0)).isEnabled(); } public Label lblRecDate() { return (Label)super.getControl(1); } public Label lblRecUser() { return (Label)super.getControl(2); } public TextBox txtRecordingDateTime() { return (TextBox)super.getControl(8); } public TextBox txtRecordingUser() { return (TextBox)super.getControl(9); } public DateTimeControl dtimVerifying() { return (DateTimeControl)super.getControl(10); } public cmbStatusComboBox cmbStatus() { return (cmbStatusComboBox)super.getComboBox(0); } public qmbVerifyingHCPComboBox qmbVerifyingHCP() { return (qmbVerifyingHCPComboBox)super.getComboBox(1); } public grdRecipientsGrid grdRecipients() { return (grdRecipientsGrid)super.getGrid(0); } public TreeView treCDI() { return (TreeView)super.getControl(14); } public ImageButton imbStatus() { return (ImageButton)super.getControl(15); } } public static class tabCommentsOPDContainer extends LayerBridge { private static final long serialVersionUID = 1L; public static class cmbOPFollowUpComboBox extends ComboBoxBridge { private static final long serialVersionUID = 1L; public void newRow(ims.clinical.vo.lookups.OpdFollowUp value, String text) { super.control.newRow(value, text); } public void newRow(ims.clinical.vo.lookups.OpdFollowUp value, String text, ims.framework.utils.Image image) { super.control.newRow(value, text, image); } public void newRow(ims.clinical.vo.lookups.OpdFollowUp value, String text, ims.framework.utils.Color textColor) { super.control.newRow(value, text, textColor); } public void newRow(ims.clinical.vo.lookups.OpdFollowUp value, String text, ims.framework.utils.Image image, ims.framework.utils.Color textColor) { super.control.newRow(value, text, image, textColor); } public boolean removeRow(ims.clinical.vo.lookups.OpdFollowUp value) { return super.control.removeRow(value); } public ims.clinical.vo.lookups.OpdFollowUp getValue() { return (ims.clinical.vo.lookups.OpdFollowUp)super.control.getValue(); } public void setValue(ims.clinical.vo.lookups.OpdFollowUp value) { super.control.setValue(value); } } public static class cmbOPReviewInComboBox extends ComboBoxBridge { private static final long serialVersionUID = 1L; public void newRow(ims.clinical.vo.lookups.ReviewInDuration value, String text) { super.control.newRow(value, text); } public void newRow(ims.clinical.vo.lookups.ReviewInDuration value, String text, ims.framework.utils.Image image) { super.control.newRow(value, text, image); } public void newRow(ims.clinical.vo.lookups.ReviewInDuration value, String text, ims.framework.utils.Color textColor) { super.control.newRow(value, text, textColor); } public void newRow(ims.clinical.vo.lookups.ReviewInDuration value, String text, ims.framework.utils.Image image, ims.framework.utils.Color textColor) { super.control.newRow(value, text, image, textColor); } public boolean removeRow(ims.clinical.vo.lookups.ReviewInDuration value) { return super.control.removeRow(value); } public ims.clinical.vo.lookups.ReviewInDuration getValue() { return (ims.clinical.vo.lookups.ReviewInDuration)super.control.getValue(); } public void setValue(ims.clinical.vo.lookups.ReviewInDuration value) { super.control.setValue(value); } } public static class grdClinicalNotesRow extends GridRowBridge { private static final long serialVersionUID = 1L; protected grdClinicalNotesRow(GridRow row) { super(row); } public void showOpened(int column) { super.row.showOpened(column); } public void setColSelectReadOnly(boolean value) { super.row.setReadOnly(0, value); } public boolean isColSelectReadOnly() { return super.row.isReadOnly(0); } public void showColSelectOpened() { super.row.showOpened(0); } public boolean getColSelect() { return ((Boolean)super.row.get(0)).booleanValue(); } public void setColSelect(boolean value) { super.row.set(0, new Boolean(value)); } public void setCellColSelectTooltip(String value) { super.row.setTooltip(0, value); } public void setColContextReadOnly(boolean value) { super.row.setReadOnly(1, value); } public boolean isColContextReadOnly() { return super.row.isReadOnly(1); } public void showColContextOpened() { super.row.showOpened(1); } public String getColContext() { return (String)super.row.get(1); } public void setColContext(String value) { super.row.set(1, value); } public void setCellColContextTooltip(String value) { super.row.setTooltip(1, value); } public void setColTextReadOnly(boolean value) { super.row.setReadOnly(2, value); } public boolean isColTextReadOnly() { return super.row.isReadOnly(2); } public void showColTextOpened() { super.row.showOpened(2); } public String getColText() { return (String)super.row.get(2); } public void setColText(String value) { super.row.set(2, value); } public void setCellColTextTooltip(String value) { super.row.setTooltip(2, value); } public String getValue() { return (String)super.row.getValue(); } public void setValue(String value) { super.row.setValue(value); } } public static class grdClinicalNotesRowCollection extends GridRowCollectionBridge { private static final long serialVersionUID = 1L; private grdClinicalNotesRowCollection(GridRowCollection collection) { super(collection); } public grdClinicalNotesRow get(int index) { return new grdClinicalNotesRow(super.collection.get(index)); } public grdClinicalNotesRow newRow() { return new grdClinicalNotesRow(super.collection.newRow()); } public grdClinicalNotesRow newRow(boolean autoSelect) { return new grdClinicalNotesRow(super.collection.newRow(autoSelect)); } public grdClinicalNotesRow newRowAt(int index) { return new grdClinicalNotesRow(super.collection.newRowAt(index)); } public grdClinicalNotesRow newRowAt(int index, boolean autoSelect) { return new grdClinicalNotesRow(super.collection.newRowAt(index, autoSelect)); } } public static class grdClinicalNotesGrid extends GridBridge { private static final long serialVersionUID = 1L; private void addBoolColumn(String caption, int captionAlignment, int alignment, int width, boolean readOnly, boolean autoPostBack, int sortOrder, boolean canGrow) { super.grid.addBoolColumn(caption, captionAlignment, alignment, width, readOnly, autoPostBack, sortOrder, canGrow); } private void addStringColumn(String caption, int captionAlignment, int alignment, int width, boolean readOnly, boolean bold, int sortOrder, int maxLength, boolean canGrow, ims.framework.enumerations.CharacterCasing casing) { super.grid.addStringColumn(caption, captionAlignment, alignment, width, readOnly, bold, sortOrder, maxLength, canGrow, casing); } private void addHtmlColumn(String caption, int captionAlignment, int alignment, int width, boolean readOnly, boolean bold, int sortOrder, boolean canGrow) { super.grid.addHtmlColumn(caption, captionAlignment, alignment, width, readOnly, bold, sortOrder, canGrow); } public String[] getValues() { String[] listOfValues = new String[this.getRows().size()]; for(int x = 0; x < this.getRows().size(); x++) { listOfValues[x] = this.getRows().get(x).getValue(); } return listOfValues; } public String getValue() { return (String)super.grid.getValue(); } public void setValue(String value) { super.grid.setValue(value); } public grdClinicalNotesRow getSelectedRow() { return super.grid.getSelectedRow() == null ? null : new grdClinicalNotesRow(super.grid.getSelectedRow()); } public int getSelectedRowIndex() { return super.grid.getSelectedRowIndex(); } public grdClinicalNotesRowCollection getRows() { return new grdClinicalNotesRowCollection(super.grid.getRows()); } public grdClinicalNotesRow getRowByValue(String value) { GridRow row = super.grid.getRowByValue(value); return row == null?null:new grdClinicalNotesRow(row); } public void setColSelectHeaderTooltip(String value) { super.grid.setColumnHeaderTooltip(0, value); } public String getColSelectHeaderTooltip() { return super.grid.getColumnHeaderTooltip(0); } public void setColContextHeaderTooltip(String value) { super.grid.setColumnHeaderTooltip(1, value); } public String getColContextHeaderTooltip() { return super.grid.getColumnHeaderTooltip(1); } public void setColTextHeaderTooltip(String value) { super.grid.setColumnHeaderTooltip(2, value); } public String getColTextHeaderTooltip() { return super.grid.getColumnHeaderTooltip(2); } } public void setTabActivatedEvent(ims.framework.delegates.TabActivated delegate) { super.container.setTabActivatedEvent(delegate); } public boolean isInitialized() { return super.container.isInitialized(); } protected void setContext(Form form, ims.framework.interfaces.IAppForm appForm, Control control, FormLoader loader, Images form_images_local, ContextMenus contextMenus, Integer startControlID, ims.framework.utils.SizeInfo designSize, ims.framework.utils.SizeInfo runtimeSize, Integer startTabIndex, boolean skipContextValidation) throws Exception { if(form == null) throw new RuntimeException("Invalid form"); if(appForm == null) throw new RuntimeException("Invalid application form"); if(control == null); // this is to avoid eclipse warning only. if(loader == null); // this is to avoid eclipse warning only. if(form_images_local == null); // this is to avoid eclipse warning only. if(contextMenus == null); // this is to avoid eclipse warning only. if(startControlID == null) throw new RuntimeException("Invalid startControlID"); if(designSize == null); // this is to avoid eclipse warning only. if(runtimeSize == null); // this is to avoid eclipse warning only. if(startTabIndex == null) throw new RuntimeException("Invalid startTabIndex"); // Label Controls RuntimeAnchoring anchoringHelper17 = new RuntimeAnchoring(designSize, runtimeSize, 16, 499, 64, 17, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT); super.addControl(factory.getControl(Label.class, new Object[] { control, new Integer(startControlID.intValue() + 1017), new Integer(anchoringHelper17.getX()), new Integer(anchoringHelper17.getY()), new Integer(anchoringHelper17.getWidth()), new Integer(anchoringHelper17.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT, "Review in:", new Integer(1), null, new Integer(0)})); RuntimeAnchoring anchoringHelper18 = new RuntimeAnchoring(designSize, runtimeSize, 16, 470, 107, 17, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT); super.addControl(factory.getControl(Label.class, new Object[] { control, new Integer(startControlID.intValue() + 1018), new Integer(anchoringHelper18.getX()), new Integer(anchoringHelper18.getY()), new Integer(anchoringHelper18.getWidth()), new Integer(anchoringHelper18.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT, "Follow Up Details:", new Integer(1), null, new Integer(0)})); RuntimeAnchoring anchoringHelper19 = new RuntimeAnchoring(designSize, runtimeSize, 16, 16, 370, 17, ims.framework.enumerations.ControlAnchoring.TOPLEFT); super.addControl(factory.getControl(Label.class, new Object[] { control, new Integer(startControlID.intValue() + 1019), new Integer(anchoringHelper19.getX()), new Integer(anchoringHelper19.getY()), new Integer(anchoringHelper19.getWidth()), new Integer(anchoringHelper19.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.TOPLEFT, "Outpatient Clinical Notes (Objective / Plan / Instructions for Next Clinic) :", new Integer(0), null, new Integer(0)})); // ComboBox Controls RuntimeAnchoring anchoringHelper20 = new RuntimeAnchoring(designSize, runtimeSize, 120, 468, 168, 20, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFTRIGHT); ComboBox m_cmbOPFollowUpTemp = (ComboBox)factory.getControl(ComboBox.class, new Object[] { control, new Integer(startControlID.intValue() + 1020), new Integer(anchoringHelper20.getX()), new Integer(anchoringHelper20.getY()), new Integer(anchoringHelper20.getWidth()), new Integer(anchoringHelper20.getHeight()), new Integer(startTabIndex.intValue() + 15), ControlState.DISABLED, ControlState.UNKNOWN,ims.framework.enumerations.ControlAnchoring.BOTTOMLEFTRIGHT ,Boolean.TRUE, Boolean.FALSE, SortOrder.NONE, Boolean.FALSE, new Integer(1), null, Boolean.FALSE, new Integer(-1)}); addControl(m_cmbOPFollowUpTemp); cmbOPFollowUpComboBox cmbOPFollowUp = (cmbOPFollowUpComboBox)ComboBoxFlyweightFactory.getInstance().createComboBoxBridge(cmbOPFollowUpComboBox.class, m_cmbOPFollowUpTemp); super.addComboBox(cmbOPFollowUp); RuntimeAnchoring anchoringHelper21 = new RuntimeAnchoring(designSize, runtimeSize, 168, 496, 120, 20, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFTRIGHT); ComboBox m_cmbOPReviewInTemp = (ComboBox)factory.getControl(ComboBox.class, new Object[] { control, new Integer(startControlID.intValue() + 1021), new Integer(anchoringHelper21.getX()), new Integer(anchoringHelper21.getY()), new Integer(anchoringHelper21.getWidth()), new Integer(anchoringHelper21.getHeight()), new Integer(startTabIndex.intValue() + 14), ControlState.DISABLED, ControlState.UNKNOWN,ims.framework.enumerations.ControlAnchoring.BOTTOMLEFTRIGHT ,Boolean.TRUE, Boolean.FALSE, SortOrder.NONE, Boolean.FALSE, new Integer(1), null, Boolean.FALSE, new Integer(-1)}); addControl(m_cmbOPReviewInTemp); cmbOPReviewInComboBox cmbOPReviewIn = (cmbOPReviewInComboBox)ComboBoxFlyweightFactory.getInstance().createComboBoxBridge(cmbOPReviewInComboBox.class, m_cmbOPReviewInTemp); super.addComboBox(cmbOPReviewIn); // Grid Controls RuntimeAnchoring anchoringHelper22 = new RuntimeAnchoring(designSize, runtimeSize, 16, 32, 792, 416, ims.framework.enumerations.ControlAnchoring.ALL); Grid m_grdClinicalNotesTemp = (Grid)factory.getControl(Grid.class, new Object[] { control, new Integer(startControlID.intValue() + 1022), new Integer(anchoringHelper22.getX()), new Integer(anchoringHelper22.getY()), new Integer(anchoringHelper22.getWidth()), new Integer(anchoringHelper22.getHeight()), new Integer(startTabIndex.intValue() + 8), ControlState.EDITABLE, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.ALL,Boolean.FALSE, Boolean.FALSE, new Integer(24), Boolean.TRUE, null, Boolean.FALSE, Boolean.FALSE, new Integer(0), null, Boolean.FALSE, Boolean.TRUE}); addControl(m_grdClinicalNotesTemp); grdClinicalNotesGrid grdClinicalNotes = (grdClinicalNotesGrid)GridFlyweightFactory.getInstance().createGridBridge(grdClinicalNotesGrid.class, m_grdClinicalNotesTemp); grdClinicalNotes.addBoolColumn("Select", 1, 1, 55, false, false, 0, true); grdClinicalNotes.addStringColumn("Context", 0, 0, 200, true, false, 0, 0, true, ims.framework.enumerations.CharacterCasing.NORMAL); grdClinicalNotes.addHtmlColumn("Text", 0, 0, -1, true, false, 0, true); super.addGrid(grdClinicalNotes); // IntBox Controls RuntimeAnchoring anchoringHelper23 = new RuntimeAnchoring(designSize, runtimeSize, 120, 496, 40, 21, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT); super.addControl(factory.getControl(IntBox.class, new Object[] { control, new Integer(startControlID.intValue() + 1023), new Integer(anchoringHelper23.getX()), new Integer(anchoringHelper23.getY()), new Integer(anchoringHelper23.getWidth()), new Integer(anchoringHelper23.getHeight()), new Integer(startTabIndex.intValue() + 13), ControlState.DISABLED, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT,Boolean.TRUE, Boolean.TRUE, Boolean.FALSE, null, null, Boolean.FALSE, new Integer(9)})); } public cmbOPFollowUpComboBox cmbOPFollowUp() { return (cmbOPFollowUpComboBox)super.getComboBox(0); } public cmbOPReviewInComboBox cmbOPReviewIn() { return (cmbOPReviewInComboBox)super.getComboBox(1); } public grdClinicalNotesGrid grdClinicalNotes() { return (grdClinicalNotesGrid)super.getGrid(0); } public IntBox intOPReviewIn() { return (IntBox)super.getControl(6); } } public static class tabSummaryIPContainer extends LayerBridge { private static final long serialVersionUID = 1L; public static class cmbIPFollowUPComboBox extends ComboBoxBridge { private static final long serialVersionUID = 1L; public void newRow(ims.clinical.vo.lookups.InpatientFollowUp value, String text) { super.control.newRow(value, text); } public void newRow(ims.clinical.vo.lookups.InpatientFollowUp value, String text, ims.framework.utils.Image image) { super.control.newRow(value, text, image); } public void newRow(ims.clinical.vo.lookups.InpatientFollowUp value, String text, ims.framework.utils.Color textColor) { super.control.newRow(value, text, textColor); } public void newRow(ims.clinical.vo.lookups.InpatientFollowUp value, String text, ims.framework.utils.Image image, ims.framework.utils.Color textColor) { super.control.newRow(value, text, image, textColor); } public boolean removeRow(ims.clinical.vo.lookups.InpatientFollowUp value) { return super.control.removeRow(value); } public ims.clinical.vo.lookups.InpatientFollowUp getValue() { return (ims.clinical.vo.lookups.InpatientFollowUp)super.control.getValue(); } public void setValue(ims.clinical.vo.lookups.InpatientFollowUp value) { super.control.setValue(value); } } public static class cmbIPReviewInComboBox extends ComboBoxBridge { private static final long serialVersionUID = 1L; public void newRow(ims.clinical.vo.lookups.ReviewInDuration value, String text) { super.control.newRow(value, text); } public void newRow(ims.clinical.vo.lookups.ReviewInDuration value, String text, ims.framework.utils.Image image) { super.control.newRow(value, text, image); } public void newRow(ims.clinical.vo.lookups.ReviewInDuration value, String text, ims.framework.utils.Color textColor) { super.control.newRow(value, text, textColor); } public void newRow(ims.clinical.vo.lookups.ReviewInDuration value, String text, ims.framework.utils.Image image, ims.framework.utils.Color textColor) { super.control.newRow(value, text, image, textColor); } public boolean removeRow(ims.clinical.vo.lookups.ReviewInDuration value) { return super.control.removeRow(value); } public ims.clinical.vo.lookups.ReviewInDuration getValue() { return (ims.clinical.vo.lookups.ReviewInDuration)super.control.getValue(); } public void setValue(ims.clinical.vo.lookups.ReviewInDuration value) { super.control.setValue(value); } } public void setTabActivatedEvent(ims.framework.delegates.TabActivated delegate) { super.container.setTabActivatedEvent(delegate); } public boolean isInitialized() { return super.container.isInitialized(); } protected void setContext(Form form, ims.framework.interfaces.IAppForm appForm, Control control, FormLoader loader, Images form_images_local, ContextMenus contextMenus, Integer startControlID, ims.framework.utils.SizeInfo designSize, ims.framework.utils.SizeInfo runtimeSize, Integer startTabIndex, boolean skipContextValidation) throws Exception { if(form == null) throw new RuntimeException("Invalid form"); if(appForm == null) throw new RuntimeException("Invalid application form"); if(control == null); // this is to avoid eclipse warning only. if(loader == null); // this is to avoid eclipse warning only. if(form_images_local == null); // this is to avoid eclipse warning only. if(contextMenus == null); // this is to avoid eclipse warning only. if(startControlID == null) throw new RuntimeException("Invalid startControlID"); if(designSize == null); // this is to avoid eclipse warning only. if(runtimeSize == null); // this is to avoid eclipse warning only. if(startTabIndex == null) throw new RuntimeException("Invalid startTabIndex"); // Label Controls RuntimeAnchoring anchoringHelper24 = new RuntimeAnchoring(designSize, runtimeSize, 16, 496, 64, 17, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT); super.addControl(factory.getControl(Label.class, new Object[] { control, new Integer(startControlID.intValue() + 1024), new Integer(anchoringHelper24.getX()), new Integer(anchoringHelper24.getY()), new Integer(anchoringHelper24.getWidth()), new Integer(anchoringHelper24.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT, "Review in:", new Integer(1), null, new Integer(0)})); RuntimeAnchoring anchoringHelper25 = new RuntimeAnchoring(designSize, runtimeSize, 16, 472, 107, 17, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT); super.addControl(factory.getControl(Label.class, new Object[] { control, new Integer(startControlID.intValue() + 1025), new Integer(anchoringHelper25.getX()), new Integer(anchoringHelper25.getY()), new Integer(anchoringHelper25.getWidth()), new Integer(anchoringHelper25.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT, "Follow Up Details:", new Integer(1), null, new Integer(0)})); RuntimeAnchoring anchoringHelper26 = new RuntimeAnchoring(designSize, runtimeSize, 16, 16, 153, 17, ims.framework.enumerations.ControlAnchoring.TOPLEFT); super.addControl(factory.getControl(Label.class, new Object[] { control, new Integer(startControlID.intValue() + 1026), new Integer(anchoringHelper26.getX()), new Integer(anchoringHelper26.getY()), new Integer(anchoringHelper26.getWidth()), new Integer(anchoringHelper26.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.TOPLEFT, "Discharge Summary Note:", new Integer(1), null, new Integer(0)})); // ComboBox Controls RuntimeAnchoring anchoringHelper27 = new RuntimeAnchoring(designSize, runtimeSize, 120, 472, 168, 20, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFTRIGHT); ComboBox m_cmbIPFollowUPTemp = (ComboBox)factory.getControl(ComboBox.class, new Object[] { control, new Integer(startControlID.intValue() + 1027), new Integer(anchoringHelper27.getX()), new Integer(anchoringHelper27.getY()), new Integer(anchoringHelper27.getWidth()), new Integer(anchoringHelper27.getHeight()), new Integer(startTabIndex.intValue() + 18), ControlState.DISABLED, ControlState.UNKNOWN,ims.framework.enumerations.ControlAnchoring.BOTTOMLEFTRIGHT ,Boolean.TRUE, Boolean.FALSE, SortOrder.NONE, Boolean.FALSE, new Integer(1), null, Boolean.FALSE, new Integer(-1)}); addControl(m_cmbIPFollowUPTemp); cmbIPFollowUPComboBox cmbIPFollowUP = (cmbIPFollowUPComboBox)ComboBoxFlyweightFactory.getInstance().createComboBoxBridge(cmbIPFollowUPComboBox.class, m_cmbIPFollowUPTemp); super.addComboBox(cmbIPFollowUP); RuntimeAnchoring anchoringHelper28 = new RuntimeAnchoring(designSize, runtimeSize, 168, 496, 120, 20, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFTRIGHT); ComboBox m_cmbIPReviewInTemp = (ComboBox)factory.getControl(ComboBox.class, new Object[] { control, new Integer(startControlID.intValue() + 1028), new Integer(anchoringHelper28.getX()), new Integer(anchoringHelper28.getY()), new Integer(anchoringHelper28.getWidth()), new Integer(anchoringHelper28.getHeight()), new Integer(startTabIndex.intValue() + 17), ControlState.DISABLED, ControlState.UNKNOWN,ims.framework.enumerations.ControlAnchoring.BOTTOMLEFTRIGHT ,Boolean.TRUE, Boolean.FALSE, SortOrder.NONE, Boolean.FALSE, new Integer(1), null, Boolean.FALSE, new Integer(-1)}); addControl(m_cmbIPReviewInTemp); cmbIPReviewInComboBox cmbIPReviewIn = (cmbIPReviewInComboBox)ComboBoxFlyweightFactory.getInstance().createComboBoxBridge(cmbIPReviewInComboBox.class, m_cmbIPReviewInTemp); super.addComboBox(cmbIPReviewIn); // IntBox Controls RuntimeAnchoring anchoringHelper29 = new RuntimeAnchoring(designSize, runtimeSize, 120, 496, 40, 21, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT); super.addControl(factory.getControl(IntBox.class, new Object[] { control, new Integer(startControlID.intValue() + 1029), new Integer(anchoringHelper29.getX()), new Integer(anchoringHelper29.getY()), new Integer(anchoringHelper29.getWidth()), new Integer(anchoringHelper29.getHeight()), new Integer(startTabIndex.intValue() + 16), ControlState.DISABLED, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT,Boolean.TRUE, Boolean.TRUE, Boolean.TRUE, null, null, Boolean.FALSE, new Integer(9)})); // Rich Text Controls RuntimeAnchoring anchoringHelper30 = new RuntimeAnchoring(designSize, runtimeSize, 16, 32, 796, 416, ims.framework.enumerations.ControlAnchoring.ALL); super.addControl(factory.getControl(RichTextControl.class, new Object[] { control, new Integer(startControlID.intValue() + 1030), new Integer(anchoringHelper30.getX()), new Integer(anchoringHelper30.getY()), new Integer(anchoringHelper30.getWidth()), new Integer(anchoringHelper30.getHeight()), new Integer(startTabIndex.intValue() + 12), ControlState.DISABLED, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.ALL, Boolean.FALSE, Boolean.FALSE, new Integer(0)} )); } public cmbIPFollowUPComboBox cmbIPFollowUP() { return (cmbIPFollowUPComboBox)super.getComboBox(0); } public cmbIPReviewInComboBox cmbIPReviewIn() { return (cmbIPReviewInComboBox)super.getComboBox(1); } public IntBox intIPReviewIn() { return (IntBox)super.getControl(5); } public RichTextControl richDischargeSummary() { return (RichTextControl)super.getControl(6); } } public static class tabServicesContainer extends LayerBridge { private static final long serialVersionUID = 1L; public void setTabActivatedEvent(ims.framework.delegates.TabActivated delegate) { super.container.setTabActivatedEvent(delegate); } public boolean isInitialized() { return super.container.isInitialized(); } protected void setContext(Form form, ims.framework.interfaces.IAppForm appForm, Control control, FormLoader loader, Images form_images_local, ContextMenus contextMenus, Integer startControlID, ims.framework.utils.SizeInfo designSize, ims.framework.utils.SizeInfo runtimeSize, Integer startTabIndex, boolean skipContextValidation) throws Exception { if(form == null) throw new RuntimeException("Invalid form"); if(appForm == null) throw new RuntimeException("Invalid application form"); if(control == null); // this is to avoid eclipse warning only. if(loader == null); // this is to avoid eclipse warning only. if(form_images_local == null); // this is to avoid eclipse warning only. if(contextMenus == null); // this is to avoid eclipse warning only. if(startControlID == null) throw new RuntimeException("Invalid startControlID"); if(designSize == null); // this is to avoid eclipse warning only. if(runtimeSize == null); // this is to avoid eclipse warning only. if(startTabIndex == null) throw new RuntimeException("Invalid startTabIndex"); // Label Controls RuntimeAnchoring anchoringHelper31 = new RuntimeAnchoring(designSize, runtimeSize, 16, 16, 117, 17, ims.framework.enumerations.ControlAnchoring.TOPLEFT); super.addControl(factory.getControl(Label.class, new Object[] { control, new Integer(startControlID.intValue() + 1031), new Integer(anchoringHelper31.getX()), new Integer(anchoringHelper31.getY()), new Integer(anchoringHelper31.getWidth()), new Integer(anchoringHelper31.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.TOPLEFT, "Current Medication:", new Integer(1), null, new Integer(0)})); RuntimeAnchoring anchoringHelper32 = new RuntimeAnchoring(designSize, runtimeSize, 16, 335, 206, 17, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT); super.addControl(factory.getControl(Label.class, new Object[] { control, new Integer(startControlID.intValue() + 1032), new Integer(anchoringHelper32.getX()), new Integer(anchoringHelper32.getY()), new Integer(anchoringHelper32.getWidth()), new Integer(anchoringHelper32.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT, "Procedures - Performed / Planned:", new Integer(1), null, new Integer(0)})); // Tree Controls RuntimeAnchoring anchoringHelper33 = new RuntimeAnchoring(designSize, runtimeSize, 16, 352, 800, 184, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFTRIGHT); super.addControl(factory.getControl(TreeView.class, new Object[] { control, new Integer(startControlID.intValue() + 1033), new Integer(anchoringHelper33.getX()), new Integer(anchoringHelper33.getY()), new Integer(anchoringHelper33.getWidth()), new Integer(anchoringHelper33.getHeight()), new Integer(startTabIndex.intValue() + 5), ControlState.DISABLED, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFTRIGHT,Boolean.FALSE, Boolean.TRUE, Boolean.FALSE, null, Boolean.TRUE, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE})); // Dynamic Grid Controls RuntimeAnchoring anchoringHelper34 = new RuntimeAnchoring(designSize, runtimeSize, 16, 32, 800, 296, ims.framework.enumerations.ControlAnchoring.ALL); super.addControl(factory.getControl(DynamicGrid.class, new Object[] { control, new Integer(startControlID.intValue() + 1034), new Integer(anchoringHelper34.getX()), new Integer(anchoringHelper34.getY()), new Integer(anchoringHelper34.getWidth()), new Integer(anchoringHelper34.getHeight()), new Integer(-1), ControlState.READONLY, ControlState.READONLY, ims.framework.enumerations.ControlAnchoring.ALL, null, Boolean.FALSE, Boolean.FALSE, Boolean.TRUE})); } public TreeView treProcedure() { return (TreeView)super.getControl(2); } public DynamicGrid dyngrdMedication() { return (DynamicGrid)super.getControl(3); } } public static class tabPreviewContainer extends LayerBridge { private static final long serialVersionUID = 1L; public void setTabActivatedEvent(ims.framework.delegates.TabActivated delegate) { super.container.setTabActivatedEvent(delegate); } public boolean isInitialized() { return super.container.isInitialized(); } protected void setContext(Form form, ims.framework.interfaces.IAppForm appForm, Control control, FormLoader loader, Images form_images_local, ContextMenus contextMenus, Integer startControlID, ims.framework.utils.SizeInfo designSize, ims.framework.utils.SizeInfo runtimeSize, Integer startTabIndex, boolean skipContextValidation) throws Exception { if(form == null) throw new RuntimeException("Invalid form"); if(appForm == null) throw new RuntimeException("Invalid application form"); if(control == null); // this is to avoid eclipse warning only. if(loader == null); // this is to avoid eclipse warning only. if(form_images_local == null); // this is to avoid eclipse warning only. if(contextMenus == null); // this is to avoid eclipse warning only. if(startControlID == null) throw new RuntimeException("Invalid startControlID"); if(designSize == null); // this is to avoid eclipse warning only. if(runtimeSize == null); // this is to avoid eclipse warning only. if(startTabIndex == null) throw new RuntimeException("Invalid startTabIndex"); // HTML Viewer Controls RuntimeAnchoring anchoringHelper35 = new RuntimeAnchoring(designSize, runtimeSize, 16, 16, 800, 520, ims.framework.enumerations.ControlAnchoring.ALL); super.addControl(factory.getControl(HTMLViewer.class, new Object[] { control, new Integer(startControlID.intValue() + 1035), new Integer(anchoringHelper35.getX()), new Integer(anchoringHelper35.getY()), new Integer(anchoringHelper35.getWidth()), new Integer(anchoringHelper35.getHeight()), new Integer(-1), ControlState.ENABLED, ControlState.ENABLED, ims.framework.enumerations.ControlAnchoring.ALL, Boolean.FALSE, Boolean.TRUE, Boolean.FALSE})); } public HTMLViewer htmReport() { return (HTMLViewer)super.getControl(0); } } protected void setContext(Form form, ims.framework.interfaces.IAppForm appForm, Control control, FormLoader loader, Images form_images_local, ContextMenus contextMenus, Integer startControlID, ims.framework.utils.SizeInfo designSize, ims.framework.utils.SizeInfo runtimeSize, Integer startTabIndex, boolean skipContextValidation) throws Exception { if(form == null) throw new RuntimeException("Invalid form"); if(appForm == null) throw new RuntimeException("Invalid application form"); if(control == null); // this is to avoid eclipse warning only. if(loader == null); // this is to avoid eclipse warning only. if(form_images_local == null); // this is to avoid eclipse warning only. if(contextMenus == null); // this is to avoid eclipse warning only. if(startControlID == null) throw new RuntimeException("Invalid startControlID"); if(designSize == null); // this is to avoid eclipse warning only. if(runtimeSize == null); // this is to avoid eclipse warning only. if(startTabIndex == null) throw new RuntimeException("Invalid startTabIndex"); RuntimeAnchoring anchoringHelper36 = new RuntimeAnchoring(designSize, runtimeSize, 8, 16, 832, 576, ims.framework.enumerations.ControlAnchoring.ALL); Container m_tabRecipents = (Container)factory.getControl(Container.class, new Object[] { control, new Integer(startControlID.intValue() + 1036), new Integer(anchoringHelper36.getX()), new Integer(anchoringHelper36.getY()), new Integer(anchoringHelper36.getWidth()), new Integer(anchoringHelper36.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.ALL,"General Details", new Integer(startControlID.intValue() + 0), new Boolean(true), new Boolean(true), new Boolean(true), new Boolean(true), new Boolean(true), new Boolean(false)}); tabRecipentsContainer m_tabRecipentsContainer = (tabRecipentsContainer)LayerBridgeFlyweightFactory.getInstance().createLayerBridge(tabRecipentsContainer.class, m_tabRecipents, factory); super.addContainer(m_tabRecipents, m_tabRecipentsContainer); ims.framework.utils.SizeInfo m_tabRecipentsDesignSize = new ims.framework.utils.SizeInfo(832, 576); ims.framework.utils.SizeInfo m_tabRecipentsRuntimeSize = new ims.framework.utils.SizeInfo(anchoringHelper36.getWidth(), anchoringHelper36.getHeight()); m_tabRecipentsContainer.setContext(form, appForm, m_tabRecipents, loader, form_images_local, contextMenus, startControlID, m_tabRecipentsDesignSize, m_tabRecipentsRuntimeSize, startTabIndex, skipContextValidation); RuntimeAnchoring anchoringHelper37 = new RuntimeAnchoring(designSize, runtimeSize, 8, 16, 832, 576, ims.framework.enumerations.ControlAnchoring.ALL); Container m_tabCommentsOPD = (Container)factory.getControl(Container.class, new Object[] { control, new Integer(startControlID.intValue() + 1037), new Integer(anchoringHelper37.getX()), new Integer(anchoringHelper37.getY()), new Integer(anchoringHelper37.getWidth()), new Integer(anchoringHelper37.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.ALL,"Outpatient Summary", new Integer(startControlID.intValue() + 0), new Boolean(false), new Boolean(true), new Boolean(true), new Boolean(true), new Boolean(true), new Boolean(false)}); tabCommentsOPDContainer m_tabCommentsOPDContainer = (tabCommentsOPDContainer)LayerBridgeFlyweightFactory.getInstance().createLayerBridge(tabCommentsOPDContainer.class, m_tabCommentsOPD, factory); super.addContainer(m_tabCommentsOPD, m_tabCommentsOPDContainer); ims.framework.utils.SizeInfo m_tabCommentsOPDDesignSize = new ims.framework.utils.SizeInfo(832, 576); ims.framework.utils.SizeInfo m_tabCommentsOPDRuntimeSize = new ims.framework.utils.SizeInfo(anchoringHelper37.getWidth(), anchoringHelper37.getHeight()); m_tabCommentsOPDContainer.setContext(form, appForm, m_tabCommentsOPD, loader, form_images_local, contextMenus, startControlID, m_tabCommentsOPDDesignSize, m_tabCommentsOPDRuntimeSize, startTabIndex, skipContextValidation); RuntimeAnchoring anchoringHelper38 = new RuntimeAnchoring(designSize, runtimeSize, 8, 16, 832, 576, ims.framework.enumerations.ControlAnchoring.ALL); Container m_tabSummaryIP = (Container)factory.getControl(Container.class, new Object[] { control, new Integer(startControlID.intValue() + 1038), new Integer(anchoringHelper38.getX()), new Integer(anchoringHelper38.getY()), new Integer(anchoringHelper38.getWidth()), new Integer(anchoringHelper38.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.ALL,"Discharge Summary", new Integer(startControlID.intValue() + 0), new Boolean(false), new Boolean(true), new Boolean(true), new Boolean(true), new Boolean(true), new Boolean(false)}); tabSummaryIPContainer m_tabSummaryIPContainer = (tabSummaryIPContainer)LayerBridgeFlyweightFactory.getInstance().createLayerBridge(tabSummaryIPContainer.class, m_tabSummaryIP, factory); super.addContainer(m_tabSummaryIP, m_tabSummaryIPContainer); ims.framework.utils.SizeInfo m_tabSummaryIPDesignSize = new ims.framework.utils.SizeInfo(832, 576); ims.framework.utils.SizeInfo m_tabSummaryIPRuntimeSize = new ims.framework.utils.SizeInfo(anchoringHelper38.getWidth(), anchoringHelper38.getHeight()); m_tabSummaryIPContainer.setContext(form, appForm, m_tabSummaryIP, loader, form_images_local, contextMenus, startControlID, m_tabSummaryIPDesignSize, m_tabSummaryIPRuntimeSize, startTabIndex, skipContextValidation); RuntimeAnchoring anchoringHelper39 = new RuntimeAnchoring(designSize, runtimeSize, 8, 16, 832, 576, ims.framework.enumerations.ControlAnchoring.ALL); Container m_tabServices = (Container)factory.getControl(Container.class, new Object[] { control, new Integer(startControlID.intValue() + 1039), new Integer(anchoringHelper39.getX()), new Integer(anchoringHelper39.getY()), new Integer(anchoringHelper39.getWidth()), new Integer(anchoringHelper39.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.ALL,"Procedures / Medication", new Integer(startControlID.intValue() + 0), new Boolean(false), new Boolean(true), new Boolean(true), new Boolean(true), new Boolean(true), new Boolean(false)}); tabServicesContainer m_tabServicesContainer = (tabServicesContainer)LayerBridgeFlyweightFactory.getInstance().createLayerBridge(tabServicesContainer.class, m_tabServices, factory); super.addContainer(m_tabServices, m_tabServicesContainer); ims.framework.utils.SizeInfo m_tabServicesDesignSize = new ims.framework.utils.SizeInfo(832, 576); ims.framework.utils.SizeInfo m_tabServicesRuntimeSize = new ims.framework.utils.SizeInfo(anchoringHelper39.getWidth(), anchoringHelper39.getHeight()); m_tabServicesContainer.setContext(form, appForm, m_tabServices, loader, form_images_local, contextMenus, startControlID, m_tabServicesDesignSize, m_tabServicesRuntimeSize, startTabIndex, skipContextValidation); RuntimeAnchoring anchoringHelper40 = new RuntimeAnchoring(designSize, runtimeSize, 8, 16, 832, 576, ims.framework.enumerations.ControlAnchoring.ALL); Container m_tabPreview = (Container)factory.getControl(Container.class, new Object[] { control, new Integer(startControlID.intValue() + 1040), new Integer(anchoringHelper40.getX()), new Integer(anchoringHelper40.getY()), new Integer(anchoringHelper40.getWidth()), new Integer(anchoringHelper40.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.ALL,"Preview", new Integer(startControlID.intValue() + 0), new Boolean(false), new Boolean(true), new Boolean(true), new Boolean(true), new Boolean(true), new Boolean(false)}); tabPreviewContainer m_tabPreviewContainer = (tabPreviewContainer)LayerBridgeFlyweightFactory.getInstance().createLayerBridge(tabPreviewContainer.class, m_tabPreview, factory); super.addContainer(m_tabPreview, m_tabPreviewContainer); ims.framework.utils.SizeInfo m_tabPreviewDesignSize = new ims.framework.utils.SizeInfo(832, 576); ims.framework.utils.SizeInfo m_tabPreviewRuntimeSize = new ims.framework.utils.SizeInfo(anchoringHelper40.getWidth(), anchoringHelper40.getHeight()); m_tabPreviewContainer.setContext(form, appForm, m_tabPreview, loader, form_images_local, contextMenus, startControlID, m_tabPreviewDesignSize, m_tabPreviewRuntimeSize, startTabIndex, skipContextValidation); } public void hide() { tabRecipents().setVisible(false); tabCommentsOPD().setVisible(false); tabSummaryIP().setVisible(false); tabServices().setVisible(false); tabPreview().setVisible(false); } public void settabRecipentsEnabled(boolean value) { tabRecipents().setEnabled(value); } public void settabCommentsOPDEnabled(boolean value) { tabCommentsOPD().setEnabled(value); } public void settabSummaryIPEnabled(boolean value) { tabSummaryIP().setEnabled(value); } public void settabServicesEnabled(boolean value) { tabServices().setEnabled(value); } public void settabPreviewEnabled(boolean value) { tabPreview().setEnabled(value); } public void showtabRecipents() { tabCommentsOPD().setVisible(false); tabSummaryIP().setVisible(false); tabServices().setVisible(false); tabPreview().setVisible(false); tabRecipents().setVisible(true); } public void showtabCommentsOPD() { tabRecipents().setVisible(false); tabSummaryIP().setVisible(false); tabServices().setVisible(false); tabPreview().setVisible(false); tabCommentsOPD().setVisible(true); } public void showtabSummaryIP() { tabRecipents().setVisible(false); tabCommentsOPD().setVisible(false); tabServices().setVisible(false); tabPreview().setVisible(false); tabSummaryIP().setVisible(true); } public void showtabServices() { tabRecipents().setVisible(false); tabCommentsOPD().setVisible(false); tabSummaryIP().setVisible(false); tabPreview().setVisible(false); tabServices().setVisible(true); } public void showtabPreview() { tabRecipents().setVisible(false); tabCommentsOPD().setVisible(false); tabSummaryIP().setVisible(false); tabServices().setVisible(false); tabPreview().setVisible(true); } public tabRecipentsContainer tabRecipents() { return (tabRecipentsContainer)super.layers.get(0); } public tabCommentsOPDContainer tabCommentsOPD() { return (tabCommentsOPDContainer)super.layers.get(1); } public tabSummaryIPContainer tabSummaryIP() { return (tabSummaryIPContainer)super.layers.get(2); } public tabServicesContainer tabServices() { return (tabServicesContainer)super.layers.get(3); } public tabPreviewContainer tabPreview() { return (tabPreviewContainer)super.layers.get(4); } } private void validateContext(ims.framework.Context context) { if(context == null) return; if(!context.isValidContextType(ims.core.vo.CorrespondenceSearchCriteriaVo.class)) throw new ims.framework.exceptions.CodingRuntimeException("The type 'ims.core.vo.CorrespondenceSearchCriteriaVo' of the global context variable 'Clinical.CurrentCorrespondanceSearchCriteria' is not supported."); if(!context.isValidContextType(ims.core.vo.EpisodeofCareShortVo.class)) throw new ims.framework.exceptions.CodingRuntimeException("The type 'ims.core.vo.EpisodeofCareShortVo' of the global context variable 'Core.EpisodeofCareShort' is not supported."); if(!context.isValidContextType(ims.core.vo.ClinicalNotesVo.class)) throw new ims.framework.exceptions.CodingRuntimeException("The type 'ims.core.vo.ClinicalNotesVo' of the global context variable 'Clinical.CurrentClinicalNote' is not supported."); if(!context.isValidContextType(ims.core.vo.PatientShort.class)) throw new ims.framework.exceptions.CodingRuntimeException("The type 'ims.core.vo.PatientShort' of the global context variable 'Core.PatientShort' is not supported."); if(!context.isValidContextType(ims.core.vo.ClinicalContactShortVo.class)) throw new ims.framework.exceptions.CodingRuntimeException("The type 'ims.core.vo.ClinicalContactShortVo' of the global context variable 'Core.CurrentClinicalContact' is not supported."); if(!context.isValidContextType(ims.core.vo.CareContextShortVo.class)) throw new ims.framework.exceptions.CodingRuntimeException("The type 'ims.core.vo.CareContextShortVo' of the global context variable 'Core.CurrentCareContext' is not supported."); } private void validateMandatoryContext(Context context) { if(new ims.framework.ContextVariable("Core.PatientShort", "_cvp_Core.PatientShort").getValueIsNull(context)) throw new ims.framework.exceptions.FormMandatoryContextMissingException("The required context data 'Core.PatientShort' is not available."); if(new ims.framework.ContextVariable("Core.CurrentCareContext", "_cvp_Core.CurrentCareContext").getValueIsNull(context)) throw new ims.framework.exceptions.FormMandatoryContextMissingException("The required context data 'Core.CurrentCareContext' is not available."); } public boolean supportsRecordedInError() { return false; } public ims.vo.ValueObject getRecordedInErrorVo() { return null; } protected void setContext(FormLoader loader, Form form, ims.framework.interfaces.IAppForm appForm, UIFactory factory, Context context) throws Exception { setContext(loader, form, appForm, factory, context, Boolean.FALSE, new Integer(0), null, null, new Integer(0)); } protected void setContext(FormLoader loader, Form form, ims.framework.interfaces.IAppForm appForm, UIFactory factory, Context context, Boolean skipContextValidation) throws Exception { setContext(loader, form, appForm, factory, context, skipContextValidation, new Integer(0), null, null, new Integer(0)); } protected void setContext(FormLoader loader, Form form, ims.framework.interfaces.IAppForm appForm, UIFactory factory, ims.framework.Context context, Boolean skipContextValidation, Integer startControlID, ims.framework.utils.SizeInfo runtimeSize, ims.framework.Control control, Integer startTabIndex) throws Exception { if(loader == null); // this is to avoid eclipse warning only. if(factory == null); // this is to avoid eclipse warning only. if(runtimeSize == null); // this is to avoid eclipse warning only. if(appForm == null) throw new RuntimeException("Invalid application form"); if(startControlID == null) throw new RuntimeException("Invalid startControlID"); if(control == null); // this is to avoid eclipse warning only. if(startTabIndex == null) throw new RuntimeException("Invalid startTabIndex"); this.context = context; this.componentIdentifier = startControlID.toString(); this.formInfo = form.getFormInfo(); this.globalContext = new GlobalContext(context); if(skipContextValidation == null || !skipContextValidation.booleanValue()) { validateContext(context); validateMandatoryContext(context); } super.setContext(form); ims.framework.utils.SizeInfo designSize = new ims.framework.utils.SizeInfo(848, 632); if(runtimeSize == null) runtimeSize = designSize; form.setWidth(runtimeSize.getWidth()); form.setHeight(runtimeSize.getHeight()); super.setFormReferences(FormReferencesFlyweightFactory.getInstance().create(Forms.class)); super.setImageReferences(ImageReferencesFlyweightFactory.getInstance().create(Images.class)); super.setGlobalContext(ContextBridgeFlyweightFactory.getInstance().create(GlobalContextBridge.class, context, false)); super.setLocalContext(new LocalContext(context, form.getFormInfo(), componentIdentifier)); // Context Menus contextMenus = new ContextMenus(); contextMenus.contextMenuRecipientsOperations = factory.createMenu(startControlID.intValue() + 1); contextMenus.contextMenuRecipientsOperationsADD_GPItem = factory.createMenuItem(startControlID.intValue() + 1, "Add GP", true, false, new Integer(103139), true, false); contextMenus.contextMenuRecipientsOperations.add(contextMenus.contextMenuRecipientsOperationsADD_GPItem); contextMenus.contextMenuRecipientsOperationsADD_PAT_GPItem = factory.createMenuItem(startControlID.intValue() + 2, "Add Patients GP", true, false, new Integer(103139), true, false); contextMenus.contextMenuRecipientsOperations.add(contextMenus.contextMenuRecipientsOperationsADD_PAT_GPItem); contextMenus.contextMenuRecipientsOperationsADD_MOSItem = factory.createMenuItem(startControlID.intValue() + 3, "Add Member of Staff", true, false, new Integer(103140), true, true); contextMenus.contextMenuRecipientsOperations.add(contextMenus.contextMenuRecipientsOperationsADD_MOSItem); contextMenus.contextMenuRecipientsOperationsADD_PATIENTItem = factory.createMenuItem(startControlID.intValue() + 4, "Add patient", true, false, new Integer(103141), true, true); contextMenus.contextMenuRecipientsOperations.add(contextMenus.contextMenuRecipientsOperationsADD_PATIENTItem); contextMenus.contextMenuRecipientsOperationsREMOVEItem = factory.createMenuItem(startControlID.intValue() + 5, "Remove Recipient", true, false, new Integer(102148), true, true); contextMenus.contextMenuRecipientsOperations.add(contextMenus.contextMenuRecipientsOperationsREMOVEItem); form.registerMenu(contextMenus.contextMenuRecipientsOperations); // Layer Clasess lyrDetailsLayer m_lyrDetailsLayer = (lyrDetailsLayer)LayerFlyweightFactory.getInstance().createLayer(lyrDetailsLayer.class, this, factory); super.addLayer(m_lyrDetailsLayer); m_lyrDetailsLayer.setContext(form, appForm, control, loader, this.getImages(), contextMenus, startControlID, designSize, runtimeSize, startTabIndex, skipContextValidation); // Button Controls RuntimeAnchoring anchoringHelper41 = new RuntimeAnchoring(designSize, runtimeSize, 384, 600, 75, 23, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT); super.addControl(factory.getControl(Button.class, new Object[] { control, new Integer(startControlID.intValue() + 1041), new Integer(anchoringHelper41.getX()), new Integer(anchoringHelper41.getY()), new Integer(anchoringHelper41.getWidth()), new Integer(anchoringHelper41.getHeight()), new Integer(startTabIndex.intValue() + 11), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT, "Close", Boolean.FALSE, null, Boolean.FALSE, Boolean.TRUE, Boolean.FALSE, null, ims.framework.utils.Color.Default, ims.framework.utils.Color.Default })); RuntimeAnchoring anchoringHelper42 = new RuntimeAnchoring(designSize, runtimeSize, 8, 600, 75, 23, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT); super.addControl(factory.getControl(Button.class, new Object[] { control, new Integer(startControlID.intValue() + 1042), new Integer(anchoringHelper42.getX()), new Integer(anchoringHelper42.getY()), new Integer(anchoringHelper42.getWidth()), new Integer(anchoringHelper42.getHeight()), new Integer(startTabIndex.intValue() + 10), ControlState.UNKNOWN, ControlState.HIDDEN, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT, "Edit", Boolean.TRUE, null, Boolean.FALSE, Boolean.TRUE, Boolean.FALSE, null, ims.framework.utils.Color.Default, ims.framework.utils.Color.Default })); RuntimeAnchoring anchoringHelper43 = new RuntimeAnchoring(designSize, runtimeSize, 8, 600, 75, 23, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT); super.addControl(factory.getControl(Button.class, new Object[] { control, new Integer(startControlID.intValue() + 1043), new Integer(anchoringHelper43.getX()), new Integer(anchoringHelper43.getY()), new Integer(anchoringHelper43.getWidth()), new Integer(anchoringHelper43.getHeight()), new Integer(startTabIndex.intValue() + 9), ControlState.UNKNOWN, ControlState.HIDDEN, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT, "New", Boolean.TRUE, null, Boolean.FALSE, Boolean.TRUE, Boolean.FALSE, null, ims.framework.utils.Color.Default, ims.framework.utils.Color.Default })); RuntimeAnchoring anchoringHelper44 = new RuntimeAnchoring(designSize, runtimeSize, 765, 600, 75, 23, ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT); super.addControl(factory.getControl(Button.class, new Object[] { control, new Integer(startControlID.intValue() + 1044), new Integer(anchoringHelper44.getX()), new Integer(anchoringHelper44.getY()), new Integer(anchoringHelper44.getWidth()), new Integer(anchoringHelper44.getHeight()), new Integer(startTabIndex.intValue() + 7), ControlState.HIDDEN, ControlState.ENABLED, ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT, "Cancel", Boolean.FALSE, null, Boolean.FALSE, Boolean.TRUE, Boolean.FALSE, null, ims.framework.utils.Color.Default, ims.framework.utils.Color.Default })); RuntimeAnchoring anchoringHelper45 = new RuntimeAnchoring(designSize, runtimeSize, 684, 600, 75, 23, ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT); super.addControl(factory.getControl(Button.class, new Object[] { control, new Integer(startControlID.intValue() + 1045), new Integer(anchoringHelper45.getX()), new Integer(anchoringHelper45.getY()), new Integer(anchoringHelper45.getWidth()), new Integer(anchoringHelper45.getHeight()), new Integer(startTabIndex.intValue() + 6), ControlState.HIDDEN, ControlState.ENABLED, ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT, "Save", Boolean.FALSE, null, Boolean.FALSE, Boolean.TRUE, Boolean.FALSE, null, ims.framework.utils.Color.Default, ims.framework.utils.Color.Default })); } public Forms getForms() { return (Forms)super.getFormReferences(); } public Images getImages() { return (Images)super.getImageReferences(); } public lyrDetailsLayer lyrDetails() { return (lyrDetailsLayer)super.getLayer(0); } public Button btnClose() { return (Button)super.getControl(5); } public Button btnUpdate() { return (Button)super.getControl(6); } public Button btnNew() { return (Button)super.getControl(7); } public Button btnCancel() { return (Button)super.getControl(8); } public Button btnSave() { return (Button)super.getControl(9); } public static class Forms implements java.io.Serializable { private static final long serialVersionUID = 1L; protected final class LocalFormName extends FormName { private static final long serialVersionUID = 1L; private LocalFormName(int name) { super(name); } } private Forms() { Clinical = new ClinicalForms(); Core = new CoreForms(); Admin = new AdminForms(); } public final class ClinicalForms implements java.io.Serializable { private static final long serialVersionUID = 1L; private ClinicalForms() { MedicationOnAdmission = new LocalFormName(122126); EpisodeSummary = new LocalFormName(122109); OutPatientsTreatmentPlan = new LocalFormName(122120); DocumentGeneration = new LocalFormName(122140); DocumentGenerationOP = new LocalFormName(122177); } public final FormName MedicationOnAdmission; public final FormName EpisodeSummary; public final FormName OutPatientsTreatmentPlan; public final FormName DocumentGeneration; public final FormName DocumentGenerationOP; } public final class CoreForms implements java.io.Serializable { private static final long serialVersionUID = 1L; private CoreForms() { GPSelection = new LocalFormName(102137); } public final FormName GPSelection; } public final class AdminForms implements java.io.Serializable { private static final long serialVersionUID = 1L; private AdminForms() { MosSelect = new LocalFormName(103142); } public final FormName MosSelect; } public ClinicalForms Clinical; public CoreForms Core; public AdminForms Admin; } public static class Images implements java.io.Serializable { private static final long serialVersionUID = 1L; private final class ImageHelper extends ims.framework.utils.ImagePath { private static final long serialVersionUID = 1L; private ImageHelper(int id, String path, Integer width, Integer height) { super(id, path, width, height); } } private Images() { COE = new COEImages(); Admin = new AdminImages(); ICP = new ICPImages(); Core = new CoreImages(); } public final class COEImages implements java.io.Serializable { private static final long serialVersionUID = 1L; private COEImages() { Blue = new ImageHelper(101100, "Images/COE/blue12x12.gif", new Integer(12), new Integer(12)); BlueViolet = new ImageHelper(101101, "Images/COE/violet12x12.gif", new Integer(12), new Integer(12)); DarkCyan = new ImageHelper(101102, "Images/COE/darkcyan12x12.gif", new Integer(12), new Integer(12)); LightSeaGreen = new ImageHelper(101104, "Images/COE/LightSeaGreen.gif", new Integer(12), new Integer(12)); LightSkyBlue = new ImageHelper(101105, "Images/COE/lightblue12x12.gif", new Integer(12), new Integer(12)); Turquoise = new ImageHelper(101108, "Images/COE/Turquoise.gif", new Integer(12), new Integer(12)); } public final ims.framework.utils.Image Blue; public final ims.framework.utils.Image BlueViolet; public final ims.framework.utils.Image DarkCyan; public final ims.framework.utils.Image LightSeaGreen; public final ims.framework.utils.Image LightSkyBlue; public final ims.framework.utils.Image Turquoise; } public final class AdminImages implements java.io.Serializable { private static final long serialVersionUID = 1L; private AdminImages() { Activity = new ImageHelper(103111, "Images/Admin/VSObject_Structure.gif", new Integer(16), new Integer(16)); } public final ims.framework.utils.Image Activity; } public final class ICPImages implements java.io.Serializable { private static final long serialVersionUID = 1L; private ICPImages() { Child = new ImageHelper(118100, "Images/ICP/property.gif", new Integer(16), new Integer(16)); } public final ims.framework.utils.Image Child; } public final class CoreImages implements java.io.Serializable { private static final long serialVersionUID = 1L; private CoreImages() { InfoDisabled24 = new ImageHelper(102512, "Images/Core/info_disabled_24.png", new Integer(24), new Integer(24)); InfoEnabled24 = new ImageHelper(102511, "Images/Core/info_enabled_24.png", new Integer(24), new Integer(24)); } public final ims.framework.utils.Image InfoDisabled24; public final ims.framework.utils.Image InfoEnabled24; } public final COEImages COE; public final AdminImages Admin; public final ICPImages ICP; public final CoreImages Core; } public GlobalContext getGlobalContext() { return this.globalContext; } public static class GlobalContextBridge extends ContextBridge { private static final long serialVersionUID = 1L; } public LocalContext getLocalContext() { return (LocalContext)super.getLocalCtx(); } public class LocalContext extends ContextBridge { private static final long serialVersionUID = 1L; public LocalContext(Context context, ims.framework.FormInfo formInfo, String componentIdentifier) { super.setContext(context); String prefix = formInfo.getLocalVariablesPrefix(); cxl_SelectedItem = new ims.framework.ContextVariable("SelectedItem", prefix + "_lv_Clinical.DocumentGeneration.__internal_x_context__SelectedItem_" + componentIdentifier + ""); cxl_ReportChanged = new ims.framework.ContextVariable("ReportChanged", prefix + "_lv_Clinical.DocumentGeneration.__internal_x_context__ReportChanged_" + componentIdentifier + ""); cxl_IsMedicationDataLoaded = new ims.framework.ContextVariable("IsMedicationDataLoaded", prefix + "_lv_Clinical.DocumentGeneration.__internal_x_context__IsMedicationDataLoaded_" + componentIdentifier + ""); cxl_OutpatientSummaryChanged = new ims.framework.ContextVariable("OutpatientSummaryChanged", prefix + "_lv_Clinical.DocumentGeneration.__internal_x_context__OutpatientSummaryChanged_" + componentIdentifier + ""); cxl_Inpatient = new ims.framework.ContextVariable("Inpatient", prefix + "_lv_Clinical.DocumentGeneration.__internal_x_context__Inpatient_" + componentIdentifier + ""); cxl_Outpatient = new ims.framework.ContextVariable("Outpatient", prefix + "_lv_Clinical.DocumentGeneration.__internal_x_context__Outpatient_" + componentIdentifier + ""); } public boolean getSelectedItemIsNotNull() { return !cxl_SelectedItem.getValueIsNull(context); } public ims.clinical.vo.ClinicalCorrespondenceVo getSelectedItem() { return (ims.clinical.vo.ClinicalCorrespondenceVo)cxl_SelectedItem.getValue(context); } public void setSelectedItem(ims.clinical.vo.ClinicalCorrespondenceVo value) { cxl_SelectedItem.setValue(context, value); } private ims.framework.ContextVariable cxl_SelectedItem = null; public boolean getReportChangedIsNotNull() { return !cxl_ReportChanged.getValueIsNull(context); } public Boolean getReportChanged() { return (Boolean)cxl_ReportChanged.getValue(context); } public void setReportChanged(Boolean value) { cxl_ReportChanged.setValue(context, value); } private ims.framework.ContextVariable cxl_ReportChanged = null; public boolean getIsMedicationDataLoadedIsNotNull() { return !cxl_IsMedicationDataLoaded.getValueIsNull(context); } public Boolean getIsMedicationDataLoaded() { return (Boolean)cxl_IsMedicationDataLoaded.getValue(context); } public void setIsMedicationDataLoaded(Boolean value) { cxl_IsMedicationDataLoaded.setValue(context, value); } private ims.framework.ContextVariable cxl_IsMedicationDataLoaded = null; public boolean getOutpatientSummaryChangedIsNotNull() { return !cxl_OutpatientSummaryChanged.getValueIsNull(context); } public Boolean getOutpatientSummaryChanged() { return (Boolean)cxl_OutpatientSummaryChanged.getValue(context); } public void setOutpatientSummaryChanged(Boolean value) { cxl_OutpatientSummaryChanged.setValue(context, value); } private ims.framework.ContextVariable cxl_OutpatientSummaryChanged = null; public boolean getInpatientIsNotNull() { return !cxl_Inpatient.getValueIsNull(context); } public ims.clinical.vo.InpatientDischargeNoteFollowupVo getInpatient() { return (ims.clinical.vo.InpatientDischargeNoteFollowupVo)cxl_Inpatient.getValue(context); } public void setInpatient(ims.clinical.vo.InpatientDischargeNoteFollowupVo value) { cxl_Inpatient.setValue(context, value); } private ims.framework.ContextVariable cxl_Inpatient = null; public boolean getOutpatientIsNotNull() { return !cxl_Outpatient.getValueIsNull(context); } public ims.clinical.vo.OutpatientNotesOutcomeVo getOutpatient() { return (ims.clinical.vo.OutpatientNotesOutcomeVo)cxl_Outpatient.getValue(context); } public void setOutpatient(ims.clinical.vo.OutpatientNotesOutcomeVo value) { cxl_Outpatient.setValue(context, value); } private ims.framework.ContextVariable cxl_Outpatient = null; } public final class ContextMenus implements java.io.Serializable { private static final long serialVersionUID = 1L; public final class RecipientsOperations implements java.io.Serializable { private static final long serialVersionUID = 1L; public static final int ADD_GP = 1; public static final int ADD_PAT_GP = 2; public static final int ADD_MOS = 3; public static final int ADD_PATIENT = 4; public static final int REMOVE = 5; } public void disableAllRecipientsOperationsMenuItems() { this.contextMenuRecipientsOperationsADD_GPItem.setEnabled(false); this.contextMenuRecipientsOperationsADD_PAT_GPItem.setEnabled(false); this.contextMenuRecipientsOperationsADD_MOSItem.setEnabled(false); this.contextMenuRecipientsOperationsADD_PATIENTItem.setEnabled(false); this.contextMenuRecipientsOperationsREMOVEItem.setEnabled(false); } public void hideAllRecipientsOperationsMenuItems() { this.contextMenuRecipientsOperationsADD_GPItem.setVisible(false); this.contextMenuRecipientsOperationsADD_PAT_GPItem.setVisible(false); this.contextMenuRecipientsOperationsADD_MOSItem.setVisible(false); this.contextMenuRecipientsOperationsADD_PATIENTItem.setVisible(false); this.contextMenuRecipientsOperationsREMOVEItem.setVisible(false); } private Menu contextMenuRecipientsOperations; public MenuItem getRecipientsOperationsADD_GPItem() { return this.contextMenuRecipientsOperationsADD_GPItem; } private MenuItem contextMenuRecipientsOperationsADD_GPItem; public MenuItem getRecipientsOperationsADD_PAT_GPItem() { return this.contextMenuRecipientsOperationsADD_PAT_GPItem; } private MenuItem contextMenuRecipientsOperationsADD_PAT_GPItem; public MenuItem getRecipientsOperationsADD_MOSItem() { return this.contextMenuRecipientsOperationsADD_MOSItem; } private MenuItem contextMenuRecipientsOperationsADD_MOSItem; public MenuItem getRecipientsOperationsADD_PATIENTItem() { return this.contextMenuRecipientsOperationsADD_PATIENTItem; } private MenuItem contextMenuRecipientsOperationsADD_PATIENTItem; public MenuItem getRecipientsOperationsREMOVEItem() { return this.contextMenuRecipientsOperationsREMOVEItem; } private MenuItem contextMenuRecipientsOperationsREMOVEItem; } private ContextMenus contextMenus; public ContextMenus getContextMenus() { return this.contextMenus; } private IReportField[] getFormReportFields() { if(this.context == null) return null; if(this.reportFields == null) this.reportFields = new ReportFields(this.context, this.formInfo, this.componentIdentifier).getReportFields(); return this.reportFields; } private class ReportFields { public ReportFields(Context context, ims.framework.FormInfo formInfo, String componentIdentifier) { this.context = context; this.formInfo = formInfo; this.componentIdentifier = componentIdentifier; } public IReportField[] getReportFields() { String prefix = formInfo.getLocalVariablesPrefix(); IReportField[] fields = new IReportField[172]; fields[0] = new ims.framework.ReportField(this.context, "_cvp_Core.PatientShort", "BO-1001100000-ID", "ID_Patient"); fields[1] = new ims.framework.ReportField(this.context, "_cvp_Core.PatientShort", "BO-1001100000-SEX", "Sex"); fields[2] = new ims.framework.ReportField(this.context, "_cvp_Core.PatientShort", "BO-1001100000-DOB", "Dob"); fields[3] = new ims.framework.ReportField(this.context, "_cvp_Core.PatientShort", "BO-1001100000-DOD", "Dod"); fields[4] = new ims.framework.ReportField(this.context, "_cvp_Core.PatientShort", "BO-1001100000-RELIGION", "Religion"); fields[5] = new ims.framework.ReportField(this.context, "_cvp_Core.PatientShort", "BO-1001100000-ISACTIVE", "IsActive"); fields[6] = new ims.framework.ReportField(this.context, "_cvp_Core.PatientShort", "BO-1001100000-ETHNICORIGIN", "EthnicOrigin"); fields[7] = new ims.framework.ReportField(this.context, "_cvp_Core.PatientShort", "BO-1001100000-MARITALSTATUS", "MaritalStatus"); fields[8] = new ims.framework.ReportField(this.context, "_cvp_Core.PatientShort", "BO-1001100000-SCN", "SCN"); fields[9] = new ims.framework.ReportField(this.context, "_cvp_Core.PatientShort", "BO-1001100000-SOURCEOFINFORMATION", "SourceOfInformation"); fields[10] = new ims.framework.ReportField(this.context, "_cvp_Core.PatientShort", "BO-1001100000-TIMEOFDEATH", "TimeOfDeath"); fields[11] = new ims.framework.ReportField(this.context, "_cvp_Core.PatientShort", "BO-1001100000-ISQUICKREGISTRATIONPATIENT", "IsQuickRegistrationPatient"); fields[12] = new ims.framework.ReportField(this.context, "_cvp_Core.PatientShort", "BO-1001100000-CURRENTRESPONSIBLECONSULTANT", "CurrentResponsibleConsultant"); fields[13] = new ims.framework.ReportField(this.context, "_cvp_Core.PatientShort", "BO-1001100000-DEMENTIABREACHDATETIME", "DementiaBreachDateTime"); fields[14] = new ims.framework.ReportField(this.context, "_cvp_Core.PatientShort", "BO-1001100000-DEMENTIAWORKLISTSTATUS", "DementiaWorklistStatus"); fields[15] = new ims.framework.ReportField(this.context, "_cvp_Core.PatientShort", "BO-1001100000-MRNSTATUS", "MRNStatus"); fields[16] = new ims.framework.ReportField(this.context, "_cvp_Core.PatientShort", "BO-1001100000-HASSCANNEDCASENOTEFOLDERS", "HasScannedCaseNoteFolders"); fields[17] = new ims.framework.ReportField(this.context, "_cvp_Core.PatientShort", "BO-1001100000-ISCONFIDENTIAL", "IsConfidential"); fields[18] = new ims.framework.ReportField(this.context, "_cvp_Core.PatientShort", "BO-1001100000-TIMEOFBIRTH", "TimeOfBirth"); fields[19] = new ims.framework.ReportField(this.context, "_cvp_Core.PatientShort", "BO-1001100000-PATIENTCATEGORY", "PatientCategory"); fields[20] = new ims.framework.ReportField(this.context, "_cvp_Core.PatientFilter", "BO-1001100000-ID", "ID_Patient"); fields[21] = new ims.framework.ReportField(this.context, "_cvp_Core.PatientFilter", "BO-1001100000-SEX", "Sex"); fields[22] = new ims.framework.ReportField(this.context, "_cvp_Core.PatientFilter", "BO-1001100000-DOB", "Dob"); fields[23] = new ims.framework.ReportField(this.context, "_cvp_Core.CurrentClinicalContact", "BO-1004100003-ID", "ID_ClinicalContact"); fields[24] = new ims.framework.ReportField(this.context, "_cvp_Core.CurrentClinicalContact", "BO-1004100003-SPECIALTY", "Specialty"); fields[25] = new ims.framework.ReportField(this.context, "_cvp_Core.CurrentClinicalContact", "BO-1004100003-CONTACTTYPE", "ContactType"); fields[26] = new ims.framework.ReportField(this.context, "_cvp_Core.CurrentClinicalContact", "BO-1004100003-STARTDATETIME", "StartDateTime"); fields[27] = new ims.framework.ReportField(this.context, "_cvp_Core.CurrentClinicalContact", "BO-1004100003-ENDDATETIME", "EndDateTime"); fields[28] = new ims.framework.ReportField(this.context, "_cvp_Core.CurrentClinicalContact", "BO-1004100003-CARECONTEXT", "CareContext"); fields[29] = new ims.framework.ReportField(this.context, "_cvp_Core.CurrentClinicalContact", "BO-1004100003-ISCLINICALNOTECREATED", "IsClinicalNoteCreated"); fields[30] = new ims.framework.ReportField(this.context, "_cvp_Core.RecordingHCP", "BO-1006100000-ID", "ID_Hcp"); fields[31] = new ims.framework.ReportField(this.context, "_cvp_Core.RecordingHCP", "BO-1006100000-HCPTYPE", "HcpType"); fields[32] = new ims.framework.ReportField(this.context, "_cvp_Core.RecordingHCP", "BO-1006100000-ISACTIVE", "IsActive"); fields[33] = new ims.framework.ReportField(this.context, "_cvp_Core.RecordingHCP", "BO-1006100000-ISHCPARESPONSIBLEHCP", "IsHCPaResponsibleHCP"); fields[34] = new ims.framework.ReportField(this.context, "_cvp_Core.RecordingHCP", "BO-1006100000-ISARESPONSIBLEEDCLINICIAN", "IsAResponsibleEDClinician"); fields[35] = new ims.framework.ReportField(this.context, "_cvp_Core.RecordingHCP", "BO-1006100000-ISHCPAENDOSCOPIST", "IsHCPaEndoscopist"); fields[36] = new ims.framework.ReportField(this.context, "_cvp_Core.CurrentCareContext", "BO-1004100019-ID", "ID_CareContext"); fields[37] = new ims.framework.ReportField(this.context, "_cvp_Core.CurrentCareContext", "BO-1004100019-CONTEXT", "Context"); fields[38] = new ims.framework.ReportField(this.context, "_cvp_Core.CurrentCareContext", "BO-1004100019-ORDERINGHOSPITAL", "OrderingHospital"); fields[39] = new ims.framework.ReportField(this.context, "_cvp_Core.CurrentCareContext", "BO-1004100019-ESTIMATEDDISCHARGEDATE", "EstimatedDischargeDate"); fields[40] = new ims.framework.ReportField(this.context, "_cvp_Core.CurrentCareContext", "BO-1004100019-STARTDATETIME", "StartDateTime"); fields[41] = new ims.framework.ReportField(this.context, "_cvp_Core.CurrentCareContext", "BO-1004100019-ENDDATETIME", "EndDateTime"); fields[42] = new ims.framework.ReportField(this.context, "_cvp_Core.CurrentCareContext", "BO-1004100019-LOCATIONTYPE", "LocationType"); fields[43] = new ims.framework.ReportField(this.context, "_cvp_Core.CurrentCareContext", "BO-1004100019-RESPONSIBLEHCP", "ResponsibleHCP"); fields[44] = new ims.framework.ReportField(this.context, "_cvp_Core.EpisodeofCareShort", "BO-1004100018-ID", "ID_EpisodeOfCare"); fields[45] = new ims.framework.ReportField(this.context, "_cvp_Core.EpisodeofCareShort", "BO-1004100018-CARESPELL", "CareSpell"); fields[46] = new ims.framework.ReportField(this.context, "_cvp_Core.EpisodeofCareShort", "BO-1004100018-SPECIALTY", "Specialty"); fields[47] = new ims.framework.ReportField(this.context, "_cvp_Core.EpisodeofCareShort", "BO-1004100018-RELATIONSHIP", "Relationship"); fields[48] = new ims.framework.ReportField(this.context, "_cvp_Core.EpisodeofCareShort", "BO-1004100018-STARTDATE", "StartDate"); fields[49] = new ims.framework.ReportField(this.context, "_cvp_Core.EpisodeofCareShort", "BO-1004100018-ENDDATE", "EndDate"); fields[50] = new ims.framework.ReportField(this.context, "_cvp_Clinical.CurrentClinicalNote", "BO-1011100000-ID", "ID_ClinicalNotes"); fields[51] = new ims.framework.ReportField(this.context, "_cvp_Clinical.CurrentClinicalNote", "BO-1011100000-CLINICALNOTE", "ClinicalNote"); fields[52] = new ims.framework.ReportField(this.context, "_cvp_Clinical.CurrentClinicalNote", "BO-1011100000-NOTETYPE", "NoteType"); fields[53] = new ims.framework.ReportField(this.context, "_cvp_Clinical.CurrentClinicalNote", "BO-1011100000-DISCIPLINE", "Discipline"); fields[54] = new ims.framework.ReportField(this.context, "_cvp_Clinical.CurrentClinicalNote", "BO-1011100000-CLINICALCONTACT", "ClinicalContact"); fields[55] = new ims.framework.ReportField(this.context, "_cvp_Clinical.CurrentClinicalNote", "BO-1011100000-ISDERIVEDNOTE", "IsDerivedNote"); fields[56] = new ims.framework.ReportField(this.context, "_cvp_Clinical.CurrentClinicalNote", "BO-1011100000-FORREVIEW", "ForReview"); fields[57] = new ims.framework.ReportField(this.context, "_cvp_Clinical.CurrentClinicalNote", "BO-1011100000-FORREVIEWDISCIPLINE", "ForReviewDiscipline"); fields[58] = new ims.framework.ReportField(this.context, "_cvp_Clinical.CurrentClinicalNote", "BO-1011100000-REVIEWINGDATETIME", "ReviewingDateTime"); fields[59] = new ims.framework.ReportField(this.context, "_cvp_Clinical.CurrentClinicalNote", "BO-1011100000-ISCORRECTED", "IsCorrected"); fields[60] = new ims.framework.ReportField(this.context, "_cvp_Clinical.CurrentClinicalNote", "BO-1011100000-ISTRANSCRIBED", "IsTranscribed"); fields[61] = new ims.framework.ReportField(this.context, "_cvp_Clinical.CurrentClinicalNote", "BO-1011100000-SOURCEOFNOTE", "SourceOfNote"); fields[62] = new ims.framework.ReportField(this.context, "_cvp_Clinical.CurrentClinicalNote", "BO-1011100000-RECORDINGDATETIME", "RecordingDateTime"); fields[63] = new ims.framework.ReportField(this.context, "_cvp_Clinical.CurrentClinicalNote", "BO-1011100000-INHOSPITALREPORT", "InHospitalReport"); fields[64] = new ims.framework.ReportField(this.context, "_cvp_Clinical.CurrentClinicalNote", "BO-1011100000-CARECONTEXT", "CareContext"); fields[65] = new ims.framework.ReportField(this.context, "_cvp_Clinical.CurrentClinicalNote", "BO-1011100000-NOTECLASSIFICATION", "NoteClassification"); fields[66] = new ims.framework.ReportField(this.context, "_cvp_Naes.Referral", "BO-1097100004-ID", "ID_NAESReferral"); fields[67] = new ims.framework.ReportField(this.context, "_cvp_Naes.Referral", "BO-1097100004-DATEREFERRALRECEIVED", "DateReferralReceived"); fields[68] = new ims.framework.ReportField(this.context, "_cvp_Naes.Referral", "BO-1097100004-DATEOFSURGERY", "DateOfSurgery"); fields[69] = new ims.framework.ReportField(this.context, "_cvp_Naes.Referral", "BO-1097100004-REFERRINGHOSPITAL", "ReferringHospital"); fields[70] = new ims.framework.ReportField(this.context, "_cvp_Naes.Referral", "BO-1097100004-REFERRINGDOCTOR", "ReferringDoctor"); fields[71] = new ims.framework.ReportField(this.context, "_cvp_Naes.Referral", "BO-1097100004-REFERRALREASON", "ReferralReason"); fields[72] = new ims.framework.ReportField(this.context, "_cvp_Naes.Referral", "BO-1097100004-SECONDARYSURGERY", "SecondarySurgery"); fields[73] = new ims.framework.ReportField(this.context, "_cvp_Naes.Referral", "BO-1097100004-UNDERLYINGREASON", "UnderlyingReason"); fields[74] = new ims.framework.ReportField(this.context, "_cvp_Naes.Referral", "BO-1097100004-AFFECTEDEYE", "AffectedEye"); fields[75] = new ims.framework.ReportField(this.context, "_cvp_Naes.Referral", "BO-1097100004-IMPLANT", "Implant"); fields[76] = new ims.framework.ReportField(this.context, "_cvp_Naes.Referral", "BO-1097100004-IMPLANTTYPE", "ImplantType"); fields[77] = new ims.framework.ReportField(this.context, "_cvp_Naes.Referral", "BO-1097100004-INTERPRETERREQUIRED", "InterpreterRequired"); fields[78] = new ims.framework.ReportField(this.context, "_cvp_Naes.Referral", "BO-1097100004-LANGUAGE", "Language"); fields[79] = new ims.framework.ReportField(this.context, "_cvp_Naes.Referral", "BO-1097100004-LANGUAGEIFOTHER", "LanguageIfOther"); fields[80] = new ims.framework.ReportField(this.context, "_cvp_Naes.Referral", "BO-1097100004-REFERREDBY", "ReferredBy"); fields[81] = new ims.framework.ReportField(this.context, "_cvp_Naes.Referral", "BO-1097100004-_6WEEKKPI", "SixWeekKPI"); fields[82] = new ims.framework.ReportField(this.context, "_cvp_Naes.Referral", "BO-1097100004-_3WEEKKPI", "ThreeWeekKPI"); fields[83] = new ims.framework.ReportField(this.context, "_cvp_Naes.Referral", "BO-1097100004-PREFERREDCLINIC", "PreferredClinic"); fields[84] = new ims.framework.ReportField(this.context, "_cvp_Naes.Referral", "BO-1097100004-NOTES", "Notes"); fields[85] = new ims.framework.ReportField(this.context, "_cvp_STHK.AvailableBedsListFilter", "BO-1014100009-ID", "ID_BedSpaceState"); fields[86] = new ims.framework.ReportField(this.context, "_cvp_STHK.PendingEmergencyAdmissionsFilter", "BO-1014100011-ID", "ID_PendingEmergencyAdmission"); fields[87] = new ims.framework.ReportField(this.context, "_cvp_STHK.PendingEmergencyAdmissionsFilter", "BO-1014100011-ADMISSIONSTATUS", "AdmissionStatus"); fields[88] = new ims.framework.ReportField(this.context, "_cvp_STHK.PendingDischargesListFilter", "BO-1014100000-ID", "ID_InpatientEpisode"); fields[89] = new ims.framework.ReportField(this.context, "_cvp_STHK.PendingDischargesListFilter", "BO-1014100000-ESTDISCHARGEDATE", "EstDischargeDate"); fields[90] = new ims.framework.ReportField(this.context, "_cvp_Clinical.ExtendedClinicalNotesListFilter", "BO-1011100000-ID", "ID_ClinicalNotes"); fields[91] = new ims.framework.ReportField(this.context, "_cvp_Clinical.ExtendedClinicalNotesListFilter", "BO-1011100000-FORREVIEW", "ForReview"); fields[92] = new ims.framework.ReportField(this.context, "_cvp_Clinical.ExtendedClinicalNotesListFilter", "BO-1011100000-FORREVIEWDISCIPLINE", "ForReviewDiscipline"); fields[93] = new ims.framework.ReportField(this.context, "_cvp_Clinical.ExtendedClinicalNotesListFilter", "BO-1011100000-NOTECLASSIFICATION", "NoteClassification"); fields[94] = new ims.framework.ReportField(this.context, "_cvp_Clinical.ExtendedClinicalNotesListFilter", "BO-1011100000-CARECONTEXT", "CareContext"); fields[95] = new ims.framework.ReportField(this.context, "_cvp_Core.PatientClinicalNotesSearchCriteria", "BO-1011100000-ID", "ID_ClinicalNotes"); fields[96] = new ims.framework.ReportField(this.context, "_cvp_Core.PatientClinicalNotesSearchCriteria", "BO-1011100000-NOTETYPE", "NoteType"); fields[97] = new ims.framework.ReportField(this.context, "_cvp_Core.PatientClinicalNotesSearchCriteria", "BO-1011100000-FORREVIEW", "ForReview"); fields[98] = new ims.framework.ReportField(this.context, "_cvp_Core.PatientClinicalNotesSearchCriteria", "BO-1011100000-FORREVIEWDISCIPLINE", "ForReviewDiscipline"); fields[99] = new ims.framework.ReportField(this.context, "_cvp_Nursing.ObservationFormsSearchCriteria", "BO-1011100002-ID", "ID_ObservationForm"); fields[100] = new ims.framework.ReportField(this.context, "_cvp_Nursing.ObservationFormsSearchCriteria", "BO-1011100002-FORMTYPE", "FormType"); fields[101] = new ims.framework.ReportField(this.context, "_cvp_Nursing.ObservationFormsSearchCriteria", "BO-1011100002-DETAILS", "Details"); fields[102] = new ims.framework.ReportField(this.context, "_cvp_Nursing.ObservationFormsSearchCriteria", "BO-1011100002-DATETIMESTART", "DateTimeStart"); fields[103] = new ims.framework.ReportField(this.context, "_cvp_Nursing.ObservationFormsSearchCriteria", "BO-1011100002-DATETIMESTOP", "DateTimeStop"); fields[104] = new ims.framework.ReportField(this.context, "_cvp_Nursing.ObservationFormsSearchCriteria", "BO-1011100002-ISSTOPPED", "IsStopped"); fields[105] = new ims.framework.ReportField(this.context, "_cvp_Nursing.ObservationFormsSearchCriteria", "BO-1011100002-CARECONTEXT", "CareContext"); fields[106] = new ims.framework.ReportField(this.context, "_cvp_Nursing.ObservationFormsSearchCriteria", "BO-1011100002-CLINICALCONTACT", "ClinicalContact"); fields[107] = new ims.framework.ReportField(this.context, "_cvp_Clinical.MedMultipleDosesAdmSearchCriteia", "BO-1072100034-ID", "ID_MedicationOverview"); fields[108] = new ims.framework.ReportField(this.context, "_cvp_Clinical.MedMultipleDosesAdmSearchCriteia", "BO-1072100034-TYPE", "Type"); fields[109] = new ims.framework.ReportField(this.context, "_cvp_Clinical.MedMultipleDosesAdmSearchCriteia", "BO-1072100034-CARECONTEXT", "CareContext"); fields[110] = new ims.framework.ReportField(this.context, "_cvp_Clinical.MedMultipleDosesDisSearchCriteria", "BO-1072100034-ID", "ID_MedicationOverview"); fields[111] = new ims.framework.ReportField(this.context, "_cvp_Clinical.MedMultipleDosesDisSearchCriteria", "BO-1072100034-TYPE", "Type"); fields[112] = new ims.framework.ReportField(this.context, "_cvp_Clinical.MedMultipleDosesDisSearchCriteria", "BO-1072100034-CARECONTEXT", "CareContext"); fields[113] = new ims.framework.ReportField(this.context, "_cvp_Clinical.MedMultipleDosesOPDSearchCriteria", "BO-1072100034-ID", "ID_MedicationOverview"); fields[114] = new ims.framework.ReportField(this.context, "_cvp_Clinical.MedMultipleDosesOPDSearchCriteria", "BO-1072100034-TYPE", "Type"); fields[115] = new ims.framework.ReportField(this.context, "_cvp_Clinical.MedMultipleDosesOPDSearchCriteria", "BO-1072100034-CARECONTEXT", "CareContext"); fields[116] = new ims.framework.ReportField(this.context, "_cvp_Clinical.MedMultipleDosesPatSearchCriteria", "BO-1072100034-ID", "ID_MedicationOverview"); fields[117] = new ims.framework.ReportField(this.context, "_cvp_Clinical.MedMultipleDosesPatSearchCriteria", "BO-1072100034-TYPE", "Type"); fields[118] = new ims.framework.ReportField(this.context, "_cvp_Clinical.MedMultipleDosesPatSearchCriteria", "BO-1072100034-CARECONTEXT", "CareContext"); fields[119] = new ims.framework.ReportField(this.context, "_cvp_Core.UrinalysisSearchCriteria", "BO-1022100012-ID", "ID_Urinalysis"); fields[120] = new ims.framework.ReportField(this.context, "_cvp_Core.UrinalysisSearchCriteria", "BO-1022100012-NOABNORMALITYDETECTED", "NoAbnormalityDetected"); fields[121] = new ims.framework.ReportField(this.context, "_cvp_Core.UrinalysisSearchCriteria", "BO-1022100012-LEUCOCYTES", "Leucocytes"); fields[122] = new ims.framework.ReportField(this.context, "_cvp_Core.UrinalysisSearchCriteria", "BO-1022100012-PROTEIN", "Protein"); fields[123] = new ims.framework.ReportField(this.context, "_cvp_Core.UrinalysisSearchCriteria", "BO-1022100012-BLOOD", "Blood"); fields[124] = new ims.framework.ReportField(this.context, "_cvp_Core.UrinalysisSearchCriteria", "BO-1022100012-KETONES", "Ketones"); fields[125] = new ims.framework.ReportField(this.context, "_cvp_Core.UrinalysisSearchCriteria", "BO-1022100012-ASCORBICACID", "AscorbicAcid"); fields[126] = new ims.framework.ReportField(this.context, "_cvp_Core.UrinalysisSearchCriteria", "BO-1022100012-GLUCOSE", "Glucose"); fields[127] = new ims.framework.ReportField(this.context, "_cvp_Core.UrinalysisSearchCriteria", "BO-1022100012-BILIRUBIN", "Bilirubin"); fields[128] = new ims.framework.ReportField(this.context, "_cvp_Core.UrinalysisSearchCriteria", "BO-1022100012-UROBILINOGEN", "Urobilinogen"); fields[129] = new ims.framework.ReportField(this.context, "_cvp_Core.UrinalysisSearchCriteria", "BO-1022100012-NITRATE", "Nitrate"); fields[130] = new ims.framework.ReportField(this.context, "_cvp_Core.UrinalysisSearchCriteria", "BO-1022100012-PH", "PH"); fields[131] = new ims.framework.ReportField(this.context, "_cvp_Core.UrinalysisSearchCriteria", "BO-1022100012-SPECIFICGRAVITY", "SpecificGravity"); fields[132] = new ims.framework.ReportField(this.context, "_cvp_Core.UrinalysisSearchCriteria", "BO-1022100012-NOSAMPLE", "NoSample"); fields[133] = new ims.framework.ReportField(this.context, "_cvp_Core.UrinalysisSearchCriteria", "BO-1022100012-ISACTIVE", "IsActive"); fields[134] = new ims.framework.ReportField(this.context, "_cvp_Core.UrinalysisSearchCriteria", "BO-1022100012-CARECONTEXT", "CareContext"); fields[135] = new ims.framework.ReportField(this.context, "_cvp_Core.PDSPatientFilterSearchCriteria", "BO-1001100000-ID", "ID_Patient"); fields[136] = new ims.framework.ReportField(this.context, "_cvp_Core.PDSPatientFilterSearchCriteria", "BO-1001100000-SEX", "Sex"); fields[137] = new ims.framework.ReportField(this.context, "_cvp_Core.PDSPatientFilterSearchCriteria", "BO-1001100000-DOB", "Dob"); fields[138] = new ims.framework.ReportField(this.context, "_cvp_Core.LocalPatientFilterSearchCriteria", "BO-1001100000-ID", "ID_Patient"); fields[139] = new ims.framework.ReportField(this.context, "_cvp_Core.LocalPatientFilterSearchCriteria", "BO-1001100000-SEX", "Sex"); fields[140] = new ims.framework.ReportField(this.context, "_cvp_Core.LocalPatientFilterSearchCriteria", "BO-1001100000-DOB", "Dob"); fields[141] = new ims.framework.ReportField(this.context, "_cvp_Core.PasEvent", "BO-1014100003-ID", "ID_PASEvent"); fields[142] = new ims.framework.ReportField(this.context, "_cvp_Correspondence.CorrespondenceDetails", "BO-1052100001-ID", "ID_CorrespondenceDetails"); fields[143] = new ims.framework.ReportField(this.context, "_cvp_RefMan.CatsReferral", "BO-1004100035-ID", "ID_CatsReferral"); fields[144] = new ims.framework.ReportField(this.context, "_cv_Core.GPDetails", "BO-1006100001-ID", "ID_Gp"); fields[145] = new ims.framework.ReportField(this.context, "_cv_Core.GPDetails", "BO-1006100001-STATUS", "Status"); fields[146] = new ims.framework.ReportField(this.context, "_cv_Clinical.CurrentClinicalCorrespondanceLiteVo", "BO-1072100040-ID", "ID_ClinicalCorrespondence"); fields[147] = new ims.framework.ReportField(this.context, "_cv_Clinical.CurrentClinicalCorrespondanceLiteVo", "BO-1072100040-VERIFYINGDATETIME", "VerifyingDateTime"); fields[148] = new ims.framework.ReportField(this.context, "_cv_Clinical.CurrentClinicalCorrespondanceLiteVo", "BO-1072100040-HASOBJECTIVENOTE", "HasObjectiveNote"); fields[149] = new ims.framework.ReportField(this.context, "_cv_Clinical.CurrentClinicalCorrespondanceLiteVo", "BO-1072100040-HASPLANNOTE", "HasPlanNote"); fields[150] = new ims.framework.ReportField(this.context, "_cv_Clinical.CurrentClinicalCorrespondanceLiteVo", "BO-1072100040-HASINSTRUCTIONSNOTE", "HasInstructionsNote"); fields[151] = new ims.framework.ReportField(this.context, "_cv_Clinical.CurrentClinicalCorrespondanceLiteVo", "BO-1072100040-TYPE", "Type"); fields[152] = new ims.framework.ReportField(this.context, prefix + "_lv_Clinical.DocumentGeneration.__internal_x_context__SelectedItem_" + componentIdentifier, "BO-1072100040-ID", "ID_ClinicalCorrespondence"); fields[153] = new ims.framework.ReportField(this.context, prefix + "_lv_Clinical.DocumentGeneration.__internal_x_context__SelectedItem_" + componentIdentifier, "BO-1072100040-VERIFYINGDATETIME", "VerifyingDateTime"); fields[154] = new ims.framework.ReportField(this.context, prefix + "_lv_Clinical.DocumentGeneration.__internal_x_context__SelectedItem_" + componentIdentifier, "BO-1072100040-HASOBJECTIVENOTE", "HasObjectiveNote"); fields[155] = new ims.framework.ReportField(this.context, prefix + "_lv_Clinical.DocumentGeneration.__internal_x_context__SelectedItem_" + componentIdentifier, "BO-1072100040-HASPLANNOTE", "HasPlanNote"); fields[156] = new ims.framework.ReportField(this.context, prefix + "_lv_Clinical.DocumentGeneration.__internal_x_context__SelectedItem_" + componentIdentifier, "BO-1072100040-HASINSTRUCTIONSNOTE", "HasInstructionsNote"); fields[157] = new ims.framework.ReportField(this.context, prefix + "_lv_Clinical.DocumentGeneration.__internal_x_context__SelectedItem_" + componentIdentifier, "BO-1072100040-TYPE", "Type"); fields[158] = new ims.framework.ReportField(this.context, prefix + "_lv_Clinical.DocumentGeneration.__internal_x_context__SelectedItem_" + componentIdentifier, "BO-1072100040-MEDICATION", "Medication"); fields[159] = new ims.framework.ReportField(this.context, prefix + "_lv_Clinical.DocumentGeneration.__internal_x_context__SelectedItem_" + componentIdentifier, "BO-1072100040-RUSERVERIFYINGDATETIME", "RUserVerifyingDateTime"); fields[160] = new ims.framework.ReportField(this.context, prefix + "_lv_Clinical.DocumentGeneration.__internal_x_context__Inpatient_" + componentIdentifier, "BO-1072100050-ID", "ID_InpatientDischargeNoteFollowup"); fields[161] = new ims.framework.ReportField(this.context, prefix + "_lv_Clinical.DocumentGeneration.__internal_x_context__Inpatient_" + componentIdentifier, "BO-1072100050-OUTCOME", "Outcome"); fields[162] = new ims.framework.ReportField(this.context, prefix + "_lv_Clinical.DocumentGeneration.__internal_x_context__Inpatient_" + componentIdentifier, "BO-1072100050-REVIEWIN", "ReviewIn"); fields[163] = new ims.framework.ReportField(this.context, prefix + "_lv_Clinical.DocumentGeneration.__internal_x_context__Inpatient_" + componentIdentifier, "BO-1072100050-REVIEWINUNITS", "ReviewinUnits"); fields[164] = new ims.framework.ReportField(this.context, prefix + "_lv_Clinical.DocumentGeneration.__internal_x_context__Inpatient_" + componentIdentifier, "BO-1072100050-CARECONTEXT", "CareContext"); fields[165] = new ims.framework.ReportField(this.context, prefix + "_lv_Clinical.DocumentGeneration.__internal_x_context__Outpatient_" + componentIdentifier, "BO-1072100046-ID", "ID_OutpatientNotesOutcome"); fields[166] = new ims.framework.ReportField(this.context, prefix + "_lv_Clinical.DocumentGeneration.__internal_x_context__Outpatient_" + componentIdentifier, "BO-1072100046-INSTRUCTIONNEXTCLINIC", "InstructionNextClinic"); fields[167] = new ims.framework.ReportField(this.context, prefix + "_lv_Clinical.DocumentGeneration.__internal_x_context__Outpatient_" + componentIdentifier, "BO-1072100046-OUTCOME", "Outcome"); fields[168] = new ims.framework.ReportField(this.context, prefix + "_lv_Clinical.DocumentGeneration.__internal_x_context__Outpatient_" + componentIdentifier, "BO-1072100046-REVIEWIN", "ReviewIn"); fields[169] = new ims.framework.ReportField(this.context, prefix + "_lv_Clinical.DocumentGeneration.__internal_x_context__Outpatient_" + componentIdentifier, "BO-1072100046-REVIEWINUNITS", "ReviewinUnits"); fields[170] = new ims.framework.ReportField(this.context, prefix + "_lv_Clinical.DocumentGeneration.__internal_x_context__Outpatient_" + componentIdentifier, "BO-1072100046-CARECONTEXT", "CareContext"); fields[171] = new ims.framework.ReportField(this.context, prefix + "_lv_Clinical.DocumentGeneration.__internal_x_context__Outpatient_" + componentIdentifier, "BO-1072100046-CLINICALCONTACT", "ClinicalContact"); return fields; } protected Context context = null; protected ims.framework.FormInfo formInfo; protected String componentIdentifier; } public String getUniqueIdentifier() { return null; } private Context context = null; private ims.framework.FormInfo formInfo = null; private String componentIdentifier; private GlobalContext globalContext = null; private IReportField[] reportFields = null; }
FreudianNM/openMAXIMS
Source Library/openmaxims_workspace/Clinical/src/ims/clinical/forms/documentgeneration/GenForm.java
Java
agpl-3.0
121,453
/** * Shopware 5 * Copyright (c) shopware AG * * According to our dual licensing model, this program can be used either * under the terms of the GNU Affero General Public License, version 3, * or under a proprietary license. * * The texts of the GNU Affero General Public License with an additional * permission and of our proprietary license can be found at and * in the LICENSE file you have received along with this program. * * 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. * * "Shopware" is a registered trademark of shopware AG. * The licensing of the program under the AGPLv3 does not imply a * trademark license. Therefore any rights, title and interest in * our trademarks remain entirely with us. */ //{namespace name=backend/article_list/main} //{block name="backend/article_list/view/main/grid"} Ext.define('Shopware.apps.ArticleList.view.main.Grid', { extend: 'Ext.grid.Panel', alias: 'widget.multi-edit-main-grid', /** * Make the grid statefull */ stateful: true, /** * StateId (used in the cookiename later) */ stateId: 'multiedit-grid', /** * Variant active column */ detailActiveColumn: null, snippets: { 'Article_id': '{s name=columns/product/Article_id}Article_id{/s}', 'Article_mainDetailId': '{s name=columns/product/Article_mainDetailId}Article_mainDetailId{/s}', 'Article_supplierId': '{s name=columns/product/Article_supplierId}Article_supplierId{/s}', 'Article_taxId': '{s name=columns/product/Article_taxId}Article_taxId{/s}', 'Article_priceGroupId': '{s name=columns/product/Article_priceGroupId}Article_priceGroupId{/s}', 'Article_filterGroupId': '{s name=columns/product/Article_filterGroupId}Article_filterGroupId{/s}', 'Article_configuratorSetId': '{s name=columns/product/Article_configuratorSetId}Article_configuratorSetId{/s}', 'Article_name': '{s name=columns/product/Article_name}Article_name{/s}', 'Article_description': '{s name=columns/product/Article_description}Article_description{/s}', 'Article_descriptionLong': '{s name=columns/product/Article_descriptionLong}Article_descriptionLong{/s}', 'Article_added': '{s name=columns/product/Article_added}Article_added{/s}', 'Article_active': '{s name=columns/product/Article_active}Article_active{/s}', 'Article_pseudoSales': '{s name=columns/product/Article_pseudoSales}Article_pseudoSales{/s}', 'Article_highlight': '{s name=columns/product/Article_highlight}Article_highlight{/s}', 'Article_keywords': '{s name=columns/product/Article_keywords}Article_keywords{/s}', 'Article_changed': '{s name=columns/product/Article_changed}Article_changed{/s}', 'Article_priceGroupActive': '{s name=columns/product/Article_priceGroupActive}Article_priceGroupActive{/s}', 'Article_lastStock': '{s name=columns/product/Article_lastStock}Article_lastStock{/s}', 'Article_crossBundleLook': '{s name=columns/product/Article_crossBundleLook}Article_crossBundleLook{/s}', 'Article_notification': '{s name=columns/product/Article_notification}Article_notification{/s}', 'Article_template': '{s name=columns/product/Article_template}Article_template{/s}', 'Article_mode': '{s name=columns/product/Article_mode}Article_mode{/s}', 'Article_availableFrom': '{s name=columns/product/Article_availableFrom}Article_availableFrom{/s}', 'Article_availableTo': '{s name=columns/product/Article_availableTo}Article_availableTo{/s}', 'Detail_id': '{s name=columns/product/Detail_id}Detail_id{/s}', 'Detail_articleId': '{s name=columns/product/Detail_articleId}Detail_articleId{/s}', 'Detail_unitId': '{s name=columns/product/Detail_unitId}Detail_unitId{/s}', 'Detail_number': '{s name=columns/product/Detail_number}Detail_number{/s}', 'Detail_supplierNumber': '{s name=columns/product/Detail_supplierNumber}Detail_supplierNumber{/s}', 'Detail_kind': '{s name=columns/product/Detail_kind}Detail_kind{/s}', 'Detail_additionalText': '{s name=columns/product/Detail_additionalText}Detail_additionalText{/s}', 'Detail_active': '{s name=columns/product/Detail_active}Detail_active{/s}', 'Detail_inStock': '{s name=columns/product/Detail_inStock}Detail_inStock{/s}', 'Detail_stockMin': '{s name=columns/product/Detail_stockMin}Detail_stockMin{/s}', 'Detail_weight': '{s name=columns/product/Detail_weight}Detail_weight{/s}', 'Detail_width': '{s name=columns/product/Detail_width}Detail_width{/s}', 'Detail_len': '{s name=columns/product/Detail_len}Detail_len{/s}', 'Detail_height': '{s name=columns/product/Detail_height}Detail_height{/s}', 'Detail_ean': '{s name=columns/product/Detail_ean}Detail_ean{/s}', 'Detail_position': '{s name=columns/product/Detail_position}Detail_position{/s}', 'Detail_minPurchase': '{s name=columns/product/Detail_minPurchase}Detail_minPurchase{/s}', 'Detail_purchaseSteps': '{s name=columns/product/Detail_purchaseSteps}Detail_purchaseSteps{/s}', 'Detail_maxPurchase': '{s name=columns/product/Detail_maxPurchase}Detail_maxPurchase{/s}', 'Detail_purchaseUnit': '{s name=columns/product/Detail_purchaseUnit}Detail_purchaseUnit{/s}', 'Detail_referenceUnit': '{s name=columns/product/Detail_referenceUnit}Detail_referenceUnit{/s}', 'Detail_packUnit': '{s name=columns/product/Detail_packUnit}Detail_packUnit{/s}', 'Detail_shippingFree': '{s name=columns/product/Detail_shippingFree}Detail_shippingFree{/s}', 'Detail_releaseDate': '{s name=columns/product/Detail_releaseDate}Detail_releaseDate{/s}', 'Detail_shippingTime': '{s name=columns/product/Detail_shippingTime}Detail_shippingTime{/s}', 'Attribute_id': '{s name=columns/product/Attribute_id}Attribute_id{/s}', 'Attribute_articleId': '{s name=columns/product/Attribute_articleId}Attribute_articleId{/s}', 'Attribute_articleDetailId': '{s name=columns/product/Attribute_articleDetailId}Attribute_articleDetailId{/s}', 'Attribute_attr1': '{s name=columns/product/Attribute_attr1}Attribute_attr1{/s}', 'Attribute_attr2': '{s name=columns/product/Attribute_attr2}Attribute_attr2{/s}', 'Attribute_attr3': '{s name=columns/product/Attribute_attr3}Attribute_attr3{/s}', 'Attribute_attr4': '{s name=columns/product/Attribute_attr4}Attribute_attr4{/s}', 'Attribute_attr5': '{s name=columns/product/Attribute_attr5}Attribute_attr5{/s}', 'Attribute_attr6': '{s name=columns/product/Attribute_attr6}Attribute_attr6{/s}', 'Attribute_attr7': '{s name=columns/product/Attribute_attr7}Attribute_attr7{/s}', 'Attribute_attr8': '{s name=columns/product/Attribute_attr8}Attribute_attr8{/s}', 'Attribute_attr9': '{s name=columns/product/Attribute_attr9}Attribute_attr9{/s}', 'Attribute_attr10': '{s name=columns/product/Attribute_attr10}Attribute_attr10{/s}', 'Attribute_attr11': '{s name=columns/product/Attribute_attr11}Attribute_attr11{/s}', 'Attribute_attr12': '{s name=columns/product/Attribute_attr12}Attribute_attr12{/s}', 'Attribute_attr13': '{s name=columns/product/Attribute_attr13}Attribute_attr13{/s}', 'Attribute_attr14': '{s name=columns/product/Attribute_attr14}Attribute_attr14{/s}', 'Attribute_attr15': '{s name=columns/product/Attribute_attr15}Attribute_attr15{/s}', 'Attribute_attr16': '{s name=columns/product/Attribute_attr16}Attribute_attr16{/s}', 'Attribute_attr17': '{s name=columns/product/Attribute_attr17}Attribute_attr17{/s}', 'Attribute_attr18': '{s name=columns/product/Attribute_attr18}Attribute_attr18{/s}', 'Attribute_attr19': '{s name=columns/product/Attribute_attr19}Attribute_attr19{/s}', 'Attribute_attr20': '{s name=columns/product/Attribute_attr20}Attribute_attr20{/s}', 'Price_price': '{s name=columns/product/Price_price}Price_price{/s}', 'Price_netPrice': '{s name=columns/product/Price_netPrice}Price_netPrice{/s}', 'Supplier_name': '{s name=columns/product/Supplier_name}Supplier{/s}', 'Tax_name': '{s name=columns/product/Tax_name}Tax{/s}' }, /** * Setup the component */ initComponent: function () { var me = this; this.setupStateManager(); me.columns = me.getColumns(); me.tbar = me.getToolbar(); me.bbar = me.getPagingbar(); me.selModel = me.getGridSelModel(); me.addEvents( /** * Fired when the user edited a product in the grid */ 'saveProduct', /** * Delete a single article */ 'deleteProduct', /** * Delete multiple articles */ 'deleteMultipleProducts', /** * Trigger the split view */ 'triggerSplitView', /** * Triggered when the product selection changes */ 'productchange', /** * A search was triggered */ 'search' ); me.rowEditing = Ext.create('Ext.grid.plugin.RowEditing', { clicksToEdit: 2, autoCancel: true, listeners: { scope: me, edit: function (editor, context) { me.fireEvent('saveProduct', editor, context) } } }); me.plugins = me.rowEditing; me.listeners = { 'afterrender': me.onAfterRender }; me.callParent(arguments); }, onAfterRender: function() { var me = this; Ext.each(me.columns, function(col) { if (col.dataIndex == 'Detail_active') { me.detailActiveColumn = col; window.setTimeout(function() { col.setVisible(false); }, 0); } }); }, setupStateManager: function () { var me = this; me.stateManager = new Ext.state.LocalStorageProvider({ }); Ext.state.Manager.setProvider(me.stateManager); }, /** * Creates rowEditor Plugin * * @return [Ext.grid.plugin.RowEditing] */ getRowEditorPlugin: function () { return Ext.create('Ext.grid.plugin.RowEditing', { clicksToEdit: 2, errorSummary: false, pluginId: 'rowEditing' }); }, /** * Creates the grid selection model for checkboxes * * @return [Ext.selection.CheckboxModel] grid selection model */ getGridSelModel: function () { var me = this; return Ext.create('Ext.selection.CheckboxModel', { listeners: { // Unlocks the delete button if the user has checked at least one checkbox selectionchange: function (sm, selections) { me.deleteButton.setDisabled(selections.length === 0); me.splitViewModeBtn.setDisabled(selections.length === 0); me.fireEvent('productchange', selections); } } }); }, getActionColumn: function () { var me = this; return { xtype: 'actioncolumn', width: 60, items: [ /*{if {acl_is_allowed resource=article privilege=save}}*/ { action: 'edit', cls: 'editBtn', iconCls: 'sprite-pencil', handler: function (view, rowIndex, colIndex, item, opts, record) { Shopware.app.Application.addSubApplication({ name: 'Shopware.apps.Article', action: 'detail', params: { articleId: record.get('Article_id') } }); } }, /*{/if}*/ /*{if {acl_is_allowed resource=article privilege=delete}}*/ { iconCls: 'sprite-minus-circle-frame', action: 'delete', handler: function (view, rowIndex, colIndex, item, opts, record) { me.fireEvent('deleteProduct', record); } } /*{/if}*/ ] }; }, /** * Helper method which creates the columns for the * grid panel in this widget. * * @return [array] generated columns */ getColumns: function () { var me = this, colLength, i, column, stateColumn, columnDefinition, width, xtype, renderer, columns = [ ]; colLength = me.columnConfig.length; for (i = 0; i < colLength; i++) { column = me.columnConfig[i]; if (!column.allowInGrid) { continue; } columnDefinition = { dataIndex: column.alias, header: me.getTranslationForColumnHead(column.alias), /*{if {acl_is_allowed resource=article privilege=save}}*/ editor: me.getEditorForColumn(column), /*{/if}*/ hidden: !column.show }; if (xtype = me.getXtypeForColumn(column)) { columnDefinition.xtype = xtype; } if (renderer = me.getRendererForColumn(column)) { columnDefinition.renderer = renderer; } if (width = me.getWidthForColumn(column)) { columnDefinition.width = width; } else { columnDefinition.flex = 1; } if (column.alias == 'Detail_active') { columnDefinition.hidden = true; } columns.push(columnDefinition); } columns.push({ header: '{s name=list/column_info}Info{/s}', width: 90, renderer: me.infoColumnRenderer }); columns.push(me.getActionColumn()); return columns; }, /** * Returns a proper xtype fo a column * * @param column * @returns * */ getXtypeForColumn: function (column) { var me = this; if (column.alias == 'Price_price') { return 'numbercolumn'; } return undefined; }, /** * Column renderer for columns shown in <b>tags</b> * * @param value * @returns string */ boldColumnRenderer: function (value, metaData, record) { var result = value; var checkbox = this.up('window').down('checkbox[name=displayVariants]'); if (checkbox.getValue() && record.get('Detail_additionalText')) { result = value + ' - ' + record.get('Detail_additionalText'); } return '<b>' + this.defaultColumnRenderer(result) + '</b>'; }, /** * Column renderer for most of the columns * * @param value * @returns string */ defaultColumnRenderer: function (value) { return Ext.util.Format.htmlEncode(value); }, /** * Column renderer for boolean columns in order to * @param value */ booleanColumnRenderer: function (value) { var checked = 'sprite-ui-check-box-uncheck'; if (value == true) { checked = 'sprite-ui-check-box'; } return '<span style="display:block; margin: 0 auto; height:25px; width:25px;" class="' + checked + '"></span>'; }, /** * * Show info like: Is this a configurator article / does it have images / * does it have a category * * @param value * @param metaData * @param record * @returns string */ infoColumnRenderer: function (value, metaData, record) { var me = this, result = '', title; var style = 'style="width: 25px; height: 25px; display: inline-block; margin-right: 3px;"'; if (!record.get('imageSrc')) { title = '{s name=list/tooltip_noimage}Article has no image{/s}'; result = result + '<div title="' + title + '" class="sprite-image--exclamation" ' + style + '>&nbsp;</div>'; } if (record.get('hasConfigurator')) { title = '{s name=list/tooltip_hasconfigurator}Article has configurator{/s}'; result = result + '<div title="' + title + '" class="sprite-images-stack" ' + style + '>&nbsp;</div>'; } if (!record.get('hasCategories')) { title = '{s name=list/tooltip_categories}Article is not assigned to any category{/s}'; result = result + '<div title="' + title + '" class="sprite-blue-folder--exclamation" ' + style + '>&nbsp;</div>'; } return result; }, /** * Will return a renderer depending on the passed column. * todo: Article_name should not be hardcoded here * * @param column * @returns string|function */ getRendererForColumn: function (column) { var me = this; if (column.alias == 'Article_name') { return me.boldColumnRenderer; } if (column.type == 'boolean') { return me.booleanColumnRenderer; } if (column.alias == 'Detail_inStock') { return me.colorColumnRenderer; } if (column.alias == 'Price_price') { return undefined; } return me.defaultColumnRenderer; }, /** * Will return a green string for values > 0 and red otherwise * * @param value * @returns string */ colorColumnRenderer: function (value) { value = value || 0; if (value > 0) { return '<span style="color:green;">' + value + '</span>'; } else { return '<span style="color:red;">' + value + '</span>'; } }, /** * Helper method which returns a "human readable" translation for a columnAlias * Will return the columnAlias, if no translation was created * * @param columnHeader * @returns string */ getTranslationForColumnHead: function (columnHeader) { var me = this; if (me.snippets.hasOwnProperty(columnHeader)) { return me.snippets[columnHeader]; } return columnHeader; }, /** * Return width for a given column * * For known fields like boolean, integer, date and datetime, we can try and * educated guess, for anything else undefined is returned. * * @param column */ getWidthForColumn: function (column) { var me = this; if (column.alias.slice(-2).toLowerCase() == 'id') { return 60; } switch (column.alias) { case 'Price_price': return 90; case 'Detail_number': return 110; case 'Supplier_name': return 110; case 'Article_active': case 'Detail_active': return 40; case 'Tax_name': return 75; case 'Detail_inStock': return 80; } switch (column.type) { case 'integer': case 'decimal': case 'float': return 60; case 'string': case 'text': return undefined; case 'boolean': return 60; case 'date': return 100; case 'datetime': return 140; default: return undefined; } }, /** * Helper method which returns a rowEditing.editor for a given column. * * @param column * @returns Object|boolean */ getEditorForColumn: function (column) { var me = this; // Do create editor for columns, which have been configured to be non-editable if (!column.editable) { return false; } switch (column.alias) { case 'Price_price': return { width: 85, xtype: 'numberfield', allowBlank: false, hideTrigger: true, keyNavEnabled: false, mouseWheelEnabled: false }; default: switch (column.type) { case 'integer': case 'decimal': case 'float': var precision = 0; if (column.precision) { precision = column.precision } else if (column.type == 'float') { precision = 3; } else if (column.type == 'decimal') { precision = 3; } return { xtype: 'numberfield', decimalPrecision: precision }; break; case 'string': case 'text': return 'textfield'; break; case 'boolean': return { xtype: 'checkbox', inputValue: 1, uncheckedValue: 0 }; break; case 'date': return new Ext.form.DateField({ disabled: false, format: 'Y-m-d' }); break; case 'datetime': return new Ext.form.DateField({ disabled: false, format: 'Y-m-d H:i:s' }); return new Shopware.apps.Base.view.element.DateTime({ timeCfg: { format: 'H:i:s' }, dateCfg: { format: 'Y-m-d' } }); break; default: break; } break; } }, /** * Creates the grid toolbar * * @return [Ext.toolbar.Toolbar] grid toolbar */ getToolbar: function () { var me = this, buttons = []; me.splitViewModeBtn = Ext.create('Ext.button.Button', { iconCls: 'sprite-ui-split-panel', text: '{s name=enableSplitView}Activate split view{/s}', disabled: true, enableToggle: true, handler: function () { var selectionModel = me.getSelectionModel(), record = selectionModel.getSelection()[0]; me.fireEvent('triggerSplitView', this, record); } }); buttons.push(me.splitViewModeBtn); /*{if {acl_is_allowed resource=article privilege=save}}*/ buttons.push( Ext.create('Ext.button.Button', { text: '{s name=addProduct}Add{/s}', iconCls: 'sprite-plus-circle-frame', handler: function () { Shopware.app.Application.addSubApplication({ name: 'Shopware.apps.Article', action: 'detail' }); } }) ); /*{/if}*/ //creates the delete button to remove all selected esds in one request. me.deleteButton = Ext.create('Ext.button.Button', { iconCls: 'sprite-minus-circle-frame', text: '{s name=deleteProduct}Delete{/s}', disabled: true, handler: function () { var selectionModel = me.getSelectionModel(), records = selectionModel.getSelection(); if (records.length > 0) { me.fireEvent('deleteMultipleProducts', records); } } }); /*{if {acl_is_allowed resource=article privilege=delete}}*/ buttons.push(me.deleteButton); /*{/if}*/ buttons.push('->'); buttons.push({ xtype: 'textfield', name: 'searchfield', action: 'search', width: 170, cls: 'searchfield', enableKeyEvents: true, checkChangeBuffer: 500, emptyText: '{s name=list/emptytext_search}Search ...{/s}', listeners: { 'change': function (field, value) { var store = me.store, searchString = Ext.String.trim(value); me.fireEvent('search', searchString); } } }); return Ext.create('Ext.toolbar.Toolbar', { ui: 'shopware-ui', items: buttons }); }, /** * Creates pagingbar * * @return Ext.toolbar.Paging */ getPagingbar: function () { var me = this, productSnippet = '{s name=pagingCombo/products}products{/s}'; var pageSize = Ext.create('Ext.form.field.ComboBox', { labelWidth: 120, cls: Ext.baseCSSPrefix + 'page-size', queryMode: 'local', width: 180, editable: false, listeners: { scope: me, select: me.onPageSizeChange }, store: Ext.create('Ext.data.Store', { fields: [ 'value', 'name' ], data: [ { value: '25', name: '25 ' + productSnippet }, { value: '50', name: '50 ' + productSnippet }, { value: '75', name: '75 ' + productSnippet } ] }), displayField: 'name', valueField: 'value' }); var pagingBar = Ext.create('Ext.toolbar.Paging', { dock: 'bottom', displayInfo: true }); pagingBar.insert(pagingBar.items.length - 2, [ { xtype: 'tbspacer', width: 6 }, pageSize ]); return pagingBar; }, /** * Event listener method which fires when the user selects * a entry in the "number of orders"-combo box. * * @event select * @param [object] combo - Ext.form.field.ComboBox * @param [array] records - Array of selected entries * @return void */ onPageSizeChange: function (combo, records) { var record = records[0], me = this; me.store.pageSize = record.get('value'); if (!me.store.getProxy().extraParams.ast) { return; } me.store.loadPage(1); } }); //{/block}
Sunchairs/shopware
themes/Backend/ExtJs/backend/article_list/view/main/grid.js
JavaScript
agpl-3.0
27,560
using Tgstation.Server.Api.Models.Internal; namespace Tgstation.Server.Api.Models { /// <inheritdoc /> public sealed class TestMerge : TestMergeApiBase { /// <summary> /// The <see cref="NamedEntity"/> of the user who created the <see cref="TestMerge"/>. /// </summary> public UserName? MergedBy { get; set; } } }
tgstation/tgstation-server
src/Tgstation.Server.Api/Models/TestMerge.cs
C#
agpl-3.0
330
# -*- coding: utf-8 -*- # Copyright 2016 LasLabs Inc. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). from odoo.exceptions import UserError class ConnectionFailedError(UserError): pass class ConnectionSuccessError(UserError): pass
thinkopensolutions/server-tools
base_external_dbsource/exceptions.py
Python
agpl-3.0
260
/* Copyright (c) 2008-2009 NetAllied Systems GmbH This file is part of COLLADAStreamWriter. Licensed under the MIT Open Source License, for details please see LICENSE file or the website http://www.opensource.org/licenses/mit-license.php */ #include "COLLADASWSurfaceInitOption.h" #include "COLLADASWConstants.h" namespace COLLADASW { // ---------------------------------------- void SurfaceInitOption::add ( StreamWriter* sw ) const { switch ( mType ) { case INIT_AS_TARGET: addInitAsTarget ( sw ); break; case INIT_CUBE: addInitCube ( sw ); break; case INIT_VOLUME: addInitVolume ( sw ); break; case INIT_PLANAR: addInitPlanar ( sw ); break; case INIT_FROM: addInitFrom ( sw ); break; case INIT_AS_NULL: default: addInitAsNull ( sw ); break; } } // ---------------------------------------- void SurfaceInitOption::addInitAsTarget ( StreamWriter* sw ) const { sw->openElement( CSWC::CSW_ELEMENT_INIT_AS_TARGET ); sw->closeElement (); } // ---------------------------------------- void SurfaceInitOption::addInitCube ( StreamWriter* sw ) const { sw->openElement( CSWC::CSW_ELEMENT_INIT_CUBE ); if ( !mAllRef.empty() ) { sw->openElement( CSWC::CSW_ELEMENT_ALL ); sw->appendAttribute( CSWC::CSW_ATTRIBUTE_REF, mAllRef ); sw->closeElement (); } if ( !mPrimaryRef.empty() ) { sw->openElement( CSWC::CSW_ELEMENT_PRIMARY ); sw->appendAttribute( CSWC::CSW_ATTRIBUTE_REF, mPrimaryRef ); for ( size_t i=0; i<mPrimaryOrders.size(); ++i ) { sw->openElement( CSWC::CSW_ELEMENT_ORDER ); sw->appendValues ( getFaceString ( mPrimaryOrders[i] ) ); sw->closeElement (); } sw->closeElement (); } for ( size_t i=0; i<mFaceRefs.size(); ++i ) { sw->openElement( CSWC::CSW_ELEMENT_FACE ); sw->appendAttribute( CSWC::CSW_ATTRIBUTE_REF, mFaceRefs[i] ); sw->closeElement (); } sw->closeElement (); } // ---------------------------------------- void SurfaceInitOption::addInitVolume ( StreamWriter* sw ) const { sw->openElement( CSWC::CSW_ELEMENT_INIT_VOLUME ); if ( !mAllRef.empty() ) { sw->openElement( CSWC::CSW_ELEMENT_ALL ); sw->appendAttribute( CSWC::CSW_ATTRIBUTE_REF, mAllRef ); sw->closeElement (); } if ( !mPrimaryRef.empty() ) { sw->openElement( CSWC::CSW_ELEMENT_PRIMARY ); sw->appendAttribute( CSWC::CSW_ATTRIBUTE_REF, mPrimaryRef ); sw->closeElement (); } sw->closeElement (); } // ---------------------------------------- void SurfaceInitOption::addInitPlanar ( StreamWriter* sw ) const { sw->openElement( CSWC::CSW_ELEMENT_INIT_PLANAR ); if ( !mAllRef.empty() ) { sw->openElement( CSWC::CSW_ELEMENT_ALL ); sw->appendAttribute( CSWC::CSW_ATTRIBUTE_REF, mAllRef ); sw->closeElement (); } sw->closeElement (); } // ---------------------------------------- void SurfaceInitOption::addInitFrom ( StreamWriter* sw ) const { sw->openElement( CSWC::CSW_ELEMENT_INIT_FROM ); if ( mMipLevel!= 0 ) sw->appendAttribute( CSWC::CSW_ATTRIBUTE_MIP, mMipLevel ); if ( mSlice!= 0 ) sw->appendAttribute( CSWC::CSW_ATTRIBUTE_SLICE, mSlice ); if ( mFace != POSITIVE_X ) sw->appendAttribute( CSWC::CSW_ATTRIBUTE_FACE, getFaceString ( mFace ) ); if ( !mImageReference.empty() ) sw->appendValues( mImageReference ); sw->closeElement (); } // ---------------------------------------- void SurfaceInitOption::addInitAsNull ( StreamWriter* sw ) const { sw->openElement( CSWC::CSW_ELEMENT_INIT_AS_NULL ); sw->closeElement (); } // ---------------------------------------- const String& SurfaceInitOption::getFaceString( const Face& face ) { switch ( face ) { case POSITIVE_X: return CSWC::CSW_FACE_POSITIVE_X; case NEGATIVE_X: return CSWC::CSW_FACE_NEGATIVE_X; case POSITIVE_Y: return CSWC::CSW_FACE_POSITIVE_Y; case NEGATIVE_Y: return CSWC::CSW_FACE_NEGATIVE_Y; case POSITIVE_Z: return CSWC::CSW_FACE_POSITIVE_Z; case NEGATIVE_Z: return CSWC::CSW_FACE_NEGATIVE_Z; default: return CSWC::CSW_FACE_POSITIVE_X; } } }
AsherBond/MondocosmOS
opencollada/COLLADAStreamWriter/src/COLLADASWSurfaceInitOption.cpp
C++
agpl-3.0
5,065
require 'spec_helper' require 'support/feature_helpers' feature 'Behaviour of the flag Site#registration_enabled' do let(:user) { FactoryGirl.create(:user) } context "when the flag is set" do before { Site.current.update_attributes(registration_enabled: true) } scenario "shows the 'register' link in the login page" scenario "shows the 'register' link in the navbar" scenario "shows the 'resend confirmation email' in the login page" scenario "events/index shows a link for anonymous to register" scenario "spaces/index shows a link for anonymous to register" scenario "the home of a space shows a link for anonymous to register" end context "when the flag is not set" do before { Site.current.update_attributes(registration_enabled: false) } scenario "hides the 'register' from the login page" scenario "hides the 'register' from the navbar" scenario "hides the 'resend confirmation email' from the login page" scenario "events/index shows a link for anonymous to sign in" scenario "spaces/index shows a link for anonymous to sign in" scenario "the home of a space shows a link for anonymous to sign in" end end
mconftec/mconf-web-cedia
spec/features/site/flag_registration_enabled_spec.rb
Ruby
agpl-3.0
1,187
"""This file implements the gym environment of minitaur. """ import math import time import os, inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(os.path.dirname(currentdir)) os.sys.path.insert(0, parentdir) import gym from gym import spaces from gym.utils import seeding import numpy as np import pybullet from pybullet_utils import bullet_client as bc import pybullet_data from pybullet_envs.minitaur.envs import minitaur from pybullet_envs.minitaur.envs import minitaur_derpy from pybullet_envs.minitaur.envs import minitaur_logging from pybullet_envs.minitaur.envs import minitaur_logging_pb2 from pybullet_envs.minitaur.envs import minitaur_rainbow_dash from pybullet_envs.minitaur.envs import motor from pkg_resources import parse_version NUM_MOTORS = 8 MOTOR_ANGLE_OBSERVATION_INDEX = 0 MOTOR_VELOCITY_OBSERVATION_INDEX = MOTOR_ANGLE_OBSERVATION_INDEX + NUM_MOTORS MOTOR_TORQUE_OBSERVATION_INDEX = MOTOR_VELOCITY_OBSERVATION_INDEX + NUM_MOTORS BASE_ORIENTATION_OBSERVATION_INDEX = MOTOR_TORQUE_OBSERVATION_INDEX + NUM_MOTORS ACTION_EPS = 0.01 OBSERVATION_EPS = 0.01 RENDER_HEIGHT = 360 RENDER_WIDTH = 480 SENSOR_NOISE_STDDEV = minitaur.SENSOR_NOISE_STDDEV DEFAULT_URDF_VERSION = "default" DERPY_V0_URDF_VERSION = "derpy_v0" RAINBOW_DASH_V0_URDF_VERSION = "rainbow_dash_v0" NUM_SIMULATION_ITERATION_STEPS = 300 MINIATUR_URDF_VERSION_MAP = { DEFAULT_URDF_VERSION: minitaur.Minitaur, DERPY_V0_URDF_VERSION: minitaur_derpy.MinitaurDerpy, RAINBOW_DASH_V0_URDF_VERSION: minitaur_rainbow_dash.MinitaurRainbowDash, } def convert_to_list(obj): try: iter(obj) return obj except TypeError: return [obj] class MinitaurGymEnv(gym.Env): """The gym environment for the minitaur. It simulates the locomotion of a minitaur, a quadruped robot. The state space include the angles, velocities and torques for all the motors and the action space is the desired motor angle for each motor. The reward function is based on how far the minitaur walks in 1000 steps and penalizes the energy expenditure. """ metadata = {"render.modes": ["human", "rgb_array"], "video.frames_per_second": 100} def __init__(self, urdf_root=pybullet_data.getDataPath(), urdf_version=None, distance_weight=1.0, energy_weight=0.005, shake_weight=0.0, drift_weight=0.0, distance_limit=float("inf"), observation_noise_stdev=SENSOR_NOISE_STDDEV, self_collision_enabled=True, motor_velocity_limit=np.inf, pd_control_enabled=False, leg_model_enabled=True, accurate_motor_model_enabled=False, remove_default_joint_damping=False, motor_kp=1.0, motor_kd=0.02, control_latency=0.0, pd_latency=0.0, torque_control_enabled=False, motor_overheat_protection=False, hard_reset=True, on_rack=False, render=False, num_steps_to_log=1000, action_repeat=1, control_time_step=None, env_randomizer=None, forward_reward_cap=float("inf"), reflection=True, log_path=None): """Initialize the minitaur gym environment. Args: urdf_root: The path to the urdf data folder. urdf_version: [DEFAULT_URDF_VERSION, DERPY_V0_URDF_VERSION, RAINBOW_DASH_V0_URDF_VERSION] are allowable versions. If None, DEFAULT_URDF_VERSION is used. DERPY_V0_URDF_VERSION is the result of first pass system identification for derpy. We will have a different URDF and related Minitaur class each time we perform system identification. While the majority of the code of the class remains the same, some code changes (e.g. the constraint location might change). __init__() will choose the right Minitaur class from different minitaur modules based on urdf_version. distance_weight: The weight of the distance term in the reward. energy_weight: The weight of the energy term in the reward. shake_weight: The weight of the vertical shakiness term in the reward. drift_weight: The weight of the sideways drift term in the reward. distance_limit: The maximum distance to terminate the episode. observation_noise_stdev: The standard deviation of observation noise. self_collision_enabled: Whether to enable self collision in the sim. motor_velocity_limit: The velocity limit of each motor. pd_control_enabled: Whether to use PD controller for each motor. leg_model_enabled: Whether to use a leg motor to reparameterize the action space. accurate_motor_model_enabled: Whether to use the accurate DC motor model. remove_default_joint_damping: Whether to remove the default joint damping. motor_kp: proportional gain for the accurate motor model. motor_kd: derivative gain for the accurate motor model. control_latency: It is the delay in the controller between when an observation is made at some point, and when that reading is reported back to the Neural Network. pd_latency: latency of the PD controller loop. PD calculates PWM based on the motor angle and velocity. The latency measures the time between when the motor angle and velocity are observed on the microcontroller and when the true state happens on the motor. It is typically (0.001- 0.002s). torque_control_enabled: Whether to use the torque control, if set to False, pose control will be used. motor_overheat_protection: Whether to shutdown the motor that has exerted large torque (OVERHEAT_SHUTDOWN_TORQUE) for an extended amount of time (OVERHEAT_SHUTDOWN_TIME). See ApplyAction() in minitaur.py for more details. hard_reset: Whether to wipe the simulation and load everything when reset is called. If set to false, reset just place the minitaur back to start position and set its pose to initial configuration. on_rack: Whether to place the minitaur on rack. This is only used to debug the walking gait. In this mode, the minitaur's base is hanged midair so that its walking gait is clearer to visualize. render: Whether to render the simulation. num_steps_to_log: The max number of control steps in one episode that will be logged. If the number of steps is more than num_steps_to_log, the environment will still be running, but only first num_steps_to_log will be recorded in logging. action_repeat: The number of simulation steps before actions are applied. control_time_step: The time step between two successive control signals. env_randomizer: An instance (or a list) of EnvRandomizer(s). An EnvRandomizer may randomize the physical property of minitaur, change the terrrain during reset(), or add perturbation forces during step(). forward_reward_cap: The maximum value that forward reward is capped at. Disabled (Inf) by default. log_path: The path to write out logs. For the details of logging, refer to minitaur_logging.proto. Raises: ValueError: If the urdf_version is not supported. """ # Set up logging. self._log_path = log_path self.logging = minitaur_logging.MinitaurLogging(log_path) # PD control needs smaller time step for stability. if control_time_step is not None: self.control_time_step = control_time_step self._action_repeat = action_repeat self._time_step = control_time_step / action_repeat else: # Default values for time step and action repeat if accurate_motor_model_enabled or pd_control_enabled: self._time_step = 0.002 self._action_repeat = 5 else: self._time_step = 0.01 self._action_repeat = 1 self.control_time_step = self._time_step * self._action_repeat # TODO(b/73829334): Fix the value of self._num_bullet_solver_iterations. self._num_bullet_solver_iterations = int(NUM_SIMULATION_ITERATION_STEPS / self._action_repeat) self._urdf_root = urdf_root self._self_collision_enabled = self_collision_enabled self._motor_velocity_limit = motor_velocity_limit self._observation = [] self._true_observation = [] self._objectives = [] self._objective_weights = [distance_weight, energy_weight, drift_weight, shake_weight] self._env_step_counter = 0 self._num_steps_to_log = num_steps_to_log self._is_render = render self._last_base_position = [0, 0, 0] self._distance_weight = distance_weight self._energy_weight = energy_weight self._drift_weight = drift_weight self._shake_weight = shake_weight self._distance_limit = distance_limit self._observation_noise_stdev = observation_noise_stdev self._action_bound = 1 self._pd_control_enabled = pd_control_enabled self._leg_model_enabled = leg_model_enabled self._accurate_motor_model_enabled = accurate_motor_model_enabled self._remove_default_joint_damping = remove_default_joint_damping self._motor_kp = motor_kp self._motor_kd = motor_kd self._torque_control_enabled = torque_control_enabled self._motor_overheat_protection = motor_overheat_protection self._on_rack = on_rack self._cam_dist = 1.0 self._cam_yaw = 0 self._cam_pitch = -30 self._forward_reward_cap = forward_reward_cap self._hard_reset = True self._last_frame_time = 0.0 self._control_latency = control_latency self._pd_latency = pd_latency self._urdf_version = urdf_version self._ground_id = None self._reflection = reflection self._env_randomizers = convert_to_list(env_randomizer) if env_randomizer else [] self._episode_proto = minitaur_logging_pb2.MinitaurEpisode() if self._is_render: self._pybullet_client = bc.BulletClient(connection_mode=pybullet.GUI) else: self._pybullet_client = bc.BulletClient() if self._urdf_version is None: self._urdf_version = DEFAULT_URDF_VERSION self._pybullet_client.setPhysicsEngineParameter(enableConeFriction=0) self.seed() self.reset() observation_high = (self._get_observation_upper_bound() + OBSERVATION_EPS) observation_low = (self._get_observation_lower_bound() - OBSERVATION_EPS) action_dim = NUM_MOTORS action_high = np.array([self._action_bound] * action_dim) self.action_space = spaces.Box(-action_high, action_high) self.observation_space = spaces.Box(observation_low, observation_high) self.viewer = None self._hard_reset = hard_reset # This assignment need to be after reset() def close(self): if self._env_step_counter > 0: self.logging.save_episode(self._episode_proto) self.minitaur.Terminate() def add_env_randomizer(self, env_randomizer): self._env_randomizers.append(env_randomizer) def reset(self, initial_motor_angles=None, reset_duration=1.0): self._pybullet_client.configureDebugVisualizer(self._pybullet_client.COV_ENABLE_RENDERING, 0) if self._env_step_counter > 0: self.logging.save_episode(self._episode_proto) self._episode_proto = minitaur_logging_pb2.MinitaurEpisode() minitaur_logging.preallocate_episode_proto(self._episode_proto, self._num_steps_to_log) if self._hard_reset: self._pybullet_client.resetSimulation() self._pybullet_client.setPhysicsEngineParameter( numSolverIterations=int(self._num_bullet_solver_iterations)) self._pybullet_client.setTimeStep(self._time_step) self._ground_id = self._pybullet_client.loadURDF("%s/plane.urdf" % self._urdf_root) if (self._reflection): self._pybullet_client.changeVisualShape(self._ground_id, -1, rgbaColor=[1, 1, 1, 0.8]) self._pybullet_client.configureDebugVisualizer( self._pybullet_client.COV_ENABLE_PLANAR_REFLECTION, self._ground_id) self._pybullet_client.setGravity(0, 0, -10) acc_motor = self._accurate_motor_model_enabled motor_protect = self._motor_overheat_protection if self._urdf_version not in MINIATUR_URDF_VERSION_MAP: raise ValueError("%s is not a supported urdf_version." % self._urdf_version) else: self.minitaur = (MINIATUR_URDF_VERSION_MAP[self._urdf_version]( pybullet_client=self._pybullet_client, action_repeat=self._action_repeat, urdf_root=self._urdf_root, time_step=self._time_step, self_collision_enabled=self._self_collision_enabled, motor_velocity_limit=self._motor_velocity_limit, pd_control_enabled=self._pd_control_enabled, accurate_motor_model_enabled=acc_motor, remove_default_joint_damping=self._remove_default_joint_damping, motor_kp=self._motor_kp, motor_kd=self._motor_kd, control_latency=self._control_latency, pd_latency=self._pd_latency, observation_noise_stdev=self._observation_noise_stdev, torque_control_enabled=self._torque_control_enabled, motor_overheat_protection=motor_protect, on_rack=self._on_rack)) self.minitaur.Reset(reload_urdf=False, default_motor_angles=initial_motor_angles, reset_time=reset_duration) # Loop over all env randomizers. for env_randomizer in self._env_randomizers: env_randomizer.randomize_env(self) self._pybullet_client.setPhysicsEngineParameter(enableConeFriction=0) self._env_step_counter = 0 self._last_base_position = [0, 0, 0] self._objectives = [] self._pybullet_client.resetDebugVisualizerCamera(self._cam_dist, self._cam_yaw, self._cam_pitch, [0, 0, 0]) self._pybullet_client.configureDebugVisualizer(self._pybullet_client.COV_ENABLE_RENDERING, 1) return self._get_observation() def seed(self, seed=None): self.np_random, seed = seeding.np_random(seed) return [seed] def _transform_action_to_motor_command(self, action): if self._leg_model_enabled: for i, action_component in enumerate(action): if not (-self._action_bound - ACTION_EPS <= action_component <= self._action_bound + ACTION_EPS): raise ValueError("{}th action {} out of bounds.".format(i, action_component)) action = self.minitaur.ConvertFromLegModel(action) return action def step(self, action): """Step forward the simulation, given the action. Args: action: A list of desired motor angles for eight motors. Returns: observations: The angles, velocities and torques of all motors. reward: The reward for the current state-action pair. done: Whether the episode has ended. info: A dictionary that stores diagnostic information. Raises: ValueError: The action dimension is not the same as the number of motors. ValueError: The magnitude of actions is out of bounds. """ self._last_base_position = self.minitaur.GetBasePosition() if self._is_render: # Sleep, otherwise the computation takes less time than real time, # which will make the visualization like a fast-forward video. time_spent = time.time() - self._last_frame_time self._last_frame_time = time.time() time_to_sleep = self.control_time_step - time_spent if time_to_sleep > 0: time.sleep(time_to_sleep) base_pos = self.minitaur.GetBasePosition() # Keep the previous orientation of the camera set by the user. [yaw, pitch, dist] = self._pybullet_client.getDebugVisualizerCamera()[8:11] self._pybullet_client.resetDebugVisualizerCamera(dist, yaw, pitch, base_pos) for env_randomizer in self._env_randomizers: env_randomizer.randomize_step(self) action = self._transform_action_to_motor_command(action) self.minitaur.Step(action) reward = self._reward() done = self._termination() if self._log_path is not None: minitaur_logging.update_episode_proto(self._episode_proto, self.minitaur, action, self._env_step_counter) self._env_step_counter += 1 if done: self.minitaur.Terminate() return np.array(self._get_observation()), reward, done, {} def render(self, mode="rgb_array", close=False): if mode != "rgb_array": return np.array([]) base_pos = self.minitaur.GetBasePosition() view_matrix = self._pybullet_client.computeViewMatrixFromYawPitchRoll( cameraTargetPosition=base_pos, distance=self._cam_dist, yaw=self._cam_yaw, pitch=self._cam_pitch, roll=0, upAxisIndex=2) proj_matrix = self._pybullet_client.computeProjectionMatrixFOV(fov=60, aspect=float(RENDER_WIDTH) / RENDER_HEIGHT, nearVal=0.1, farVal=100.0) (_, _, px, _, _) = self._pybullet_client.getCameraImage( width=RENDER_WIDTH, height=RENDER_HEIGHT, renderer=self._pybullet_client.ER_BULLET_HARDWARE_OPENGL, viewMatrix=view_matrix, projectionMatrix=proj_matrix) rgb_array = np.array(px) rgb_array = rgb_array[:, :, :3] return rgb_array def get_minitaur_motor_angles(self): """Get the minitaur's motor angles. Returns: A numpy array of motor angles. """ return np.array(self._observation[MOTOR_ANGLE_OBSERVATION_INDEX:MOTOR_ANGLE_OBSERVATION_INDEX + NUM_MOTORS]) def get_minitaur_motor_velocities(self): """Get the minitaur's motor velocities. Returns: A numpy array of motor velocities. """ return np.array( self._observation[MOTOR_VELOCITY_OBSERVATION_INDEX:MOTOR_VELOCITY_OBSERVATION_INDEX + NUM_MOTORS]) def get_minitaur_motor_torques(self): """Get the minitaur's motor torques. Returns: A numpy array of motor torques. """ return np.array( self._observation[MOTOR_TORQUE_OBSERVATION_INDEX:MOTOR_TORQUE_OBSERVATION_INDEX + NUM_MOTORS]) def get_minitaur_base_orientation(self): """Get the minitaur's base orientation, represented by a quaternion. Returns: A numpy array of minitaur's orientation. """ return np.array(self._observation[BASE_ORIENTATION_OBSERVATION_INDEX:]) def is_fallen(self): """Decide whether the minitaur has fallen. If the up directions between the base and the world is larger (the dot product is smaller than 0.85) or the base is very low on the ground (the height is smaller than 0.13 meter), the minitaur is considered fallen. Returns: Boolean value that indicates whether the minitaur has fallen. """ orientation = self.minitaur.GetBaseOrientation() rot_mat = self._pybullet_client.getMatrixFromQuaternion(orientation) local_up = rot_mat[6:] pos = self.minitaur.GetBasePosition() return (np.dot(np.asarray([0, 0, 1]), np.asarray(local_up)) < 0.85 or pos[2] < 0.13) def _termination(self): position = self.minitaur.GetBasePosition() distance = math.sqrt(position[0]**2 + position[1]**2) return self.is_fallen() or distance > self._distance_limit def _reward(self): current_base_position = self.minitaur.GetBasePosition() forward_reward = current_base_position[0] - self._last_base_position[0] # Cap the forward reward if a cap is set. forward_reward = min(forward_reward, self._forward_reward_cap) # Penalty for sideways translation. drift_reward = -abs(current_base_position[1] - self._last_base_position[1]) # Penalty for sideways rotation of the body. orientation = self.minitaur.GetBaseOrientation() rot_matrix = pybullet.getMatrixFromQuaternion(orientation) local_up_vec = rot_matrix[6:] shake_reward = -abs(np.dot(np.asarray([1, 1, 0]), np.asarray(local_up_vec))) energy_reward = -np.abs( np.dot(self.minitaur.GetMotorTorques(), self.minitaur.GetMotorVelocities())) * self._time_step objectives = [forward_reward, energy_reward, drift_reward, shake_reward] weighted_objectives = [o * w for o, w in zip(objectives, self._objective_weights)] reward = sum(weighted_objectives) self._objectives.append(objectives) return reward def get_objectives(self): return self._objectives @property def objective_weights(self): """Accessor for the weights for all the objectives. Returns: List of floating points that corresponds to weights for the objectives in the order that objectives are stored. """ return self._objective_weights def _get_observation(self): """Get observation of this environment, including noise and latency. The minitaur class maintains a history of true observations. Based on the latency, this function will find the observation at the right time, interpolate if necessary. Then Gaussian noise is added to this observation based on self.observation_noise_stdev. Returns: The noisy observation with latency. """ observation = [] observation.extend(self.minitaur.GetMotorAngles().tolist()) observation.extend(self.minitaur.GetMotorVelocities().tolist()) observation.extend(self.minitaur.GetMotorTorques().tolist()) observation.extend(list(self.minitaur.GetBaseOrientation())) self._observation = observation return self._observation def _get_true_observation(self): """Get the observations of this environment. It includes the angles, velocities, torques and the orientation of the base. Returns: The observation list. observation[0:8] are motor angles. observation[8:16] are motor velocities, observation[16:24] are motor torques. observation[24:28] is the orientation of the base, in quaternion form. """ observation = [] observation.extend(self.minitaur.GetTrueMotorAngles().tolist()) observation.extend(self.minitaur.GetTrueMotorVelocities().tolist()) observation.extend(self.minitaur.GetTrueMotorTorques().tolist()) observation.extend(list(self.minitaur.GetTrueBaseOrientation())) self._true_observation = observation return self._true_observation def _get_observation_upper_bound(self): """Get the upper bound of the observation. Returns: The upper bound of an observation. See GetObservation() for the details of each element of an observation. """ upper_bound = np.zeros(self._get_observation_dimension()) num_motors = self.minitaur.num_motors upper_bound[0:num_motors] = math.pi # Joint angle. upper_bound[num_motors:2 * num_motors] = (motor.MOTOR_SPEED_LIMIT) # Joint velocity. upper_bound[2 * num_motors:3 * num_motors] = (motor.OBSERVED_TORQUE_LIMIT) # Joint torque. upper_bound[3 * num_motors:] = 1.0 # Quaternion of base orientation. return upper_bound def _get_observation_lower_bound(self): """Get the lower bound of the observation.""" return -self._get_observation_upper_bound() def _get_observation_dimension(self): """Get the length of the observation list. Returns: The length of the observation list. """ return len(self._get_observation()) if parse_version(gym.__version__) < parse_version('0.9.6'): _render = render _reset = reset _seed = seed _step = step def set_time_step(self, control_step, simulation_step=0.001): """Sets the time step of the environment. Args: control_step: The time period (in seconds) between two adjacent control actions are applied. simulation_step: The simulation time step in PyBullet. By default, the simulation step is 0.001s, which is a good trade-off between simulation speed and accuracy. Raises: ValueError: If the control step is smaller than the simulation step. """ if control_step < simulation_step: raise ValueError("Control step should be larger than or equal to simulation step.") self.control_time_step = control_step self._time_step = simulation_step self._action_repeat = int(round(control_step / simulation_step)) self._num_bullet_solver_iterations = (NUM_SIMULATION_ITERATION_STEPS / self._action_repeat) self._pybullet_client.setPhysicsEngineParameter( numSolverIterations=self._num_bullet_solver_iterations) self._pybullet_client.setTimeStep(self._time_step) self.minitaur.SetTimeSteps(action_repeat=self._action_repeat, simulation_step=self._time_step) @property def pybullet_client(self): return self._pybullet_client @property def ground_id(self): return self._ground_id @ground_id.setter def ground_id(self, new_ground_id): self._ground_id = new_ground_id @property def env_step_counter(self): return self._env_step_counter
nrz/ylikuutio
external/bullet3/examples/pybullet/gym/pybullet_envs/minitaur/envs/minitaur_gym_env.py
Python
agpl-3.0
25,350
# encoding: utf-8 from .OpeningHours import ParseException, OpeningHours
ypid/pyopening_hours
pyopening_hours/__init__.py
Python
agpl-3.0
74
# # Copyright (C) 2011 - 2014 Instructure, Inc. # # This file is part of Canvas. # # Canvas 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, version 3 of the License. # # Canvas 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/>. # # # enforce the version of bundler itself, to avoid any surprises req_bundler_version_floor, req_bundler_version_ceiling = '1.10.1', '1.12.5' bundler_requirements = [">=#{req_bundler_version_floor}", "<=#{req_bundler_version_ceiling}"] gem 'bundler', bundler_requirements # we still manually do this check because older bundler versions don't validate the version requirement # of the bundler gem once the bundle has been initially installed unless Gem::Requirement.new(*bundler_requirements).satisfied_by?(Gem::Version.new(Bundler::VERSION)) if Gem::Version.new(Bundler::VERSION) < Gem::Version.new(req_bundler_version_floor) bundle_command = "gem install bundler -v #{req_bundler_version_ceiling}" else require 'shellwords' bundle_command = "bundle _#{req_bundler_version_ceiling}_ " + "#{ARGV.map { |a| Shellwords.escape(a) }.join(' ')}" end warn "Bundler version #{req_bundler_version_floor} is required; " + "you're currently running #{Bundler::VERSION}. " + "Maybe try `#{bundle_command}`, or " + "`gem uninstall bundler -v #{Bundler::VERSION}`." exit 1 end # NOTE: this has to use 1.8.7 hash syntax to not raise a parser exception on 1.8.7 if RUBY_VERSION >= "2.1" && RUBY_VERSION < "2.2" ruby RUBY_VERSION, :engine => 'ruby', :engine_version => RUBY_VERSION elsif RUBY_VERSION >= "2.2" && RUBY_VERSION < "2.3" ruby RUBY_VERSION, :engine => 'ruby', :engine_version => RUBY_VERSION elsif RUBY_VERSION >= "2.3.1" && RUBY_VERSION < "2.4" puts "Ruby 2.3 support is untested" ruby RUBY_VERSION, :engine => 'ruby', :engine_version => RUBY_VERSION else ruby '2.1.6', :engine => 'ruby', :engine_version => '2.1.6' end # force a different lockfile for rails 4.2 unless CANVAS_RAILS4_0 Bundler::SharedHelpers.class_eval do class << self def default_lockfile Pathname.new("#{Bundler.default_gemfile}.lock4_2") end end end Bundler::Dsl.class_eval do def to_definition(lockfile, unlock) @sources << @rubygems_source if @sources.respond_to?(:include?) && !@sources.include?(@rubygems_source) Definition.new(Bundler.default_lockfile, @dependencies, @sources, unlock, @ruby_version) end end end git_source(:github) do |repo_name| repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") "https://github.com/#{repo_name}.git" end gem 'syck', '1.0.4' gem 'iconv', '1.0.4'
dgynn/canvas-lms
Gemfile.d/_before.rb
Ruby
agpl-3.0
3,119
/* * Funambol is a mobile platform developed by Funambol, Inc. * Copyright (C) 2004 - 2007 Funambol, Inc. * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License version 3 as published by * the Free Software Foundation with the addition of the following permission * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED * WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. * * 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 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 or write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301 USA. * * You can contact Funambol, Inc. headquarters at 643 Bair Island Road, Suite * 305, Redwood City, CA 94063, USA, or at email address info@funambol.com. * * The interactive user interfaces in modified source and object code versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU Affero General Public License version 3. * * In accordance with Section 7(b) of the GNU Affero General Public License * version 3, these Appropriate Legal Notices must retain the display of the * "Powered by Funambol" logo. If the display of the logo is not reasonably * feasible for technical reasons, the Appropriate Legal Notices must display * the words "Powered by Funambol". */ package com.funambol.admin.ui; import java.awt.BorderLayout; import org.openide.explorer.ExplorerManager; import org.openide.explorer.ExplorerUtils; import org.openide.explorer.view.BeanTreeView; import org.openide.explorer.view.TreeView; import org.openide.nodes.Node; import org.openide.util.Lookup; import org.openide.windows.TopComponent; import com.funambol.admin.main.SyncAdminController; import com.funambol.admin.util.Bundle; /** * Extended Explorer Panel. * * * @version $Id: ServerExplorer.java,v 1.10 2007-11-28 10:28:18 nichele Exp $ **/ public class ServerExplorer extends TopComponent implements ExplorerManager.Provider, Lookup.Provider { private static String name = Bundle.getMessage(Bundle.EXPLORER_TITLE) + " v." + Bundle.getMessage(Bundle.VERSION); // ------------------------------------------------------------ Private data /** composited view */ protected TreeView view; /** explorer manager */ private ExplorerManager explorerManager; /** mini status bar */ private MiniStatusBar miniStatusBar; // ------------------------------------------------------------ Constructors /** * Constructor */ public ServerExplorer() { explorerManager = new ExplorerManager(); // // Now we create the root node // SyncAdminController baseNode = new SyncAdminController(); ExplorerUtil.setSyncAdminController(baseNode); ExplorerUtil.setServerExplorer(this); explorerManager.setRootContext(baseNode); setDisplayName(name); setName(name); } // ---------------------------------------------------------- Public methods /** * Sets a new controller */ public void setSyncAdminController(SyncAdminController controller) { explorerManager.setRootContext(controller); } /** * Returns this explorer manager * * @return this explorer manager */ public ExplorerManager getExplorerManager() { return explorerManager; } /** * Returns composited view * @return view TreeView */ public TreeView getTreeView() { return view; } /** * Returns root node * @return root node */ public Node getRootContext() { return getExplorerManager().getRootContext(); } // It is good idea to switch all listeners on and off when the // component is shown or hidden. In the case of TopComponent use: protected void componentActivated() { ExplorerUtils.activateActions(explorerManager, true); } protected void componentDeactivated() { ExplorerUtils.activateActions(explorerManager, false); } /** * Overriden to explicitely set persistence type of this component * to PERSISTENCE_NEVER */ public int getPersistenceType() { return TopComponent.PERSISTENCE_NEVER; } //---------------------------------------- // Overrides javax.swing. method //---------------------------------------- /** * Updated accessible description of the tree view * @param text String */ public void setToolTipText(String text) { super.setToolTipText(text); if (view != null) { view.getAccessibleContext().setAccessibleDescription(text); } } //---------------------------------------- // Overrides javax.swing. method //---------------------------------------- /** * Checks if explorer panel can be close. We always return false, so that * the user cannot close it. * * @return always false */ public boolean canClose() { return false; } // ------------------------------------------------------- Protected methods protected String preferredID() { return "server"; } /** * Initializes gui of this component. Subclasses can override * this method to install their own gui. * @return Tree view that will serve as main view for this explorer. */ protected TreeView initGui() { view = new BeanTreeView(); setLayout(new BorderLayout()); add(view, BorderLayout.CENTER); view.setRootVisible(true); return view; } //---------------------------------------- // Overrides javax.swing. method //---------------------------------------- /** * Initialize visual content of component */ protected void componentShowing() { setDisplayName(name); setName(name); super.componentShowing(); if (view == null) { initGui(); } } //---------------------------------------- // Overrides javax.swing. method //---------------------------------------- /** * Sets the title to the name of the root context only */ protected void updateTitle() { // set name by the root context setName(getExplorerManager().getRootContext().getDisplayName()); } // --------------------------------------------------------- Private methods }
accesstest3/cfunambol
admin-suite/admin/src/com/funambol/admin/ui/ServerExplorer.java
Java
agpl-3.0
7,043
import React from 'react'; import SPELLS from 'common/SPELLS'; import Panel from 'interface/others/Panel'; import CooldownOverview from 'interface/others/CooldownOverview'; import CoreCooldownThroughputTracker, { BUILT_IN_SUMMARY_TYPES } from 'parser/shared/modules/CooldownThroughputTracker'; class ProcTracker extends CoreCooldownThroughputTracker { static cooldownSpells = [ { spell: SPELLS.ASCENDANCE_TALENT_ENHANCEMENT, summary: [ BUILT_IN_SUMMARY_TYPES.DAMAGE, ], }, ]; tab() { return { title: 'Procs', url: 'procs', render: () => ( <Panel> <CooldownOverview fightStart={this.owner.fight.start_time} fightEnd={this.owner.fight.end_time} cooldowns={this.pastCooldowns} /> </Panel> ), }; } } export default ProcTracker;
fyruna/WoWAnalyzer
src/parser/shaman/enhancement/modules/features/ProcTracker.js
JavaScript
agpl-3.0
874
Bookyt::Application.routes.draw do # Root root :to => "overview#index" # I18n filter 'locale' # Tenancy devise_for :admin_users namespace :admin do match '/' => redirect('/admin/tenants') resources :tenants end get "setup" => "setup#tenant" scope 'setup' do get "accounting" => "setup#accounting" put "accounting" => "setup#accounting" get "select_template" => "setup#select_template" post "load_template" => "setup#load_template" end # static pages get 'imprint' => 'static_pages#imprint' # Authorization devise_for :users, :controllers => { :omniauth_callbacks => "omniauth_callbacks" } resources :users # Search get "search" => "search#search" # Accounting resources :account_types resources :tenants, only: [:show, :update] do member do get :balance_sheet, :profit_sheet, :vat_report end resources :attachments resources :backups do collection do post :dump end member do post :restore end end end resources :companies do resources :attachments member do get :new_phone_number end collection do get :new_phone_number end end # Attachments resources :attachments do member do get :download end end # Contacts resources :people do resources :attachments member do get :new_phone_number end collection do get :new_phone_number end end resources :employees do resources :attachments member do get :new_phone_number end collection do get :new_phone_number end end resources :employments resources :banks do resources :attachments member do get :new_phone_number end collection do get :new_phone_number end end # Invoices resources :invoices do resources :simple_bookings resources :attachments member do get :copy end end resources :credit_invoices do member do get :copy end resources :attachments member do get :new_line_item end collection do get :new_line_item get :new_company end end resources :debit_invoices do member do get :letter get :copy end resources :attachments member do get :new_line_item end collection do get :new_line_item get :new_customer end end resources :customers do resources :invoices resources :attachments member do get :new_phone_number end collection do get :new_phone_number end end # Expenses get "expenses/new" => "expenses#new", :as => :new_expense get "expenses/new_vat" => "expenses#new_vat", :as => :new_vat_expense post "expenses" => "expenses#create", :as => :create_expense resources :bookings_batch_edit, :only => [:index, :update] resources :direct_bookings resources :bank_accounts do member do get :csv_bookings end resources :bookings resources :attachments end # Booking import resources :booking_imports resources :booking_import_attachments resources :mt940_imports resources :raiffeisen_csv_imports # Settings resources "settings" do collection do get :vesr post :vesr, :to => 'settings#update_vesr' end end resources :charge_rates resources :charge_booking_templates resources :debit_direct_files, :only => [:create, :show, :index] mount Bookyt::API => '/api' end
wtag/bookyt
config/routes.rb
Ruby
agpl-3.0
3,514
/* This file is part of VoltDB. * Copyright (C) 2008-2014 VoltDB Inc. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ package org.voltcore.zk; import java.util.ArrayList; import java.util.Map; import java.util.TreeMap; import java.util.concurrent.Semaphore; import org.apache.zookeeper_voltpatches.WatchedEvent; import org.apache.zookeeper_voltpatches.Watcher; import org.apache.zookeeper_voltpatches.Watcher.Event.KeeperState; import org.apache.zookeeper_voltpatches.ZooKeeper; import org.voltcore.messaging.HostMessenger; import org.voltcore.utils.PortGenerator; import com.google_voltpatches.common.collect.ImmutableSet; import com.google_voltpatches.common.collect.Sets; /** * */ public class ZKTestBase { PortGenerator m_ports = new PortGenerator(); protected Map<Integer, Integer> m_siteIdToZKPort; protected ArrayList<HostMessenger> m_messengers; protected ArrayList<ZooKeeper> m_clients; protected void setUpZK(int sites) throws Exception { m_siteIdToZKPort = new TreeMap<Integer, Integer>(); m_clients = new ArrayList<ZooKeeper>(); m_messengers = new ArrayList<HostMessenger>(); for (int ii = 0; ii < sites; ii++) { HostMessenger.Config config = new HostMessenger.Config(); config.internalPort += ii; int externalPort = m_ports.next(); config.zkInterface = "127.0.0.1:" + externalPort; m_siteIdToZKPort.put(ii, externalPort); config.networkThreads = 1; HostMessenger hm = new HostMessenger(config); hm.start(); m_messengers.add(hm); } } protected void tearDownZK() throws Exception { for (ZooKeeper keeper : m_clients) { keeper.close(); } m_clients.clear(); for (HostMessenger hm : m_messengers) { if (hm != null) { hm.shutdown(); } } m_messengers.clear(); } protected ZooKeeper getClient(int site) throws Exception { final Semaphore permit = new Semaphore(0); int clientPort = m_siteIdToZKPort.get(site); ZooKeeper keeper = new ZooKeeper("127.0.0.1:" + Integer.toString(clientPort), 4000, new Watcher() { @Override public void process(WatchedEvent event) { if (event.getState() == KeeperState.SyncConnected) { permit.release(); } System.out.println(event); }}, Sets.<Long>newHashSet()); m_clients.add(keeper); permit.acquire(); return keeper; } }
zheguang/voltdb
tests/frontend/org/voltcore/zk/ZKTestBase.java
Java
agpl-3.0
3,634
/* * (c) Copyright Ascensio System SIA 2010-2015 * * This program is a free software product. You can redistribute it and/or * modify it under the terms of the GNU Affero General Public License (AGPL) * version 3 as published by the Free Software Foundation. In accordance with * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect * that Ascensio System SIA expressly excludes the warranty of non-infringement * of any third-party rights. * * This program is distributed WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html * * You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, * EU, LV-1021. * * The interactive user interfaces in modified source and object code versions * of the Program must display Appropriate Legal Notices, as required under * Section 5 of the GNU AGPL version 3. * * Pursuant to Section 7(b) of the License you must retain the original Product * logo when distributing the program. Pursuant to Section 7(e) we decline to * grant you any rights under trademark law for use of our trademarks. * * All the Product's GUI elements, including illustrations and icon sets, as * well as technical writing content are licensed under the terms of the * Creative Commons Attribution-ShareAlike 4.0 International. See the License * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ "use strict"; function CreateGeometry(prst) { var f = new Geometry(); switch (prst) { case "accentBorderCallout1": f.AddAdj("adj1", 15, "18750"); f.AddAdj("adj2", 15, "-8333"); f.AddAdj("adj3", 15, "112500"); f.AddAdj("adj4", 15, "-38333"); f.AddGuide("y1", 0, "h", "adj1", "100000"); f.AddGuide("x1", 0, "w", "adj2", "100000"); f.AddGuide("y2", 0, "h", "adj3", "100000"); f.AddGuide("x2", 0, "w", "adj4", "100000"); f.AddHandleXY("adj2", "-2147483647", "2147483647", "adj1", "-2147483647", "2147483647", "x1", "y1"); f.AddHandleXY("adj4", "-2147483647", "2147483647", "adj3", "-2147483647", "2147483647", "x2", "y2"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, false, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "x1", "t"); f.AddPathCommand(6); f.AddPathCommand(2, "x1", "b"); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y1"); f.AddPathCommand(2, "x2", "y2"); break; case "accentBorderCallout2": f.AddAdj("adj1", 15, "18750"); f.AddAdj("adj2", 15, "-8333"); f.AddAdj("adj3", 15, "18750"); f.AddAdj("adj4", 15, "-16667"); f.AddAdj("adj5", 15, "112500"); f.AddAdj("adj6", 15, "-46667"); f.AddGuide("y1", 0, "h", "adj1", "100000"); f.AddGuide("x1", 0, "w", "adj2", "100000"); f.AddGuide("y2", 0, "h", "adj3", "100000"); f.AddGuide("x2", 0, "w", "adj4", "100000"); f.AddGuide("y3", 0, "h", "adj5", "100000"); f.AddGuide("x3", 0, "w", "adj6", "100000"); f.AddHandleXY("adj2", "-2147483647", "2147483647", "adj1", "-2147483647", "2147483647", "x1", "y1"); f.AddHandleXY("adj4", "-2147483647", "2147483647", "adj3", "-2147483647", "2147483647", "x2", "y2"); f.AddHandleXY("adj6", "-2147483647", "2147483647", "adj5", "-2147483647", "2147483647", "x3", "y3"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, false, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "x1", "t"); f.AddPathCommand(6); f.AddPathCommand(2, "x1", "b"); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y1"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "x3", "y3"); break; case "accentBorderCallout3": f.AddAdj("adj1", 15, "18750"); f.AddAdj("adj2", 15, "-8333"); f.AddAdj("adj3", 15, "18750"); f.AddAdj("adj4", 15, "-16667"); f.AddAdj("adj5", 15, "100000"); f.AddAdj("adj6", 15, "-16667"); f.AddAdj("adj7", 15, "112963"); f.AddAdj("adj8", 15, "-8333"); f.AddGuide("y1", 0, "h", "adj1", "100000"); f.AddGuide("x1", 0, "w", "adj2", "100000"); f.AddGuide("y2", 0, "h", "adj3", "100000"); f.AddGuide("x2", 0, "w", "adj4", "100000"); f.AddGuide("y3", 0, "h", "adj5", "100000"); f.AddGuide("x3", 0, "w", "adj6", "100000"); f.AddGuide("y4", 0, "h", "adj7", "100000"); f.AddGuide("x4", 0, "w", "adj8", "100000"); f.AddHandleXY("adj2", "-2147483647", "2147483647", "adj1", "-2147483647", "2147483647", "x1", "y1"); f.AddHandleXY("adj4", "-2147483647", "2147483647", "adj3", "-2147483647", "2147483647", "x2", "y2"); f.AddHandleXY("adj6", "-2147483647", "2147483647", "adj5", "-2147483647", "2147483647", "x3", "y3"); f.AddHandleXY("adj8", "-2147483647", "2147483647", "adj7", "-2147483647", "2147483647", "x4", "y4"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, false, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "x1", "t"); f.AddPathCommand(6); f.AddPathCommand(2, "x1", "b"); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y1"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "x3", "y3"); f.AddPathCommand(2, "x4", "y4"); break; case "accentCallout1": f.AddAdj("adj1", 15, "18750"); f.AddAdj("adj2", 15, "-8333"); f.AddAdj("adj3", 15, "112500"); f.AddAdj("adj4", 15, "-38333"); f.AddGuide("y1", 0, "h", "adj1", "100000"); f.AddGuide("x1", 0, "w", "adj2", "100000"); f.AddGuide("y2", 0, "h", "adj3", "100000"); f.AddGuide("x2", 0, "w", "adj4", "100000"); f.AddHandleXY("adj2", "-2147483647", "2147483647", "adj1", "-2147483647", "2147483647", "x1", "y1"); f.AddHandleXY("adj4", "-2147483647", "2147483647", "adj3", "-2147483647", "2147483647", "x2", "y2"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "x1", "t"); f.AddPathCommand(6); f.AddPathCommand(2, "x1", "b"); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y1"); f.AddPathCommand(2, "x2", "y2"); break; case "accentCallout2": f.AddAdj("adj1", 15, "18750"); f.AddAdj("adj2", 15, "-8333"); f.AddAdj("adj3", 15, "18750"); f.AddAdj("adj4", 15, "-16667"); f.AddAdj("adj5", 15, "112500"); f.AddAdj("adj6", 15, "-46667"); f.AddGuide("y1", 0, "h", "adj1", "100000"); f.AddGuide("x1", 0, "w", "adj2", "100000"); f.AddGuide("y2", 0, "h", "adj3", "100000"); f.AddGuide("x2", 0, "w", "adj4", "100000"); f.AddGuide("y3", 0, "h", "adj5", "100000"); f.AddGuide("x3", 0, "w", "adj6", "100000"); f.AddHandleXY("adj2", "-2147483647", "2147483647", "adj1", "-2147483647", "2147483647", "x1", "y1"); f.AddHandleXY("adj4", "-2147483647", "2147483647", "adj3", "-2147483647", "2147483647", "x2", "y2"); f.AddHandleXY("adj6", "-2147483647", "2147483647", "adj5", "-2147483647", "2147483647", "x3", "y3"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "x1", "t"); f.AddPathCommand(6); f.AddPathCommand(2, "x1", "b"); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y1"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "x3", "y3"); break; case "accentCallout3": f.AddAdj("adj1", 15, "18750"); f.AddAdj("adj2", 15, "-8333"); f.AddAdj("adj3", 15, "18750"); f.AddAdj("adj4", 15, "-16667"); f.AddAdj("adj5", 15, "100000"); f.AddAdj("adj6", 15, "-16667"); f.AddAdj("adj7", 15, "112963"); f.AddAdj("adj8", 15, "-8333"); f.AddGuide("y1", 0, "h", "adj1", "100000"); f.AddGuide("x1", 0, "w", "adj2", "100000"); f.AddGuide("y2", 0, "h", "adj3", "100000"); f.AddGuide("x2", 0, "w", "adj4", "100000"); f.AddGuide("y3", 0, "h", "adj5", "100000"); f.AddGuide("x3", 0, "w", "adj6", "100000"); f.AddGuide("y4", 0, "h", "adj7", "100000"); f.AddGuide("x4", 0, "w", "adj8", "100000"); f.AddHandleXY("adj2", "-2147483647", "2147483647", "adj1", "-2147483647", "2147483647", "x1", "y1"); f.AddHandleXY("adj4", "-2147483647", "2147483647", "adj3", "-2147483647", "2147483647", "x2", "y2"); f.AddHandleXY("adj6", "-2147483647", "2147483647", "adj5", "-2147483647", "2147483647", "x3", "y3"); f.AddHandleXY("adj8", "-2147483647", "2147483647", "adj7", "-2147483647", "2147483647", "x4", "y4"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "x1", "t"); f.AddPathCommand(6); f.AddPathCommand(2, "x1", "b"); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y1"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "x3", "y3"); f.AddPathCommand(2, "x4", "y4"); break; case "actionButtonBackPrevious": f.AddGuide("dx2", 0, "ss", "3", "8"); f.AddGuide("g9", 1, "vc", "0", "dx2"); f.AddGuide("g10", 1, "vc", "dx2", "0"); f.AddGuide("g11", 1, "hc", "0", "dx2"); f.AddGuide("g12", 1, "hc", "dx2", "0"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(1, "g11", "vc"); f.AddPathCommand(2, "g12", "g9"); f.AddPathCommand(2, "g12", "g10"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darken", false, undefined, undefined); f.AddPathCommand(1, "g11", "vc"); f.AddPathCommand(2, "g12", "g9"); f.AddPathCommand(2, "g12", "g10"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "g11", "vc"); f.AddPathCommand(2, "g12", "g9"); f.AddPathCommand(2, "g12", "g10"); f.AddPathCommand(6); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); break; case "actionButtonBeginning": f.AddGuide("dx2", 0, "ss", "3", "8"); f.AddGuide("g9", 1, "vc", "0", "dx2"); f.AddGuide("g10", 1, "vc", "dx2", "0"); f.AddGuide("g11", 1, "hc", "0", "dx2"); f.AddGuide("g12", 1, "hc", "dx2", "0"); f.AddGuide("g13", 0, "ss", "3", "4"); f.AddGuide("g14", 0, "g13", "1", "8"); f.AddGuide("g15", 0, "g13", "1", "4"); f.AddGuide("g16", 1, "g11", "g14", "0"); f.AddGuide("g17", 1, "g11", "g15", "0"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(1, "g17", "vc"); f.AddPathCommand(2, "g12", "g9"); f.AddPathCommand(2, "g12", "g10"); f.AddPathCommand(6); f.AddPathCommand(1, "g16", "g9"); f.AddPathCommand(2, "g11", "g9"); f.AddPathCommand(2, "g11", "g10"); f.AddPathCommand(2, "g16", "g10"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darken", false, undefined, undefined); f.AddPathCommand(1, "g17", "vc"); f.AddPathCommand(2, "g12", "g9"); f.AddPathCommand(2, "g12", "g10"); f.AddPathCommand(6); f.AddPathCommand(1, "g16", "g9"); f.AddPathCommand(2, "g11", "g9"); f.AddPathCommand(2, "g11", "g10"); f.AddPathCommand(2, "g16", "g10"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "g17", "vc"); f.AddPathCommand(2, "g12", "g9"); f.AddPathCommand(2, "g12", "g10"); f.AddPathCommand(6); f.AddPathCommand(1, "g16", "g9"); f.AddPathCommand(2, "g16", "g10"); f.AddPathCommand(2, "g11", "g10"); f.AddPathCommand(2, "g11", "g9"); f.AddPathCommand(6); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); break; case "actionButtonBlank": f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); break; case "actionButtonDocument": f.AddGuide("dx2", 0, "ss", "3", "8"); f.AddGuide("g9", 1, "vc", "0", "dx2"); f.AddGuide("g10", 1, "vc", "dx2", "0"); f.AddGuide("dx1", 0, "ss", "9", "32"); f.AddGuide("g11", 1, "hc", "0", "dx1"); f.AddGuide("g12", 1, "hc", "dx1", "0"); f.AddGuide("g13", 0, "ss", "3", "16"); f.AddGuide("g14", 1, "g12", "0", "g13"); f.AddGuide("g15", 1, "g9", "g13", "0"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(1, "g11", "g9"); f.AddPathCommand(2, "g14", "g9"); f.AddPathCommand(2, "g12", "g15"); f.AddPathCommand(2, "g12", "g10"); f.AddPathCommand(2, "g11", "g10"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darkenLess", false, undefined, undefined); f.AddPathCommand(1, "g11", "g9"); f.AddPathCommand(2, "g14", "g9"); f.AddPathCommand(2, "g14", "g15"); f.AddPathCommand(2, "g12", "g15"); f.AddPathCommand(2, "g12", "g10"); f.AddPathCommand(2, "g11", "g10"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darken", false, undefined, undefined); f.AddPathCommand(1, "g14", "g9"); f.AddPathCommand(2, "g14", "g15"); f.AddPathCommand(2, "g12", "g15"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "g11", "g9"); f.AddPathCommand(2, "g14", "g9"); f.AddPathCommand(2, "g12", "g15"); f.AddPathCommand(2, "g12", "g10"); f.AddPathCommand(2, "g11", "g10"); f.AddPathCommand(6); f.AddPathCommand(1, "g12", "g15"); f.AddPathCommand(2, "g14", "g15"); f.AddPathCommand(2, "g14", "g9"); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); break; case "actionButtonEnd": f.AddGuide("dx2", 0, "ss", "3", "8"); f.AddGuide("g9", 1, "vc", "0", "dx2"); f.AddGuide("g10", 1, "vc", "dx2", "0"); f.AddGuide("g11", 1, "hc", "0", "dx2"); f.AddGuide("g12", 1, "hc", "dx2", "0"); f.AddGuide("g13", 0, "ss", "3", "4"); f.AddGuide("g14", 0, "g13", "3", "4"); f.AddGuide("g15", 0, "g13", "7", "8"); f.AddGuide("g16", 1, "g11", "g14", "0"); f.AddGuide("g17", 1, "g11", "g15", "0"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(1, "g16", "vc"); f.AddPathCommand(2, "g11", "g9"); f.AddPathCommand(2, "g11", "g10"); f.AddPathCommand(6); f.AddPathCommand(1, "g17", "g9"); f.AddPathCommand(2, "g12", "g9"); f.AddPathCommand(2, "g12", "g10"); f.AddPathCommand(2, "g17", "g10"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darken", false, undefined, undefined); f.AddPathCommand(1, "g16", "vc"); f.AddPathCommand(2, "g11", "g9"); f.AddPathCommand(2, "g11", "g10"); f.AddPathCommand(6); f.AddPathCommand(1, "g17", "g9"); f.AddPathCommand(2, "g12", "g9"); f.AddPathCommand(2, "g12", "g10"); f.AddPathCommand(2, "g17", "g10"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "g16", "vc"); f.AddPathCommand(2, "g11", "g10"); f.AddPathCommand(2, "g11", "g9"); f.AddPathCommand(6); f.AddPathCommand(1, "g17", "g9"); f.AddPathCommand(2, "g12", "g9"); f.AddPathCommand(2, "g12", "g10"); f.AddPathCommand(2, "g17", "g10"); f.AddPathCommand(6); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); break; case "actionButtonForwardNext": f.AddGuide("dx2", 0, "ss", "3", "8"); f.AddGuide("g9", 1, "vc", "0", "dx2"); f.AddGuide("g10", 1, "vc", "dx2", "0"); f.AddGuide("g11", 1, "hc", "0", "dx2"); f.AddGuide("g12", 1, "hc", "dx2", "0"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(1, "g12", "vc"); f.AddPathCommand(2, "g11", "g9"); f.AddPathCommand(2, "g11", "g10"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darken", false, undefined, undefined); f.AddPathCommand(1, "g12", "vc"); f.AddPathCommand(2, "g11", "g9"); f.AddPathCommand(2, "g11", "g10"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "g12", "vc"); f.AddPathCommand(2, "g11", "g10"); f.AddPathCommand(2, "g11", "g9"); f.AddPathCommand(6); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); break; case "actionButtonHelp": f.AddGuide("dx2", 0, "ss", "3", "8"); f.AddGuide("g9", 1, "vc", "0", "dx2"); f.AddGuide("g11", 1, "hc", "0", "dx2"); f.AddGuide("g13", 0, "ss", "3", "4"); f.AddGuide("g14", 0, "g13", "1", "7"); f.AddGuide("g15", 0, "g13", "3", "14"); f.AddGuide("g16", 0, "g13", "2", "7"); f.AddGuide("g19", 0, "g13", "3", "7"); f.AddGuide("g20", 0, "g13", "4", "7"); f.AddGuide("g21", 0, "g13", "17", "28"); f.AddGuide("g23", 0, "g13", "21", "28"); f.AddGuide("g24", 0, "g13", "11", "14"); f.AddGuide("g27", 1, "g9", "g16", "0"); f.AddGuide("g29", 1, "g9", "g21", "0"); f.AddGuide("g30", 1, "g9", "g23", "0"); f.AddGuide("g31", 1, "g9", "g24", "0"); f.AddGuide("g33", 1, "g11", "g15", "0"); f.AddGuide("g36", 1, "g11", "g19", "0"); f.AddGuide("g37", 1, "g11", "g20", "0"); f.AddGuide("g41", 0, "g13", "1", "14"); f.AddGuide("g42", 0, "g13", "3", "28"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(1, "g33", "g27"); f.AddPathCommand(3, "g16", "g16", "cd2", "cd2"); f.AddPathCommand(3, "g14", "g15", "0", "cd4"); f.AddPathCommand(3, "g41", "g42", "_3cd4", "-5400000"); f.AddPathCommand(2, "g37", "g30"); f.AddPathCommand(2, "g36", "g30"); f.AddPathCommand(2, "g36", "g29"); f.AddPathCommand(3, "g14", "g15", "cd2", "cd4"); f.AddPathCommand(3, "g41", "g42", "cd4", "-5400000"); f.AddPathCommand(3, "g14", "g14", "0", "-10800000"); f.AddPathCommand(6); f.AddPathCommand(1, "hc", "g31"); f.AddPathCommand(3, "g42", "g42", "_3cd4", "21600000"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darken", false, undefined, undefined); f.AddPathCommand(1, "g33", "g27"); f.AddPathCommand(3, "g16", "g16", "cd2", "cd2"); f.AddPathCommand(3, "g14", "g15", "0", "cd4"); f.AddPathCommand(3, "g41", "g42", "_3cd4", "-5400000"); f.AddPathCommand(2, "g37", "g30"); f.AddPathCommand(2, "g36", "g30"); f.AddPathCommand(2, "g36", "g29"); f.AddPathCommand(3, "g14", "g15", "cd2", "cd4"); f.AddPathCommand(3, "g41", "g42", "cd4", "-5400000"); f.AddPathCommand(3, "g14", "g14", "0", "-10800000"); f.AddPathCommand(6); f.AddPathCommand(1, "hc", "g31"); f.AddPathCommand(3, "g42", "g42", "_3cd4", "21600000"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "g33", "g27"); f.AddPathCommand(3, "g16", "g16", "cd2", "cd2"); f.AddPathCommand(3, "g14", "g15", "0", "cd4"); f.AddPathCommand(3, "g41", "g42", "_3cd4", "-5400000"); f.AddPathCommand(2, "g37", "g30"); f.AddPathCommand(2, "g36", "g30"); f.AddPathCommand(2, "g36", "g29"); f.AddPathCommand(3, "g14", "g15", "cd2", "cd4"); f.AddPathCommand(3, "g41", "g42", "cd4", "-5400000"); f.AddPathCommand(3, "g14", "g14", "0", "-10800000"); f.AddPathCommand(6); f.AddPathCommand(1, "hc", "g31"); f.AddPathCommand(3, "g42", "g42", "_3cd4", "21600000"); f.AddPathCommand(6); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); break; case "actionButtonHome": f.AddGuide("dx2", 0, "ss", "3", "8"); f.AddGuide("g9", 1, "vc", "0", "dx2"); f.AddGuide("g10", 1, "vc", "dx2", "0"); f.AddGuide("g11", 1, "hc", "0", "dx2"); f.AddGuide("g12", 1, "hc", "dx2", "0"); f.AddGuide("g13", 0, "ss", "3", "4"); f.AddGuide("g14", 0, "g13", "1", "16"); f.AddGuide("g15", 0, "g13", "1", "8"); f.AddGuide("g16", 0, "g13", "3", "16"); f.AddGuide("g17", 0, "g13", "5", "16"); f.AddGuide("g18", 0, "g13", "7", "16"); f.AddGuide("g19", 0, "g13", "9", "16"); f.AddGuide("g20", 0, "g13", "11", "16"); f.AddGuide("g21", 0, "g13", "3", "4"); f.AddGuide("g22", 0, "g13", "13", "16"); f.AddGuide("g23", 0, "g13", "7", "8"); f.AddGuide("g24", 1, "g9", "g14", "0"); f.AddGuide("g25", 1, "g9", "g16", "0"); f.AddGuide("g26", 1, "g9", "g17", "0"); f.AddGuide("g27", 1, "g9", "g21", "0"); f.AddGuide("g28", 1, "g11", "g15", "0"); f.AddGuide("g29", 1, "g11", "g18", "0"); f.AddGuide("g30", 1, "g11", "g19", "0"); f.AddGuide("g31", 1, "g11", "g20", "0"); f.AddGuide("g32", 1, "g11", "g22", "0"); f.AddGuide("g33", 1, "g11", "g23", "0"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(1, "hc", "g9"); f.AddPathCommand(2, "g11", "vc"); f.AddPathCommand(2, "g28", "vc"); f.AddPathCommand(2, "g28", "g10"); f.AddPathCommand(2, "g33", "g10"); f.AddPathCommand(2, "g33", "vc"); f.AddPathCommand(2, "g12", "vc"); f.AddPathCommand(2, "g32", "g26"); f.AddPathCommand(2, "g32", "g24"); f.AddPathCommand(2, "g31", "g24"); f.AddPathCommand(2, "g31", "g25"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darkenLess", false, undefined, undefined); f.AddPathCommand(1, "g32", "g26"); f.AddPathCommand(2, "g32", "g24"); f.AddPathCommand(2, "g31", "g24"); f.AddPathCommand(2, "g31", "g25"); f.AddPathCommand(6); f.AddPathCommand(1, "g28", "vc"); f.AddPathCommand(2, "g28", "g10"); f.AddPathCommand(2, "g29", "g10"); f.AddPathCommand(2, "g29", "g27"); f.AddPathCommand(2, "g30", "g27"); f.AddPathCommand(2, "g30", "g10"); f.AddPathCommand(2, "g33", "g10"); f.AddPathCommand(2, "g33", "vc"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darken", false, undefined, undefined); f.AddPathCommand(1, "hc", "g9"); f.AddPathCommand(2, "g11", "vc"); f.AddPathCommand(2, "g12", "vc"); f.AddPathCommand(6); f.AddPathCommand(1, "g29", "g27"); f.AddPathCommand(2, "g30", "g27"); f.AddPathCommand(2, "g30", "g10"); f.AddPathCommand(2, "g29", "g10"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "hc", "g9"); f.AddPathCommand(2, "g31", "g25"); f.AddPathCommand(2, "g31", "g24"); f.AddPathCommand(2, "g32", "g24"); f.AddPathCommand(2, "g32", "g26"); f.AddPathCommand(2, "g12", "vc"); f.AddPathCommand(2, "g33", "vc"); f.AddPathCommand(2, "g33", "g10"); f.AddPathCommand(2, "g28", "g10"); f.AddPathCommand(2, "g28", "vc"); f.AddPathCommand(2, "g11", "vc"); f.AddPathCommand(6); f.AddPathCommand(1, "g31", "g25"); f.AddPathCommand(2, "g32", "g26"); f.AddPathCommand(1, "g33", "vc"); f.AddPathCommand(2, "g28", "vc"); f.AddPathCommand(1, "g29", "g10"); f.AddPathCommand(2, "g29", "g27"); f.AddPathCommand(2, "g30", "g27"); f.AddPathCommand(2, "g30", "g10"); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); break; case "actionButtonInformation": f.AddGuide("dx2", 0, "ss", "3", "8"); f.AddGuide("g9", 1, "vc", "0", "dx2"); f.AddGuide("g11", 1, "hc", "0", "dx2"); f.AddGuide("g13", 0, "ss", "3", "4"); f.AddGuide("g14", 0, "g13", "1", "32"); f.AddGuide("g17", 0, "g13", "5", "16"); f.AddGuide("g18", 0, "g13", "3", "8"); f.AddGuide("g19", 0, "g13", "13", "32"); f.AddGuide("g20", 0, "g13", "19", "32"); f.AddGuide("g22", 0, "g13", "11", "16"); f.AddGuide("g23", 0, "g13", "13", "16"); f.AddGuide("g24", 0, "g13", "7", "8"); f.AddGuide("g25", 1, "g9", "g14", "0"); f.AddGuide("g28", 1, "g9", "g17", "0"); f.AddGuide("g29", 1, "g9", "g18", "0"); f.AddGuide("g30", 1, "g9", "g23", "0"); f.AddGuide("g31", 1, "g9", "g24", "0"); f.AddGuide("g32", 1, "g11", "g17", "0"); f.AddGuide("g34", 1, "g11", "g19", "0"); f.AddGuide("g35", 1, "g11", "g20", "0"); f.AddGuide("g37", 1, "g11", "g22", "0"); f.AddGuide("g38", 0, "g13", "3", "32"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(1, "hc", "g9"); f.AddPathCommand(3, "dx2", "dx2", "_3cd4", "21600000"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darken", false, undefined, undefined); f.AddPathCommand(1, "hc", "g9"); f.AddPathCommand(3, "dx2", "dx2", "_3cd4", "21600000"); f.AddPathCommand(6); f.AddPathCommand(1, "hc", "g25"); f.AddPathCommand(3, "g38", "g38", "_3cd4", "21600000"); f.AddPathCommand(1, "g32", "g28"); f.AddPathCommand(2, "g32", "g29"); f.AddPathCommand(2, "g34", "g29"); f.AddPathCommand(2, "g34", "g30"); f.AddPathCommand(2, "g32", "g30"); f.AddPathCommand(2, "g32", "g31"); f.AddPathCommand(2, "g37", "g31"); f.AddPathCommand(2, "g37", "g30"); f.AddPathCommand(2, "g35", "g30"); f.AddPathCommand(2, "g35", "g28"); f.AddPathCommand(6); f.AddPathCommand(0, false, "lighten", false, undefined, undefined); f.AddPathCommand(1, "hc", "g25"); f.AddPathCommand(3, "g38", "g38", "_3cd4", "21600000"); f.AddPathCommand(1, "g32", "g28"); f.AddPathCommand(2, "g35", "g28"); f.AddPathCommand(2, "g35", "g30"); f.AddPathCommand(2, "g37", "g30"); f.AddPathCommand(2, "g37", "g31"); f.AddPathCommand(2, "g32", "g31"); f.AddPathCommand(2, "g32", "g30"); f.AddPathCommand(2, "g34", "g30"); f.AddPathCommand(2, "g34", "g29"); f.AddPathCommand(2, "g32", "g29"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "hc", "g9"); f.AddPathCommand(3, "dx2", "dx2", "_3cd4", "21600000"); f.AddPathCommand(6); f.AddPathCommand(1, "hc", "g25"); f.AddPathCommand(3, "g38", "g38", "_3cd4", "21600000"); f.AddPathCommand(1, "g32", "g28"); f.AddPathCommand(2, "g35", "g28"); f.AddPathCommand(2, "g35", "g30"); f.AddPathCommand(2, "g37", "g30"); f.AddPathCommand(2, "g37", "g31"); f.AddPathCommand(2, "g32", "g31"); f.AddPathCommand(2, "g32", "g30"); f.AddPathCommand(2, "g34", "g30"); f.AddPathCommand(2, "g34", "g29"); f.AddPathCommand(2, "g32", "g29"); f.AddPathCommand(6); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); break; case "actionButtonMovie": f.AddGuide("dx2", 0, "ss", "3", "8"); f.AddGuide("g9", 1, "vc", "0", "dx2"); f.AddGuide("g10", 1, "vc", "dx2", "0"); f.AddGuide("g11", 1, "hc", "0", "dx2"); f.AddGuide("g12", 1, "hc", "dx2", "0"); f.AddGuide("g13", 0, "ss", "3", "4"); f.AddGuide("g14", 0, "g13", "1455", "21600"); f.AddGuide("g15", 0, "g13", "1905", "21600"); f.AddGuide("g16", 0, "g13", "2325", "21600"); f.AddGuide("g17", 0, "g13", "16155", "21600"); f.AddGuide("g18", 0, "g13", "17010", "21600"); f.AddGuide("g19", 0, "g13", "19335", "21600"); f.AddGuide("g20", 0, "g13", "19725", "21600"); f.AddGuide("g21", 0, "g13", "20595", "21600"); f.AddGuide("g22", 0, "g13", "5280", "21600"); f.AddGuide("g23", 0, "g13", "5730", "21600"); f.AddGuide("g24", 0, "g13", "6630", "21600"); f.AddGuide("g25", 0, "g13", "7492", "21600"); f.AddGuide("g26", 0, "g13", "9067", "21600"); f.AddGuide("g27", 0, "g13", "9555", "21600"); f.AddGuide("g28", 0, "g13", "13342", "21600"); f.AddGuide("g29", 0, "g13", "14580", "21600"); f.AddGuide("g30", 0, "g13", "15592", "21600"); f.AddGuide("g31", 1, "g11", "g14", "0"); f.AddGuide("g32", 1, "g11", "g15", "0"); f.AddGuide("g33", 1, "g11", "g16", "0"); f.AddGuide("g34", 1, "g11", "g17", "0"); f.AddGuide("g35", 1, "g11", "g18", "0"); f.AddGuide("g36", 1, "g11", "g19", "0"); f.AddGuide("g37", 1, "g11", "g20", "0"); f.AddGuide("g38", 1, "g11", "g21", "0"); f.AddGuide("g39", 1, "g9", "g22", "0"); f.AddGuide("g40", 1, "g9", "g23", "0"); f.AddGuide("g41", 1, "g9", "g24", "0"); f.AddGuide("g42", 1, "g9", "g25", "0"); f.AddGuide("g43", 1, "g9", "g26", "0"); f.AddGuide("g44", 1, "g9", "g27", "0"); f.AddGuide("g45", 1, "g9", "g28", "0"); f.AddGuide("g46", 1, "g9", "g29", "0"); f.AddGuide("g47", 1, "g9", "g30", "0"); f.AddGuide("g48", 1, "g9", "g31", "0"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(1, "g11", "g39"); f.AddPathCommand(2, "g11", "g44"); f.AddPathCommand(2, "g31", "g44"); f.AddPathCommand(2, "g32", "g43"); f.AddPathCommand(2, "g33", "g43"); f.AddPathCommand(2, "g33", "g47"); f.AddPathCommand(2, "g35", "g47"); f.AddPathCommand(2, "g35", "g45"); f.AddPathCommand(2, "g36", "g45"); f.AddPathCommand(2, "g38", "g46"); f.AddPathCommand(2, "g12", "g46"); f.AddPathCommand(2, "g12", "g41"); f.AddPathCommand(2, "g38", "g41"); f.AddPathCommand(2, "g37", "g42"); f.AddPathCommand(2, "g35", "g42"); f.AddPathCommand(2, "g35", "g41"); f.AddPathCommand(2, "g34", "g40"); f.AddPathCommand(2, "g32", "g40"); f.AddPathCommand(2, "g31", "g39"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darken", false, undefined, undefined); f.AddPathCommand(1, "g11", "g39"); f.AddPathCommand(2, "g11", "g44"); f.AddPathCommand(2, "g31", "g44"); f.AddPathCommand(2, "g32", "g43"); f.AddPathCommand(2, "g33", "g43"); f.AddPathCommand(2, "g33", "g47"); f.AddPathCommand(2, "g35", "g47"); f.AddPathCommand(2, "g35", "g45"); f.AddPathCommand(2, "g36", "g45"); f.AddPathCommand(2, "g38", "g46"); f.AddPathCommand(2, "g12", "g46"); f.AddPathCommand(2, "g12", "g41"); f.AddPathCommand(2, "g38", "g41"); f.AddPathCommand(2, "g37", "g42"); f.AddPathCommand(2, "g35", "g42"); f.AddPathCommand(2, "g35", "g41"); f.AddPathCommand(2, "g34", "g40"); f.AddPathCommand(2, "g32", "g40"); f.AddPathCommand(2, "g31", "g39"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "g11", "g39"); f.AddPathCommand(2, "g31", "g39"); f.AddPathCommand(2, "g32", "g40"); f.AddPathCommand(2, "g34", "g40"); f.AddPathCommand(2, "g35", "g41"); f.AddPathCommand(2, "g35", "g42"); f.AddPathCommand(2, "g37", "g42"); f.AddPathCommand(2, "g38", "g41"); f.AddPathCommand(2, "g12", "g41"); f.AddPathCommand(2, "g12", "g46"); f.AddPathCommand(2, "g38", "g46"); f.AddPathCommand(2, "g36", "g45"); f.AddPathCommand(2, "g35", "g45"); f.AddPathCommand(2, "g35", "g47"); f.AddPathCommand(2, "g33", "g47"); f.AddPathCommand(2, "g33", "g43"); f.AddPathCommand(2, "g32", "g43"); f.AddPathCommand(2, "g31", "g44"); f.AddPathCommand(2, "g11", "g44"); f.AddPathCommand(6); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); break; case "actionButtonReturn": f.AddGuide("dx2", 0, "ss", "3", "8"); f.AddGuide("g9", 1, "vc", "0", "dx2"); f.AddGuide("g10", 1, "vc", "dx2", "0"); f.AddGuide("g11", 1, "hc", "0", "dx2"); f.AddGuide("g12", 1, "hc", "dx2", "0"); f.AddGuide("g13", 0, "ss", "3", "4"); f.AddGuide("g14", 0, "g13", "7", "8"); f.AddGuide("g15", 0, "g13", "3", "4"); f.AddGuide("g16", 0, "g13", "5", "8"); f.AddGuide("g17", 0, "g13", "3", "8"); f.AddGuide("g18", 0, "g13", "1", "4"); f.AddGuide("g19", 1, "g9", "g15", "0"); f.AddGuide("g20", 1, "g9", "g16", "0"); f.AddGuide("g21", 1, "g9", "g18", "0"); f.AddGuide("g22", 1, "g11", "g14", "0"); f.AddGuide("g23", 1, "g11", "g15", "0"); f.AddGuide("g24", 1, "g11", "g16", "0"); f.AddGuide("g25", 1, "g11", "g17", "0"); f.AddGuide("g26", 1, "g11", "g18", "0"); f.AddGuide("g27", 0, "g13", "1", "8"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(1, "g12", "g21"); f.AddPathCommand(2, "g23", "g9"); f.AddPathCommand(2, "hc", "g21"); f.AddPathCommand(2, "g24", "g21"); f.AddPathCommand(2, "g24", "g20"); f.AddPathCommand(3, "g27", "g27", "0", "cd4"); f.AddPathCommand(2, "g25", "g19"); f.AddPathCommand(3, "g27", "g27", "cd4", "cd4"); f.AddPathCommand(2, "g26", "g21"); f.AddPathCommand(2, "g11", "g21"); f.AddPathCommand(2, "g11", "g20"); f.AddPathCommand(3, "g17", "g17", "cd2", "-5400000"); f.AddPathCommand(2, "hc", "g10"); f.AddPathCommand(3, "g17", "g17", "cd4", "-5400000"); f.AddPathCommand(2, "g22", "g21"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darken", false, undefined, undefined); f.AddPathCommand(1, "g12", "g21"); f.AddPathCommand(2, "g23", "g9"); f.AddPathCommand(2, "hc", "g21"); f.AddPathCommand(2, "g24", "g21"); f.AddPathCommand(2, "g24", "g20"); f.AddPathCommand(3, "g27", "g27", "0", "cd4"); f.AddPathCommand(2, "g25", "g19"); f.AddPathCommand(3, "g27", "g27", "cd4", "cd4"); f.AddPathCommand(2, "g26", "g21"); f.AddPathCommand(2, "g11", "g21"); f.AddPathCommand(2, "g11", "g20"); f.AddPathCommand(3, "g17", "g17", "cd2", "-5400000"); f.AddPathCommand(2, "hc", "g10"); f.AddPathCommand(3, "g17", "g17", "cd4", "-5400000"); f.AddPathCommand(2, "g22", "g21"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "g12", "g21"); f.AddPathCommand(2, "g22", "g21"); f.AddPathCommand(2, "g22", "g20"); f.AddPathCommand(3, "g17", "g17", "0", "cd4"); f.AddPathCommand(2, "g25", "g10"); f.AddPathCommand(3, "g17", "g17", "cd4", "cd4"); f.AddPathCommand(2, "g11", "g21"); f.AddPathCommand(2, "g26", "g21"); f.AddPathCommand(2, "g26", "g20"); f.AddPathCommand(3, "g27", "g27", "cd2", "-5400000"); f.AddPathCommand(2, "hc", "g19"); f.AddPathCommand(3, "g27", "g27", "cd4", "-5400000"); f.AddPathCommand(2, "g24", "g21"); f.AddPathCommand(2, "hc", "g21"); f.AddPathCommand(2, "g23", "g9"); f.AddPathCommand(6); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); break; case "actionButtonSound": f.AddGuide("dx2", 0, "ss", "3", "8"); f.AddGuide("g9", 1, "vc", "0", "dx2"); f.AddGuide("g10", 1, "vc", "dx2", "0"); f.AddGuide("g11", 1, "hc", "0", "dx2"); f.AddGuide("g12", 1, "hc", "dx2", "0"); f.AddGuide("g13", 0, "ss", "3", "4"); f.AddGuide("g14", 0, "g13", "1", "8"); f.AddGuide("g15", 0, "g13", "5", "16"); f.AddGuide("g16", 0, "g13", "5", "8"); f.AddGuide("g17", 0, "g13", "11", "16"); f.AddGuide("g18", 0, "g13", "3", "4"); f.AddGuide("g19", 0, "g13", "7", "8"); f.AddGuide("g20", 1, "g9", "g14", "0"); f.AddGuide("g21", 1, "g9", "g15", "0"); f.AddGuide("g22", 1, "g9", "g17", "0"); f.AddGuide("g23", 1, "g9", "g19", "0"); f.AddGuide("g24", 1, "g11", "g15", "0"); f.AddGuide("g25", 1, "g11", "g16", "0"); f.AddGuide("g26", 1, "g11", "g18", "0"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(1, "g11", "g21"); f.AddPathCommand(2, "g11", "g22"); f.AddPathCommand(2, "g24", "g22"); f.AddPathCommand(2, "g25", "g10"); f.AddPathCommand(2, "g25", "g9"); f.AddPathCommand(2, "g24", "g21"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darken", false, undefined, undefined); f.AddPathCommand(1, "g11", "g21"); f.AddPathCommand(2, "g11", "g22"); f.AddPathCommand(2, "g24", "g22"); f.AddPathCommand(2, "g25", "g10"); f.AddPathCommand(2, "g25", "g9"); f.AddPathCommand(2, "g24", "g21"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "g11", "g21"); f.AddPathCommand(2, "g24", "g21"); f.AddPathCommand(2, "g25", "g9"); f.AddPathCommand(2, "g25", "g10"); f.AddPathCommand(2, "g24", "g22"); f.AddPathCommand(2, "g11", "g22"); f.AddPathCommand(6); f.AddPathCommand(1, "g26", "g21"); f.AddPathCommand(2, "g12", "g20"); f.AddPathCommand(1, "g26", "vc"); f.AddPathCommand(2, "g12", "vc"); f.AddPathCommand(1, "g26", "g22"); f.AddPathCommand(2, "g12", "g23"); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); break; case "arc": f.AddAdj("adj1", 15, "16200000"); f.AddAdj("adj2", 15, "0"); f.AddGuide("stAng", 10, "0", "adj1", "21599999"); f.AddGuide("enAng", 10, "0", "adj2", "21599999"); f.AddGuide("sw11", 1, "enAng", "0", "stAng"); f.AddGuide("sw12", 1, "sw11", "21600000", "0"); f.AddGuide("swAng", 3, "sw11", "sw11", "sw12"); f.AddGuide("wt1", 12, "wd2", "stAng"); f.AddGuide("ht1", 7, "hd2", "stAng"); f.AddGuide("dx1", 6, "wd2", "ht1", "wt1"); f.AddGuide("dy1", 11, "hd2", "ht1", "wt1"); f.AddGuide("wt2", 12, "wd2", "enAng"); f.AddGuide("ht2", 7, "hd2", "enAng"); f.AddGuide("dx2", 6, "wd2", "ht2", "wt2"); f.AddGuide("dy2", 11, "hd2", "ht2", "wt2"); f.AddGuide("x1", 1, "hc", "dx1", "0"); f.AddGuide("y1", 1, "vc", "dy1", "0"); f.AddGuide("x2", 1, "hc", "dx2", "0"); f.AddGuide("y2", 1, "vc", "dy2", "0"); f.AddGuide("sw0", 1, "21600000", "0", "stAng"); f.AddGuide("da1", 1, "swAng", "0", "sw0"); f.AddGuide("g1", 8, "x1", "x2"); f.AddGuide("ir", 3, "da1", "r", "g1"); f.AddGuide("sw1", 1, "cd4", "0", "stAng"); f.AddGuide("sw2", 1, "27000000", "0", "stAng"); f.AddGuide("sw3", 3, "sw1", "sw1", "sw2"); f.AddGuide("da2", 1, "swAng", "0", "sw3"); f.AddGuide("g5", 8, "y1", "y2"); f.AddGuide("ib", 3, "da2", "b", "g5"); f.AddGuide("sw4", 1, "cd2", "0", "stAng"); f.AddGuide("sw5", 1, "32400000", "0", "stAng"); f.AddGuide("sw6", 3, "sw4", "sw4", "sw5"); f.AddGuide("da3", 1, "swAng", "0", "sw6"); f.AddGuide("g9", 16, "x1", "x2"); f.AddGuide("il", 3, "da3", "l", "g9"); f.AddGuide("sw7", 1, "_3cd4", "0", "stAng"); f.AddGuide("sw8", 1, "37800000", "0", "stAng"); f.AddGuide("sw9", 3, "sw7", "sw7", "sw8"); f.AddGuide("da4", 1, "swAng", "0", "sw9"); f.AddGuide("g13", 16, "y1", "y2"); f.AddGuide("it", 3, "da4", "t", "g13"); f.AddGuide("cang1", 1, "stAng", "0", "cd4"); f.AddGuide("cang2", 1, "enAng", "cd4", "0"); f.AddGuide("cang3", 2, "cang1", "cang2", "2"); f.AddHandlePolar("adj1", "0", "21599999", undefined, "0", "0", "x1", "y1"); f.AddHandlePolar("adj2", "0", "21599999", undefined, "0", "0", "x2", "y2"); f.AddCnx("cang1", "x1", "y1"); f.AddCnx("cang3", "hc", "vc"); f.AddCnx("cang2", "x2", "y2"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "x1", "y1"); f.AddPathCommand(3, "wd2", "hd2", "stAng", "swAng"); f.AddPathCommand(2, "hc", "vc"); f.AddPathCommand(6); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y1"); f.AddPathCommand(3, "wd2", "hd2", "stAng", "swAng"); break; case "bentArrow": f.AddAdj("adj1", 15, "25000"); f.AddAdj("adj2", 15, "25000"); f.AddAdj("adj3", 15, "25000"); f.AddAdj("adj4", 15, "43750"); f.AddGuide("a2", 10, "0", "adj2", "50000"); f.AddGuide("maxAdj1", 0, "a2", "2", "1"); f.AddGuide("a1", 10, "0", "adj1", "maxAdj1"); f.AddGuide("a3", 10, "0", "adj3", "50000"); f.AddGuide("th", 0, "ss", "a1", "100000"); f.AddGuide("aw2", 0, "ss", "a2", "100000"); f.AddGuide("th2", 0, "th", "1", "2"); f.AddGuide("dh2", 1, "aw2", "0", "th2"); f.AddGuide("ah", 0, "ss", "a3", "100000"); f.AddGuide("bw", 1, "r", "0", "ah"); f.AddGuide("bh", 1, "b", "0", "dh2"); f.AddGuide("bs", 16, "bw", "bh"); f.AddGuide("maxAdj4", 0, "100000", "bs", "ss"); f.AddGuide("a4", 10, "0", "adj4", "maxAdj4"); f.AddGuide("bd", 0, "ss", "a4", "100000"); f.AddGuide("bd3", 1, "bd", "0", "th"); f.AddGuide("bd2", 8, "bd3", "0"); f.AddGuide("x3", 1, "th", "bd2", "0"); f.AddGuide("x4", 1, "r", "0", "ah"); f.AddGuide("y3", 1, "dh2", "th", "0"); f.AddGuide("y4", 1, "y3", "dh2", "0"); f.AddGuide("y5", 1, "dh2", "bd", "0"); f.AddGuide("y6", 1, "y3", "bd2", "0"); f.AddHandleXY("adj1", "0", "maxAdj1", undefined, "0", "0", "th", "b"); f.AddHandleXY(undefined, "0", "0", "adj2", "0", "50000", "r", "y4"); f.AddHandleXY("adj3", "0", "50000", undefined, "0", "0", "x4", "t"); f.AddHandleXY("adj4", "0", "maxAdj4", undefined, "0", "0", "bd", "t"); f.AddCnx("_3cd4", "x4", "t"); f.AddCnx("cd4", "x4", "y4"); f.AddCnx("cd4", "th2", "b"); f.AddCnx("0", "r", "aw2"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "b"); f.AddPathCommand(2, "l", "y5"); f.AddPathCommand(3, "bd", "bd", "cd2", "cd4"); f.AddPathCommand(2, "x4", "dh2"); f.AddPathCommand(2, "x4", "t"); f.AddPathCommand(2, "r", "aw2"); f.AddPathCommand(2, "x4", "y4"); f.AddPathCommand(2, "x4", "y3"); f.AddPathCommand(2, "x3", "y3"); f.AddPathCommand(3, "bd2", "bd2", "_3cd4", "-5400000"); f.AddPathCommand(2, "th", "b"); f.AddPathCommand(6); break; case "bentConnector2": f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); break; case "bentConnector3": f.AddAdj("adj1", 15, "50000"); f.AddGuide("x1", 0, "w", "adj1", "100000"); f.AddHandleXY("adj1", "-2147483647", "2147483647", undefined, "0", "0", "x1", "vc"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "x1", "t"); f.AddPathCommand(2, "x1", "b"); f.AddPathCommand(2, "r", "b"); break; case "bentConnector4": f.AddAdj("adj1", 15, "50000"); f.AddAdj("adj2", 15, "50000"); f.AddGuide("x1", 0, "w", "adj1", "100000"); f.AddGuide("x2", 2, "x1", "r", "2"); f.AddGuide("y2", 0, "h", "adj2", "100000"); f.AddGuide("y1", 2, "t", "y2", "2"); f.AddHandleXY("adj1", "-2147483647", "2147483647", undefined, "0", "0", "x1", "y1"); f.AddHandleXY(undefined, "0", "0", "adj2", "-2147483647", "2147483647", "x2", "y2"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "x1", "t"); f.AddPathCommand(2, "x1", "y2"); f.AddPathCommand(2, "r", "y2"); f.AddPathCommand(2, "r", "b"); break; case "bentConnector5": f.AddAdj("adj1", 15, "50000"); f.AddAdj("adj2", 15, "50000"); f.AddAdj("adj3", 15, "50000"); f.AddGuide("x1", 0, "w", "adj1", "100000"); f.AddGuide("x3", 0, "w", "adj3", "100000"); f.AddGuide("x2", 2, "x1", "x3", "2"); f.AddGuide("y2", 0, "h", "adj2", "100000"); f.AddGuide("y1", 2, "t", "y2", "2"); f.AddGuide("y3", 2, "b", "y2", "2"); f.AddHandleXY("adj1", "-2147483647", "2147483647", undefined, "0", "0", "x1", "y1"); f.AddHandleXY(undefined, "0", "0", "adj2", "-2147483647", "2147483647", "x2", "y2"); f.AddHandleXY("adj3", "-2147483647", "2147483647", undefined, "0", "0", "x3", "y3"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "x1", "t"); f.AddPathCommand(2, "x1", "y2"); f.AddPathCommand(2, "x3", "y2"); f.AddPathCommand(2, "x3", "b"); f.AddPathCommand(2, "r", "b"); break; case "bentUpArrow": f.AddAdj("adj1", 15, "25000"); f.AddAdj("adj2", 15, "25000"); f.AddAdj("adj3", 15, "25000"); f.AddGuide("a1", 10, "0", "adj1", "50000"); f.AddGuide("a2", 10, "0", "adj2", "50000"); f.AddGuide("a3", 10, "0", "adj3", "50000"); f.AddGuide("y1", 0, "ss", "a3", "100000"); f.AddGuide("dx1", 0, "ss", "a2", "50000"); f.AddGuide("x1", 1, "r", "0", "dx1"); f.AddGuide("dx3", 0, "ss", "a2", "100000"); f.AddGuide("x3", 1, "r", "0", "dx3"); f.AddGuide("dx2", 0, "ss", "a1", "200000"); f.AddGuide("x2", 1, "x3", "0", "dx2"); f.AddGuide("x4", 1, "x3", "dx2", "0"); f.AddGuide("dy2", 0, "ss", "a1", "100000"); f.AddGuide("y2", 1, "b", "0", "dy2"); f.AddGuide("x0", 0, "x4", "1", "2"); f.AddGuide("y3", 2, "y2", "b", "2"); f.AddGuide("y15", 2, "y1", "b", "2"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "50000", "l", "y2"); f.AddHandleXY("adj2", "0", "50000", undefined, "0", "0", "x1", "t"); f.AddHandleXY(undefined, "0", "0", "adj3", "0", "50000", "x2", "y1"); f.AddCnx("_3cd4", "x3", "t"); f.AddCnx("cd2", "x1", "y1"); f.AddCnx("cd2", "l", "y3"); f.AddCnx("cd4", "x0", "b"); f.AddCnx("0", "x4", "y15"); f.AddCnx("0", "r", "y1"); f.AddRect("l", "y2", "x4", "b"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "y2"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "x2", "y1"); f.AddPathCommand(2, "x1", "y1"); f.AddPathCommand(2, "x3", "t"); f.AddPathCommand(2, "r", "y1"); f.AddPathCommand(2, "x4", "y1"); f.AddPathCommand(2, "x4", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); break; case "bevel": f.AddAdj("adj", 15, "12500"); f.AddGuide("a", 10, "0", "adj", "50000"); f.AddGuide("x1", 0, "ss", "a", "100000"); f.AddGuide("x2", 1, "r", "0", "x1"); f.AddGuide("y2", 1, "b", "0", "x1"); f.AddHandleXY("adj", "0", "50000", undefined, "0", "0", "x1", "t"); f.AddCnx("0", "r", "vc"); f.AddCnx("0", "x2", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd4", "hc", "y2"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd2", "x1", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("_3cd4", "hc", "x1"); f.AddRect("x1", "x1", "x2", "y2"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "x1", "x1"); f.AddPathCommand(2, "x2", "x1"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "x1", "y2"); f.AddPathCommand(6); f.AddPathCommand(0, false, "lightenLess", false, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "x2", "x1"); f.AddPathCommand(2, "x1", "x1"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darkenLess", false, undefined, undefined); f.AddPathCommand(1, "l", "b"); f.AddPathCommand(2, "x1", "y2"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(6); f.AddPathCommand(0, false, "lighten", false, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "x1", "x1"); f.AddPathCommand(2, "x1", "y2"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darken", false, undefined, undefined); f.AddPathCommand(1, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "x2", "x1"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(1, "x1", "x1"); f.AddPathCommand(2, "x2", "x1"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "x1", "y2"); f.AddPathCommand(6); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "x1", "x1"); f.AddPathCommand(1, "l", "b"); f.AddPathCommand(2, "x1", "y2"); f.AddPathCommand(1, "r", "t"); f.AddPathCommand(2, "x2", "x1"); f.AddPathCommand(1, "r", "b"); f.AddPathCommand(2, "x2", "y2"); break; case "blockArc": f.AddAdj("adj1", 15, "10800000"); f.AddAdj("adj2", 15, "0"); f.AddAdj("adj3", 15, "25000"); f.AddGuide("stAng", 10, "0", "adj1", "21599999"); f.AddGuide("istAng", 10, "0", "adj2", "21599999"); f.AddGuide("a3", 10, "0", "adj3", "50000"); f.AddGuide("sw11", 1, "istAng", "0", "stAng"); f.AddGuide("sw12", 1, "sw11", "21600000", "0"); f.AddGuide("swAng", 3, "sw11", "sw11", "sw12"); f.AddGuide("iswAng", 1, "0", "0", "swAng"); f.AddGuide("wt1", 12, "wd2", "stAng"); f.AddGuide("ht1", 7, "hd2", "stAng"); f.AddGuide("wt3", 12, "wd2", "istAng"); f.AddGuide("ht3", 7, "hd2", "istAng"); f.AddGuide("dx1", 6, "wd2", "ht1", "wt1"); f.AddGuide("dy1", 11, "hd2", "ht1", "wt1"); f.AddGuide("dx3", 6, "wd2", "ht3", "wt3"); f.AddGuide("dy3", 11, "hd2", "ht3", "wt3"); f.AddGuide("x1", 1, "hc", "dx1", "0"); f.AddGuide("y1", 1, "vc", "dy1", "0"); f.AddGuide("x3", 1, "hc", "dx3", "0"); f.AddGuide("y3", 1, "vc", "dy3", "0"); f.AddGuide("dr", 0, "ss", "a3", "100000"); f.AddGuide("iwd2", 1, "wd2", "0", "dr"); f.AddGuide("ihd2", 1, "hd2", "0", "dr"); f.AddGuide("wt2", 12, "iwd2", "istAng"); f.AddGuide("ht2", 7, "ihd2", "istAng"); f.AddGuide("wt4", 12, "iwd2", "stAng"); f.AddGuide("ht4", 7, "ihd2", "stAng"); f.AddGuide("dx2", 6, "iwd2", "ht2", "wt2"); f.AddGuide("dy2", 11, "ihd2", "ht2", "wt2"); f.AddGuide("dx4", 6, "iwd2", "ht4", "wt4"); f.AddGuide("dy4", 11, "ihd2", "ht4", "wt4"); f.AddGuide("x2", 1, "hc", "dx2", "0"); f.AddGuide("y2", 1, "vc", "dy2", "0"); f.AddGuide("x4", 1, "hc", "dx4", "0"); f.AddGuide("y4", 1, "vc", "dy4", "0"); f.AddGuide("sw0", 1, "21600000", "0", "stAng"); f.AddGuide("da1", 1, "swAng", "0", "sw0"); f.AddGuide("g1", 8, "x1", "x2"); f.AddGuide("g2", 8, "x3", "x4"); f.AddGuide("g3", 8, "g1", "g2"); f.AddGuide("ir", 3, "da1", "r", "g3"); f.AddGuide("sw1", 1, "cd4", "0", "stAng"); f.AddGuide("sw2", 1, "27000000", "0", "stAng"); f.AddGuide("sw3", 3, "sw1", "sw1", "sw2"); f.AddGuide("da2", 1, "swAng", "0", "sw3"); f.AddGuide("g5", 8, "y1", "y2"); f.AddGuide("g6", 8, "y3", "y4"); f.AddGuide("g7", 8, "g5", "g6"); f.AddGuide("ib", 3, "da2", "b", "g7"); f.AddGuide("sw4", 1, "cd2", "0", "stAng"); f.AddGuide("sw5", 1, "32400000", "0", "stAng"); f.AddGuide("sw6", 3, "sw4", "sw4", "sw5"); f.AddGuide("da3", 1, "swAng", "0", "sw6"); f.AddGuide("g9", 16, "x1", "x2"); f.AddGuide("g10", 16, "x3", "x4"); f.AddGuide("g11", 16, "g9", "g10"); f.AddGuide("il", 3, "da3", "l", "g11"); f.AddGuide("sw7", 1, "_3cd4", "0", "stAng"); f.AddGuide("sw8", 1, "37800000", "0", "stAng"); f.AddGuide("sw9", 3, "sw7", "sw7", "sw8"); f.AddGuide("da4", 1, "swAng", "0", "sw9"); f.AddGuide("g13", 16, "y1", "y2"); f.AddGuide("g14", 16, "y3", "y4"); f.AddGuide("g15", 16, "g13", "g14"); f.AddGuide("it", 3, "da4", "t", "g15"); f.AddGuide("x5", 2, "x1", "x4", "2"); f.AddGuide("y5", 2, "y1", "y4", "2"); f.AddGuide("x6", 2, "x3", "x2", "2"); f.AddGuide("y6", 2, "y3", "y2", "2"); f.AddGuide("cang1", 1, "stAng", "0", "cd4"); f.AddGuide("cang2", 1, "istAng", "cd4", "0"); f.AddGuide("cang3", 2, "cang1", "cang2", "2"); f.AddHandlePolar("adj1", "0", "21599999", undefined, "0", "0", "x1", "y1"); f.AddHandlePolar(undefined, "0", "0", "adj3", "0", "50000", "x2", "y2"); f.AddCnx("cang1", "x5", "y5"); f.AddCnx("cang2", "x6", "y6"); f.AddCnx("cang3", "hc", "vc"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y1"); f.AddPathCommand(3, "wd2", "hd2", "stAng", "swAng"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(3, "iwd2", "ihd2", "istAng", "iswAng"); f.AddPathCommand(6); break; case "borderCallout1": f.AddAdj("adj1", 15, "18750"); f.AddAdj("adj2", 15, "-8333"); f.AddAdj("adj3", 15, "112500"); f.AddAdj("adj4", 15, "-38333"); f.AddGuide("y1", 0, "h", "adj1", "100000"); f.AddGuide("x1", 0, "w", "adj2", "100000"); f.AddGuide("y2", 0, "h", "adj3", "100000"); f.AddGuide("x2", 0, "w", "adj4", "100000"); f.AddHandleXY("adj2", "-2147483647", "2147483647", "adj1", "-2147483647", "2147483647", "x1", "y1"); f.AddHandleXY("adj4", "-2147483647", "2147483647", "adj3", "-2147483647", "2147483647", "x2", "y2"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, false, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y1"); f.AddPathCommand(2, "x2", "y2"); break; case "borderCallout2": f.AddAdj("adj1", 15, "18750"); f.AddAdj("adj2", 15, "-8333"); f.AddAdj("adj3", 15, "18750"); f.AddAdj("adj4", 15, "-16667"); f.AddAdj("adj5", 15, "112500"); f.AddAdj("adj6", 15, "-46667"); f.AddGuide("y1", 0, "h", "adj1", "100000"); f.AddGuide("x1", 0, "w", "adj2", "100000"); f.AddGuide("y2", 0, "h", "adj3", "100000"); f.AddGuide("x2", 0, "w", "adj4", "100000"); f.AddGuide("y3", 0, "h", "adj5", "100000"); f.AddGuide("x3", 0, "w", "adj6", "100000"); f.AddHandleXY("adj2", "-2147483647", "2147483647", "adj1", "-2147483647", "2147483647", "x1", "y1"); f.AddHandleXY("adj4", "-2147483647", "2147483647", "adj3", "-2147483647", "2147483647", "x2", "y2"); f.AddHandleXY("adj6", "-2147483647", "2147483647", "adj5", "-2147483647", "2147483647", "x3", "y3"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, false, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y1"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "x3", "y3"); break; case "borderCallout3": f.AddAdj("adj1", 15, "18750"); f.AddAdj("adj2", 15, "-8333"); f.AddAdj("adj3", 15, "18750"); f.AddAdj("adj4", 15, "-16667"); f.AddAdj("adj5", 15, "100000"); f.AddAdj("adj6", 15, "-16667"); f.AddAdj("adj7", 15, "112963"); f.AddAdj("adj8", 15, "-8333"); f.AddGuide("y1", 0, "h", "adj1", "100000"); f.AddGuide("x1", 0, "w", "adj2", "100000"); f.AddGuide("y2", 0, "h", "adj3", "100000"); f.AddGuide("x2", 0, "w", "adj4", "100000"); f.AddGuide("y3", 0, "h", "adj5", "100000"); f.AddGuide("x3", 0, "w", "adj6", "100000"); f.AddGuide("y4", 0, "h", "adj7", "100000"); f.AddGuide("x4", 0, "w", "adj8", "100000"); f.AddHandleXY("adj2", "-2147483647", "2147483647", "adj1", "-2147483647", "2147483647", "x1", "y1"); f.AddHandleXY("adj4", "-2147483647", "2147483647", "adj3", "-2147483647", "2147483647", "x2", "y2"); f.AddHandleXY("adj6", "-2147483647", "2147483647", "adj5", "-2147483647", "2147483647", "x3", "y3"); f.AddHandleXY("adj8", "-2147483647", "2147483647", "adj7", "-2147483647", "2147483647", "x4", "y4"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, false, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y1"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "x3", "y3"); f.AddPathCommand(2, "x4", "y4"); break; case "bracePair": f.AddAdj("adj", 15, "8333"); f.AddGuide("a", 10, "0", "adj", "25000"); f.AddGuide("x1", 0, "ss", "a", "100000"); f.AddGuide("x2", 0, "ss", "a", "50000"); f.AddGuide("x3", 1, "r", "0", "x2"); f.AddGuide("x4", 1, "r", "0", "x1"); f.AddGuide("y2", 1, "vc", "0", "x1"); f.AddGuide("y3", 1, "vc", "x1", "0"); f.AddGuide("y4", 1, "b", "0", "x1"); f.AddGuide("it", 0, "x1", "29289", "100000"); f.AddGuide("il", 1, "x1", "it", "0"); f.AddGuide("ir", 1, "r", "0", "il"); f.AddGuide("ib", 1, "b", "0", "it"); f.AddHandleXY(undefined, "0", "0", "adj", "0", "25000", "l", "x1"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("il", "il", "ir", "ib"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "x2", "b"); f.AddPathCommand(3, "x1", "x1", "cd4", "cd4"); f.AddPathCommand(2, "x1", "y3"); f.AddPathCommand(3, "x1", "x1", "0", "-5400000"); f.AddPathCommand(3, "x1", "x1", "cd4", "-5400000"); f.AddPathCommand(2, "x1", "x1"); f.AddPathCommand(3, "x1", "x1", "cd2", "cd4"); f.AddPathCommand(2, "x3", "t"); f.AddPathCommand(3, "x1", "x1", "_3cd4", "cd4"); f.AddPathCommand(2, "x4", "y2"); f.AddPathCommand(3, "x1", "x1", "cd2", "-5400000"); f.AddPathCommand(3, "x1", "x1", "_3cd4", "-5400000"); f.AddPathCommand(2, "x4", "y4"); f.AddPathCommand(3, "x1", "x1", "0", "cd4"); f.AddPathCommand(6); f.AddPathCommand(0, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "x2", "b"); f.AddPathCommand(3, "x1", "x1", "cd4", "cd4"); f.AddPathCommand(2, "x1", "y3"); f.AddPathCommand(3, "x1", "x1", "0", "-5400000"); f.AddPathCommand(3, "x1", "x1", "cd4", "-5400000"); f.AddPathCommand(2, "x1", "x1"); f.AddPathCommand(3, "x1", "x1", "cd2", "cd4"); f.AddPathCommand(1, "x3", "t"); f.AddPathCommand(3, "x1", "x1", "_3cd4", "cd4"); f.AddPathCommand(2, "x4", "y2"); f.AddPathCommand(3, "x1", "x1", "cd2", "-5400000"); f.AddPathCommand(3, "x1", "x1", "_3cd4", "-5400000"); f.AddPathCommand(2, "x4", "y4"); f.AddPathCommand(3, "x1", "x1", "0", "cd4"); break; case "bracketPair": f.AddAdj("adj", 15, "16667"); f.AddGuide("a", 10, "0", "adj", "50000"); f.AddGuide("x1", 0, "ss", "a", "100000"); f.AddGuide("x2", 1, "r", "0", "x1"); f.AddGuide("y2", 1, "b", "0", "x1"); f.AddGuide("il", 0, "x1", "29289", "100000"); f.AddGuide("ir", 1, "r", "0", "il"); f.AddGuide("ib", 1, "b", "0", "il"); f.AddHandleXY(undefined, "0", "0", "adj", "0", "50000", "l", "x1"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("il", "il", "ir", "ib"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "x1"); f.AddPathCommand(3, "x1", "x1", "cd2", "cd4"); f.AddPathCommand(2, "x2", "t"); f.AddPathCommand(3, "x1", "x1", "_3cd4", "cd4"); f.AddPathCommand(2, "r", "y2"); f.AddPathCommand(3, "x1", "x1", "0", "cd4"); f.AddPathCommand(2, "x1", "b"); f.AddPathCommand(3, "x1", "x1", "cd4", "cd4"); f.AddPathCommand(6); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "x1", "b"); f.AddPathCommand(3, "x1", "x1", "cd4", "cd4"); f.AddPathCommand(2, "l", "x1"); f.AddPathCommand(3, "x1", "x1", "cd2", "cd4"); f.AddPathCommand(1, "x2", "t"); f.AddPathCommand(3, "x1", "x1", "_3cd4", "cd4"); f.AddPathCommand(2, "r", "y2"); f.AddPathCommand(3, "x1", "x1", "0", "cd4"); break; case "callout1": f.AddAdj("adj1", 15, "18750"); f.AddAdj("adj2", 15, "-8333"); f.AddAdj("adj3", 15, "112500"); f.AddAdj("adj4", 15, "-38333"); f.AddGuide("y1", 0, "h", "adj1", "100000"); f.AddGuide("x1", 0, "w", "adj2", "100000"); f.AddGuide("y2", 0, "h", "adj3", "100000"); f.AddGuide("x2", 0, "w", "adj4", "100000"); f.AddHandleXY("adj2", "-2147483647", "2147483647", "adj1", "-2147483647", "2147483647", "x1", "y1"); f.AddHandleXY("adj4", "-2147483647", "2147483647", "adj3", "-2147483647", "2147483647", "x2", "y2"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y1"); f.AddPathCommand(2, "x2", "y2"); break; case "callout2": f.AddAdj("adj1", 15, "18750"); f.AddAdj("adj2", 15, "-8333"); f.AddAdj("adj3", 15, "18750"); f.AddAdj("adj4", 15, "-16667"); f.AddAdj("adj5", 15, "112500"); f.AddAdj("adj6", 15, "-46667"); f.AddGuide("y1", 0, "h", "adj1", "100000"); f.AddGuide("x1", 0, "w", "adj2", "100000"); f.AddGuide("y2", 0, "h", "adj3", "100000"); f.AddGuide("x2", 0, "w", "adj4", "100000"); f.AddGuide("y3", 0, "h", "adj5", "100000"); f.AddGuide("x3", 0, "w", "adj6", "100000"); f.AddHandleXY("adj2", "-2147483647", "2147483647", "adj1", "-2147483647", "2147483647", "x1", "y1"); f.AddHandleXY("adj4", "-2147483647", "2147483647", "adj3", "-2147483647", "2147483647", "x2", "y2"); f.AddHandleXY("adj6", "-2147483647", "2147483647", "adj5", "-2147483647", "2147483647", "x3", "y3"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y1"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "x3", "y3"); break; case "callout3": f.AddAdj("adj1", 15, "18750"); f.AddAdj("adj2", 15, "-8333"); f.AddAdj("adj3", 15, "18750"); f.AddAdj("adj4", 15, "-16667"); f.AddAdj("adj5", 15, "100000"); f.AddAdj("adj6", 15, "-16667"); f.AddAdj("adj7", 15, "112963"); f.AddAdj("adj8", 15, "-8333"); f.AddGuide("y1", 0, "h", "adj1", "100000"); f.AddGuide("x1", 0, "w", "adj2", "100000"); f.AddGuide("y2", 0, "h", "adj3", "100000"); f.AddGuide("x2", 0, "w", "adj4", "100000"); f.AddGuide("y3", 0, "h", "adj5", "100000"); f.AddGuide("x3", 0, "w", "adj6", "100000"); f.AddGuide("y4", 0, "h", "adj7", "100000"); f.AddGuide("x4", 0, "w", "adj8", "100000"); f.AddHandleXY("adj2", "-2147483647", "2147483647", "adj1", "-2147483647", "2147483647", "x1", "y1"); f.AddHandleXY("adj4", "-2147483647", "2147483647", "adj3", "-2147483647", "2147483647", "x2", "y2"); f.AddHandleXY("adj6", "-2147483647", "2147483647", "adj5", "-2147483647", "2147483647", "x3", "y3"); f.AddHandleXY("adj8", "-2147483647", "2147483647", "adj7", "-2147483647", "2147483647", "x4", "y4"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y1"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "x3", "y3"); f.AddPathCommand(2, "x4", "y4"); break; case "can": f.AddAdj("adj", 15, "25000"); f.AddGuide("maxAdj", 0, "50000", "h", "ss"); f.AddGuide("a", 10, "0", "adj", "maxAdj"); f.AddGuide("y1", 0, "ss", "a", "200000"); f.AddGuide("y2", 1, "y1", "y1", "0"); f.AddGuide("y3", 1, "b", "0", "y1"); f.AddHandleXY(undefined, "0", "0", "adj", "0", "maxAdj", "hc", "y2"); f.AddCnx("_3cd4", "hc", "y2"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("l", "y2", "r", "y3"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "y1"); f.AddPathCommand(3, "wd2", "y1", "cd2", "-10800000"); f.AddPathCommand(2, "r", "y3"); f.AddPathCommand(3, "wd2", "y1", "0", "cd2"); f.AddPathCommand(6); f.AddPathCommand(0, false, "lighten", false, undefined, undefined); f.AddPathCommand(1, "l", "y1"); f.AddPathCommand(3, "wd2", "y1", "cd2", "cd2"); f.AddPathCommand(3, "wd2", "y1", "0", "cd2"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "r", "y1"); f.AddPathCommand(3, "wd2", "y1", "0", "cd2"); f.AddPathCommand(3, "wd2", "y1", "cd2", "cd2"); f.AddPathCommand(2, "r", "y3"); f.AddPathCommand(3, "wd2", "y1", "0", "cd2"); f.AddPathCommand(2, "l", "y1"); break; case "chartPlus": f.AddPathCommand(0, false, "none", undefined, 10, 10); f.AddPathCommand(1, "5", "0"); f.AddPathCommand(2, "5", "10"); f.AddPathCommand(1, "0", "5"); f.AddPathCommand(2, "10", "5"); f.AddPathCommand(0, undefined, undefined, false, 10, 10); f.AddPathCommand(1, "0", "0"); f.AddPathCommand(2, "0", "10"); f.AddPathCommand(2, "10", "10"); f.AddPathCommand(2, "10", "0"); f.AddPathCommand(6); break; case "chartStar": f.AddPathCommand(0, false, "none", undefined, 10, 10); f.AddPathCommand(1, "0", "0"); f.AddPathCommand(2, "10", "10"); f.AddPathCommand(1, "0", "10"); f.AddPathCommand(2, "10", "0"); f.AddPathCommand(1, "5", "0"); f.AddPathCommand(2, "5", "10"); f.AddPathCommand(0, undefined, undefined, false, 10, 10); f.AddPathCommand(1, "0", "0"); f.AddPathCommand(2, "0", "10"); f.AddPathCommand(2, "10", "10"); f.AddPathCommand(2, "10", "0"); f.AddPathCommand(6); break; case "chartX": f.AddPathCommand(0, false, "none", undefined, 10, 10); f.AddPathCommand(1, "0", "0"); f.AddPathCommand(2, "10", "10"); f.AddPathCommand(1, "0", "10"); f.AddPathCommand(2, "10", "0"); f.AddPathCommand(0, undefined, undefined, false, 10, 10); f.AddPathCommand(1, "0", "0"); f.AddPathCommand(2, "0", "10"); f.AddPathCommand(2, "10", "10"); f.AddPathCommand(2, "10", "0"); f.AddPathCommand(6); break; case "chevron": f.AddAdj("adj", 15, "50000"); f.AddGuide("maxAdj", 0, "100000", "w", "ss"); f.AddGuide("a", 10, "0", "adj", "maxAdj"); f.AddGuide("x1", 0, "ss", "a", "100000"); f.AddGuide("x2", 1, "r", "0", "x1"); f.AddGuide("x3", 0, "x2", "1", "2"); f.AddGuide("dx", 1, "x2", "0", "x1"); f.AddGuide("il", 3, "dx", "x1", "l"); f.AddGuide("ir", 3, "dx", "x2", "r"); f.AddHandleXY("adj", "0", "maxAdj", undefined, "0", "0", "x2", "t"); f.AddCnx("_3cd4", "x3", "t"); f.AddCnx("cd2", "x1", "vc"); f.AddCnx("cd4", "x3", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("il", "t", "ir", "b"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "x2", "t"); f.AddPathCommand(2, "r", "vc"); f.AddPathCommand(2, "x2", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(2, "x1", "vc"); f.AddPathCommand(6); break; case "chord": f.AddAdj("adj1", 15, "2700000"); f.AddAdj("adj2", 15, "16200000"); f.AddGuide("stAng", 10, "0", "adj1", "21599999"); f.AddGuide("enAng", 10, "0", "adj2", "21599999"); f.AddGuide("sw1", 1, "enAng", "0", "stAng"); f.AddGuide("sw2", 1, "sw1", "21600000", "0"); f.AddGuide("swAng", 3, "sw1", "sw1", "sw2"); f.AddGuide("wt1", 12, "wd2", "stAng"); f.AddGuide("ht1", 7, "hd2", "stAng"); f.AddGuide("dx1", 6, "wd2", "ht1", "wt1"); f.AddGuide("dy1", 11, "hd2", "ht1", "wt1"); f.AddGuide("wt2", 12, "wd2", "enAng"); f.AddGuide("ht2", 7, "hd2", "enAng"); f.AddGuide("dx2", 6, "wd2", "ht2", "wt2"); f.AddGuide("dy2", 11, "hd2", "ht2", "wt2"); f.AddGuide("x1", 1, "hc", "dx1", "0"); f.AddGuide("y1", 1, "vc", "dy1", "0"); f.AddGuide("x2", 1, "hc", "dx2", "0"); f.AddGuide("y2", 1, "vc", "dy2", "0"); f.AddGuide("x3", 2, "x1", "x2", "2"); f.AddGuide("y3", 2, "y1", "y2", "2"); f.AddGuide("midAng0", 0, "swAng", "1", "2"); f.AddGuide("midAng", 1, "stAng", "midAng0", "cd2"); f.AddGuide("idx", 7, "wd2", "2700000"); f.AddGuide("idy", 12, "hd2", "2700000"); f.AddGuide("il", 1, "hc", "0", "idx"); f.AddGuide("ir", 1, "hc", "idx", "0"); f.AddGuide("it", 1, "vc", "0", "idy"); f.AddGuide("ib", 1, "vc", "idy", "0"); f.AddHandlePolar("adj1", "0", "21599999", undefined, "0", "0", "x1", "y1"); f.AddHandlePolar("adj2", "0", "21599999", undefined, "0", "0", "x2", "y2"); f.AddCnx("stAng", "x1", "y1"); f.AddCnx("enAng", "x2", "y2"); f.AddCnx("midAng", "x3", "y3"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y1"); f.AddPathCommand(3, "wd2", "hd2", "stAng", "swAng"); f.AddPathCommand(6); break; case "circularArrow": f.AddAdj("adj1", 15, "12500"); f.AddAdj("adj2", 15, "1142319"); f.AddAdj("adj3", 15, "20457681"); f.AddAdj("adj4", 15, "10800000"); f.AddAdj("adj5", 15, "12500"); f.AddGuide("a5", 10, "0", "adj5", "25000"); f.AddGuide("maxAdj1", 0, "a5", "2", "1"); f.AddGuide("a1", 10, "0", "adj1", "maxAdj1"); f.AddGuide("enAng", 10, "1", "adj3", "21599999"); f.AddGuide("stAng", 10, "0", "adj4", "21599999"); f.AddGuide("th", 0, "ss", "a1", "100000"); f.AddGuide("thh", 0, "ss", "a5", "100000"); f.AddGuide("th2", 0, "th", "1", "2"); f.AddGuide("rw1", 1, "wd2", "th2", "thh"); f.AddGuide("rh1", 1, "hd2", "th2", "thh"); f.AddGuide("rw2", 1, "rw1", "0", "th"); f.AddGuide("rh2", 1, "rh1", "0", "th"); f.AddGuide("rw3", 1, "rw2", "th2", "0"); f.AddGuide("rh3", 1, "rh2", "th2", "0"); f.AddGuide("wtH", 12, "rw3", "enAng"); f.AddGuide("htH", 7, "rh3", "enAng"); f.AddGuide("dxH", 6, "rw3", "htH", "wtH"); f.AddGuide("dyH", 11, "rh3", "htH", "wtH"); f.AddGuide("xH", 1, "hc", "dxH", "0"); f.AddGuide("yH", 1, "vc", "dyH", "0"); f.AddGuide("rI", 16, "rw2", "rh2"); f.AddGuide("u1", 0, "dxH", "dxH", "1"); f.AddGuide("u2", 0, "dyH", "dyH", "1"); f.AddGuide("u3", 0, "rI", "rI", "1"); f.AddGuide("u4", 1, "u1", "0", "u3"); f.AddGuide("u5", 1, "u2", "0", "u3"); f.AddGuide("u6", 0, "u4", "u5", "u1"); f.AddGuide("u7", 0, "u6", "1", "u2"); f.AddGuide("u8", 1, "1", "0", "u7"); f.AddGuide("u9", 13, "u8"); f.AddGuide("u10", 0, "u4", "1", "dxH"); f.AddGuide("u11", 0, "u10", "1", "dyH"); f.AddGuide("u12", 2, "1", "u9", "u11"); f.AddGuide("u13", 5, "1", "u12"); f.AddGuide("u14", 1, "u13", "21600000", "0"); f.AddGuide("u15", 3, "u13", "u13", "u14"); f.AddGuide("u16", 1, "u15", "0", "enAng"); f.AddGuide("u17", 1, "u16", "21600000", "0"); f.AddGuide("u18", 3, "u16", "u16", "u17"); f.AddGuide("u19", 1, "u18", "0", "cd2"); f.AddGuide("u20", 1, "u18", "0", "21600000"); f.AddGuide("u21", 3, "u19", "u20", "u18"); f.AddGuide("maxAng", 4, "u21"); f.AddGuide("aAng", 10, "0", "adj2", "maxAng"); f.AddGuide("ptAng", 1, "enAng", "aAng", "0"); f.AddGuide("wtA", 12, "rw3", "ptAng"); f.AddGuide("htA", 7, "rh3", "ptAng"); f.AddGuide("dxA", 6, "rw3", "htA", "wtA"); f.AddGuide("dyA", 11, "rh3", "htA", "wtA"); f.AddGuide("xA", 1, "hc", "dxA", "0"); f.AddGuide("yA", 1, "vc", "dyA", "0"); f.AddGuide("wtE", 12, "rw1", "stAng"); f.AddGuide("htE", 7, "rh1", "stAng"); f.AddGuide("dxE", 6, "rw1", "htE", "wtE"); f.AddGuide("dyE", 11, "rh1", "htE", "wtE"); f.AddGuide("xE", 1, "hc", "dxE", "0"); f.AddGuide("yE", 1, "vc", "dyE", "0"); f.AddGuide("dxG", 7, "thh", "ptAng"); f.AddGuide("dyG", 12, "thh", "ptAng"); f.AddGuide("xG", 1, "xH", "dxG", "0"); f.AddGuide("yG", 1, "yH", "dyG", "0"); f.AddGuide("dxB", 7, "thh", "ptAng"); f.AddGuide("dyB", 12, "thh", "ptAng"); f.AddGuide("xB", 1, "xH", "0", "dxB", "0"); f.AddGuide("yB", 1, "yH", "0", "dyB", "0"); f.AddGuide("sx1", 1, "xB", "0", "hc"); f.AddGuide("sy1", 1, "yB", "0", "vc"); f.AddGuide("sx2", 1, "xG", "0", "hc"); f.AddGuide("sy2", 1, "yG", "0", "vc"); f.AddGuide("rO", 16, "rw1", "rh1"); f.AddGuide("x1O", 0, "sx1", "rO", "rw1"); f.AddGuide("y1O", 0, "sy1", "rO", "rh1"); f.AddGuide("x2O", 0, "sx2", "rO", "rw1"); f.AddGuide("y2O", 0, "sy2", "rO", "rh1"); f.AddGuide("dxO", 1, "x2O", "0", "x1O"); f.AddGuide("dyO", 1, "y2O", "0", "y1O"); f.AddGuide("dO", 9, "dxO", "dyO", "0"); f.AddGuide("q1", 0, "x1O", "y2O", "1"); f.AddGuide("q2", 0, "x2O", "y1O", "1"); f.AddGuide("DO", 1, "q1", "0", "q2"); f.AddGuide("q3", 0, "rO", "rO", "1"); f.AddGuide("q4", 0, "dO", "dO", "1"); f.AddGuide("q5", 0, "q3", "q4", "1"); f.AddGuide("q6", 0, "DO", "DO", "1"); f.AddGuide("q7", 1, "q5", "0", "q6"); f.AddGuide("q8", 8, "q7", "0"); f.AddGuide("sdelO", 13, "q8"); f.AddGuide("ndyO", 0, "dyO", "-1", "1"); f.AddGuide("sdyO", 3, "ndyO", "-1", "1"); f.AddGuide("q9", 0, "sdyO", "dxO", "1"); f.AddGuide("q10", 0, "q9", "sdelO", "1"); f.AddGuide("q11", 0, "DO", "dyO", "1"); f.AddGuide("dxF1", 2, "q11", "q10", "q4"); f.AddGuide("q12", 1, "q11", "0", "q10"); f.AddGuide("dxF2", 0, "q12", "1", "q4"); f.AddGuide("adyO", 4, "dyO"); f.AddGuide("q13", 0, "adyO", "sdelO", "1"); f.AddGuide("q14", 0, "DO", "dxO", "-1"); f.AddGuide("dyF1", 2, "q14", "q13", "q4"); f.AddGuide("q15", 1, "q14", "0", "q13"); f.AddGuide("dyF2", 0, "q15", "1", "q4"); f.AddGuide("q16", 1, "x2O", "0", "dxF1"); f.AddGuide("q17", 1, "x2O", "0", "dxF2"); f.AddGuide("q18", 1, "y2O", "0", "dyF1"); f.AddGuide("q19", 1, "y2O", "0", "dyF2"); f.AddGuide("q20", 9, "q16", "q18", "0"); f.AddGuide("q21", 9, "q17", "q19", "0"); f.AddGuide("q22", 1, "q21", "0", "q20"); f.AddGuide("dxF", 3, "q22", "dxF1", "dxF2"); f.AddGuide("dyF", 3, "q22", "dyF1", "dyF2"); f.AddGuide("sdxF", 0, "dxF", "rw1", "rO"); f.AddGuide("sdyF", 0, "dyF", "rh1", "rO"); f.AddGuide("xF", 1, "hc", "sdxF", "0"); f.AddGuide("yF", 1, "vc", "sdyF", "0"); f.AddGuide("x1I", 0, "sx1", "rI", "rw2"); f.AddGuide("y1I", 0, "sy1", "rI", "rh2"); f.AddGuide("x2I", 0, "sx2", "rI", "rw2"); f.AddGuide("y2I", 0, "sy2", "rI", "rh2"); f.AddGuide("dxI", 1, "x2I", "0", "x1I"); f.AddGuide("dyI", 1, "y2I", "0", "y1I"); f.AddGuide("dI", 9, "dxI", "dyI", "0"); f.AddGuide("v1", 0, "x1I", "y2I", "1"); f.AddGuide("v2", 0, "x2I", "y1I", "1"); f.AddGuide("DI", 1, "v1", "0", "v2"); f.AddGuide("v3", 0, "rI", "rI", "1"); f.AddGuide("v4", 0, "dI", "dI", "1"); f.AddGuide("v5", 0, "v3", "v4", "1"); f.AddGuide("v6", 0, "DI", "DI", "1"); f.AddGuide("v7", 1, "v5", "0", "v6"); f.AddGuide("v8", 8, "v7", "0"); f.AddGuide("sdelI", 13, "v8"); f.AddGuide("v9", 0, "sdyO", "dxI", "1"); f.AddGuide("v10", 0, "v9", "sdelI", "1"); f.AddGuide("v11", 0, "DI", "dyI", "1"); f.AddGuide("dxC1", 2, "v11", "v10", "v4"); f.AddGuide("v12", 1, "v11", "0", "v10"); f.AddGuide("dxC2", 0, "v12", "1", "v4"); f.AddGuide("adyI", 4, "dyI"); f.AddGuide("v13", 0, "adyI", "sdelI", "1"); f.AddGuide("v14", 0, "DI", "dxI", "-1"); f.AddGuide("dyC1", 2, "v14", "v13", "v4"); f.AddGuide("v15", 1, "v14", "0", "v13"); f.AddGuide("dyC2", 0, "v15", "1", "v4"); f.AddGuide("v16", 1, "x1I", "0", "dxC1"); f.AddGuide("v17", 1, "x1I", "0", "dxC2"); f.AddGuide("v18", 1, "y1I", "0", "dyC1"); f.AddGuide("v19", 1, "y1I", "0", "dyC2"); f.AddGuide("v20", 9, "v16", "v18", "0"); f.AddGuide("v21", 9, "v17", "v19", "0"); f.AddGuide("v22", 1, "v21", "0", "v20"); f.AddGuide("dxC", 3, "v22", "dxC1", "dxC2"); f.AddGuide("dyC", 3, "v22", "dyC1", "dyC2"); f.AddGuide("sdxC", 0, "dxC", "rw2", "rI"); f.AddGuide("sdyC", 0, "dyC", "rh2", "rI"); f.AddGuide("xC", 1, "hc", "sdxC", "0"); f.AddGuide("yC", 1, "vc", "sdyC", "0"); f.AddGuide("ist0", 5, "sdxC", "sdyC"); f.AddGuide("ist1", 1, "ist0", "21600000", "0"); f.AddGuide("istAng", 3, "ist0", "ist0", "ist1"); f.AddGuide("isw1", 1, "stAng", "0", "istAng"); f.AddGuide("isw2", 1, "isw1", "0", "21600000"); f.AddGuide("iswAng", 3, "isw1", "isw2", "isw1"); f.AddGuide("p1", 1, "xF", "0", "xC"); f.AddGuide("p2", 1, "yF", "0", "yC"); f.AddGuide("p3", 9, "p1", "p2", "0"); f.AddGuide("p4", 0, "p3", "1", "2"); f.AddGuide("p5", 1, "p4", "0", "thh"); f.AddGuide("xGp", 3, "p5", "xF", "xG"); f.AddGuide("yGp", 3, "p5", "yF", "yG"); f.AddGuide("xBp", 3, "p5", "xC", "xB"); f.AddGuide("yBp", 3, "p5", "yC", "yB"); f.AddGuide("en0", 5, "sdxF", "sdyF"); f.AddGuide("en1", 1, "en0", "21600000", "0"); f.AddGuide("en2", 3, "en0", "en0", "en1"); f.AddGuide("sw0", 1, "en2", "0", "stAng"); f.AddGuide("sw1", 1, "sw0", "21600000", "0"); f.AddGuide("swAng", 3, "sw0", "sw0", "sw1"); f.AddGuide("wtI", 12, "rw3", "stAng"); f.AddGuide("htI", 7, "rh3", "stAng"); f.AddGuide("dxI", 6, "rw3", "htI", "wtI"); f.AddGuide("dyI", 11, "rh3", "htI", "wtI"); f.AddGuide("xI", 1, "hc", "dxI", "0"); f.AddGuide("yI", 1, "vc", "dyI", "0"); f.AddGuide("aI", 1, "stAng", "0", "cd4"); f.AddGuide("aA", 1, "ptAng", "cd4", "0"); f.AddGuide("aB", 1, "ptAng", "cd2", "0"); f.AddGuide("idx", 7, "rw1", "2700000"); f.AddGuide("idy", 12, "rh1", "2700000"); f.AddGuide("il", 1, "hc", "0", "idx"); f.AddGuide("ir", 1, "hc", "idx", "0"); f.AddGuide("it", 1, "vc", "0", "idy"); f.AddGuide("ib", 1, "vc", "idy", "0"); f.AddHandlePolar("adj2", "0", "maxAng", undefined, "0", "0", "xA", "yA"); f.AddHandlePolar("adj4", "0", "21599999", undefined, "0", "0", "xE", "yE"); f.AddHandlePolar(undefined, "0", "0", "adj1", "0", "maxAdj1", "xF", "yF"); f.AddHandlePolar(undefined, "0", "0", "adj5", "0", "25000", "xB", "yB"); f.AddCnx("aI", "xI", "yI"); f.AddCnx("ptAng", "xGp", "yGp"); f.AddCnx("aA", "xA", "yA"); f.AddCnx("aB", "xBp", "yBp"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "xE", "yE"); f.AddPathCommand(3, "rw1", "rh1", "stAng", "swAng"); f.AddPathCommand(2, "xGp", "yGp"); f.AddPathCommand(2, "xA", "yA"); f.AddPathCommand(2, "xBp", "yBp"); f.AddPathCommand(2, "xC", "yC"); f.AddPathCommand(3, "rw2", "rh2", "istAng", "iswAng"); f.AddPathCommand(6); break; case "cloud": f.AddGuide("il", 0, "w", "2977", "21600"); f.AddGuide("it", 0, "h", "3262", "21600"); f.AddGuide("ir", 0, "w", "17087", "21600"); f.AddGuide("ib", 0, "h", "17337", "21600"); f.AddGuide("g27", 0, "w", "67", "21600"); f.AddGuide("g28", 0, "h", "21577", "21600"); f.AddGuide("g29", 0, "w", "21582", "21600"); f.AddGuide("g30", 0, "h", "1235", "21600"); f.AddCnx("0", "g29", "vc"); f.AddCnx("cd4", "hc", "g28"); f.AddCnx("cd2", "g27", "vc"); f.AddCnx("_3cd4", "hc", "g30"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, 43200, 43200); f.AddPathCommand(1, "3900", "14370"); f.AddPathCommand(3, "6753", "9190", "-11429249", "7426832"); f.AddPathCommand(3, "5333", "7267", "-8646143", "5396714"); f.AddPathCommand(3, "4365", "5945", "-8748475", "5983381"); f.AddPathCommand(3, "4857", "6595", "-7859164", "7034504"); f.AddPathCommand(3, "5333", "7273", "-4722533", "6541615"); f.AddPathCommand(3, "6775", "9220", "-2776035", "7816140"); f.AddPathCommand(3, "5785", "7867", "37501", "6842000"); f.AddPathCommand(3, "6752", "9215", "1347096", "6910353"); f.AddPathCommand(3, "7720", "10543", "3974558", "4542661"); f.AddPathCommand(3, "4360", "5918", "-16496525", "8804134"); f.AddPathCommand(3, "4345", "5945", "-14809710", "9151131"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, 43200, 43200); f.AddPathCommand(1, "4693", "26177"); f.AddPathCommand(3, "4345", "5945", "5204520", "1585770"); f.AddPathCommand(1, "6928", "34899"); f.AddPathCommand(3, "4360", "5918", "4416628", "686848"); f.AddPathCommand(1, "16478", "39090"); f.AddPathCommand(3, "6752", "9215", "8257449", "844866"); f.AddPathCommand(1, "28827", "34751"); f.AddPathCommand(3, "6752", "9215", "387196", "959901"); f.AddPathCommand(1, "34129", "22954"); f.AddPathCommand(3, "5785", "7867", "-4217541", "4255042"); f.AddPathCommand(1, "41798", "15354"); f.AddPathCommand(3, "5333", "7273", "1819082", "1665090"); f.AddPathCommand(1, "38324", "5426"); f.AddPathCommand(3, "4857", "6595", "-824660", "891534"); f.AddPathCommand(1, "29078", "3952"); f.AddPathCommand(3, "4857", "6595", "-8950887", "1091722"); f.AddPathCommand(1, "22141", "4720"); f.AddPathCommand(3, "4365", "5945", "-9809656", "1061181"); f.AddPathCommand(1, "14000", "5192"); f.AddPathCommand(3, "6753", "9190", "-4002417", "739161"); f.AddPathCommand(1, "4127", "15789"); f.AddPathCommand(3, "6753", "9190", "9459261", "711490"); f.AddPathCommand(6); break; case "cloudCallout": f.AddAdj("adj1", 15, "-20833"); f.AddAdj("adj2", 15, "62500"); f.AddGuide("dxPos", 0, "w", "adj1", "100000"); f.AddGuide("dyPos", 0, "h", "adj2", "100000"); f.AddGuide("xPos", 1, "hc", "dxPos", "0"); f.AddGuide("yPos", 1, "vc", "dyPos", "0"); f.AddGuide("ht", 6, "hd2", "dxPos", "dyPos"); f.AddGuide("wt", 11, "wd2", "dxPos", "dyPos"); f.AddGuide("g2", 6, "wd2", "ht", "wt"); f.AddGuide("g3", 11, "hd2", "ht", "wt"); f.AddGuide("g4", 1, "hc", "g2", "0"); f.AddGuide("g5", 1, "vc", "g3", "0"); f.AddGuide("g6", 1, "g4", "0", "xPos"); f.AddGuide("g7", 1, "g5", "0", "yPos"); f.AddGuide("g8", 9, "g6", "g7", "0"); f.AddGuide("g9", 0, "ss", "6600", "21600"); f.AddGuide("g10", 1, "g8", "0", "g9"); f.AddGuide("g11", 0, "g10", "1", "3"); f.AddGuide("g12", 0, "ss", "1800", "21600"); f.AddGuide("g13", 1, "g11", "g12", "0"); f.AddGuide("g14", 0, "g13", "g6", "g8"); f.AddGuide("g15", 0, "g13", "g7", "g8"); f.AddGuide("g16", 1, "g14", "xPos", "0"); f.AddGuide("g17", 1, "g15", "yPos", "0"); f.AddGuide("g18", 0, "ss", "4800", "21600"); f.AddGuide("g19", 0, "g11", "2", "1"); f.AddGuide("g20", 1, "g18", "g19", "0"); f.AddGuide("g21", 0, "g20", "g6", "g8"); f.AddGuide("g22", 0, "g20", "g7", "g8"); f.AddGuide("g23", 1, "g21", "xPos", "0"); f.AddGuide("g24", 1, "g22", "yPos", "0"); f.AddGuide("g25", 0, "ss", "1200", "21600"); f.AddGuide("g26", 0, "ss", "600", "21600"); f.AddGuide("x23", 1, "xPos", "g26", "0"); f.AddGuide("x24", 1, "g16", "g25", "0"); f.AddGuide("x25", 1, "g23", "g12", "0"); f.AddGuide("il", 0, "w", "2977", "21600"); f.AddGuide("it", 0, "h", "3262", "21600"); f.AddGuide("ir", 0, "w", "17087", "21600"); f.AddGuide("ib", 0, "h", "17337", "21600"); f.AddGuide("g27", 0, "w", "67", "21600"); f.AddGuide("g28", 0, "h", "21577", "21600"); f.AddGuide("g29", 0, "w", "21582", "21600"); f.AddGuide("g30", 0, "h", "1235", "21600"); f.AddGuide("pang", 5, "dxPos", "dyPos"); f.AddHandleXY("adj1", "-2147483647", "2147483647", "adj2", "-2147483647", "2147483647", "xPos", "yPos"); f.AddCnx("cd2", "g27", "vc"); f.AddCnx("cd4", "hc", "g28"); f.AddCnx("0", "g29", "vc"); f.AddCnx("_3cd4", "hc", "g30"); f.AddCnx("pang", "xPos", "yPos"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, 43200, 43200); f.AddPathCommand(1, "3900", "14370"); f.AddPathCommand(3, "6753", "9190", "-11429249", "7426832"); f.AddPathCommand(3, "5333", "7267", "-8646143", "5396714"); f.AddPathCommand(3, "4365", "5945", "-8748475", "5983381"); f.AddPathCommand(3, "4857", "6595", "-7859164", "7034504"); f.AddPathCommand(3, "5333", "7273", "-4722533", "6541615"); f.AddPathCommand(3, "6775", "9220", "-2776035", "7816140"); f.AddPathCommand(3, "5785", "7867", "37501", "6842000"); f.AddPathCommand(3, "6752", "9215", "1347096", "6910353"); f.AddPathCommand(3, "7720", "10543", "3974558", "4542661"); f.AddPathCommand(3, "4360", "5918", "-16496525", "8804134"); f.AddPathCommand(3, "4345", "5945", "-14809710", "9151131"); f.AddPathCommand(6); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "x23", "yPos"); f.AddPathCommand(3, "g26", "g26", "0", "21600000"); f.AddPathCommand(6); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "x24", "g17"); f.AddPathCommand(3, "g25", "g25", "0", "21600000"); f.AddPathCommand(6); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "x25", "g24"); f.AddPathCommand(3, "g12", "g12", "0", "21600000"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, 43200, 43200); f.AddPathCommand(1, "4693", "26177"); f.AddPathCommand(3, "4345", "5945", "5204520", "1585770"); f.AddPathCommand(1, "6928", "34899"); f.AddPathCommand(3, "4360", "5918", "4416628", "686848"); f.AddPathCommand(1, "16478", "39090"); f.AddPathCommand(3, "6752", "9215", "8257449", "844866"); f.AddPathCommand(1, "28827", "34751"); f.AddPathCommand(3, "6752", "9215", "387196", "959901"); f.AddPathCommand(1, "34129", "22954"); f.AddPathCommand(3, "5785", "7867", "-4217541", "4255042"); f.AddPathCommand(1, "41798", "15354"); f.AddPathCommand(3, "5333", "7273", "1819082", "1665090"); f.AddPathCommand(1, "38324", "5426"); f.AddPathCommand(3, "4857", "6595", "-824660", "891534"); f.AddPathCommand(1, "29078", "3952"); f.AddPathCommand(3, "4857", "6595", "-8950887", "1091722"); f.AddPathCommand(1, "22141", "4720"); f.AddPathCommand(3, "4365", "5945", "-9809656", "1061181"); f.AddPathCommand(1, "14000", "5192"); f.AddPathCommand(3, "6753", "9190", "-4002417", "739161"); f.AddPathCommand(1, "4127", "15789"); f.AddPathCommand(3, "6753", "9190", "9459261", "711490"); f.AddPathCommand(6); break; case "corner": f.AddAdj("adj1", 15, "50000"); f.AddAdj("adj2", 15, "50000"); f.AddGuide("maxAdj1", 0, "100000", "h", "ss"); f.AddGuide("maxAdj2", 0, "100000", "w", "ss"); f.AddGuide("a1", 10, "0", "adj1", "maxAdj1"); f.AddGuide("a2", 10, "0", "adj2", "maxAdj2"); f.AddGuide("x1", 0, "ss", "a2", "100000"); f.AddGuide("dy1", 0, "ss", "a1", "100000"); f.AddGuide("y1", 1, "b", "0", "dy1"); f.AddGuide("cx1", 0, "x1", "1", "2"); f.AddGuide("cy1", 2, "y1", "b", "2"); f.AddGuide("d", 1, "w", "0", "h"); f.AddGuide("it", 3, "d", "y1", "t"); f.AddGuide("ir", 3, "d", "r", "x1"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "maxAdj1", "l", "y1"); f.AddHandleXY("adj2", "0", "maxAdj2", undefined, "0", "0", "x1", "t"); f.AddCnx("0", "r", "cy1"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "cx1", "t"); f.AddRect("l", "it", "ir", "b"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "x1", "t"); f.AddPathCommand(2, "x1", "y1"); f.AddPathCommand(2, "r", "y1"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); break; case "cornerTabs": f.AddGuide("md", 9, "w", "h", "0"); f.AddGuide("dx", 0, "1", "md", "20"); f.AddGuide("y1", 1, "0", "b", "dx"); f.AddGuide("x1", 1, "0", "r", "dx"); f.AddCnx("cd2", "l", "t"); f.AddCnx("cd2", "l", "dx"); f.AddCnx("cd2", "l", "y1"); f.AddCnx("cd2", "l", "b"); f.AddCnx("_3cd4", "dx", "t"); f.AddCnx("_3cd4", "x1", "t"); f.AddCnx("cd4", "dx", "b"); f.AddCnx("cd4", "x1", "b"); f.AddCnx("0", "r", "t"); f.AddCnx("0", "r", "dx"); f.AddCnx("0", "r", "y1"); f.AddCnx("0", "r", "b"); f.AddRect("dx", "dx", "x1", "y1"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "dx", "t"); f.AddPathCommand(2, "l", "dx"); f.AddPathCommand(6); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "y1"); f.AddPathCommand(2, "dx", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "x1", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "dx"); f.AddPathCommand(6); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "r", "y1"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "x1", "b"); f.AddPathCommand(6); break; case "cube": f.AddAdj("adj", 15, "25000"); f.AddGuide("a", 10, "0", "adj", "100000"); f.AddGuide("y1", 0, "ss", "a", "100000"); f.AddGuide("y4", 1, "b", "0", "y1"); f.AddGuide("y2", 0, "y4", "1", "2"); f.AddGuide("y3", 2, "y1", "b", "2"); f.AddGuide("x4", 1, "r", "0", "y1"); f.AddGuide("x2", 0, "x4", "1", "2"); f.AddGuide("x3", 2, "y1", "r", "2"); f.AddHandleXY(undefined, "0", "0", "adj", "0", "100000", "l", "y1"); f.AddCnx("_3cd4", "x3", "t"); f.AddCnx("_3cd4", "x2", "y1"); f.AddCnx("cd2", "l", "y3"); f.AddCnx("cd4", "x2", "b"); f.AddCnx("0", "x4", "y3"); f.AddCnx("0", "r", "y2"); f.AddRect("l", "y1", "x4", "b"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "y1"); f.AddPathCommand(2, "x4", "y1"); f.AddPathCommand(2, "x4", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darkenLess", false, undefined, undefined); f.AddPathCommand(1, "x4", "y1"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "y4"); f.AddPathCommand(2, "x4", "b"); f.AddPathCommand(6); f.AddPathCommand(0, false, "lightenLess", false, undefined, undefined); f.AddPathCommand(1, "l", "y1"); f.AddPathCommand(2, "y1", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "x4", "y1"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "y1"); f.AddPathCommand(2, "y1", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "y4"); f.AddPathCommand(2, "x4", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(1, "l", "y1"); f.AddPathCommand(2, "x4", "y1"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(1, "x4", "y1"); f.AddPathCommand(2, "x4", "b"); break; case "curvedConnector2": f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(5, "wd2", "t", "r", "hd2", "r", "b"); break; case "curvedConnector3": f.AddAdj("adj1", 15, "50000"); f.AddGuide("x2", 0, "w", "adj1", "100000"); f.AddGuide("x1", 2, "l", "x2", "2"); f.AddGuide("x3", 2, "r", "x2", "2"); f.AddGuide("y3", 0, "h", "3", "4"); f.AddHandleXY("adj1", "-2147483647", "2147483647", undefined, "0", "0", "x2", "vc"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(5, "x1", "t", "x2", "hd4", "x2", "vc"); f.AddPathCommand(5, "x2", "y3", "x3", "b", "r", "b"); break; case "curvedConnector4": f.AddAdj("adj1", 15, "50000"); f.AddAdj("adj2", 15, "50000"); f.AddGuide("x2", 0, "w", "adj1", "100000"); f.AddGuide("x1", 2, "l", "x2", "2"); f.AddGuide("x3", 2, "r", "x2", "2"); f.AddGuide("x4", 2, "x2", "x3", "2"); f.AddGuide("x5", 2, "x3", "r", "2"); f.AddGuide("y4", 0, "h", "adj2", "100000"); f.AddGuide("y1", 2, "t", "y4", "2"); f.AddGuide("y2", 2, "t", "y1", "2"); f.AddGuide("y3", 2, "y1", "y4", "2"); f.AddGuide("y5", 2, "b", "y4", "2"); f.AddHandleXY("adj1", "-2147483647", "2147483647", undefined, "0", "0", "x2", "y1"); f.AddHandleXY(undefined, "0", "0", "adj2", "-2147483647", "2147483647", "x3", "y4"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(5, "x1", "t", "x2", "y2", "x2", "y1"); f.AddPathCommand(5, "x2", "y3", "x4", "y4", "x3", "y4"); f.AddPathCommand(5, "x5", "y4", "r", "y5", "r", "b"); break; case "curvedConnector5": f.AddAdj("adj1", 15, "50000"); f.AddAdj("adj2", 15, "50000"); f.AddAdj("adj3", 15, "50000"); f.AddGuide("x3", 0, "w", "adj1", "100000"); f.AddGuide("x6", 0, "w", "adj3", "100000"); f.AddGuide("x1", 2, "x3", "x6", "2"); f.AddGuide("x2", 2, "l", "x3", "2"); f.AddGuide("x4", 2, "x3", "x1", "2"); f.AddGuide("x5", 2, "x6", "x1", "2"); f.AddGuide("x7", 2, "x6", "r", "2"); f.AddGuide("y4", 0, "h", "adj2", "100000"); f.AddGuide("y1", 2, "t", "y4", "2"); f.AddGuide("y2", 2, "t", "y1", "2"); f.AddGuide("y3", 2, "y1", "y4", "2"); f.AddGuide("y5", 2, "b", "y4", "2"); f.AddGuide("y6", 2, "y5", "y4", "2"); f.AddGuide("y7", 2, "y5", "b", "2"); f.AddHandleXY("adj1", "-2147483647", "2147483647", undefined, "0", "0", "x3", "y1"); f.AddHandleXY(undefined, "0", "0", "adj2", "-2147483647", "2147483647", "x1", "y4"); f.AddHandleXY("adj3", "-2147483647", "2147483647", undefined, "0", "0", "x6", "y5"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(5, "x2", "t", "x3", "y2", "x3", "y1"); f.AddPathCommand(5, "x3", "y3", "x4", "y4", "x1", "y4"); f.AddPathCommand(5, "x5", "y4", "x6", "y6", "x6", "y5"); f.AddPathCommand(5, "x6", "y7", "x7", "b", "r", "b"); break; case "curvedDownArrow": f.AddAdj("adj1", 15, "12960"); f.AddAdj("adj2", 15, "19440"); f.AddAdj("adj3", 15, "14400"); f.AddGuide("maxAdj2", 0, "50000", "w", "ss"); f.AddGuide("a2", 10, "0", "adj2", "maxAdj2"); f.AddGuide("a1", 10, "0", "adj1", "100000"); f.AddGuide("th", 0, "ss", "a1", "100000"); f.AddGuide("aw", 0, "ss", "a2", "100000"); f.AddGuide("q1", 2, "th", "aw", "4"); f.AddGuide("wR", 1, "wd2", "0", "q1"); f.AddGuide("q7", 0, "wR", "2", "1"); f.AddGuide("q8", 0, "q7", "q7", "1"); f.AddGuide("q9", 0, "th", "th", "1"); f.AddGuide("q10", 1, "q8", "0", "q9"); f.AddGuide("q11", 13, "q10"); f.AddGuide("idy", 0, "q11", "h", "q7"); f.AddGuide("maxAdj3", 0, "100000", "idy", "ss"); f.AddGuide("a3", 10, "0", "adj3", "maxAdj3"); f.AddGuide("ah", 0, "ss", "adj3", "100000"); f.AddGuide("x3", 1, "wR", "th", "0"); f.AddGuide("q2", 0, "h", "h", "1"); f.AddGuide("q3", 0, "ah", "ah", "1"); f.AddGuide("q4", 1, "q2", "0", "q3"); f.AddGuide("q5", 13, "q4"); f.AddGuide("dx", 0, "q5", "wR", "h"); f.AddGuide("x5", 1, "wR", "dx", "0"); f.AddGuide("x7", 1, "x3", "dx", "0"); f.AddGuide("q6", 1, "aw", "0", "th"); f.AddGuide("dh", 0, "q6", "1", "2"); f.AddGuide("x4", 1, "x5", "0", "dh"); f.AddGuide("x8", 1, "x7", "dh", "0"); f.AddGuide("aw2", 0, "aw", "1", "2"); f.AddGuide("x6", 1, "r", "0", "aw2"); f.AddGuide("y1", 1, "b", "0", "ah"); f.AddGuide("swAng", 5, "ah", "dx"); f.AddGuide("mswAng", 1, "0", "0", "swAng"); f.AddGuide("iy", 1, "b", "0", "idy"); f.AddGuide("ix", 2, "wR", "x3", "2"); f.AddGuide("q12", 0, "th", "1", "2"); f.AddGuide("dang2", 5, "idy", "q12"); f.AddGuide("stAng", 1, "_3cd4", "swAng", "0"); f.AddGuide("stAng2", 1, "_3cd4", "0", "dang2"); f.AddGuide("swAng2", 1, "dang2", "0", "cd4"); f.AddGuide("swAng3", 1, "cd4", "dang2", "0"); f.AddHandleXY("adj1", "0", "adj2", undefined, "0", "0", "x7", "y1"); f.AddHandleXY("adj2", "0", "maxAdj2", undefined, "0", "0", "x4", "b"); f.AddHandleXY(undefined, "0", "0", "adj3", "0", "maxAdj3", "r", "y1"); f.AddCnx("_3cd4", "ix", "t"); f.AddCnx("cd4", "q12", "b"); f.AddCnx("cd4", "x4", "y1"); f.AddCnx("cd4", "x6", "b"); f.AddCnx("0", "x8", "y1"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "x6", "b"); f.AddPathCommand(2, "x4", "y1"); f.AddPathCommand(2, "x5", "y1"); f.AddPathCommand(3, "wR", "h", "stAng", "mswAng"); f.AddPathCommand(2, "x3", "t"); f.AddPathCommand(3, "wR", "h", "_3cd4", "swAng"); f.AddPathCommand(2, "x8", "y1"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darkenLess", false, undefined, undefined); f.AddPathCommand(1, "ix", "iy"); f.AddPathCommand(3, "wR", "h", "stAng2", "swAng2"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(3, "wR", "h", "cd2", "swAng3"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "ix", "iy"); f.AddPathCommand(3, "wR", "h", "stAng2", "swAng2"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(3, "wR", "h", "cd2", "cd4"); f.AddPathCommand(2, "x3", "t"); f.AddPathCommand(3, "wR", "h", "_3cd4", "swAng"); f.AddPathCommand(2, "x8", "y1"); f.AddPathCommand(2, "x6", "b"); f.AddPathCommand(2, "x4", "y1"); f.AddPathCommand(2, "x5", "y1"); f.AddPathCommand(3, "wR", "h", "stAng", "mswAng"); break; case "curvedLeftArrow": f.AddAdj("adj1", 15, "25000"); f.AddAdj("adj2", 15, "50000"); f.AddAdj("adj3", 15, "25000"); f.AddGuide("maxAdj2", 0, "50000", "h", "ss"); f.AddGuide("a2", 10, "0", "adj2", "maxAdj2"); f.AddGuide("a1", 10, "0", "adj1", "a2"); f.AddGuide("th", 0, "ss", "a1", "100000"); f.AddGuide("aw", 0, "ss", "a2", "100000"); f.AddGuide("q1", 2, "th", "aw", "4"); f.AddGuide("hR", 1, "hd2", "0", "q1"); f.AddGuide("q7", 0, "hR", "2", "1"); f.AddGuide("q8", 0, "q7", "q7", "1"); f.AddGuide("q9", 0, "th", "th", "1"); f.AddGuide("q10", 1, "q8", "0", "q9"); f.AddGuide("q11", 13, "q10"); f.AddGuide("idx", 0, "q11", "w", "q7"); f.AddGuide("maxAdj3", 0, "100000", "idx", "ss"); f.AddGuide("a3", 10, "0", "adj3", "maxAdj3"); f.AddGuide("ah", 0, "ss", "a3", "100000"); f.AddGuide("y3", 1, "hR", "th", "0"); f.AddGuide("q2", 0, "w", "w", "1"); f.AddGuide("q3", 0, "ah", "ah", "1"); f.AddGuide("q4", 1, "q2", "0", "q3"); f.AddGuide("q5", 13, "q4"); f.AddGuide("dy", 0, "q5", "hR", "w"); f.AddGuide("y5", 1, "hR", "dy", "0"); f.AddGuide("y7", 1, "y3", "dy", "0"); f.AddGuide("q6", 1, "aw", "0", "th"); f.AddGuide("dh", 0, "q6", "1", "2"); f.AddGuide("y4", 1, "y5", "0", "dh"); f.AddGuide("y8", 1, "y7", "dh", "0"); f.AddGuide("aw2", 0, "aw", "1", "2"); f.AddGuide("y6", 1, "b", "0", "aw2"); f.AddGuide("x1", 1, "l", "ah", "0"); f.AddGuide("swAng", 5, "ah", "dy"); f.AddGuide("mswAng", 1, "0", "0", "swAng"); f.AddGuide("ix", 1, "l", "idx", "0"); f.AddGuide("iy", 2, "hR", "y3", "2"); f.AddGuide("q12", 0, "th", "1", "2"); f.AddGuide("dang2", 5, "idx", "q12"); f.AddGuide("swAng2", 1, "dang2", "0", "swAng"); f.AddGuide("swAng3", 1, "swAng", "dang2", "0"); f.AddGuide("stAng3", 1, "0", "0", "dang2"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "a2", "x1", "y5"); f.AddHandleXY(undefined, "0", "0", "adj2", "0", "maxAdj2", "r", "y4"); f.AddHandleXY("adj3", "0", "maxAdj3", undefined, "0", "0", "x1", "b"); f.AddCnx("cd2", "l", "q12"); f.AddCnx("cd2", "x1", "y4"); f.AddCnx("cd3", "l", "y6"); f.AddCnx("cd4", "x1", "y8"); f.AddCnx("0", "r", "iy"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "y6"); f.AddPathCommand(2, "x1", "y4"); f.AddPathCommand(2, "x1", "y5"); f.AddPathCommand(3, "w", "hR", "swAng", "swAng2"); f.AddPathCommand(3, "w", "hR", "stAng3", "swAng3"); f.AddPathCommand(2, "x1", "y8"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darkenLess", false, undefined, undefined); f.AddPathCommand(1, "r", "y3"); f.AddPathCommand(3, "w", "hR", "0", "-5400000"); f.AddPathCommand(2, "l", "t"); f.AddPathCommand(3, "w", "hR", "_3cd4", "cd4"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "r", "y3"); f.AddPathCommand(3, "w", "hR", "0", "-5400000"); f.AddPathCommand(2, "l", "t"); f.AddPathCommand(3, "w", "hR", "_3cd4", "cd4"); f.AddPathCommand(2, "r", "y3"); f.AddPathCommand(3, "w", "hR", "0", "swAng"); f.AddPathCommand(2, "x1", "y8"); f.AddPathCommand(2, "l", "y6"); f.AddPathCommand(2, "x1", "y4"); f.AddPathCommand(2, "x1", "y5"); f.AddPathCommand(3, "w", "hR", "swAng", "swAng2"); break; case "curvedRightArrow": f.AddAdj("adj1", 15, "12960"); f.AddAdj("adj2", 15, "19440"); f.AddAdj("adj3", 15, "14400"); f.AddGuide("maxAdj2", 0, "50000", "h", "ss"); f.AddGuide("a2", 10, "0", "adj2", "maxAdj2"); f.AddGuide("a1", 10, "0", "adj1", "a2"); f.AddGuide("th", 0, "ss", "a1", "100000"); f.AddGuide("aw", 0, "ss", "a2", "100000"); f.AddGuide("q1", 2, "th", "aw", "4"); f.AddGuide("hR", 1, "hd2", "0", "q1"); f.AddGuide("q7", 0, "hR", "2", "1"); f.AddGuide("q8", 0, "q7", "q7", "1"); f.AddGuide("q9", 0, "th", "th", "1"); f.AddGuide("q10", 1, "q8", "0", "q9"); f.AddGuide("q11", 13, "q10"); f.AddGuide("idx", 0, "q11", "w", "q7"); f.AddGuide("maxAdj3", 0, "100000", "idx", "ss"); f.AddGuide("a3", 10, "0", "adj3", "maxAdj3"); f.AddGuide("ah", 0, "ss", "a3", "100000"); f.AddGuide("y3", 1, "hR", "th", "0"); f.AddGuide("q2", 0, "w", "w", "1"); f.AddGuide("q3", 0, "ah", "ah", "1"); f.AddGuide("q4", 1, "q2", "0", "q3"); f.AddGuide("q5", 13, "q4"); f.AddGuide("dy", 0, "q5", "hR", "w"); f.AddGuide("y5", 1, "hR", "dy", "0"); f.AddGuide("y7", 1, "y3", "dy", "0"); f.AddGuide("q6", 1, "aw", "0", "th"); f.AddGuide("dh", 0, "q6", "1", "2"); f.AddGuide("y4", 1, "y5", "0", "dh"); f.AddGuide("y8", 1, "y7", "dh", "0"); f.AddGuide("aw2", 0, "aw", "1", "2"); f.AddGuide("y6", 1, "b", "0", "aw2"); f.AddGuide("x1", 1, "r", "0", "ah"); f.AddGuide("swAng", 5, "ah", "dy"); f.AddGuide("stAng", 1, "cd2", "0", "swAng"); f.AddGuide("mswAng", 1, "0", "0", "swAng"); f.AddGuide("ix", 1, "r", "0", "idx"); f.AddGuide("iy", 2, "hR", "y3", "2"); f.AddGuide("q12", 0, "th", "1", "2"); f.AddGuide("dang2", 5, "idx", "q12"); f.AddGuide("swAng2", 1, "dang2", "0", "cd4"); f.AddGuide("swAng3", 1, "cd4", "dang2", "0"); f.AddGuide("stAng3", 1, "cd2", "0", "dang2"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "a2", "x1", "y5"); f.AddHandleXY(undefined, "0", "0", "adj2", "0", "maxAdj2", "r", "y4"); f.AddHandleXY("adj3", "0", "maxAdj3", undefined, "0", "0", "x1", "b"); f.AddCnx("cd2", "l", "iy"); f.AddCnx("cd4", "x1", "y8"); f.AddCnx("0", "r", "y6"); f.AddCnx("0", "x1", "y4"); f.AddCnx("0", "r", "q12"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "hR"); f.AddPathCommand(3, "w", "hR", "cd2", "mswAng"); f.AddPathCommand(2, "x1", "y4"); f.AddPathCommand(2, "r", "y6"); f.AddPathCommand(2, "x1", "y8"); f.AddPathCommand(2, "x1", "y7"); f.AddPathCommand(3, "w", "hR", "stAng", "swAng"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darkenLess", false, undefined, undefined); f.AddPathCommand(1, "r", "th"); f.AddPathCommand(3, "w", "hR", "_3cd4", "swAng2"); f.AddPathCommand(3, "w", "hR", "stAng3", "swAng3"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "hR"); f.AddPathCommand(3, "w", "hR", "cd2", "mswAng"); f.AddPathCommand(2, "x1", "y4"); f.AddPathCommand(2, "r", "y6"); f.AddPathCommand(2, "x1", "y8"); f.AddPathCommand(2, "x1", "y7"); f.AddPathCommand(3, "w", "hR", "stAng", "swAng"); f.AddPathCommand(2, "l", "hR"); f.AddPathCommand(3, "w", "hR", "cd2", "cd4"); f.AddPathCommand(2, "r", "th"); f.AddPathCommand(3, "w", "hR", "_3cd4", "swAng2"); break; case "curvedUpArrow": f.AddAdj("adj1", 15, "25000"); f.AddAdj("adj2", 15, "50000"); f.AddAdj("adj3", 15, "25000"); f.AddGuide("maxAdj2", 0, "50000", "w", "ss"); f.AddGuide("a2", 10, "0", "adj2", "maxAdj2"); f.AddGuide("a1", 10, "0", "adj1", "100000"); f.AddGuide("th", 0, "ss", "a1", "100000"); f.AddGuide("aw", 0, "ss", "a2", "100000"); f.AddGuide("q1", 2, "th", "aw", "4"); f.AddGuide("wR", 1, "wd2", "0", "q1"); f.AddGuide("q7", 0, "wR", "2", "1"); f.AddGuide("q8", 0, "q7", "q7", "1"); f.AddGuide("q9", 0, "th", "th", "1"); f.AddGuide("q10", 1, "q8", "0", "q9"); f.AddGuide("q11", 13, "q10"); f.AddGuide("idy", 0, "q11", "h", "q7"); f.AddGuide("maxAdj3", 0, "100000", "idy", "ss"); f.AddGuide("a3", 10, "0", "adj3", "maxAdj3"); f.AddGuide("ah", 0, "ss", "adj3", "100000"); f.AddGuide("x3", 1, "wR", "th", "0"); f.AddGuide("q2", 0, "h", "h", "1"); f.AddGuide("q3", 0, "ah", "ah", "1"); f.AddGuide("q4", 1, "q2", "0", "q3"); f.AddGuide("q5", 13, "q4"); f.AddGuide("dx", 0, "q5", "wR", "h"); f.AddGuide("x5", 1, "wR", "dx", "0"); f.AddGuide("x7", 1, "x3", "dx", "0"); f.AddGuide("q6", 1, "aw", "0", "th"); f.AddGuide("dh", 0, "q6", "1", "2"); f.AddGuide("x4", 1, "x5", "0", "dh"); f.AddGuide("x8", 1, "x7", "dh", "0"); f.AddGuide("aw2", 0, "aw", "1", "2"); f.AddGuide("x6", 1, "r", "0", "aw2"); f.AddGuide("y1", 1, "t", "ah", "0"); f.AddGuide("swAng", 5, "ah", "dx"); f.AddGuide("mswAng", 1, "0", "0", "swAng"); f.AddGuide("iy", 1, "t", "idy", "0"); f.AddGuide("ix", 2, "wR", "x3", "2"); f.AddGuide("q12", 0, "th", "1", "2"); f.AddGuide("dang2", 5, "idy", "q12"); f.AddGuide("swAng2", 1, "dang2", "0", "swAng"); f.AddGuide("mswAng2", 1, "0", "0", "swAng2"); f.AddGuide("stAng3", 1, "cd4", "0", "swAng"); f.AddGuide("swAng3", 1, "swAng", "dang2", "0"); f.AddGuide("stAng2", 1, "cd4", "0", "dang2"); f.AddHandleXY("adj1", "0", "a2", undefined, "0", "0", "x7", "y1"); f.AddHandleXY("adj2", "0", "maxAdj2", undefined, "0", "0", "x4", "t"); f.AddHandleXY(undefined, "0", "0", "adj3", "0", "maxAdj3", "r", "y1"); f.AddCnx("_3cd4", "x6", "t"); f.AddCnx("_3cd4", "x4", "y1"); f.AddCnx("_3cd4", "q12", "t"); f.AddCnx("cd4", "ix", "b"); f.AddCnx("0", "x8", "y1"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "x6", "t"); f.AddPathCommand(2, "x8", "y1"); f.AddPathCommand(2, "x7", "y1"); f.AddPathCommand(3, "wR", "h", "stAng3", "swAng3"); f.AddPathCommand(3, "wR", "h", "stAng2", "swAng2"); f.AddPathCommand(2, "x4", "y1"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darkenLess", false, undefined, undefined); f.AddPathCommand(1, "wR", "b"); f.AddPathCommand(3, "wR", "h", "cd4", "cd4"); f.AddPathCommand(2, "th", "t"); f.AddPathCommand(3, "wR", "h", "cd2", "-5400000"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "ix", "iy"); f.AddPathCommand(3, "wR", "h", "stAng2", "swAng2"); f.AddPathCommand(2, "x4", "y1"); f.AddPathCommand(2, "x6", "t"); f.AddPathCommand(2, "x8", "y1"); f.AddPathCommand(2, "x7", "y1"); f.AddPathCommand(3, "wR", "h", "stAng3", "swAng"); f.AddPathCommand(2, "wR", "b"); f.AddPathCommand(3, "wR", "h", "cd4", "cd4"); f.AddPathCommand(2, "th", "t"); f.AddPathCommand(3, "wR", "h", "cd2", "-5400000"); break; case "decagon": f.AddAdj("vf", 15, "105146"); f.AddGuide("shd2", 0, "hd2", "vf", "100000"); f.AddGuide("dx1", 7, "wd2", "2160000"); f.AddGuide("dx2", 7, "wd2", "4320000"); f.AddGuide("x1", 1, "hc", "0", "dx1"); f.AddGuide("x2", 1, "hc", "0", "dx2"); f.AddGuide("x3", 1, "hc", "dx2", "0"); f.AddGuide("x4", 1, "hc", "dx1", "0"); f.AddGuide("dy1", 12, "shd2", "4320000"); f.AddGuide("dy2", 12, "shd2", "2160000"); f.AddGuide("y1", 1, "vc", "0", "dy1"); f.AddGuide("y2", 1, "vc", "0", "dy2"); f.AddGuide("y3", 1, "vc", "dy2", "0"); f.AddGuide("y4", 1, "vc", "dy1", "0"); f.AddCnx("0", "x4", "y2"); f.AddCnx("0", "r", "vc"); f.AddCnx("0", "x4", "y3"); f.AddCnx("cd4", "x3", "y4"); f.AddCnx("cd4", "x2", "y4"); f.AddCnx("cd2", "x1", "y3"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd2", "x1", "y2"); f.AddCnx("_3cd4", "x2", "y1"); f.AddCnx("_3cd4", "x3", "y1"); f.AddRect("x1", "y2", "x4", "y3"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(2, "x1", "y2"); f.AddPathCommand(2, "x2", "y1"); f.AddPathCommand(2, "x3", "y1"); f.AddPathCommand(2, "x4", "y2"); f.AddPathCommand(2, "r", "vc"); f.AddPathCommand(2, "x4", "y3"); f.AddPathCommand(2, "x3", "y4"); f.AddPathCommand(2, "x2", "y4"); f.AddPathCommand(2, "x1", "y3"); f.AddPathCommand(6); break; case "diagStripe": f.AddAdj("adj", 15, "50000"); f.AddGuide("a", 10, "0", "adj", "100000"); f.AddGuide("x2", 0, "w", "a", "100000"); f.AddGuide("x1", 0, "x2", "1", "2"); f.AddGuide("x3", 2, "x2", "r", "2"); f.AddGuide("y2", 0, "h", "a", "100000"); f.AddGuide("y1", 0, "y2", "1", "2"); f.AddGuide("y3", 2, "y2", "b", "2"); f.AddHandleXY(undefined, "0", "0", "adj", "0", "100000", "l", "y2"); f.AddCnx("0", "hc", "vc"); f.AddCnx("cd2", "l", "y3"); f.AddCnx("cd2", "x1", "y1"); f.AddCnx("_3cd4", "x3", "t"); f.AddRect("l", "t", "x3", "y3"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "y2"); f.AddPathCommand(2, "x2", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); break; case "diamond": f.AddGuide("ir", 0, "w", "3", "4"); f.AddGuide("ib", 0, "h", "3", "4"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("wd4", "hd4", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(2, "hc", "t"); f.AddPathCommand(2, "r", "vc"); f.AddPathCommand(2, "hc", "b"); f.AddPathCommand(6); break; case "dodecagon": f.AddGuide("x1", 0, "w", "2894", "21600"); f.AddGuide("x2", 0, "w", "7906", "21600"); f.AddGuide("x3", 0, "w", "13694", "21600"); f.AddGuide("x4", 0, "w", "18706", "21600"); f.AddGuide("y1", 0, "h", "2894", "21600"); f.AddGuide("y2", 0, "h", "7906", "21600"); f.AddGuide("y3", 0, "h", "13694", "21600"); f.AddGuide("y4", 0, "h", "18706", "21600"); f.AddCnx("0", "x4", "y1"); f.AddCnx("0", "r", "y2"); f.AddCnx("0", "r", "y3"); f.AddCnx("0", "x4", "y4"); f.AddCnx("cd4", "x3", "b"); f.AddCnx("cd4", "x2", "b"); f.AddCnx("cd2", "x1", "y4"); f.AddCnx("cd2", "l", "y3"); f.AddCnx("cd2", "l", "y2"); f.AddCnx("cd2", "x1", "y1"); f.AddCnx("_3cd4", "x2", "t"); f.AddCnx("_3cd4", "x3", "t"); f.AddRect("x1", "y1", "x4", "y4"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "y2"); f.AddPathCommand(2, "x1", "y1"); f.AddPathCommand(2, "x2", "t"); f.AddPathCommand(2, "x3", "t"); f.AddPathCommand(2, "x4", "y1"); f.AddPathCommand(2, "r", "y2"); f.AddPathCommand(2, "r", "y3"); f.AddPathCommand(2, "x4", "y4"); f.AddPathCommand(2, "x3", "b"); f.AddPathCommand(2, "x2", "b"); f.AddPathCommand(2, "x1", "y4"); f.AddPathCommand(2, "l", "y3"); f.AddPathCommand(6); break; case "donut": f.AddAdj("adj", 15, "25000"); f.AddGuide("a", 10, "0", "adj", "50000"); f.AddGuide("dr", 0, "ss", "a", "100000"); f.AddGuide("iwd2", 1, "wd2", "0", "dr"); f.AddGuide("ihd2", 1, "hd2", "0", "dr"); f.AddGuide("idx", 7, "wd2", "2700000"); f.AddGuide("idy", 12, "hd2", "2700000"); f.AddGuide("il", 1, "hc", "0", "idx"); f.AddGuide("ir", 1, "hc", "idx", "0"); f.AddGuide("it", 1, "vc", "0", "idy"); f.AddGuide("ib", 1, "vc", "idy", "0"); f.AddHandlePolar(undefined, "0", "0", "adj", "0", "50000", "dr", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("_3cd4", "il", "it"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "il", "ib"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd4", "ir", "ib"); f.AddCnx("0", "r", "vc"); f.AddCnx("_3cd4", "ir", "it"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(3, "wd2", "hd2", "cd2", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "_3cd4", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "0", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "cd4", "cd4"); f.AddPathCommand(6); f.AddPathCommand(1, "dr", "vc"); f.AddPathCommand(3, "iwd2", "ihd2", "cd2", "-5400000"); f.AddPathCommand(3, "iwd2", "ihd2", "cd4", "-5400000"); f.AddPathCommand(3, "iwd2", "ihd2", "0", "-5400000"); f.AddPathCommand(3, "iwd2", "ihd2", "_3cd4", "-5400000"); f.AddPathCommand(6); break; case "doubleWave": f.AddAdj("adj1", 15, "6250"); f.AddAdj("adj2", 15, "0"); f.AddGuide("a1", 10, "0", "adj1", "12500"); f.AddGuide("a2", 10, "-10000", "adj2", "10000"); f.AddGuide("y1", 0, "h", "a1", "100000"); f.AddGuide("dy2", 0, "y1", "10", "3"); f.AddGuide("y2", 1, "y1", "0", "dy2"); f.AddGuide("y3", 1, "y1", "dy2", "0"); f.AddGuide("y4", 1, "b", "0", "y1"); f.AddGuide("y5", 1, "y4", "0", "dy2"); f.AddGuide("y6", 1, "y4", "dy2", "0"); f.AddGuide("dx1", 0, "w", "a2", "100000"); f.AddGuide("of2", 0, "w", "a2", "50000"); f.AddGuide("x1", 4, "dx1"); f.AddGuide("dx2", 3, "of2", "0", "of2"); f.AddGuide("x2", 1, "l", "0", "dx2"); f.AddGuide("dx8", 3, "of2", "of2", "0"); f.AddGuide("x8", 1, "r", "0", "dx8"); f.AddGuide("dx3", 2, "dx2", "x8", "6"); f.AddGuide("x3", 1, "x2", "dx3", "0"); f.AddGuide("dx4", 2, "dx2", "x8", "3"); f.AddGuide("x4", 1, "x2", "dx4", "0"); f.AddGuide("x5", 2, "x2", "x8", "2"); f.AddGuide("x6", 1, "x5", "dx3", "0"); f.AddGuide("x7", 2, "x6", "x8", "2"); f.AddGuide("x9", 1, "l", "dx8", "0"); f.AddGuide("x15", 1, "r", "dx2", "0"); f.AddGuide("x10", 1, "x9", "dx3", "0"); f.AddGuide("x11", 1, "x9", "dx4", "0"); f.AddGuide("x12", 2, "x9", "x15", "2"); f.AddGuide("x13", 1, "x12", "dx3", "0"); f.AddGuide("x14", 2, "x13", "x15", "2"); f.AddGuide("x16", 1, "r", "0", "x1"); f.AddGuide("xAdj", 1, "hc", "dx1", "0"); f.AddGuide("il", 8, "x2", "x9"); f.AddGuide("ir", 16, "x8", "x15"); f.AddGuide("it", 0, "h", "a1", "50000"); f.AddGuide("ib", 1, "b", "0", "it"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "12500", "l", "y1"); f.AddHandleXY("adj2", "-10000", "10000", undefined, "0", "0", "xAdj", "b"); f.AddCnx("cd4", "x12", "y1"); f.AddCnx("cd2", "x1", "vc"); f.AddCnx("_3cd4", "x5", "y4"); f.AddCnx("0", "x16", "vc"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "x2", "y1"); f.AddPathCommand(5, "x3", "y2", "x4", "y3", "x5", "y1"); f.AddPathCommand(5, "x6", "y2", "x7", "y3", "x8", "y1"); f.AddPathCommand(2, "x15", "y4"); f.AddPathCommand(5, "x14", "y6", "x13", "y5", "x12", "y4"); f.AddPathCommand(5, "x11", "y6", "x10", "y5", "x9", "y4"); f.AddPathCommand(6); break; case "downArrow": f.AddAdj("adj1", 15, "50000"); f.AddAdj("adj2", 15, "50000"); f.AddGuide("maxAdj2", 0, "100000", "h", "ss"); f.AddGuide("a1", 10, "0", "adj1", "100000"); f.AddGuide("a2", 10, "0", "adj2", "maxAdj2"); f.AddGuide("dy1", 0, "ss", "a2", "100000"); f.AddGuide("y1", 1, "b", "0", "dy1"); f.AddGuide("dx1", 0, "w", "a1", "200000"); f.AddGuide("x1", 1, "hc", "0", "dx1"); f.AddGuide("x2", 1, "hc", "dx1", "0"); f.AddGuide("dy2", 0, "x1", "dy1", "wd2"); f.AddGuide("y2", 1, "y1", "dy2", "0"); f.AddHandleXY("adj1", "0", "100000", undefined, "0", "0", "x1", "t"); f.AddHandleXY(undefined, "0", "0", "adj2", "0", "maxAdj2", "l", "y1"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "y1"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "y1"); f.AddRect("x1", "t", "x2", "y2"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "y1"); f.AddPathCommand(2, "x1", "y1"); f.AddPathCommand(2, "x1", "t"); f.AddPathCommand(2, "x2", "t"); f.AddPathCommand(2, "x2", "y1"); f.AddPathCommand(2, "r", "y1"); f.AddPathCommand(2, "hc", "b"); f.AddPathCommand(6); break; case "downArrowCallout": f.AddAdj("adj1", 15, "25000"); f.AddAdj("adj2", 15, "25000"); f.AddAdj("adj3", 15, "25000"); f.AddAdj("adj4", 15, "64977"); f.AddGuide("maxAdj2", 0, "50000", "w", "ss"); f.AddGuide("a2", 10, "0", "adj2", "maxAdj2"); f.AddGuide("maxAdj1", 0, "a2", "2", "1"); f.AddGuide("a1", 10, "0", "adj1", "maxAdj1"); f.AddGuide("maxAdj3", 0, "100000", "h", "ss"); f.AddGuide("a3", 10, "0", "adj3", "maxAdj3"); f.AddGuide("q2", 0, "a3", "ss", "h"); f.AddGuide("maxAdj4", 1, "100000", "0", "q2"); f.AddGuide("a4", 10, "0", "adj4", "maxAdj4"); f.AddGuide("dx1", 0, "ss", "a2", "100000"); f.AddGuide("dx2", 0, "ss", "a1", "200000"); f.AddGuide("x1", 1, "hc", "0", "dx1"); f.AddGuide("x2", 1, "hc", "0", "dx2"); f.AddGuide("x3", 1, "hc", "dx2", "0"); f.AddGuide("x4", 1, "hc", "dx1", "0"); f.AddGuide("dy3", 0, "ss", "a3", "100000"); f.AddGuide("y3", 1, "b", "0", "dy3"); f.AddGuide("y2", 0, "h", "a4", "100000"); f.AddGuide("y1", 0, "y2", "1", "2"); f.AddHandleXY("adj1", "0", "maxAdj1", undefined, "0", "0", "x2", "y3"); f.AddHandleXY("adj2", "0", "maxAdj2", undefined, "0", "0", "x1", "b"); f.AddHandleXY(undefined, "0", "0", "adj3", "0", "maxAdj3", "r", "y3"); f.AddHandleXY(undefined, "0", "0", "adj4", "0", "maxAdj4", "l", "y2"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "y1"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "y1"); f.AddRect("l", "t", "r", "y2"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "y2"); f.AddPathCommand(2, "x3", "y2"); f.AddPathCommand(2, "x3", "y3"); f.AddPathCommand(2, "x4", "y3"); f.AddPathCommand(2, "hc", "b"); f.AddPathCommand(2, "x1", "y3"); f.AddPathCommand(2, "x2", "y3"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "l", "y2"); f.AddPathCommand(6); break; case "ellipse": f.AddGuide("idx", 7, "wd2", "2700000"); f.AddGuide("idy", 12, "hd2", "2700000"); f.AddGuide("il", 1, "hc", "0", "idx"); f.AddGuide("ir", 1, "hc", "idx", "0"); f.AddGuide("it", 1, "vc", "0", "idy"); f.AddGuide("ib", 1, "vc", "idy", "0"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("_3cd4", "il", "it"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "il", "ib"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd4", "ir", "ib"); f.AddCnx("0", "r", "vc"); f.AddCnx("_3cd4", "ir", "it"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(3, "wd2", "hd2", "cd2", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "_3cd4", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "0", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "cd4", "cd4"); f.AddPathCommand(6); break; case "ellipseRibbon": f.AddAdj("adj1", 15, "25000"); f.AddAdj("adj2", 15, "50000"); f.AddAdj("adj3", 15, "12500"); f.AddGuide("a1", 10, "0", "adj1", "100000"); f.AddGuide("a2", 10, "25000", "adj2", "75000"); f.AddGuide("q10", 1, "100000", "0", "a1"); f.AddGuide("q11", 0, "q10", "1", "2"); f.AddGuide("q12", 1, "a1", "0", "q11"); f.AddGuide("minAdj3", 8, "0", "q12"); f.AddGuide("a3", 10, "minAdj3", "adj3", "a1"); f.AddGuide("dx2", 0, "w", "a2", "200000"); f.AddGuide("x2", 1, "hc", "0", "dx2"); f.AddGuide("x3", 1, "x2", "wd8", "0"); f.AddGuide("x4", 1, "r", "0", "x3"); f.AddGuide("x5", 1, "r", "0", "x2"); f.AddGuide("x6", 1, "r", "0", "wd8"); f.AddGuide("dy1", 0, "h", "a3", "100000"); f.AddGuide("f1", 0, "4", "dy1", "w"); f.AddGuide("q1", 0, "x3", "x3", "w"); f.AddGuide("q2", 1, "x3", "0", "q1"); f.AddGuide("y1", 0, "f1", "q2", "1"); f.AddGuide("cx1", 0, "x3", "1", "2"); f.AddGuide("cy1", 0, "f1", "cx1", "1"); f.AddGuide("cx2", 1, "r", "0", "cx1"); f.AddGuide("q1", 0, "h", "a1", "100000"); f.AddGuide("dy3", 1, "q1", "0", "dy1"); f.AddGuide("q3", 0, "x2", "x2", "w"); f.AddGuide("q4", 1, "x2", "0", "q3"); f.AddGuide("q5", 0, "f1", "q4", "1"); f.AddGuide("y3", 1, "q5", "dy3", "0"); f.AddGuide("q6", 1, "dy1", "dy3", "y3"); f.AddGuide("q7", 1, "q6", "dy1", "0"); f.AddGuide("cy3", 1, "q7", "dy3", "0"); f.AddGuide("rh", 1, "b", "0", "q1"); f.AddGuide("q8", 0, "dy1", "14", "16"); f.AddGuide("y2", 2, "q8", "rh", "2"); f.AddGuide("y5", 1, "q5", "rh", "0"); f.AddGuide("y6", 1, "y3", "rh", "0"); f.AddGuide("cx4", 0, "x2", "1", "2"); f.AddGuide("q9", 0, "f1", "cx4", "1"); f.AddGuide("cy4", 1, "q9", "rh", "0"); f.AddGuide("cx5", 1, "r", "0", "cx4"); f.AddGuide("cy6", 1, "cy3", "rh", "0"); f.AddGuide("y7", 1, "y1", "dy3", "0"); f.AddGuide("cy7", 1, "q1", "q1", "y7"); f.AddGuide("y8", 1, "b", "0", "dy1"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "100000", "hc", "q1"); f.AddHandleXY("adj2", "25000", "75000", undefined, "0", "0", "x2", "b"); f.AddHandleXY(undefined, "0", "0", "adj3", "minAdj3", "a1", "l", "y8"); f.AddCnx("_3cd4", "hc", "q1"); f.AddCnx("cd2", "wd8", "y2"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "x6", "y2"); f.AddRect("x2", "q1", "x5", "y6"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(4, "cx1", "cy1", "x3", "y1"); f.AddPathCommand(2, "x2", "y3"); f.AddPathCommand(4, "hc", "cy3", "x5", "y3"); f.AddPathCommand(2, "x4", "y1"); f.AddPathCommand(4, "cx2", "cy1", "r", "t"); f.AddPathCommand(2, "x6", "y2"); f.AddPathCommand(2, "r", "rh"); f.AddPathCommand(4, "cx5", "cy4", "x5", "y5"); f.AddPathCommand(2, "x5", "y6"); f.AddPathCommand(4, "hc", "cy6", "x2", "y6"); f.AddPathCommand(2, "x2", "y5"); f.AddPathCommand(4, "cx4", "cy4", "l", "rh"); f.AddPathCommand(2, "wd8", "y2"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darkenLess", false, undefined, undefined); f.AddPathCommand(1, "x3", "y7"); f.AddPathCommand(2, "x3", "y1"); f.AddPathCommand(2, "x2", "y3"); f.AddPathCommand(4, "hc", "cy3", "x5", "y3"); f.AddPathCommand(2, "x4", "y1"); f.AddPathCommand(2, "x4", "y7"); f.AddPathCommand(4, "hc", "cy7", "x3", "y7"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(4, "cx1", "cy1", "x3", "y1"); f.AddPathCommand(2, "x2", "y3"); f.AddPathCommand(4, "hc", "cy3", "x5", "y3"); f.AddPathCommand(2, "x4", "y1"); f.AddPathCommand(4, "cx2", "cy1", "r", "t"); f.AddPathCommand(2, "x6", "y2"); f.AddPathCommand(2, "r", "rh"); f.AddPathCommand(4, "cx5", "cy4", "x5", "y5"); f.AddPathCommand(2, "x5", "y6"); f.AddPathCommand(4, "hc", "cy6", "x2", "y6"); f.AddPathCommand(2, "x2", "y5"); f.AddPathCommand(4, "cx4", "cy4", "l", "rh"); f.AddPathCommand(2, "wd8", "y2"); f.AddPathCommand(6); f.AddPathCommand(1, "x2", "y5"); f.AddPathCommand(2, "x2", "y3"); f.AddPathCommand(1, "x5", "y3"); f.AddPathCommand(2, "x5", "y5"); f.AddPathCommand(1, "x3", "y1"); f.AddPathCommand(2, "x3", "y7"); f.AddPathCommand(1, "x4", "y7"); f.AddPathCommand(2, "x4", "y1"); break; case "ellipseRibbon2": f.AddAdj("adj1", 15, "25000"); f.AddAdj("adj2", 15, "50000"); f.AddAdj("adj3", 15, "12500"); f.AddGuide("a1", 10, "0", "adj1", "100000"); f.AddGuide("a2", 10, "25000", "adj2", "75000"); f.AddGuide("q10", 1, "100000", "0", "a1"); f.AddGuide("q11", 0, "q10", "1", "2"); f.AddGuide("q12", 1, "a1", "0", "q11"); f.AddGuide("minAdj3", 8, "0", "q12"); f.AddGuide("a3", 10, "minAdj3", "adj3", "a1"); f.AddGuide("dx2", 0, "w", "a2", "200000"); f.AddGuide("x2", 1, "hc", "0", "dx2"); f.AddGuide("x3", 1, "x2", "wd8", "0"); f.AddGuide("x4", 1, "r", "0", "x3"); f.AddGuide("x5", 1, "r", "0", "x2"); f.AddGuide("x6", 1, "r", "0", "wd8"); f.AddGuide("dy1", 0, "h", "a3", "100000"); f.AddGuide("f1", 0, "4", "dy1", "w"); f.AddGuide("q1", 0, "x3", "x3", "w"); f.AddGuide("q2", 1, "x3", "0", "q1"); f.AddGuide("u1", 0, "f1", "q2", "1"); f.AddGuide("y1", 1, "b", "0", "u1"); f.AddGuide("cx1", 0, "x3", "1", "2"); f.AddGuide("cu1", 0, "f1", "cx1", "1"); f.AddGuide("cy1", 1, "b", "0", "cu1"); f.AddGuide("cx2", 1, "r", "0", "cx1"); f.AddGuide("q1", 0, "h", "a1", "100000"); f.AddGuide("dy3", 1, "q1", "0", "dy1"); f.AddGuide("q3", 0, "x2", "x2", "w"); f.AddGuide("q4", 1, "x2", "0", "q3"); f.AddGuide("q5", 0, "f1", "q4", "1"); f.AddGuide("u3", 1, "q5", "dy3", "0"); f.AddGuide("y3", 1, "b", "0", "u3"); f.AddGuide("q6", 1, "dy1", "dy3", "u3"); f.AddGuide("q7", 1, "q6", "dy1", "0"); f.AddGuide("cu3", 1, "q7", "dy3", "0"); f.AddGuide("cy3", 1, "b", "0", "cu3"); f.AddGuide("rh", 1, "b", "0", "q1"); f.AddGuide("q8", 0, "dy1", "14", "16"); f.AddGuide("u2", 2, "q8", "rh", "2"); f.AddGuide("y2", 1, "b", "0", "u2"); f.AddGuide("u5", 1, "q5", "rh", "0"); f.AddGuide("y5", 1, "b", "0", "u5"); f.AddGuide("u6", 1, "u3", "rh", "0"); f.AddGuide("y6", 1, "b", "0", "u6"); f.AddGuide("cx4", 0, "x2", "1", "2"); f.AddGuide("q9", 0, "f1", "cx4", "1"); f.AddGuide("cu4", 1, "q9", "rh", "0"); f.AddGuide("cy4", 1, "b", "0", "cu4"); f.AddGuide("cx5", 1, "r", "0", "cx4"); f.AddGuide("cu6", 1, "cu3", "rh", "0"); f.AddGuide("cy6", 1, "b", "0", "cu6"); f.AddGuide("u7", 1, "u1", "dy3", "0"); f.AddGuide("y7", 1, "b", "0", "u7"); f.AddGuide("cu7", 1, "q1", "q1", "u7"); f.AddGuide("cy7", 1, "b", "0", "cu7"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "100000", "hc", "rh"); f.AddHandleXY("adj2", "25000", "100000", undefined, "0", "0", "x2", "t"); f.AddHandleXY(undefined, "0", "0", "adj3", "minAdj3", "a1", "l", "dy1"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "wd8", "y2"); f.AddCnx("cd4", "hc", "rh"); f.AddCnx("0", "x6", "y2"); f.AddRect("x2", "y6", "x5", "rh"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "b"); f.AddPathCommand(4, "cx1", "cy1", "x3", "y1"); f.AddPathCommand(2, "x2", "y3"); f.AddPathCommand(4, "hc", "cy3", "x5", "y3"); f.AddPathCommand(2, "x4", "y1"); f.AddPathCommand(4, "cx2", "cy1", "r", "b"); f.AddPathCommand(2, "x6", "y2"); f.AddPathCommand(2, "r", "q1"); f.AddPathCommand(4, "cx5", "cy4", "x5", "y5"); f.AddPathCommand(2, "x5", "y6"); f.AddPathCommand(4, "hc", "cy6", "x2", "y6"); f.AddPathCommand(2, "x2", "y5"); f.AddPathCommand(4, "cx4", "cy4", "l", "q1"); f.AddPathCommand(2, "wd8", "y2"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darkenLess", false, undefined, undefined); f.AddPathCommand(1, "x3", "y7"); f.AddPathCommand(2, "x3", "y1"); f.AddPathCommand(2, "x2", "y3"); f.AddPathCommand(4, "hc", "cy3", "x5", "y3"); f.AddPathCommand(2, "x4", "y1"); f.AddPathCommand(2, "x4", "y7"); f.AddPathCommand(4, "hc", "cy7", "x3", "y7"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "b"); f.AddPathCommand(2, "wd8", "y2"); f.AddPathCommand(2, "l", "q1"); f.AddPathCommand(4, "cx4", "cy4", "x2", "y5"); f.AddPathCommand(2, "x2", "y6"); f.AddPathCommand(4, "hc", "cy6", "x5", "y6"); f.AddPathCommand(2, "x5", "y5"); f.AddPathCommand(4, "cx5", "cy4", "r", "q1"); f.AddPathCommand(2, "x6", "y2"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(4, "cx2", "cy1", "x4", "y1"); f.AddPathCommand(2, "x5", "y3"); f.AddPathCommand(4, "hc", "cy3", "x2", "y3"); f.AddPathCommand(2, "x3", "y1"); f.AddPathCommand(4, "cx1", "cy1", "l", "b"); f.AddPathCommand(6); f.AddPathCommand(1, "x2", "y3"); f.AddPathCommand(2, "x2", "y5"); f.AddPathCommand(1, "x5", "y5"); f.AddPathCommand(2, "x5", "y3"); f.AddPathCommand(1, "x3", "y7"); f.AddPathCommand(2, "x3", "y1"); f.AddPathCommand(1, "x4", "y1"); f.AddPathCommand(2, "x4", "y7"); break; case "flowChartAlternateProcess": f.AddGuide("x2", 1, "r", "0", "ssd6"); f.AddGuide("y2", 1, "b", "0", "ssd6"); f.AddGuide("il", 0, "ssd6", "29289", "100000"); f.AddGuide("ir", 1, "r", "0", "il"); f.AddGuide("ib", 1, "b", "0", "il"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("il", "il", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "ssd6"); f.AddPathCommand(3, "ssd6", "ssd6", "cd2", "cd4"); f.AddPathCommand(2, "x2", "t"); f.AddPathCommand(3, "ssd6", "ssd6", "_3cd4", "cd4"); f.AddPathCommand(2, "r", "y2"); f.AddPathCommand(3, "ssd6", "ssd6", "0", "cd4"); f.AddPathCommand(2, "ssd6", "b"); f.AddPathCommand(3, "ssd6", "ssd6", "cd4", "cd4"); f.AddPathCommand(6); break; case "flowChartCollate": f.AddGuide("ir", 0, "w", "3", "4"); f.AddGuide("ib", 0, "h", "3", "4"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("_3cd4", "hc", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddRect("wd4", "hd4", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, 2, 2); f.AddPathCommand(1, "0", "0"); f.AddPathCommand(2, "2", "0"); f.AddPathCommand(2, "1", "1"); f.AddPathCommand(2, "2", "2"); f.AddPathCommand(2, "0", "2"); f.AddPathCommand(2, "1", "1"); f.AddPathCommand(6); break; case "flowChartConnector": f.AddGuide("idx", 7, "wd2", "2700000"); f.AddGuide("idy", 12, "hd2", "2700000"); f.AddGuide("il", 1, "hc", "0", "idx"); f.AddGuide("ir", 1, "hc", "idx", "0"); f.AddGuide("it", 1, "vc", "0", "idy"); f.AddGuide("ib", 1, "vc", "idy", "0"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("_3cd4", "il", "it"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "il", "ib"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd4", "ir", "ib"); f.AddCnx("0", "r", "vc"); f.AddCnx("_3cd4", "ir", "it"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(3, "wd2", "hd2", "cd2", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "_3cd4", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "0", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "cd4", "cd4"); f.AddPathCommand(6); break; case "flowChartDecision": f.AddGuide("ir", 0, "w", "3", "4"); f.AddGuide("ib", 0, "h", "3", "4"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("wd4", "hd4", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, 2, 2); f.AddPathCommand(1, "0", "1"); f.AddPathCommand(2, "1", "0"); f.AddPathCommand(2, "2", "1"); f.AddPathCommand(2, "1", "2"); f.AddPathCommand(6); break; case "flowChartDelay": f.AddGuide("idx", 7, "wd2", "2700000"); f.AddGuide("idy", 12, "hd2", "2700000"); f.AddGuide("ir", 1, "hc", "idx", "0"); f.AddGuide("it", 1, "vc", "0", "idy"); f.AddGuide("ib", 1, "vc", "idy", "0"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("l", "it", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "hc", "t"); f.AddPathCommand(3, "wd2", "hd2", "_3cd4", "cd2"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); break; case "flowChartDisplay": f.AddGuide("x2", 0, "w", "5", "6"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("wd6", "t", "x2", "b"); f.AddPathCommand(0, undefined, undefined, undefined, 6, 6); f.AddPathCommand(1, "0", "3"); f.AddPathCommand(2, "1", "0"); f.AddPathCommand(2, "5", "0"); f.AddPathCommand(3, "1", "3", "_3cd4", "cd2"); f.AddPathCommand(2, "1", "6"); f.AddPathCommand(6); break; case "flowChartDocument": f.AddGuide("y1", 0, "h", "17322", "21600"); f.AddGuide("y2", 0, "h", "20172", "21600"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "y2"); f.AddCnx("0", "r", "vc"); f.AddRect("l", "t", "r", "y1"); f.AddPathCommand(0, undefined, undefined, undefined, 21600, 21600); f.AddPathCommand(1, "0", "0"); f.AddPathCommand(2, "21600", "0"); f.AddPathCommand(2, "21600", "17322"); f.AddPathCommand(5, "10800", "17322", "10800", "23922", "0", "20172"); f.AddPathCommand(6); break; case "flowChartExtract": f.AddGuide("x2", 0, "w", "3", "4"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "wd4", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "x2", "vc"); f.AddRect("wd4", "vc", "x2", "b"); f.AddPathCommand(0, undefined, undefined, undefined, 2, 2); f.AddPathCommand(1, "0", "2"); f.AddPathCommand(2, "1", "0"); f.AddPathCommand(2, "2", "2"); f.AddPathCommand(6); break; case "flowChartInputOutput": f.AddGuide("x3", 0, "w", "2", "5"); f.AddGuide("x4", 0, "w", "3", "5"); f.AddGuide("x5", 0, "w", "4", "5"); f.AddGuide("x6", 0, "w", "9", "10"); f.AddCnx("_3cd4", "x4", "t"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "wd10", "vc"); f.AddCnx("cd4", "x3", "b"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "x6", "vc"); f.AddRect("wd5", "t", "x5", "b"); f.AddPathCommand(0, undefined, undefined, undefined, 5, 5); f.AddPathCommand(1, "0", "5"); f.AddPathCommand(2, "1", "0"); f.AddPathCommand(2, "5", "0"); f.AddPathCommand(2, "4", "5"); f.AddPathCommand(6); break; case "flowChartInternalStorage": f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("wd8", "hd8", "r", "b"); f.AddPathCommand(0, false, undefined, false, 1, 1); f.AddPathCommand(1, "0", "0"); f.AddPathCommand(2, "1", "0"); f.AddPathCommand(2, "1", "1"); f.AddPathCommand(2, "0", "1"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, 8, 8); f.AddPathCommand(1, "1", "0"); f.AddPathCommand(2, "1", "8"); f.AddPathCommand(1, "0", "1"); f.AddPathCommand(2, "8", "1"); f.AddPathCommand(0, undefined, "none", undefined, 1, 1); f.AddPathCommand(1, "0", "0"); f.AddPathCommand(2, "1", "0"); f.AddPathCommand(2, "1", "1"); f.AddPathCommand(2, "0", "1"); f.AddPathCommand(6); break; case "flowChartMagneticDisk": f.AddGuide("y3", 0, "h", "5", "6"); f.AddCnx("_3cd4", "hc", "hd3"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("l", "hd3", "r", "y3"); f.AddPathCommand(0, false, undefined, false, 6, 6); f.AddPathCommand(1, "0", "1"); f.AddPathCommand(3, "3", "1", "cd2", "cd2"); f.AddPathCommand(2, "6", "5"); f.AddPathCommand(3, "3", "1", "0", "cd2"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, 6, 6); f.AddPathCommand(1, "6", "1"); f.AddPathCommand(3, "3", "1", "0", "cd2"); f.AddPathCommand(0, undefined, "none", undefined, 6, 6); f.AddPathCommand(1, "0", "1"); f.AddPathCommand(3, "3", "1", "cd2", "cd2"); f.AddPathCommand(2, "6", "5"); f.AddPathCommand(3, "3", "1", "0", "cd2"); f.AddPathCommand(6); break; case "flowChartMagneticDrum": f.AddGuide("x2", 0, "w", "2", "3"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "x2", "vc"); f.AddCnx("0", "r", "vc"); f.AddRect("wd6", "t", "x2", "b"); f.AddPathCommand(0, false, undefined, false, 6, 6); f.AddPathCommand(1, "1", "0"); f.AddPathCommand(2, "5", "0"); f.AddPathCommand(3, "1", "3", "_3cd4", "cd2"); f.AddPathCommand(2, "1", "6"); f.AddPathCommand(3, "1", "3", "cd4", "cd2"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, 6, 6); f.AddPathCommand(1, "5", "6"); f.AddPathCommand(3, "1", "3", "cd4", "cd2"); f.AddPathCommand(0, undefined, "none", undefined, 6, 6); f.AddPathCommand(1, "1", "0"); f.AddPathCommand(2, "5", "0"); f.AddPathCommand(3, "1", "3", "_3cd4", "cd2"); f.AddPathCommand(2, "1", "6"); f.AddPathCommand(3, "1", "3", "cd4", "cd2"); f.AddPathCommand(6); break; case "flowChartMagneticTape": f.AddGuide("idx", 7, "wd2", "2700000"); f.AddGuide("idy", 12, "hd2", "2700000"); f.AddGuide("il", 1, "hc", "0", "idx"); f.AddGuide("ir", 1, "hc", "idx", "0"); f.AddGuide("it", 1, "vc", "0", "idy"); f.AddGuide("ib", 1, "vc", "idy", "0"); f.AddGuide("ang1", 5, "1", "1"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "hc", "b"); f.AddPathCommand(3, "wd2", "hd2", "cd4", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "cd2", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "_3cd4", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "0", "ang1"); f.AddPathCommand(2, "r", "ib"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(6); break; case "flowChartManualInput": f.AddCnx("_3cd4", "hc", "hd10"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("l", "hd5", "r", "b"); f.AddPathCommand(0, undefined, undefined, undefined, 5, 5); f.AddPathCommand(1, "0", "1"); f.AddPathCommand(2, "5", "0"); f.AddPathCommand(2, "5", "5"); f.AddPathCommand(2, "0", "5"); f.AddPathCommand(6); break; case "flowChartManualOperation": f.AddGuide("x3", 0, "w", "4", "5"); f.AddGuide("x4", 0, "w", "9", "10"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "wd10", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "x4", "vc"); f.AddRect("wd5", "t", "x3", "b"); f.AddPathCommand(0, undefined, undefined, undefined, 5, 5); f.AddPathCommand(1, "0", "0"); f.AddPathCommand(2, "5", "0"); f.AddPathCommand(2, "4", "5"); f.AddPathCommand(2, "1", "5"); f.AddPathCommand(6); break; case "flowChartMerge": f.AddGuide("x2", 0, "w", "3", "4"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "wd4", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "x2", "vc"); f.AddRect("wd4", "t", "x2", "vc"); f.AddPathCommand(0, undefined, undefined, undefined, 2, 2); f.AddPathCommand(1, "0", "0"); f.AddPathCommand(2, "2", "0"); f.AddPathCommand(2, "1", "2"); f.AddPathCommand(6); break; case "flowChartMultidocument": f.AddGuide("y2", 0, "h", "3675", "21600"); f.AddGuide("y8", 0, "h", "20782", "21600"); f.AddGuide("x3", 0, "w", "9298", "21600"); f.AddGuide("x4", 0, "w", "12286", "21600"); f.AddGuide("x5", 0, "w", "18595", "21600"); f.AddCnx("_3cd4", "x4", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "x3", "y8"); f.AddCnx("0", "r", "vc"); f.AddRect("l", "y2", "x5", "y8"); f.AddPathCommand(0, false, undefined, false, 21600, 21600); f.AddPathCommand(1, "0", "20782"); f.AddPathCommand(5, "9298", "23542", "9298", "18022", "18595", "18022"); f.AddPathCommand(2, "18595", "3675"); f.AddPathCommand(2, "0", "3675"); f.AddPathCommand(6); f.AddPathCommand(1, "1532", "3675"); f.AddPathCommand(2, "1532", "1815"); f.AddPathCommand(2, "20000", "1815"); f.AddPathCommand(2, "20000", "16252"); f.AddPathCommand(5, "19298", "16252", "18595", "16352", "18595", "16352"); f.AddPathCommand(2, "18595", "3675"); f.AddPathCommand(6); f.AddPathCommand(1, "2972", "1815"); f.AddPathCommand(2, "2972", "0"); f.AddPathCommand(2, "21600", "0"); f.AddPathCommand(2, "21600", "14392"); f.AddPathCommand(5, "20800", "14392", "20000", "14467", "20000", "14467"); f.AddPathCommand(2, "20000", "1815"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, 21600, 21600); f.AddPathCommand(1, "0", "3675"); f.AddPathCommand(2, "18595", "3675"); f.AddPathCommand(2, "18595", "18022"); f.AddPathCommand(5, "9298", "18022", "9298", "23542", "0", "20782"); f.AddPathCommand(6); f.AddPathCommand(1, "1532", "3675"); f.AddPathCommand(2, "1532", "1815"); f.AddPathCommand(2, "20000", "1815"); f.AddPathCommand(2, "20000", "16252"); f.AddPathCommand(5, "19298", "16252", "18595", "16352", "18595", "16352"); f.AddPathCommand(1, "2972", "1815"); f.AddPathCommand(2, "2972", "0"); f.AddPathCommand(2, "21600", "0"); f.AddPathCommand(2, "21600", "14392"); f.AddPathCommand(5, "20800", "14392", "20000", "14467", "20000", "14467"); f.AddPathCommand(0, undefined, "none", false, 21600, 21600); f.AddPathCommand(1, "0", "20782"); f.AddPathCommand(5, "9298", "23542", "9298", "18022", "18595", "18022"); f.AddPathCommand(2, "18595", "16352"); f.AddPathCommand(5, "18595", "16352", "19298", "16252", "20000", "16252"); f.AddPathCommand(2, "20000", "14467"); f.AddPathCommand(5, "20000", "14467", "20800", "14392", "21600", "14392"); f.AddPathCommand(2, "21600", "0"); f.AddPathCommand(2, "2972", "0"); f.AddPathCommand(2, "2972", "1815"); f.AddPathCommand(2, "1532", "1815"); f.AddPathCommand(2, "1532", "3675"); f.AddPathCommand(2, "0", "3675"); f.AddPathCommand(6); break; case "flowChartOfflineStorage": f.AddGuide("x4", 0, "w", "3", "4"); f.AddCnx("0", "x4", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "wd4", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("wd4", "t", "x4", "vc"); f.AddPathCommand(0, false, undefined, false, 2, 2); f.AddPathCommand(1, "0", "0"); f.AddPathCommand(2, "2", "0"); f.AddPathCommand(2, "1", "2"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, 5, 5); f.AddPathCommand(1, "2", "4"); f.AddPathCommand(2, "3", "4"); f.AddPathCommand(0, true, "none", undefined, 2, 2); f.AddPathCommand(1, "0", "0"); f.AddPathCommand(2, "2", "0"); f.AddPathCommand(2, "1", "2"); f.AddPathCommand(6); break; case "flowChartOffpageConnector": f.AddGuide("y1", 0, "h", "4", "5"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("l", "t", "r", "y1"); f.AddPathCommand(0, undefined, undefined, undefined, 10, 10); f.AddPathCommand(1, "0", "0"); f.AddPathCommand(2, "10", "0"); f.AddPathCommand(2, "10", "8"); f.AddPathCommand(2, "5", "10"); f.AddPathCommand(2, "0", "8"); f.AddPathCommand(6); break; case "flowChartOnlineStorage": f.AddGuide("x2", 0, "w", "5", "6"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "x2", "vc"); f.AddRect("wd6", "t", "x2", "b"); f.AddPathCommand(0, undefined, undefined, undefined, 6, 6); f.AddPathCommand(1, "1", "0"); f.AddPathCommand(2, "6", "0"); f.AddPathCommand(3, "1", "3", "_3cd4", "-10800000"); f.AddPathCommand(2, "1", "6"); f.AddPathCommand(3, "1", "3", "cd4", "cd2"); f.AddPathCommand(6); break; case "flowChartOr": f.AddGuide("idx", 7, "wd2", "2700000"); f.AddGuide("idy", 12, "hd2", "2700000"); f.AddGuide("il", 1, "hc", "0", "idx"); f.AddGuide("ir", 1, "hc", "idx", "0"); f.AddGuide("it", 1, "vc", "0", "idy"); f.AddGuide("ib", 1, "vc", "idy", "0"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("_3cd4", "il", "it"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "il", "ib"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd4", "ir", "ib"); f.AddCnx("0", "r", "vc"); f.AddCnx("_3cd4", "ir", "it"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(3, "wd2", "hd2", "cd2", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "_3cd4", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "0", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "cd4", "cd4"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "hc", "t"); f.AddPathCommand(2, "hc", "b"); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(2, "r", "vc"); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(3, "wd2", "hd2", "cd2", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "_3cd4", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "0", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "cd4", "cd4"); f.AddPathCommand(6); break; case "flowChartPredefinedProcess": f.AddGuide("x2", 0, "w", "7", "8"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("wd8", "t", "x2", "b"); f.AddPathCommand(0, false, undefined, false, 1, 1); f.AddPathCommand(1, "0", "0"); f.AddPathCommand(2, "1", "0"); f.AddPathCommand(2, "1", "1"); f.AddPathCommand(2, "0", "1"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, 8, 8); f.AddPathCommand(1, "1", "0"); f.AddPathCommand(2, "1", "8"); f.AddPathCommand(1, "7", "0"); f.AddPathCommand(2, "7", "8"); f.AddPathCommand(0, undefined, "none", undefined, 1, 1); f.AddPathCommand(1, "0", "0"); f.AddPathCommand(2, "1", "0"); f.AddPathCommand(2, "1", "1"); f.AddPathCommand(2, "0", "1"); f.AddPathCommand(6); break; case "flowChartPreparation": f.AddGuide("x2", 0, "w", "4", "5"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("wd5", "t", "x2", "b"); f.AddPathCommand(0, undefined, undefined, undefined, 10, 10); f.AddPathCommand(1, "0", "5"); f.AddPathCommand(2, "2", "0"); f.AddPathCommand(2, "8", "0"); f.AddPathCommand(2, "10", "5"); f.AddPathCommand(2, "8", "10"); f.AddPathCommand(2, "2", "10"); f.AddPathCommand(6); break; case "flowChartProcess": f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, undefined, undefined, undefined, 1, 1); f.AddPathCommand(1, "0", "0"); f.AddPathCommand(2, "1", "0"); f.AddPathCommand(2, "1", "1"); f.AddPathCommand(2, "0", "1"); f.AddPathCommand(6); break; case "flowChartPunchedCard": f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("l", "hd5", "r", "b"); f.AddPathCommand(0, undefined, undefined, undefined, 5, 5); f.AddPathCommand(1, "0", "1"); f.AddPathCommand(2, "1", "0"); f.AddPathCommand(2, "5", "0"); f.AddPathCommand(2, "5", "5"); f.AddPathCommand(2, "0", "5"); f.AddPathCommand(6); break; case "flowChartPunchedTape": f.AddGuide("y2", 0, "h", "9", "10"); f.AddGuide("ib", 0, "h", "4", "5"); f.AddCnx("_3cd4", "hc", "hd10"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "y2"); f.AddCnx("0", "r", "vc"); f.AddRect("l", "hd5", "r", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, 20, 20); f.AddPathCommand(1, "0", "2"); f.AddPathCommand(3, "5", "2", "cd2", "-10800000"); f.AddPathCommand(3, "5", "2", "cd2", "cd2"); f.AddPathCommand(2, "20", "18"); f.AddPathCommand(3, "5", "2", "0", "-10800000"); f.AddPathCommand(3, "5", "2", "0", "cd2"); f.AddPathCommand(6); break; case "flowChartSort": f.AddGuide("ir", 0, "w", "3", "4"); f.AddGuide("ib", 0, "h", "3", "4"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("wd4", "hd4", "ir", "ib"); f.AddPathCommand(0, false, undefined, false, 2, 2); f.AddPathCommand(1, "0", "1"); f.AddPathCommand(2, "1", "0"); f.AddPathCommand(2, "2", "1"); f.AddPathCommand(2, "1", "2"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, 2, 2); f.AddPathCommand(1, "0", "1"); f.AddPathCommand(2, "2", "1"); f.AddPathCommand(0, undefined, "none", undefined, 2, 2); f.AddPathCommand(1, "0", "1"); f.AddPathCommand(2, "1", "0"); f.AddPathCommand(2, "2", "1"); f.AddPathCommand(2, "1", "2"); f.AddPathCommand(6); break; case "flowChartSummingJunction": f.AddGuide("idx", 7, "wd2", "2700000"); f.AddGuide("idy", 12, "hd2", "2700000"); f.AddGuide("il", 1, "hc", "0", "idx"); f.AddGuide("ir", 1, "hc", "idx", "0"); f.AddGuide("it", 1, "vc", "0", "idy"); f.AddGuide("ib", 1, "vc", "idy", "0"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("_3cd4", "il", "it"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "il", "ib"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd4", "ir", "ib"); f.AddCnx("0", "r", "vc"); f.AddCnx("_3cd4", "ir", "it"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(3, "wd2", "hd2", "cd2", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "_3cd4", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "0", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "cd4", "cd4"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "il", "it"); f.AddPathCommand(2, "ir", "ib"); f.AddPathCommand(1, "ir", "it"); f.AddPathCommand(2, "il", "ib"); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(3, "wd2", "hd2", "cd2", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "_3cd4", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "0", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "cd4", "cd4"); f.AddPathCommand(6); break; case "flowChartTerminator": f.AddGuide("il", 0, "w", "1018", "21600"); f.AddGuide("ir", 0, "w", "20582", "21600"); f.AddGuide("it", 0, "h", "3163", "21600"); f.AddGuide("ib", 0, "h", "18437", "21600"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, 21600, 21600); f.AddPathCommand(1, "3475", "0"); f.AddPathCommand(2, "18125", "0"); f.AddPathCommand(3, "3475", "10800", "_3cd4", "cd2"); f.AddPathCommand(2, "3475", "21600"); f.AddPathCommand(3, "3475", "10800", "cd4", "cd2"); f.AddPathCommand(6); break; case "foldedCorner": f.AddAdj("adj", 15, "16667"); f.AddGuide("a", 10, "0", "adj", "50000"); f.AddGuide("dy2", 0, "ss", "a", "100000"); f.AddGuide("dy1", 0, "dy2", "1", "5"); f.AddGuide("x1", 1, "r", "0", "dy2"); f.AddGuide("x2", 1, "x1", "dy1", "0"); f.AddGuide("y2", 1, "b", "0", "dy2"); f.AddGuide("y1", 1, "y2", "dy1", "0"); f.AddHandleXY("adj", "0", "50000", undefined, "0", "0", "x1", "b"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("l", "t", "r", "y2"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "y2"); f.AddPathCommand(2, "x1", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darkenLess", false, undefined, undefined); f.AddPathCommand(1, "x1", "b"); f.AddPathCommand(2, "x2", "y1"); f.AddPathCommand(2, "r", "y2"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "x1", "b"); f.AddPathCommand(2, "x2", "y1"); f.AddPathCommand(2, "r", "y2"); f.AddPathCommand(2, "x1", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(2, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "y2"); break; case "frame": f.AddAdj("adj1", 15, "12500"); f.AddGuide("a1", 10, "0", "adj1", "50000"); f.AddGuide("x1", 0, "ss", "a1", "100000"); f.AddGuide("x4", 1, "r", "0", "x1"); f.AddGuide("y4", 1, "b", "0", "x1"); f.AddHandleXY("adj1", "0", "50000", undefined, "0", "0", "x1", "t"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("x1", "x1", "x4", "y4"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(1, "x1", "x1"); f.AddPathCommand(2, "x1", "y4"); f.AddPathCommand(2, "x4", "y4"); f.AddPathCommand(2, "x4", "x1"); f.AddPathCommand(6); break; case "funnel": f.AddGuide("d", 0, "ss", "1", "20"); f.AddGuide("rw2", 1, "wd2", "0", "d"); f.AddGuide("rh2", 1, "hd4", "0", "d"); f.AddGuide("t1", 7, "wd2", "480000"); f.AddGuide("t2", 12, "hd4", "480000"); f.AddGuide("da", 5, "t1", "t2"); f.AddGuide("2da", 0, "da", "2", "1"); f.AddGuide("stAng1", 1, "cd2", "0", "da"); f.AddGuide("swAng1", 1, "cd2", "2da", "0"); f.AddGuide("swAng3", 1, "cd2", "0", "2da"); f.AddGuide("rw3", 0, "wd2", "1", "4"); f.AddGuide("rh3", 0, "hd4", "1", "4"); f.AddGuide("ct1", 7, "hd4", "stAng1"); f.AddGuide("st1", 12, "wd2", "stAng1"); f.AddGuide("m1", 9, "ct1", "st1", "0"); f.AddGuide("n1", 0, "wd2", "hd4", "m1"); f.AddGuide("dx1", 7, "n1", "stAng1"); f.AddGuide("dy1", 12, "n1", "stAng1"); f.AddGuide("x1", 1, "hc", "dx1", "0"); f.AddGuide("y1", 1, "hd4", "dy1", "0"); f.AddGuide("ct3", 7, "rh3", "da"); f.AddGuide("st3", 12, "rw3", "da"); f.AddGuide("m3", 9, "ct3", "st3", "0"); f.AddGuide("n3", 0, "rw3", "rh3", "m3"); f.AddGuide("dx3", 7, "n3", "da"); f.AddGuide("dy3", 12, "n3", "da"); f.AddGuide("x3", 1, "hc", "dx3", "0"); f.AddGuide("vc3", 1, "b", "0", "rh3"); f.AddGuide("y2", 1, "vc3", "dy3", "0"); f.AddGuide("x2", 1, "wd2", "0", "rw2"); f.AddGuide("cd", 0, "cd2", "2", "1"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y1"); f.AddPathCommand(3, "wd2", "hd4", "stAng1", "swAng1"); f.AddPathCommand(2, "x3", "y2"); f.AddPathCommand(3, "rw3", "rh3", "da", "swAng3"); f.AddPathCommand(6); f.AddPathCommand(1, "x2", "hd4"); f.AddPathCommand(3, "rw2", "rh2", "cd2", "-21600000"); f.AddPathCommand(6); break; case "gear6": f.AddAdj("adj1", 15, "15000"); f.AddAdj("adj2", 15, "3526"); f.AddGuide("a1", 10, "0", "adj1", "20000"); f.AddGuide("a2", 10, "0", "adj2", "5358"); f.AddGuide("th", 0, "ss", "a1", "100000"); f.AddGuide("lFD", 0, "ss", "a2", "100000"); f.AddGuide("th2", 0, "th", "1", "2"); f.AddGuide("l2", 0, "lFD", "1", "2"); f.AddGuide("l3", 1, "th2", "l2", "0"); f.AddGuide("rh", 1, "hd2", "0", "th"); f.AddGuide("rw", 1, "wd2", "0", "th"); f.AddGuide("dr", 1, "rw", "0", "rh"); f.AddGuide("maxr", 3, "dr", "rh", "rw"); f.AddGuide("ha", 5, "maxr", "l3"); f.AddGuide("aA1", 1, "19800000", "0", "ha"); f.AddGuide("aD1", 1, "19800000", "ha", "0"); f.AddGuide("ta11", 7, "rw", "aA1"); f.AddGuide("ta12", 12, "rh", "aA1"); f.AddGuide("bA1", 5, "ta11", "ta12"); f.AddGuide("cta1", 7, "rh", "bA1"); f.AddGuide("sta1", 12, "rw", "bA1"); f.AddGuide("ma1", 9, "cta1", "sta1", "0"); f.AddGuide("na1", 0, "rw", "rh", "ma1"); f.AddGuide("dxa1", 7, "na1", "bA1"); f.AddGuide("dya1", 12, "na1", "bA1"); f.AddGuide("xA1", 1, "hc", "dxa1", "0"); f.AddGuide("yA1", 1, "vc", "dya1", "0"); f.AddGuide("td11", 7, "rw", "aD1"); f.AddGuide("td12", 12, "rh", "aD1"); f.AddGuide("bD1", 5, "td11", "td12"); f.AddGuide("ctd1", 7, "rh", "bD1"); f.AddGuide("std1", 12, "rw", "bD1"); f.AddGuide("md1", 9, "ctd1", "std1", "0"); f.AddGuide("nd1", 0, "rw", "rh", "md1"); f.AddGuide("dxd1", 7, "nd1", "bD1"); f.AddGuide("dyd1", 12, "nd1", "bD1"); f.AddGuide("xD1", 1, "hc", "dxd1", "0"); f.AddGuide("yD1", 1, "vc", "dyd1", "0"); f.AddGuide("xAD1", 1, "xA1", "0", "xD1"); f.AddGuide("yAD1", 1, "yA1", "0", "yD1"); f.AddGuide("lAD1", 9, "xAD1", "yAD1", "0"); f.AddGuide("a1", 5, "yAD1", "xAD1"); f.AddGuide("dxF1", 12, "lFD", "a1"); f.AddGuide("dyF1", 7, "lFD", "a1"); f.AddGuide("xF1", 1, "xD1", "dxF1", "0"); f.AddGuide("yF1", 1, "yD1", "dyF1", "0"); f.AddGuide("xE1", 1, "xA1", "0", "dxF1"); f.AddGuide("yE1", 1, "yA1", "0", "dyF1"); f.AddGuide("yC1t", 12, "th", "a1"); f.AddGuide("xC1t", 7, "th", "a1"); f.AddGuide("yC1", 1, "yF1", "yC1t", "0"); f.AddGuide("xC1", 1, "xF1", "0", "xC1t"); f.AddGuide("yB1", 1, "yE1", "yC1t", "0"); f.AddGuide("xB1", 1, "xE1", "0", "xC1t"); f.AddGuide("aD6", 1, "_3cd4", "ha", "0"); f.AddGuide("td61", 7, "rw", "aD6"); f.AddGuide("td62", 12, "rh", "aD6"); f.AddGuide("bD6", 5, "td61", "td62"); f.AddGuide("ctd6", 7, "rh", "bD6"); f.AddGuide("std6", 12, "rw", "bD6"); f.AddGuide("md6", 9, "ctd6", "std6", "0"); f.AddGuide("nd6", 0, "rw", "rh", "md6"); f.AddGuide("dxd6", 7, "nd6", "bD6"); f.AddGuide("dyd6", 12, "nd6", "bD6"); f.AddGuide("xD6", 1, "hc", "dxd6", "0"); f.AddGuide("yD6", 1, "vc", "dyd6", "0"); f.AddGuide("xA6", 1, "hc", "0", "dxd6"); f.AddGuide("xF6", 1, "xD6", "0", "lFD"); f.AddGuide("xE6", 1, "xA6", "lFD", "0"); f.AddGuide("yC6", 1, "yD6", "0", "th"); f.AddGuide("swAng1", 1, "bA1", "0", "bD6"); f.AddGuide("aA2", 1, "1800000", "0", "ha"); f.AddGuide("aD2", 1, "1800000", "ha", "0"); f.AddGuide("ta21", 7, "rw", "aA2"); f.AddGuide("ta22", 12, "rh", "aA2"); f.AddGuide("bA2", 5, "ta21", "ta22"); f.AddGuide("yA2", 1, "h", "0", "yD1"); f.AddGuide("td21", 7, "rw", "aD2"); f.AddGuide("td22", 12, "rh", "aD2"); f.AddGuide("bD2", 5, "td21", "td22"); f.AddGuide("yD2", 1, "h", "0", "yA1"); f.AddGuide("yC2", 1, "h", "0", "yB1"); f.AddGuide("yB2", 1, "h", "0", "yC1"); f.AddGuide("xB2", 15, "xC1"); f.AddGuide("swAng2", 1, "bA2", "0", "bD1"); f.AddGuide("aD3", 1, "cd4", "ha", "0"); f.AddGuide("td31", 7, "rw", "aD3"); f.AddGuide("td32", 12, "rh", "aD3"); f.AddGuide("bD3", 5, "td31", "td32"); f.AddGuide("yD3", 1, "h", "0", "yD6"); f.AddGuide("yB3", 1, "h", "0", "yC6"); f.AddGuide("aD4", 1, "9000000", "ha", "0"); f.AddGuide("td41", 7, "rw", "aD4"); f.AddGuide("td42", 12, "rh", "aD4"); f.AddGuide("bD4", 5, "td41", "td42"); f.AddGuide("xD4", 1, "w", "0", "xD1"); f.AddGuide("xC4", 1, "w", "0", "xC1"); f.AddGuide("xB4", 1, "w", "0", "xB1"); f.AddGuide("aD5", 1, "12600000", "ha", "0"); f.AddGuide("td51", 7, "rw", "aD5"); f.AddGuide("td52", 12, "rh", "aD5"); f.AddGuide("bD5", 5, "td51", "td52"); f.AddGuide("xD5", 1, "w", "0", "xA1"); f.AddGuide("xC5", 1, "w", "0", "xB1"); f.AddGuide("xB5", 1, "w", "0", "xC1"); f.AddGuide("xCxn1", 2, "xB1", "xC1", "2"); f.AddGuide("yCxn1", 2, "yB1", "yC1", "2"); f.AddGuide("yCxn2", 1, "b", "0", "yCxn1"); f.AddGuide("xCxn4", 2, "r", "0", "xCxn1"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "20000", "xD6", "yD6"); f.AddHandleXY("adj2", "0", "5358", undefined, "0", "0", "xA6", "yD6"); f.AddCnx("19800000", "xCxn1", "yCxn1"); f.AddCnx("1800000", "xCxn1", "yCxn2"); f.AddCnx("cd4", "hc", "yB3"); f.AddCnx("9000000", "xCxn4", "yCxn2"); f.AddCnx("12600000", "xCxn4", "yCxn1"); f.AddCnx("_3cd4", "hc", "yC6"); f.AddRect("xD5", "yA1", "xA1", "yD2"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "xA1", "yA1"); f.AddPathCommand(2, "xB1", "yB1"); f.AddPathCommand(2, "xC1", "yC1"); f.AddPathCommand(2, "xD1", "yD1"); f.AddPathCommand(3, "rh", "rw", "bD1", "swAng2"); f.AddPathCommand(2, "xC1", "yB2"); f.AddPathCommand(2, "xB1", "yC2"); f.AddPathCommand(2, "xA1", "yD2"); f.AddPathCommand(3, "rh", "rw", "bD2", "swAng1"); f.AddPathCommand(2, "xF6", "yB3"); f.AddPathCommand(2, "xE6", "yB3"); f.AddPathCommand(2, "xA6", "yD3"); f.AddPathCommand(3, "rh", "rw", "bD3", "swAng1"); f.AddPathCommand(2, "xB4", "yC2"); f.AddPathCommand(2, "xC4", "yB2"); f.AddPathCommand(2, "xD4", "yA2"); f.AddPathCommand(3, "rh", "rw", "bD4", "swAng2"); f.AddPathCommand(2, "xB5", "yC1"); f.AddPathCommand(2, "xC5", "yB1"); f.AddPathCommand(2, "xD5", "yA1"); f.AddPathCommand(3, "rh", "rw", "bD5", "swAng1"); f.AddPathCommand(2, "xE6", "yC6"); f.AddPathCommand(2, "xF6", "yC6"); f.AddPathCommand(2, "xD6", "yD6"); f.AddPathCommand(3, "rh", "rw", "bD6", "swAng1"); f.AddPathCommand(6); break; case "gear9": f.AddAdj("adj1", 15, "10000"); f.AddAdj("adj2", 15, "1763"); f.AddGuide("a1", 10, "0", "adj1", "20000"); f.AddGuide("a2", 10, "0", "adj2", "2679"); f.AddGuide("th", 0, "ss", "a1", "100000"); f.AddGuide("lFD", 0, "ss", "a2", "100000"); f.AddGuide("th2", 0, "th", "1", "2"); f.AddGuide("l2", 0, "lFD", "1", "2"); f.AddGuide("l3", 1, "th2", "l2", "0"); f.AddGuide("rh", 1, "hd2", "0", "th"); f.AddGuide("rw", 1, "wd2", "0", "th"); f.AddGuide("dr", 1, "rw", "0", "rh"); f.AddGuide("maxr", 3, "dr", "rh", "rw"); f.AddGuide("ha", 5, "maxr", "l3"); f.AddGuide("aA1", 1, "18600000", "0", "ha"); f.AddGuide("aD1", 1, "18600000", "ha", "0"); f.AddGuide("ta11", 7, "rw", "aA1"); f.AddGuide("ta12", 12, "rh", "aA1"); f.AddGuide("bA1", 5, "ta11", "ta12"); f.AddGuide("cta1", 7, "rh", "bA1"); f.AddGuide("sta1", 12, "rw", "bA1"); f.AddGuide("ma1", 9, "cta1", "sta1", "0"); f.AddGuide("na1", 0, "rw", "rh", "ma1"); f.AddGuide("dxa1", 7, "na1", "bA1"); f.AddGuide("dya1", 12, "na1", "bA1"); f.AddGuide("xA1", 1, "hc", "dxa1", "0"); f.AddGuide("yA1", 1, "vc", "dya1", "0"); f.AddGuide("td11", 7, "rw", "aD1"); f.AddGuide("td12", 12, "rh", "aD1"); f.AddGuide("bD1", 5, "td11", "td12"); f.AddGuide("ctd1", 7, "rh", "bD1"); f.AddGuide("std1", 12, "rw", "bD1"); f.AddGuide("md1", 9, "ctd1", "std1", "0"); f.AddGuide("nd1", 0, "rw", "rh", "md1"); f.AddGuide("dxd1", 7, "nd1", "bD1"); f.AddGuide("dyd1", 12, "nd1", "bD1"); f.AddGuide("xD1", 1, "hc", "dxd1", "0"); f.AddGuide("yD1", 1, "vc", "dyd1", "0"); f.AddGuide("xAD1", 1, "xA1", "0", "xD1"); f.AddGuide("yAD1", 1, "yA1", "0", "yD1"); f.AddGuide("lAD1", 9, "xAD1", "yAD1", "0"); f.AddGuide("a1", 5, "yAD1", "xAD1"); f.AddGuide("dxF1", 12, "lFD", "a1"); f.AddGuide("dyF1", 7, "lFD", "a1"); f.AddGuide("xF1", 1, "xD1", "dxF1", "0"); f.AddGuide("yF1", 1, "yD1", "dyF1", "0"); f.AddGuide("xE1", 1, "xA1", "0", "dxF1"); f.AddGuide("yE1", 1, "yA1", "0", "dyF1"); f.AddGuide("yC1t", 12, "th", "a1"); f.AddGuide("xC1t", 7, "th", "a1"); f.AddGuide("yC1", 1, "yF1", "yC1t", "0"); f.AddGuide("xC1", 1, "xF1", "0", "xC1t"); f.AddGuide("yB1", 1, "yE1", "yC1t", "0"); f.AddGuide("xB1", 1, "xE1", "0", "xC1t"); f.AddGuide("aA2", 1, "21000000", "0", "ha"); f.AddGuide("aD2", 1, "21000000", "ha", "0"); f.AddGuide("ta21", 7, "rw", "aA2"); f.AddGuide("ta22", 12, "rh", "aA2"); f.AddGuide("bA2", 5, "ta21", "ta22"); f.AddGuide("cta2", 7, "rh", "bA2"); f.AddGuide("sta2", 12, "rw", "bA2"); f.AddGuide("ma2", 9, "cta2", "sta2", "0"); f.AddGuide("na2", 0, "rw", "rh", "ma2"); f.AddGuide("dxa2", 7, "na2", "bA2"); f.AddGuide("dya2", 12, "na2", "bA2"); f.AddGuide("xA2", 1, "hc", "dxa2", "0"); f.AddGuide("yA2", 1, "vc", "dya2", "0"); f.AddGuide("td21", 7, "rw", "aD2"); f.AddGuide("td22", 12, "rh", "aD2"); f.AddGuide("bD2", 5, "td21", "td22"); f.AddGuide("ctd2", 7, "rh", "bD2"); f.AddGuide("std2", 12, "rw", "bD2"); f.AddGuide("md2", 9, "ctd2", "std2", "0"); f.AddGuide("nd2", 0, "rw", "rh", "md2"); f.AddGuide("dxd2", 7, "nd2", "bD2"); f.AddGuide("dyd2", 12, "nd2", "bD2"); f.AddGuide("xD2", 1, "hc", "dxd2", "0"); f.AddGuide("yD2", 1, "vc", "dyd2", "0"); f.AddGuide("xAD2", 1, "xA2", "0", "xD2"); f.AddGuide("yAD2", 1, "yA2", "0", "yD2"); f.AddGuide("lAD2", 9, "xAD2", "yAD2", "0"); f.AddGuide("a2", 5, "yAD2", "xAD2"); f.AddGuide("dxF2", 12, "lFD", "a2"); f.AddGuide("dyF2", 7, "lFD", "a2"); f.AddGuide("xF2", 1, "xD2", "dxF2", "0"); f.AddGuide("yF2", 1, "yD2", "dyF2", "0"); f.AddGuide("xE2", 1, "xA2", "0", "dxF2"); f.AddGuide("yE2", 1, "yA2", "0", "dyF2"); f.AddGuide("yC2t", 12, "th", "a2"); f.AddGuide("xC2t", 7, "th", "a2"); f.AddGuide("yC2", 1, "yF2", "yC2t", "0"); f.AddGuide("xC2", 1, "xF2", "0", "xC2t"); f.AddGuide("yB2", 1, "yE2", "yC2t", "0"); f.AddGuide("xB2", 1, "xE2", "0", "xC2t"); f.AddGuide("swAng1", 1, "bA2", "0", "bD1"); f.AddGuide("aA3", 1, "1800000", "0", "ha"); f.AddGuide("aD3", 1, "1800000", "ha", "0"); f.AddGuide("ta31", 7, "rw", "aA3"); f.AddGuide("ta32", 12, "rh", "aA3"); f.AddGuide("bA3", 5, "ta31", "ta32"); f.AddGuide("cta3", 7, "rh", "bA3"); f.AddGuide("sta3", 12, "rw", "bA3"); f.AddGuide("ma3", 9, "cta3", "sta3", "0"); f.AddGuide("na3", 0, "rw", "rh", "ma3"); f.AddGuide("dxa3", 7, "na3", "bA3"); f.AddGuide("dya3", 12, "na3", "bA3"); f.AddGuide("xA3", 1, "hc", "dxa3", "0"); f.AddGuide("yA3", 1, "vc", "dya3", "0"); f.AddGuide("td31", 7, "rw", "aD3"); f.AddGuide("td32", 12, "rh", "aD3"); f.AddGuide("bD3", 5, "td31", "td32"); f.AddGuide("ctd3", 7, "rh", "bD3"); f.AddGuide("std3", 12, "rw", "bD3"); f.AddGuide("md3", 9, "ctd3", "std3", "0"); f.AddGuide("nd3", 0, "rw", "rh", "md3"); f.AddGuide("dxd3", 7, "nd3", "bD3"); f.AddGuide("dyd3", 12, "nd3", "bD3"); f.AddGuide("xD3", 1, "hc", "dxd3", "0"); f.AddGuide("yD3", 1, "vc", "dyd3", "0"); f.AddGuide("xAD3", 1, "xA3", "0", "xD3"); f.AddGuide("yAD3", 1, "yA3", "0", "yD3"); f.AddGuide("lAD3", 9, "xAD3", "yAD3", "0"); f.AddGuide("a3", 5, "yAD3", "xAD3"); f.AddGuide("dxF3", 12, "lFD", "a3"); f.AddGuide("dyF3", 7, "lFD", "a3"); f.AddGuide("xF3", 1, "xD3", "dxF3", "0"); f.AddGuide("yF3", 1, "yD3", "dyF3", "0"); f.AddGuide("xE3", 1, "xA3", "0", "dxF3"); f.AddGuide("yE3", 1, "yA3", "0", "dyF3"); f.AddGuide("yC3t", 12, "th", "a3"); f.AddGuide("xC3t", 7, "th", "a3"); f.AddGuide("yC3", 1, "yF3", "yC3t", "0"); f.AddGuide("xC3", 1, "xF3", "0", "xC3t"); f.AddGuide("yB3", 1, "yE3", "yC3t", "0"); f.AddGuide("xB3", 1, "xE3", "0", "xC3t"); f.AddGuide("swAng2", 1, "bA3", "0", "bD2"); f.AddGuide("aA4", 1, "4200000", "0", "ha"); f.AddGuide("aD4", 1, "4200000", "ha", "0"); f.AddGuide("ta41", 7, "rw", "aA4"); f.AddGuide("ta42", 12, "rh", "aA4"); f.AddGuide("bA4", 5, "ta41", "ta42"); f.AddGuide("cta4", 7, "rh", "bA4"); f.AddGuide("sta4", 12, "rw", "bA4"); f.AddGuide("ma4", 9, "cta4", "sta4", "0"); f.AddGuide("na4", 0, "rw", "rh", "ma4"); f.AddGuide("dxa4", 7, "na4", "bA4"); f.AddGuide("dya4", 12, "na4", "bA4"); f.AddGuide("xA4", 1, "hc", "dxa4", "0"); f.AddGuide("yA4", 1, "vc", "dya4", "0"); f.AddGuide("td41", 7, "rw", "aD4"); f.AddGuide("td42", 12, "rh", "aD4"); f.AddGuide("bD4", 5, "td41", "td42"); f.AddGuide("ctd4", 7, "rh", "bD4"); f.AddGuide("std4", 12, "rw", "bD4"); f.AddGuide("md4", 9, "ctd4", "std4", "0"); f.AddGuide("nd4", 0, "rw", "rh", "md4"); f.AddGuide("dxd4", 7, "nd4", "bD4"); f.AddGuide("dyd4", 12, "nd4", "bD4"); f.AddGuide("xD4", 1, "hc", "dxd4", "0"); f.AddGuide("yD4", 1, "vc", "dyd4", "0"); f.AddGuide("xAD4", 1, "xA4", "0", "xD4"); f.AddGuide("yAD4", 1, "yA4", "0", "yD4"); f.AddGuide("lAD4", 9, "xAD4", "yAD4", "0"); f.AddGuide("a4", 5, "yAD4", "xAD4"); f.AddGuide("dxF4", 12, "lFD", "a4"); f.AddGuide("dyF4", 7, "lFD", "a4"); f.AddGuide("xF4", 1, "xD4", "dxF4", "0"); f.AddGuide("yF4", 1, "yD4", "dyF4", "0"); f.AddGuide("xE4", 1, "xA4", "0", "dxF4"); f.AddGuide("yE4", 1, "yA4", "0", "dyF4"); f.AddGuide("yC4t", 12, "th", "a4"); f.AddGuide("xC4t", 7, "th", "a4"); f.AddGuide("yC4", 1, "yF4", "yC4t", "0"); f.AddGuide("xC4", 1, "xF4", "0", "xC4t"); f.AddGuide("yB4", 1, "yE4", "yC4t", "0"); f.AddGuide("xB4", 1, "xE4", "0", "xC4t"); f.AddGuide("swAng3", 1, "bA4", "0", "bD3"); f.AddGuide("aA5", 1, "6600000", "0", "ha"); f.AddGuide("aD5", 1, "6600000", "ha", "0"); f.AddGuide("ta51", 7, "rw", "aA5"); f.AddGuide("ta52", 12, "rh", "aA5"); f.AddGuide("bA5", 5, "ta51", "ta52"); f.AddGuide("td51", 7, "rw", "aD5"); f.AddGuide("td52", 12, "rh", "aD5"); f.AddGuide("bD5", 5, "td51", "td52"); f.AddGuide("xD5", 1, "w", "0", "xA4"); f.AddGuide("xC5", 1, "w", "0", "xB4"); f.AddGuide("xB5", 1, "w", "0", "xC4"); f.AddGuide("swAng4", 1, "bA5", "0", "bD4"); f.AddGuide("aD6", 1, "9000000", "ha", "0"); f.AddGuide("td61", 7, "rw", "aD6"); f.AddGuide("td62", 12, "rh", "aD6"); f.AddGuide("bD6", 5, "td61", "td62"); f.AddGuide("xD6", 1, "w", "0", "xA3"); f.AddGuide("xC6", 1, "w", "0", "xB3"); f.AddGuide("xB6", 1, "w", "0", "xC3"); f.AddGuide("aD7", 1, "11400000", "ha", "0"); f.AddGuide("td71", 7, "rw", "aD7"); f.AddGuide("td72", 12, "rh", "aD7"); f.AddGuide("bD7", 5, "td71", "td72"); f.AddGuide("xD7", 1, "w", "0", "xA2"); f.AddGuide("xC7", 1, "w", "0", "xB2"); f.AddGuide("xB7", 1, "w", "0", "xC2"); f.AddGuide("aD8", 1, "13800000", "ha", "0"); f.AddGuide("td81", 7, "rw", "aD8"); f.AddGuide("td82", 12, "rh", "aD8"); f.AddGuide("bD8", 5, "td81", "td82"); f.AddGuide("xA8", 1, "w", "0", "xD1"); f.AddGuide("xD8", 1, "w", "0", "xA1"); f.AddGuide("xC8", 1, "w", "0", "xB1"); f.AddGuide("xB8", 1, "w", "0", "xC1"); f.AddGuide("aA9", 1, "_3cd4", "0", "ha"); f.AddGuide("aD9", 1, "_3cd4", "ha", "0"); f.AddGuide("td91", 7, "rw", "aD9"); f.AddGuide("td92", 12, "rh", "aD9"); f.AddGuide("bD9", 5, "td91", "td92"); f.AddGuide("ctd9", 7, "rh", "bD9"); f.AddGuide("std9", 12, "rw", "bD9"); f.AddGuide("md9", 9, "ctd9", "std9", "0"); f.AddGuide("nd9", 0, "rw", "rh", "md9"); f.AddGuide("dxd9", 7, "nd9", "bD9"); f.AddGuide("dyd9", 12, "nd9", "bD9"); f.AddGuide("xD9", 1, "hc", "dxd9", "0"); f.AddGuide("yD9", 1, "vc", "dyd9", "0"); f.AddGuide("ta91", 7, "rw", "aA9"); f.AddGuide("ta92", 12, "rh", "aA9"); f.AddGuide("bA9", 5, "ta91", "ta92"); f.AddGuide("xA9", 1, "hc", "0", "dxd9"); f.AddGuide("xF9", 1, "xD9", "0", "lFD"); f.AddGuide("xE9", 1, "xA9", "lFD", "0"); f.AddGuide("yC9", 1, "yD9", "0", "th"); f.AddGuide("swAng5", 1, "bA9", "0", "bD8"); f.AddGuide("xCxn1", 2, "xB1", "xC1", "2"); f.AddGuide("yCxn1", 2, "yB1", "yC1", "2"); f.AddGuide("xCxn2", 2, "xB2", "xC2", "2"); f.AddGuide("yCxn2", 2, "yB2", "yC2", "2"); f.AddGuide("xCxn3", 2, "xB3", "xC3", "2"); f.AddGuide("yCxn3", 2, "yB3", "yC3", "2"); f.AddGuide("xCxn4", 2, "xB4", "xC4", "2"); f.AddGuide("yCxn4", 2, "yB4", "yC4", "2"); f.AddGuide("xCxn5", 2, "r", "0", "xCxn4"); f.AddGuide("xCxn6", 2, "r", "0", "xCxn3"); f.AddGuide("xCxn7", 2, "r", "0", "xCxn2"); f.AddGuide("xCxn8", 2, "r", "0", "xCxn1"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "20000", "xD9", "yD9"); f.AddHandleXY("adj2", "0", "2679", undefined, "0", "0", "xA9", "yD9"); f.AddCnx("18600000", "xCxn1", "yCxn1"); f.AddCnx("21000000", "xCxn2", "yCxn2"); f.AddCnx("1800000", "xCxn3", "yCxn3"); f.AddCnx("4200000", "xCxn4", "yCxn4"); f.AddCnx("6600000", "xCxn5", "yCxn4"); f.AddCnx("9000000", "xCxn6", "yCxn3"); f.AddCnx("11400000", "xCxn7", "yCxn2"); f.AddCnx("13800000", "xCxn8", "yCxn1"); f.AddCnx("_3cd4", "hc", "yC9"); f.AddRect("xA8", "yD1", "xD1", "yD3"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "xA1", "yA1"); f.AddPathCommand(2, "xB1", "yB1"); f.AddPathCommand(2, "xC1", "yC1"); f.AddPathCommand(2, "xD1", "yD1"); f.AddPathCommand(3, "rh", "rw", "bD1", "swAng1"); f.AddPathCommand(2, "xB2", "yB2"); f.AddPathCommand(2, "xC2", "yC2"); f.AddPathCommand(2, "xD2", "yD2"); f.AddPathCommand(3, "rh", "rw", "bD2", "swAng2"); f.AddPathCommand(2, "xB3", "yB3"); f.AddPathCommand(2, "xC3", "yC3"); f.AddPathCommand(2, "xD3", "yD3"); f.AddPathCommand(3, "rh", "rw", "bD3", "swAng3"); f.AddPathCommand(2, "xB4", "yB4"); f.AddPathCommand(2, "xC4", "yC4"); f.AddPathCommand(2, "xD4", "yD4"); f.AddPathCommand(3, "rh", "rw", "bD4", "swAng4"); f.AddPathCommand(2, "xB5", "yC4"); f.AddPathCommand(2, "xC5", "yB4"); f.AddPathCommand(2, "xD5", "yA4"); f.AddPathCommand(3, "rh", "rw", "bD5", "swAng3"); f.AddPathCommand(2, "xB6", "yC3"); f.AddPathCommand(2, "xC6", "yB3"); f.AddPathCommand(2, "xD6", "yA3"); f.AddPathCommand(3, "rh", "rw", "bD6", "swAng2"); f.AddPathCommand(2, "xB7", "yC2"); f.AddPathCommand(2, "xC7", "yB2"); f.AddPathCommand(2, "xD7", "yA2"); f.AddPathCommand(3, "rh", "rw", "bD7", "swAng1"); f.AddPathCommand(2, "xB8", "yC1"); f.AddPathCommand(2, "xC8", "yB1"); f.AddPathCommand(2, "xD8", "yA1"); f.AddPathCommand(3, "rh", "rw", "bD8", "swAng5"); f.AddPathCommand(2, "xE9", "yC9"); f.AddPathCommand(2, "xF9", "yC9"); f.AddPathCommand(2, "xD9", "yD9"); f.AddPathCommand(3, "rh", "rw", "bD9", "swAng5"); f.AddPathCommand(6); break; case "halfFrame": f.AddAdj("adj1", 15, "33333"); f.AddAdj("adj2", 15, "33333"); f.AddGuide("maxAdj2", 0, "100000", "w", "ss"); f.AddGuide("a2", 10, "0", "adj2", "maxAdj2"); f.AddGuide("x1", 0, "ss", "a2", "100000"); f.AddGuide("g1", 0, "h", "x1", "w"); f.AddGuide("g2", 1, "h", "0", "g1"); f.AddGuide("maxAdj1", 0, "100000", "g2", "ss"); f.AddGuide("a1", 10, "0", "adj1", "maxAdj1"); f.AddGuide("y1", 0, "ss", "a1", "100000"); f.AddGuide("dx2", 0, "y1", "w", "h"); f.AddGuide("x2", 1, "r", "0", "dx2"); f.AddGuide("dy2", 0, "x1", "h", "w"); f.AddGuide("y2", 1, "b", "0", "dy2"); f.AddGuide("cx1", 0, "x1", "1", "2"); f.AddGuide("cy1", 2, "y2", "b", "2"); f.AddGuide("cx2", 2, "x2", "r", "2"); f.AddGuide("cy2", 0, "y1", "1", "2"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "maxAdj1", "l", "y1"); f.AddHandleXY("adj2", "0", "maxAdj2", undefined, "0", "0", "x1", "t"); f.AddCnx("0", "cx2", "cy2"); f.AddCnx("cd4", "cx1", "cy1"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "x2", "y1"); f.AddPathCommand(2, "x1", "y1"); f.AddPathCommand(2, "x1", "y2"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); break; case "heart": f.AddGuide("dx1", 0, "w", "49", "48"); f.AddGuide("dx2", 0, "w", "10", "48"); f.AddGuide("x1", 1, "hc", "0", "dx1"); f.AddGuide("x2", 1, "hc", "0", "dx2"); f.AddGuide("x3", 1, "hc", "dx2", "0"); f.AddGuide("x4", 1, "hc", "dx1", "0"); f.AddGuide("y1", 1, "t", "0", "hd3"); f.AddGuide("il", 0, "w", "1", "6"); f.AddGuide("ir", 0, "w", "5", "6"); f.AddGuide("ib", 0, "h", "2", "3"); f.AddCnx("_3cd4", "hc", "hd4"); f.AddCnx("cd4", "hc", "b"); f.AddRect("il", "hd4", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "hc", "hd4"); f.AddPathCommand(5, "x3", "y1", "x4", "hd4", "hc", "b"); f.AddPathCommand(5, "x1", "hd4", "x2", "y1", "hc", "hd4"); f.AddPathCommand(6); break; case "heptagon": f.AddAdj("hf", 15, "102572"); f.AddAdj("vf", 15, "105210"); f.AddGuide("swd2", 0, "wd2", "hf", "100000"); f.AddGuide("shd2", 0, "hd2", "vf", "100000"); f.AddGuide("svc", 0, "vc", "vf", "100000"); f.AddGuide("dx1", 0, "swd2", "97493", "100000"); f.AddGuide("dx2", 0, "swd2", "78183", "100000"); f.AddGuide("dx3", 0, "swd2", "43388", "100000"); f.AddGuide("dy1", 0, "shd2", "62349", "100000"); f.AddGuide("dy2", 0, "shd2", "22252", "100000"); f.AddGuide("dy3", 0, "shd2", "90097", "100000"); f.AddGuide("x1", 1, "hc", "0", "dx1"); f.AddGuide("x2", 1, "hc", "0", "dx2"); f.AddGuide("x3", 1, "hc", "0", "dx3"); f.AddGuide("x4", 1, "hc", "dx3", "0"); f.AddGuide("x5", 1, "hc", "dx2", "0"); f.AddGuide("x6", 1, "hc", "dx1", "0"); f.AddGuide("y1", 1, "svc", "0", "dy1"); f.AddGuide("y2", 1, "svc", "dy2", "0"); f.AddGuide("y3", 1, "svc", "dy3", "0"); f.AddGuide("ib", 1, "b", "0", "y1"); f.AddCnx("0", "x5", "y1"); f.AddCnx("0", "x6", "y2"); f.AddCnx("cd4", "x4", "y3"); f.AddCnx("cd4", "x3", "y3"); f.AddCnx("cd2", "x1", "y2"); f.AddCnx("cd2", "x2", "y1"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("x2", "y1", "x5", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y2"); f.AddPathCommand(2, "x2", "y1"); f.AddPathCommand(2, "hc", "t"); f.AddPathCommand(2, "x5", "y1"); f.AddPathCommand(2, "x6", "y2"); f.AddPathCommand(2, "x4", "y3"); f.AddPathCommand(2, "x3", "y3"); f.AddPathCommand(6); break; case "hexagon": f.AddAdj("adj", 15, "25000"); f.AddAdj("vf", 15, "115470"); f.AddGuide("maxAdj", 0, "50000", "w", "ss"); f.AddGuide("a", 10, "0", "adj", "maxAdj"); f.AddGuide("shd2", 0, "hd2", "vf", "100000"); f.AddGuide("x1", 0, "ss", "a", "100000"); f.AddGuide("x2", 1, "r", "0", "x1"); f.AddGuide("dy1", 12, "shd2", "3600000"); f.AddGuide("y1", 1, "vc", "0", "dy1"); f.AddGuide("y2", 1, "vc", "dy1", "0"); f.AddGuide("q1", 0, "maxAdj", "-1", "2"); f.AddGuide("q2", 1, "a", "q1", "0"); f.AddGuide("q3", 3, "q2", "4", "2"); f.AddGuide("q4", 3, "q2", "3", "2"); f.AddGuide("q5", 3, "q2", "q1", "0"); f.AddGuide("q6", 2, "a", "q5", "q1"); f.AddGuide("q7", 0, "q6", "q4", "-1"); f.AddGuide("q8", 1, "q3", "q7", "0"); f.AddGuide("il", 0, "w", "q8", "24"); f.AddGuide("it", 0, "h", "q8", "24"); f.AddGuide("ir", 1, "r", "0", "il"); f.AddGuide("ib", 1, "b", "0", "it"); f.AddHandleXY("adj", "0", "maxAdj", undefined, "0", "0", "x1", "t"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "x2", "y2"); f.AddCnx("cd4", "x1", "y2"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "x1", "y1"); f.AddCnx("_3cd4", "x2", "y1"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(2, "x1", "y1"); f.AddPathCommand(2, "x2", "y1"); f.AddPathCommand(2, "r", "vc"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "x1", "y2"); f.AddPathCommand(6); break; case "homePlate": f.AddAdj("adj", 15, "50000"); f.AddGuide("maxAdj", 0, "100000", "w", "ss"); f.AddGuide("a", 10, "0", "adj", "maxAdj"); f.AddGuide("dx1", 0, "ss", "a", "100000"); f.AddGuide("x1", 1, "r", "0", "dx1"); f.AddGuide("ir", 2, "x1", "r", "2"); f.AddGuide("x2", 0, "x1", "1", "2"); f.AddHandleXY("adj", "0", "maxAdj", undefined, "0", "0", "x1", "t"); f.AddCnx("_3cd4", "x2", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "x1", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("l", "t", "ir", "b"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "x1", "t"); f.AddPathCommand(2, "r", "vc"); f.AddPathCommand(2, "x1", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); break; case "horizontalScroll": f.AddAdj("adj", 15, "12500"); f.AddGuide("a", 10, "0", "adj", "25000"); f.AddGuide("ch", 0, "ss", "a", "100000"); f.AddGuide("ch2", 0, "ch", "1", "2"); f.AddGuide("ch4", 0, "ch", "1", "4"); f.AddGuide("y3", 1, "ch", "ch2", "0"); f.AddGuide("y4", 1, "ch", "ch", "0"); f.AddGuide("y6", 1, "b", "0", "ch"); f.AddGuide("y7", 1, "b", "0", "ch2"); f.AddGuide("y5", 1, "y6", "0", "ch2"); f.AddGuide("x3", 1, "r", "0", "ch"); f.AddGuide("x4", 1, "r", "0", "ch2"); f.AddHandleXY("adj", "0", "25000", undefined, "0", "0", "ch", "t"); f.AddCnx("cd4", "hc", "ch"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "y6"); f.AddCnx("0", "r", "vc"); f.AddRect("ch", "ch", "x4", "y6"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "r", "ch2"); f.AddPathCommand(3, "ch2", "ch2", "0", "cd4"); f.AddPathCommand(2, "x4", "ch2"); f.AddPathCommand(3, "ch4", "ch4", "0", "cd2"); f.AddPathCommand(2, "x3", "ch"); f.AddPathCommand(2, "ch2", "ch"); f.AddPathCommand(3, "ch2", "ch2", "_3cd4", "-5400000"); f.AddPathCommand(2, "l", "y7"); f.AddPathCommand(3, "ch2", "ch2", "cd2", "-10800000"); f.AddPathCommand(2, "ch", "y6"); f.AddPathCommand(2, "x4", "y6"); f.AddPathCommand(3, "ch2", "ch2", "cd4", "-5400000"); f.AddPathCommand(6); f.AddPathCommand(1, "ch2", "y4"); f.AddPathCommand(3, "ch2", "ch2", "cd4", "-5400000"); f.AddPathCommand(3, "ch4", "ch4", "0", "-10800000"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darkenLess", false, undefined, undefined); f.AddPathCommand(1, "ch2", "y4"); f.AddPathCommand(3, "ch2", "ch2", "cd4", "-5400000"); f.AddPathCommand(3, "ch4", "ch4", "0", "-10800000"); f.AddPathCommand(6); f.AddPathCommand(1, "x4", "ch"); f.AddPathCommand(3, "ch2", "ch2", "cd4", "-16200000"); f.AddPathCommand(3, "ch4", "ch4", "cd2", "-10800000"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "y3"); f.AddPathCommand(3, "ch2", "ch2", "cd2", "cd4"); f.AddPathCommand(2, "x3", "ch"); f.AddPathCommand(2, "x3", "ch2"); f.AddPathCommand(3, "ch2", "ch2", "cd2", "cd2"); f.AddPathCommand(2, "r", "y5"); f.AddPathCommand(3, "ch2", "ch2", "0", "cd4"); f.AddPathCommand(2, "ch", "y6"); f.AddPathCommand(2, "ch", "y7"); f.AddPathCommand(3, "ch2", "ch2", "0", "cd2"); f.AddPathCommand(6); f.AddPathCommand(1, "x3", "ch"); f.AddPathCommand(2, "x4", "ch"); f.AddPathCommand(3, "ch2", "ch2", "cd4", "-5400000"); f.AddPathCommand(1, "x4", "ch"); f.AddPathCommand(2, "x4", "ch2"); f.AddPathCommand(3, "ch4", "ch4", "0", "cd2"); f.AddPathCommand(1, "ch2", "y4"); f.AddPathCommand(2, "ch2", "y3"); f.AddPathCommand(3, "ch4", "ch4", "cd2", "cd2"); f.AddPathCommand(3, "ch2", "ch2", "0", "cd2"); f.AddPathCommand(1, "ch", "y3"); f.AddPathCommand(2, "ch", "y6"); break; case "irregularSeal1": f.AddGuide("x5", 0, "w", "4627", "21600"); f.AddGuide("x12", 0, "w", "8485", "21600"); f.AddGuide("x21", 0, "w", "16702", "21600"); f.AddGuide("x24", 0, "w", "14522", "21600"); f.AddGuide("y3", 0, "h", "6320", "21600"); f.AddGuide("y6", 0, "h", "8615", "21600"); f.AddGuide("y9", 0, "h", "13937", "21600"); f.AddGuide("y18", 0, "h", "13290", "21600"); f.AddCnx("_3cd4", "x24", "t"); f.AddCnx("cd2", "l", "y6"); f.AddCnx("cd4", "x12", "b"); f.AddCnx("0", "r", "y18"); f.AddRect("x5", "y3", "x21", "y9"); f.AddPathCommand(0, undefined, undefined, undefined, 21600, 21600); f.AddPathCommand(1, "10800", "5800"); f.AddPathCommand(2, "14522", "0"); f.AddPathCommand(2, "14155", "5325"); f.AddPathCommand(2, "18380", "4457"); f.AddPathCommand(2, "16702", "7315"); f.AddPathCommand(2, "21097", "8137"); f.AddPathCommand(2, "17607", "10475"); f.AddPathCommand(2, "21600", "13290"); f.AddPathCommand(2, "16837", "12942"); f.AddPathCommand(2, "18145", "18095"); f.AddPathCommand(2, "14020", "14457"); f.AddPathCommand(2, "13247", "19737"); f.AddPathCommand(2, "10532", "14935"); f.AddPathCommand(2, "8485", "21600"); f.AddPathCommand(2, "7715", "15627"); f.AddPathCommand(2, "4762", "17617"); f.AddPathCommand(2, "5667", "13937"); f.AddPathCommand(2, "135", "14587"); f.AddPathCommand(2, "3722", "11775"); f.AddPathCommand(2, "0", "8615"); f.AddPathCommand(2, "4627", "7617"); f.AddPathCommand(2, "370", "2295"); f.AddPathCommand(2, "7312", "6320"); f.AddPathCommand(2, "8352", "2295"); f.AddPathCommand(6); break; case "irregularSeal2": f.AddGuide("x2", 0, "w", "9722", "21600"); f.AddGuide("x5", 0, "w", "5372", "21600"); f.AddGuide("x16", 0, "w", "11612", "21600"); f.AddGuide("x19", 0, "w", "14640", "21600"); f.AddGuide("y2", 0, "h", "1887", "21600"); f.AddGuide("y3", 0, "h", "6382", "21600"); f.AddGuide("y8", 0, "h", "12877", "21600"); f.AddGuide("y14", 0, "h", "19712", "21600"); f.AddGuide("y16", 0, "h", "18842", "21600"); f.AddGuide("y17", 0, "h", "15935", "21600"); f.AddGuide("y24", 0, "h", "6645", "21600"); f.AddCnx("_3cd4", "x2", "y2"); f.AddCnx("cd2", "l", "y8"); f.AddCnx("cd4", "x16", "y16"); f.AddCnx("0", "r", "y24"); f.AddRect("x5", "y3", "x19", "y17"); f.AddPathCommand(0, undefined, undefined, undefined, 21600, 21600); f.AddPathCommand(1, "11462", "4342"); f.AddPathCommand(2, "14790", "0"); f.AddPathCommand(2, "14525", "5777"); f.AddPathCommand(2, "18007", "3172"); f.AddPathCommand(2, "16380", "6532"); f.AddPathCommand(2, "21600", "6645"); f.AddPathCommand(2, "16985", "9402"); f.AddPathCommand(2, "18270", "11290"); f.AddPathCommand(2, "16380", "12310"); f.AddPathCommand(2, "18877", "15632"); f.AddPathCommand(2, "14640", "14350"); f.AddPathCommand(2, "14942", "17370"); f.AddPathCommand(2, "12180", "15935"); f.AddPathCommand(2, "11612", "18842"); f.AddPathCommand(2, "9872", "17370"); f.AddPathCommand(2, "8700", "19712"); f.AddPathCommand(2, "7527", "18125"); f.AddPathCommand(2, "4917", "21600"); f.AddPathCommand(2, "4805", "18240"); f.AddPathCommand(2, "1285", "17825"); f.AddPathCommand(2, "3330", "15370"); f.AddPathCommand(2, "0", "12877"); f.AddPathCommand(2, "3935", "11592"); f.AddPathCommand(2, "1172", "8270"); f.AddPathCommand(2, "5372", "7817"); f.AddPathCommand(2, "4502", "3625"); f.AddPathCommand(2, "8550", "6382"); f.AddPathCommand(2, "9722", "1887"); f.AddPathCommand(6); break; case "leftArrow": f.AddAdj("adj1", 15, "50000"); f.AddAdj("adj2", 15, "50000"); f.AddGuide("maxAdj2", 0, "100000", "w", "ss"); f.AddGuide("a1", 10, "0", "adj1", "100000"); f.AddGuide("a2", 10, "0", "adj2", "maxAdj2"); f.AddGuide("dx2", 0, "ss", "a2", "100000"); f.AddGuide("x2", 1, "l", "dx2", "0"); f.AddGuide("dy1", 0, "h", "a1", "200000"); f.AddGuide("y1", 1, "vc", "0", "dy1"); f.AddGuide("y2", 1, "vc", "dy1", "0"); f.AddGuide("dx1", 0, "y1", "dx2", "hd2"); f.AddGuide("x1", 1, "x2", "0", "dx1"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "100000", "r", "y1"); f.AddHandleXY("adj2", "0", "maxAdj2", undefined, "0", "0", "x2", "t"); f.AddCnx("_3cd4", "x2", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "x2", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("x1", "y1", "r", "y2"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(2, "x2", "t"); f.AddPathCommand(2, "x2", "y1"); f.AddPathCommand(2, "r", "y1"); f.AddPathCommand(2, "r", "y2"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "x2", "b"); f.AddPathCommand(6); break; case "upArrow": f.AddAdj("adj1", 15, "50000"); f.AddAdj("adj2", 15, "50000"); f.AddGuide("maxAdj2", 0, "100000", "h", "ss"); f.AddGuide("a1", 10, "0", "adj1", "100000"); f.AddGuide("a2", 10, "0", "adj2", "maxAdj2"); f.AddGuide("dy2", 0, "ss", "a2", "100000"); f.AddGuide("y2", 1, "t", "dy2", "0"); f.AddGuide("dx1", 0, "w", "a1", "200000"); f.AddGuide("x1", 1, "hc", "0", "dx1"); f.AddGuide("x2", 1, "hc", "dx1", "0"); f.AddGuide("dy1", 0, "x1", "dy2", "wd2"); f.AddGuide("y1", 1, "y2", "0", "dy1"); f.AddHandleXY("adj1", "0", "100000", undefined, "0", "0", "x1", "b"); f.AddHandleXY(undefined, "0", "0", "adj2", "0", "maxAdj2", "l", "y2"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "y2"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "y2"); f.AddRect("x1", "y1", "x2", "b"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "y2"); f.AddPathCommand(2, "hc", "t"); f.AddPathCommand(2, "r", "y2"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "x2", "b"); f.AddPathCommand(2, "x1", "b"); f.AddPathCommand(2, "x1", "y2"); f.AddPathCommand(6); break; case "leftArrowCallout": f.AddAdj("adj1", 15, "25000"); f.AddAdj("adj2", 15, "25000"); f.AddAdj("adj3", 15, "25000"); f.AddAdj("adj4", 15, "64977"); f.AddGuide("maxAdj2", 0, "50000", "h", "ss"); f.AddGuide("a2", 10, "0", "adj2", "maxAdj2"); f.AddGuide("maxAdj1", 0, "a2", "2", "1"); f.AddGuide("a1", 10, "0", "adj1", "maxAdj1"); f.AddGuide("maxAdj3", 0, "100000", "w", "ss"); f.AddGuide("a3", 10, "0", "adj3", "maxAdj3"); f.AddGuide("q2", 0, "a3", "ss", "w"); f.AddGuide("maxAdj4", 1, "100000", "0", "q2"); f.AddGuide("a4", 10, "0", "adj4", "maxAdj4"); f.AddGuide("dy1", 0, "ss", "a2", "100000"); f.AddGuide("dy2", 0, "ss", "a1", "200000"); f.AddGuide("y1", 1, "vc", "0", "dy1"); f.AddGuide("y2", 1, "vc", "0", "dy2"); f.AddGuide("y3", 1, "vc", "dy2", "0"); f.AddGuide("y4", 1, "vc", "dy1", "0"); f.AddGuide("x1", 0, "ss", "a3", "100000"); f.AddGuide("dx2", 0, "w", "a4", "100000"); f.AddGuide("x2", 1, "r", "0", "dx2"); f.AddGuide("x3", 2, "x2", "r", "2"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "maxAdj1", "x1", "y2"); f.AddHandleXY(undefined, "0", "0", "adj2", "0", "maxAdj2", "l", "y1"); f.AddHandleXY("adj3", "0", "maxAdj3", undefined, "0", "0", "x1", "t"); f.AddHandleXY("adj4", "0", "maxAdj4", undefined, "0", "0", "x2", "b"); f.AddCnx("_3cd4", "x3", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "x3", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("x2", "t", "r", "b"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(2, "x1", "y1"); f.AddPathCommand(2, "x1", "y2"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "x2", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "x2", "b"); f.AddPathCommand(2, "x2", "y3"); f.AddPathCommand(2, "x1", "y3"); f.AddPathCommand(2, "x1", "y4"); f.AddPathCommand(6); break; case "leftBrace": f.AddAdj("adj1", 15, "8333"); f.AddAdj("adj2", 15, "50000"); f.AddGuide("a2", 10, "0", "adj2", "100000"); f.AddGuide("q1", 1, "100000", "0", "a2"); f.AddGuide("q2", 16, "q1", "a2"); f.AddGuide("q3", 0, "q2", "1", "2"); f.AddGuide("maxAdj1", 0, "q3", "h", "ss"); f.AddGuide("a1", 10, "0", "adj1", "maxAdj1"); f.AddGuide("y1", 0, "ss", "a1", "100000"); f.AddGuide("y3", 0, "h", "a2", "100000"); f.AddGuide("y4", 1, "y3", "y1", "0"); f.AddGuide("dx1", 7, "wd2", "2700000"); f.AddGuide("dy1", 12, "y1", "2700000"); f.AddGuide("il", 1, "r", "0", "dx1"); f.AddGuide("it", 1, "y1", "0", "dy1"); f.AddGuide("ib", 1, "b", "dy1", "y1"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "maxAdj1", "hc", "y1"); f.AddHandleXY(undefined, "0", "0", "adj2", "0", "100000", "l", "y3"); f.AddCnx("cd4", "r", "t"); f.AddCnx("cd2", "l", "y3"); f.AddCnx("_3cd4", "r", "b"); f.AddRect("il", "it", "r", "ib"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "r", "b"); f.AddPathCommand(3, "wd2", "y1", "cd4", "cd4"); f.AddPathCommand(2, "hc", "y4"); f.AddPathCommand(3, "wd2", "y1", "0", "-5400000"); f.AddPathCommand(3, "wd2", "y1", "cd4", "-5400000"); f.AddPathCommand(2, "hc", "y1"); f.AddPathCommand(3, "wd2", "y1", "cd2", "cd4"); f.AddPathCommand(6); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "r", "b"); f.AddPathCommand(3, "wd2", "y1", "cd4", "cd4"); f.AddPathCommand(2, "hc", "y4"); f.AddPathCommand(3, "wd2", "y1", "0", "-5400000"); f.AddPathCommand(3, "wd2", "y1", "cd4", "-5400000"); f.AddPathCommand(2, "hc", "y1"); f.AddPathCommand(3, "wd2", "y1", "cd2", "cd4"); break; case "leftBracket": f.AddAdj("adj", 15, "8333"); f.AddGuide("maxAdj", 0, "50000", "h", "ss"); f.AddGuide("a", 10, "0", "adj", "maxAdj"); f.AddGuide("y1", 0, "ss", "a", "100000"); f.AddGuide("y2", 1, "b", "0", "y1"); f.AddGuide("dx1", 7, "w", "2700000"); f.AddGuide("dy1", 12, "y1", "2700000"); f.AddGuide("il", 1, "r", "0", "dx1"); f.AddGuide("it", 1, "y1", "0", "dy1"); f.AddGuide("ib", 1, "b", "dy1", "y1"); f.AddHandleXY(undefined, "0", "0", "adj", "0", "maxAdj", "l", "y1"); f.AddCnx("cd4", "r", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "r", "b"); f.AddRect("il", "it", "r", "ib"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "r", "b"); f.AddPathCommand(3, "w", "y1", "cd4", "cd4"); f.AddPathCommand(2, "l", "y1"); f.AddPathCommand(3, "w", "y1", "cd2", "cd4"); f.AddPathCommand(6); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "r", "b"); f.AddPathCommand(3, "w", "y1", "cd4", "cd4"); f.AddPathCommand(2, "l", "y1"); f.AddPathCommand(3, "w", "y1", "cd2", "cd4"); break; case "leftCircularArrow": f.AddAdj("adj1", 15, "12500"); f.AddAdj("adj2", 15, "-1142319"); f.AddAdj("adj3", 15, "1142319"); f.AddAdj("adj4", 15, "10800000"); f.AddAdj("adj5", 15, "12500"); f.AddGuide("a5", 10, "0", "adj5", "25000"); f.AddGuide("maxAdj1", 0, "a5", "2", "1"); f.AddGuide("a1", 10, "0", "adj1", "maxAdj1"); f.AddGuide("enAng", 10, "1", "adj3", "21599999"); f.AddGuide("stAng", 10, "0", "adj4", "21599999"); f.AddGuide("th", 0, "ss", "a1", "100000"); f.AddGuide("thh", 0, "ss", "a5", "100000"); f.AddGuide("th2", 0, "th", "1", "2"); f.AddGuide("rw1", 1, "wd2", "th2", "thh"); f.AddGuide("rh1", 1, "hd2", "th2", "thh"); f.AddGuide("rw2", 1, "rw1", "0", "th"); f.AddGuide("rh2", 1, "rh1", "0", "th"); f.AddGuide("rw3", 1, "rw2", "th2", "0"); f.AddGuide("rh3", 1, "rh2", "th2", "0"); f.AddGuide("wtH", 12, "rw3", "enAng"); f.AddGuide("htH", 7, "rh3", "enAng"); f.AddGuide("dxH", 6, "rw3", "htH", "wtH"); f.AddGuide("dyH", 11, "rh3", "htH", "wtH"); f.AddGuide("xH", 1, "hc", "dxH", "0"); f.AddGuide("yH", 1, "vc", "dyH", "0"); f.AddGuide("rI", 16, "rw2", "rh2"); f.AddGuide("u1", 0, "dxH", "dxH", "1"); f.AddGuide("u2", 0, "dyH", "dyH", "1"); f.AddGuide("u3", 0, "rI", "rI", "1"); f.AddGuide("u4", 1, "u1", "0", "u3"); f.AddGuide("u5", 1, "u2", "0", "u3"); f.AddGuide("u6", 0, "u4", "u5", "u1"); f.AddGuide("u7", 0, "u6", "1", "u2"); f.AddGuide("u8", 1, "1", "0", "u7"); f.AddGuide("u9", 13, "u8"); f.AddGuide("u10", 0, "u4", "1", "dxH"); f.AddGuide("u11", 0, "u10", "1", "dyH"); f.AddGuide("u12", 2, "1", "u9", "u11"); f.AddGuide("u13", 5, "1", "u12"); f.AddGuide("u14", 1, "u13", "21600000", "0"); f.AddGuide("u15", 3, "u13", "u13", "u14"); f.AddGuide("u16", 1, "u15", "0", "enAng"); f.AddGuide("u17", 1, "u16", "21600000", "0"); f.AddGuide("u18", 3, "u16", "u16", "u17"); f.AddGuide("u19", 1, "u18", "0", "cd2"); f.AddGuide("u20", 1, "u18", "0", "21600000"); f.AddGuide("u21", 3, "u19", "u20", "u18"); f.AddGuide("u22", 4, "u21"); f.AddGuide("minAng", 0, "u22", "-1", "1"); f.AddGuide("u23", 4, "adj2"); f.AddGuide("a2", 0, "u23", "-1", "1"); f.AddGuide("aAng", 10, "minAng", "a2", "0"); f.AddGuide("ptAng", 1, "enAng", "aAng", "0"); f.AddGuide("wtA", 12, "rw3", "ptAng"); f.AddGuide("htA", 7, "rh3", "ptAng"); f.AddGuide("dxA", 6, "rw3", "htA", "wtA"); f.AddGuide("dyA", 11, "rh3", "htA", "wtA"); f.AddGuide("xA", 1, "hc", "dxA", "0"); f.AddGuide("yA", 1, "vc", "dyA", "0"); f.AddGuide("wtE", 12, "rw1", "stAng"); f.AddGuide("htE", 7, "rh1", "stAng"); f.AddGuide("dxE", 6, "rw1", "htE", "wtE"); f.AddGuide("dyE", 11, "rh1", "htE", "wtE"); f.AddGuide("xE", 1, "hc", "dxE", "0"); f.AddGuide("yE", 1, "vc", "dyE", "0"); f.AddGuide("wtD", 12, "rw2", "stAng"); f.AddGuide("htD", 7, "rh2", "stAng"); f.AddGuide("dxD", 6, "rw2", "htD", "wtD"); f.AddGuide("dyD", 11, "rh2", "htD", "wtD"); f.AddGuide("xD", 1, "hc", "dxD", "0"); f.AddGuide("yD", 1, "vc", "dyD", "0"); f.AddGuide("dxG", 7, "thh", "ptAng"); f.AddGuide("dyG", 12, "thh", "ptAng"); f.AddGuide("xG", 1, "xH", "dxG", "0"); f.AddGuide("yG", 1, "yH", "dyG", "0"); f.AddGuide("dxB", 7, "thh", "ptAng"); f.AddGuide("dyB", 12, "thh", "ptAng"); f.AddGuide("xB", 1, "xH", "0", "dxB", "0"); f.AddGuide("yB", 1, "yH", "0", "dyB", "0"); f.AddGuide("sx1", 1, "xB", "0", "hc"); f.AddGuide("sy1", 1, "yB", "0", "vc"); f.AddGuide("sx2", 1, "xG", "0", "hc"); f.AddGuide("sy2", 1, "yG", "0", "vc"); f.AddGuide("rO", 16, "rw1", "rh1"); f.AddGuide("x1O", 0, "sx1", "rO", "rw1"); f.AddGuide("y1O", 0, "sy1", "rO", "rh1"); f.AddGuide("x2O", 0, "sx2", "rO", "rw1"); f.AddGuide("y2O", 0, "sy2", "rO", "rh1"); f.AddGuide("dxO", 1, "x2O", "0", "x1O"); f.AddGuide("dyO", 1, "y2O", "0", "y1O"); f.AddGuide("dO", 9, "dxO", "dyO", "0"); f.AddGuide("q1", 0, "x1O", "y2O", "1"); f.AddGuide("q2", 0, "x2O", "y1O", "1"); f.AddGuide("DO", 1, "q1", "0", "q2"); f.AddGuide("q3", 0, "rO", "rO", "1"); f.AddGuide("q4", 0, "dO", "dO", "1"); f.AddGuide("q5", 0, "q3", "q4", "1"); f.AddGuide("q6", 0, "DO", "DO", "1"); f.AddGuide("q7", 1, "q5", "0", "q6"); f.AddGuide("q8", 8, "q7", "0"); f.AddGuide("sdelO", 13, "q8"); f.AddGuide("ndyO", 0, "dyO", "-1", "1"); f.AddGuide("sdyO", 3, "ndyO", "-1", "1"); f.AddGuide("q9", 0, "sdyO", "dxO", "1"); f.AddGuide("q10", 0, "q9", "sdelO", "1"); f.AddGuide("q11", 0, "DO", "dyO", "1"); f.AddGuide("dxF1", 2, "q11", "q10", "q4"); f.AddGuide("q12", 1, "q11", "0", "q10"); f.AddGuide("dxF2", 0, "q12", "1", "q4"); f.AddGuide("adyO", 4, "dyO"); f.AddGuide("q13", 0, "adyO", "sdelO", "1"); f.AddGuide("q14", 0, "DO", "dxO", "-1"); f.AddGuide("dyF1", 2, "q14", "q13", "q4"); f.AddGuide("q15", 1, "q14", "0", "q13"); f.AddGuide("dyF2", 0, "q15", "1", "q4"); f.AddGuide("q16", 1, "x2O", "0", "dxF1"); f.AddGuide("q17", 1, "x2O", "0", "dxF2"); f.AddGuide("q18", 1, "y2O", "0", "dyF1"); f.AddGuide("q19", 1, "y2O", "0", "dyF2"); f.AddGuide("q20", 9, "q16", "q18", "0"); f.AddGuide("q21", 9, "q17", "q19", "0"); f.AddGuide("q22", 1, "q21", "0", "q20"); f.AddGuide("dxF", 3, "q22", "dxF1", "dxF2"); f.AddGuide("dyF", 3, "q22", "dyF1", "dyF2"); f.AddGuide("sdxF", 0, "dxF", "rw1", "rO"); f.AddGuide("sdyF", 0, "dyF", "rh1", "rO"); f.AddGuide("xF", 1, "hc", "sdxF", "0"); f.AddGuide("yF", 1, "vc", "sdyF", "0"); f.AddGuide("x1I", 0, "sx1", "rI", "rw2"); f.AddGuide("y1I", 0, "sy1", "rI", "rh2"); f.AddGuide("x2I", 0, "sx2", "rI", "rw2"); f.AddGuide("y2I", 0, "sy2", "rI", "rh2"); f.AddGuide("dxI", 1, "x2I", "0", "x1I"); f.AddGuide("dyI", 1, "y2I", "0", "y1I"); f.AddGuide("dI", 9, "dxI", "dyI", "0"); f.AddGuide("v1", 0, "x1I", "y2I", "1"); f.AddGuide("v2", 0, "x2I", "y1I", "1"); f.AddGuide("DI", 1, "v1", "0", "v2"); f.AddGuide("v3", 0, "rI", "rI", "1"); f.AddGuide("v4", 0, "dI", "dI", "1"); f.AddGuide("v5", 0, "v3", "v4", "1"); f.AddGuide("v6", 0, "DI", "DI", "1"); f.AddGuide("v7", 1, "v5", "0", "v6"); f.AddGuide("v8", 8, "v7", "0"); f.AddGuide("sdelI", 13, "v8"); f.AddGuide("v9", 0, "sdyO", "dxI", "1"); f.AddGuide("v10", 0, "v9", "sdelI", "1"); f.AddGuide("v11", 0, "DI", "dyI", "1"); f.AddGuide("dxC1", 2, "v11", "v10", "v4"); f.AddGuide("v12", 1, "v11", "0", "v10"); f.AddGuide("dxC2", 0, "v12", "1", "v4"); f.AddGuide("adyI", 4, "dyI"); f.AddGuide("v13", 0, "adyI", "sdelI", "1"); f.AddGuide("v14", 0, "DI", "dxI", "-1"); f.AddGuide("dyC1", 2, "v14", "v13", "v4"); f.AddGuide("v15", 1, "v14", "0", "v13"); f.AddGuide("dyC2", 0, "v15", "1", "v4"); f.AddGuide("v16", 1, "x1I", "0", "dxC1"); f.AddGuide("v17", 1, "x1I", "0", "dxC2"); f.AddGuide("v18", 1, "y1I", "0", "dyC1"); f.AddGuide("v19", 1, "y1I", "0", "dyC2"); f.AddGuide("v20", 9, "v16", "v18", "0"); f.AddGuide("v21", 9, "v17", "v19", "0"); f.AddGuide("v22", 1, "v21", "0", "v20"); f.AddGuide("dxC", 3, "v22", "dxC1", "dxC2"); f.AddGuide("dyC", 3, "v22", "dyC1", "dyC2"); f.AddGuide("sdxC", 0, "dxC", "rw2", "rI"); f.AddGuide("sdyC", 0, "dyC", "rh2", "rI"); f.AddGuide("xC", 1, "hc", "sdxC", "0"); f.AddGuide("yC", 1, "vc", "sdyC", "0"); f.AddGuide("ist0", 5, "sdxC", "sdyC"); f.AddGuide("ist1", 1, "ist0", "21600000", "0"); f.AddGuide("istAng0", 3, "ist0", "ist0", "ist1"); f.AddGuide("isw1", 1, "stAng", "0", "istAng0"); f.AddGuide("isw2", 1, "isw1", "21600000", "0"); f.AddGuide("iswAng0", 3, "isw1", "isw1", "isw2"); f.AddGuide("istAng", 1, "istAng0", "iswAng0", "0"); f.AddGuide("iswAng", 1, "0", "0", "iswAng0"); f.AddGuide("p1", 1, "xF", "0", "xC"); f.AddGuide("p2", 1, "yF", "0", "yC"); f.AddGuide("p3", 9, "p1", "p2", "0"); f.AddGuide("p4", 0, "p3", "1", "2"); f.AddGuide("p5", 1, "p4", "0", "thh"); f.AddGuide("xGp", 3, "p5", "xF", "xG"); f.AddGuide("yGp", 3, "p5", "yF", "yG"); f.AddGuide("xBp", 3, "p5", "xC", "xB"); f.AddGuide("yBp", 3, "p5", "yC", "yB"); f.AddGuide("en0", 5, "sdxF", "sdyF"); f.AddGuide("en1", 1, "en0", "21600000", "0"); f.AddGuide("en2", 3, "en0", "en0", "en1"); f.AddGuide("sw0", 1, "en2", "0", "stAng"); f.AddGuide("sw1", 1, "sw0", "0", "21600000"); f.AddGuide("swAng", 3, "sw0", "sw1", "sw0"); f.AddGuide("stAng0", 1, "stAng", "swAng", "0"); f.AddGuide("swAng0", 1, "0", "0", "swAng"); f.AddGuide("wtI", 12, "rw3", "stAng"); f.AddGuide("htI", 7, "rh3", "stAng"); f.AddGuide("dxI", 6, "rw3", "htI", "wtI"); f.AddGuide("dyI", 11, "rh3", "htI", "wtI"); f.AddGuide("xI", 1, "hc", "dxI", "0"); f.AddGuide("yI", 1, "vc", "dyI", "0"); f.AddGuide("aI", 1, "stAng", "cd4", "0"); f.AddGuide("aA", 1, "ptAng", "0", "cd4"); f.AddGuide("aB", 1, "ptAng", "cd2", "0"); f.AddGuide("idx", 7, "rw1", "2700000"); f.AddGuide("idy", 12, "rh1", "2700000"); f.AddGuide("il", 1, "hc", "0", "idx"); f.AddGuide("ir", 1, "hc", "idx", "0"); f.AddGuide("it", 1, "vc", "0", "idy"); f.AddGuide("ib", 1, "vc", "idy", "0"); f.AddHandlePolar("adj2", "minAng", "0", undefined, "0", "0", "xA", "yA"); f.AddHandlePolar("adj4", "0", "21599999", undefined, "0", "0", "xE", "yE"); f.AddHandlePolar(undefined, "0", "0", "adj1", "0", "maxAdj1", "xF", "yF"); f.AddHandlePolar(undefined, "0", "0", "adj5", "0", "25000", "xB", "yB"); f.AddCnx("aI", "xI", "yI"); f.AddCnx("ptAng", "xGp", "yGp"); f.AddCnx("aA", "xA", "yA"); f.AddCnx("aB", "xBp", "yBp"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "xE", "yE"); f.AddPathCommand(2, "xD", "yD"); f.AddPathCommand(3, "rw2", "rh2", "istAng", "iswAng"); f.AddPathCommand(2, "xBp", "yBp"); f.AddPathCommand(2, "xA", "yA"); f.AddPathCommand(2, "xGp", "yGp"); f.AddPathCommand(2, "xF", "yF"); f.AddPathCommand(3, "rw1", "rh1", "stAng0", "swAng0"); f.AddPathCommand(6); break; case "leftRightArrow": f.AddAdj("adj1", 15, "50000"); f.AddAdj("adj2", 15, "50000"); f.AddGuide("maxAdj2", 0, "50000", "w", "ss"); f.AddGuide("a1", 10, "0", "adj1", "100000"); f.AddGuide("a2", 10, "0", "adj2", "maxAdj2"); f.AddGuide("x2", 0, "ss", "a2", "100000"); f.AddGuide("x3", 1, "r", "0", "x2"); f.AddGuide("dy", 0, "h", "a1", "200000"); f.AddGuide("y1", 1, "vc", "0", "dy"); f.AddGuide("y2", 1, "vc", "dy", "0"); f.AddGuide("dx1", 0, "y1", "x2", "hd2"); f.AddGuide("x1", 1, "x2", "0", "dx1"); f.AddGuide("x4", 1, "x3", "dx1", "0"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "100000", "x3", "y1"); f.AddHandleXY("adj2", "0", "maxAdj2", undefined, "0", "0", "x2", "t"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "x3", "b"); f.AddCnx("cd4", "x2", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "x2", "t"); f.AddCnx("_3cd4", "x3", "t"); f.AddRect("x1", "y1", "x4", "y2"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(2, "x2", "t"); f.AddPathCommand(2, "x2", "y1"); f.AddPathCommand(2, "x3", "y1"); f.AddPathCommand(2, "x3", "t"); f.AddPathCommand(2, "r", "vc"); f.AddPathCommand(2, "x3", "b"); f.AddPathCommand(2, "x3", "y2"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "x2", "b"); f.AddPathCommand(6); break; case "leftRightArrowCallout": f.AddAdj("adj1", 15, "25000"); f.AddAdj("adj2", 15, "25000"); f.AddAdj("adj3", 15, "25000"); f.AddAdj("adj4", 15, "48123"); f.AddGuide("maxAdj2", 0, "50000", "h", "ss"); f.AddGuide("a2", 10, "0", "adj2", "maxAdj2"); f.AddGuide("maxAdj1", 0, "a2", "2", "1"); f.AddGuide("a1", 10, "0", "adj1", "maxAdj1"); f.AddGuide("maxAdj3", 0, "50000", "w", "ss"); f.AddGuide("a3", 10, "0", "adj3", "maxAdj3"); f.AddGuide("q2", 0, "a3", "ss", "wd2"); f.AddGuide("maxAdj4", 1, "100000", "0", "q2"); f.AddGuide("a4", 10, "0", "adj4", "maxAdj4"); f.AddGuide("dy1", 0, "ss", "a2", "100000"); f.AddGuide("dy2", 0, "ss", "a1", "200000"); f.AddGuide("y1", 1, "vc", "0", "dy1"); f.AddGuide("y2", 1, "vc", "0", "dy2"); f.AddGuide("y3", 1, "vc", "dy2", "0"); f.AddGuide("y4", 1, "vc", "dy1", "0"); f.AddGuide("x1", 0, "ss", "a3", "100000"); f.AddGuide("x4", 1, "r", "0", "x1"); f.AddGuide("dx2", 0, "w", "a4", "200000"); f.AddGuide("x2", 1, "hc", "0", "dx2"); f.AddGuide("x3", 1, "hc", "dx2", "0"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "maxAdj1", "x1", "y2"); f.AddHandleXY(undefined, "0", "0", "adj2", "0", "maxAdj2", "l", "y1"); f.AddHandleXY("adj3", "0", "maxAdj3", undefined, "0", "0", "x1", "t"); f.AddHandleXY("adj4", "0", "maxAdj4", undefined, "0", "0", "x2", "b"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("x2", "t", "x3", "b"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(2, "x1", "y1"); f.AddPathCommand(2, "x1", "y2"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "x2", "t"); f.AddPathCommand(2, "x3", "t"); f.AddPathCommand(2, "x3", "y2"); f.AddPathCommand(2, "x4", "y2"); f.AddPathCommand(2, "x4", "y1"); f.AddPathCommand(2, "r", "vc"); f.AddPathCommand(2, "x4", "y4"); f.AddPathCommand(2, "x4", "y3"); f.AddPathCommand(2, "x3", "y3"); f.AddPathCommand(2, "x3", "b"); f.AddPathCommand(2, "x2", "b"); f.AddPathCommand(2, "x2", "y3"); f.AddPathCommand(2, "x1", "y3"); f.AddPathCommand(2, "x1", "y4"); f.AddPathCommand(6); break; case "leftRightCircularArrow": f.AddAdj("adj1", 15, "12500"); f.AddAdj("adj2", 15, "1142319"); f.AddAdj("adj3", 15, "20457681"); f.AddAdj("adj4", 15, "11942319"); f.AddAdj("adj5", 15, "12500"); f.AddGuide("a5", 10, "0", "adj5", "25000"); f.AddGuide("maxAdj1", 0, "a5", "2", "1"); f.AddGuide("a1", 10, "0", "adj1", "maxAdj1"); f.AddGuide("enAng", 10, "1", "adj3", "21599999"); f.AddGuide("stAng", 10, "0", "adj4", "21599999"); f.AddGuide("th", 0, "ss", "a1", "100000"); f.AddGuide("thh", 0, "ss", "a5", "100000"); f.AddGuide("th2", 0, "th", "1", "2"); f.AddGuide("rw1", 1, "wd2", "th2", "thh"); f.AddGuide("rh1", 1, "hd2", "th2", "thh"); f.AddGuide("rw2", 1, "rw1", "0", "th"); f.AddGuide("rh2", 1, "rh1", "0", "th"); f.AddGuide("rw3", 1, "rw2", "th2", "0"); f.AddGuide("rh3", 1, "rh2", "th2", "0"); f.AddGuide("wtH", 12, "rw3", "enAng"); f.AddGuide("htH", 7, "rh3", "enAng"); f.AddGuide("dxH", 6, "rw3", "htH", "wtH"); f.AddGuide("dyH", 11, "rh3", "htH", "wtH"); f.AddGuide("xH", 1, "hc", "dxH", "0"); f.AddGuide("yH", 1, "vc", "dyH", "0"); f.AddGuide("rI", 16, "rw2", "rh2"); f.AddGuide("u1", 0, "dxH", "dxH", "1"); f.AddGuide("u2", 0, "dyH", "dyH", "1"); f.AddGuide("u3", 0, "rI", "rI", "1"); f.AddGuide("u4", 1, "u1", "0", "u3"); f.AddGuide("u5", 1, "u2", "0", "u3"); f.AddGuide("u6", 0, "u4", "u5", "u1"); f.AddGuide("u7", 0, "u6", "1", "u2"); f.AddGuide("u8", 1, "1", "0", "u7"); f.AddGuide("u9", 13, "u8"); f.AddGuide("u10", 0, "u4", "1", "dxH"); f.AddGuide("u11", 0, "u10", "1", "dyH"); f.AddGuide("u12", 2, "1", "u9", "u11"); f.AddGuide("u13", 5, "1", "u12"); f.AddGuide("u14", 1, "u13", "21600000", "0"); f.AddGuide("u15", 3, "u13", "u13", "u14"); f.AddGuide("u16", 1, "u15", "0", "enAng"); f.AddGuide("u17", 1, "u16", "21600000", "0"); f.AddGuide("u18", 3, "u16", "u16", "u17"); f.AddGuide("u19", 1, "u18", "0", "cd2"); f.AddGuide("u20", 1, "u18", "0", "21600000"); f.AddGuide("u21", 3, "u19", "u20", "u18"); f.AddGuide("maxAng", 4, "u21"); f.AddGuide("aAng", 10, "0", "adj2", "maxAng"); f.AddGuide("ptAng", 1, "enAng", "aAng", "0"); f.AddGuide("wtA", 12, "rw3", "ptAng"); f.AddGuide("htA", 7, "rh3", "ptAng"); f.AddGuide("dxA", 6, "rw3", "htA", "wtA"); f.AddGuide("dyA", 11, "rh3", "htA", "wtA"); f.AddGuide("xA", 1, "hc", "dxA", "0"); f.AddGuide("yA", 1, "vc", "dyA", "0"); f.AddGuide("dxG", 7, "thh", "ptAng"); f.AddGuide("dyG", 12, "thh", "ptAng"); f.AddGuide("xG", 1, "xH", "dxG", "0"); f.AddGuide("yG", 1, "yH", "dyG", "0"); f.AddGuide("dxB", 7, "thh", "ptAng"); f.AddGuide("dyB", 12, "thh", "ptAng"); f.AddGuide("xB", 1, "xH", "0", "dxB", "0"); f.AddGuide("yB", 1, "yH", "0", "dyB", "0"); f.AddGuide("sx1", 1, "xB", "0", "hc"); f.AddGuide("sy1", 1, "yB", "0", "vc"); f.AddGuide("sx2", 1, "xG", "0", "hc"); f.AddGuide("sy2", 1, "yG", "0", "vc"); f.AddGuide("rO", 16, "rw1", "rh1"); f.AddGuide("x1O", 0, "sx1", "rO", "rw1"); f.AddGuide("y1O", 0, "sy1", "rO", "rh1"); f.AddGuide("x2O", 0, "sx2", "rO", "rw1"); f.AddGuide("y2O", 0, "sy2", "rO", "rh1"); f.AddGuide("dxO", 1, "x2O", "0", "x1O"); f.AddGuide("dyO", 1, "y2O", "0", "y1O"); f.AddGuide("dO", 9, "dxO", "dyO", "0"); f.AddGuide("q1", 0, "x1O", "y2O", "1"); f.AddGuide("q2", 0, "x2O", "y1O", "1"); f.AddGuide("DO", 1, "q1", "0", "q2"); f.AddGuide("q3", 0, "rO", "rO", "1"); f.AddGuide("q4", 0, "dO", "dO", "1"); f.AddGuide("q5", 0, "q3", "q4", "1"); f.AddGuide("q6", 0, "DO", "DO", "1"); f.AddGuide("q7", 1, "q5", "0", "q6"); f.AddGuide("q8", 8, "q7", "0"); f.AddGuide("sdelO", 13, "q8"); f.AddGuide("ndyO", 0, "dyO", "-1", "1"); f.AddGuide("sdyO", 3, "ndyO", "-1", "1"); f.AddGuide("q9", 0, "sdyO", "dxO", "1"); f.AddGuide("q10", 0, "q9", "sdelO", "1"); f.AddGuide("q11", 0, "DO", "dyO", "1"); f.AddGuide("dxF1", 2, "q11", "q10", "q4"); f.AddGuide("q12", 1, "q11", "0", "q10"); f.AddGuide("dxF2", 0, "q12", "1", "q4"); f.AddGuide("adyO", 4, "dyO"); f.AddGuide("q13", 0, "adyO", "sdelO", "1"); f.AddGuide("q14", 0, "DO", "dxO", "-1"); f.AddGuide("dyF1", 2, "q14", "q13", "q4"); f.AddGuide("q15", 1, "q14", "0", "q13"); f.AddGuide("dyF2", 0, "q15", "1", "q4"); f.AddGuide("q16", 1, "x2O", "0", "dxF1"); f.AddGuide("q17", 1, "x2O", "0", "dxF2"); f.AddGuide("q18", 1, "y2O", "0", "dyF1"); f.AddGuide("q19", 1, "y2O", "0", "dyF2"); f.AddGuide("q20", 9, "q16", "q18", "0"); f.AddGuide("q21", 9, "q17", "q19", "0"); f.AddGuide("q22", 1, "q21", "0", "q20"); f.AddGuide("dxF", 3, "q22", "dxF1", "dxF2"); f.AddGuide("dyF", 3, "q22", "dyF1", "dyF2"); f.AddGuide("sdxF", 0, "dxF", "rw1", "rO"); f.AddGuide("sdyF", 0, "dyF", "rh1", "rO"); f.AddGuide("xF", 1, "hc", "sdxF", "0"); f.AddGuide("yF", 1, "vc", "sdyF", "0"); f.AddGuide("x1I", 0, "sx1", "rI", "rw2"); f.AddGuide("y1I", 0, "sy1", "rI", "rh2"); f.AddGuide("x2I", 0, "sx2", "rI", "rw2"); f.AddGuide("y2I", 0, "sy2", "rI", "rh2"); f.AddGuide("dxI", 1, "x2I", "0", "x1I"); f.AddGuide("dyI", 1, "y2I", "0", "y1I"); f.AddGuide("dI", 9, "dxI", "dyI", "0"); f.AddGuide("v1", 0, "x1I", "y2I", "1"); f.AddGuide("v2", 0, "x2I", "y1I", "1"); f.AddGuide("DI", 1, "v1", "0", "v2"); f.AddGuide("v3", 0, "rI", "rI", "1"); f.AddGuide("v4", 0, "dI", "dI", "1"); f.AddGuide("v5", 0, "v3", "v4", "1"); f.AddGuide("v6", 0, "DI", "DI", "1"); f.AddGuide("v7", 1, "v5", "0", "v6"); f.AddGuide("v8", 8, "v7", "0"); f.AddGuide("sdelI", 13, "v8"); f.AddGuide("v9", 0, "sdyO", "dxI", "1"); f.AddGuide("v10", 0, "v9", "sdelI", "1"); f.AddGuide("v11", 0, "DI", "dyI", "1"); f.AddGuide("dxC1", 2, "v11", "v10", "v4"); f.AddGuide("v12", 1, "v11", "0", "v10"); f.AddGuide("dxC2", 0, "v12", "1", "v4"); f.AddGuide("adyI", 4, "dyI"); f.AddGuide("v13", 0, "adyI", "sdelI", "1"); f.AddGuide("v14", 0, "DI", "dxI", "-1"); f.AddGuide("dyC1", 2, "v14", "v13", "v4"); f.AddGuide("v15", 1, "v14", "0", "v13"); f.AddGuide("dyC2", 0, "v15", "1", "v4"); f.AddGuide("v16", 1, "x1I", "0", "dxC1"); f.AddGuide("v17", 1, "x1I", "0", "dxC2"); f.AddGuide("v18", 1, "y1I", "0", "dyC1"); f.AddGuide("v19", 1, "y1I", "0", "dyC2"); f.AddGuide("v20", 9, "v16", "v18", "0"); f.AddGuide("v21", 9, "v17", "v19", "0"); f.AddGuide("v22", 1, "v21", "0", "v20"); f.AddGuide("dxC", 3, "v22", "dxC1", "dxC2"); f.AddGuide("dyC", 3, "v22", "dyC1", "dyC2"); f.AddGuide("sdxC", 0, "dxC", "rw2", "rI"); f.AddGuide("sdyC", 0, "dyC", "rh2", "rI"); f.AddGuide("xC", 1, "hc", "sdxC", "0"); f.AddGuide("yC", 1, "vc", "sdyC", "0"); f.AddGuide("wtI", 12, "rw3", "stAng"); f.AddGuide("htI", 7, "rh3", "stAng"); f.AddGuide("dxI", 6, "rw3", "htI", "wtI"); f.AddGuide("dyI", 11, "rh3", "htI", "wtI"); f.AddGuide("xI", 1, "hc", "dxI", "0"); f.AddGuide("yI", 1, "vc", "dyI", "0"); f.AddGuide("lptAng", 1, "stAng", "0", "aAng"); f.AddGuide("wtL", 12, "rw3", "lptAng"); f.AddGuide("htL", 7, "rh3", "lptAng"); f.AddGuide("dxL", 6, "rw3", "htL", "wtL"); f.AddGuide("dyL", 11, "rh3", "htL", "wtL"); f.AddGuide("xL", 1, "hc", "dxL", "0"); f.AddGuide("yL", 1, "vc", "dyL", "0"); f.AddGuide("dxK", 7, "thh", "lptAng"); f.AddGuide("dyK", 12, "thh", "lptAng"); f.AddGuide("xK", 1, "xI", "dxK", "0"); f.AddGuide("yK", 1, "yI", "dyK", "0"); f.AddGuide("dxJ", 7, "thh", "lptAng"); f.AddGuide("dyJ", 12, "thh", "lptAng"); f.AddGuide("xJ", 1, "xI", "0", "dxJ", "0"); f.AddGuide("yJ", 1, "yI", "0", "dyJ", "0"); f.AddGuide("p1", 1, "xF", "0", "xC"); f.AddGuide("p2", 1, "yF", "0", "yC"); f.AddGuide("p3", 9, "p1", "p2", "0"); f.AddGuide("p4", 0, "p3", "1", "2"); f.AddGuide("p5", 1, "p4", "0", "thh"); f.AddGuide("xGp", 3, "p5", "xF", "xG"); f.AddGuide("yGp", 3, "p5", "yF", "yG"); f.AddGuide("xBp", 3, "p5", "xC", "xB"); f.AddGuide("yBp", 3, "p5", "yC", "yB"); f.AddGuide("en0", 5, "sdxF", "sdyF"); f.AddGuide("en1", 1, "en0", "21600000", "0"); f.AddGuide("en2", 3, "en0", "en0", "en1"); f.AddGuide("od0", 1, "en2", "0", "enAng"); f.AddGuide("od1", 1, "od0", "21600000", "0"); f.AddGuide("od2", 3, "od0", "od0", "od1"); f.AddGuide("st0", 1, "stAng", "0", "od2"); f.AddGuide("st1", 1, "st0", "21600000", "0"); f.AddGuide("st2", 3, "st0", "st0", "st1"); f.AddGuide("sw0", 1, "en2", "0", "st2"); f.AddGuide("sw1", 1, "sw0", "21600000", "0"); f.AddGuide("swAng", 3, "sw0", "sw0", "sw1"); f.AddGuide("ist0", 5, "sdxC", "sdyC"); f.AddGuide("ist1", 1, "ist0", "21600000", "0"); f.AddGuide("istAng", 3, "ist0", "ist0", "ist1"); f.AddGuide("id0", 1, "istAng", "0", "enAng"); f.AddGuide("id1", 1, "id0", "0", "21600000"); f.AddGuide("id2", 3, "id0", "id1", "id0"); f.AddGuide("ien0", 1, "stAng", "0", "id2"); f.AddGuide("ien1", 1, "ien0", "0", "21600000"); f.AddGuide("ien2", 3, "ien1", "ien1", "ien0"); f.AddGuide("isw1", 1, "ien2", "0", "istAng"); f.AddGuide("isw2", 1, "isw1", "0", "21600000"); f.AddGuide("iswAng", 3, "isw1", "isw2", "isw1"); f.AddGuide("wtE", 12, "rw1", "st2"); f.AddGuide("htE", 7, "rh1", "st2"); f.AddGuide("dxE", 6, "rw1", "htE", "wtE"); f.AddGuide("dyE", 11, "rh1", "htE", "wtE"); f.AddGuide("xE", 1, "hc", "dxE", "0"); f.AddGuide("yE", 1, "vc", "dyE", "0"); f.AddGuide("wtD", 12, "rw2", "ien2"); f.AddGuide("htD", 7, "rh2", "ien2"); f.AddGuide("dxD", 6, "rw2", "htD", "wtD"); f.AddGuide("dyD", 11, "rh2", "htD", "wtD"); f.AddGuide("xD", 1, "hc", "dxD", "0"); f.AddGuide("yD", 1, "vc", "dyD", "0"); f.AddGuide("xKp", 3, "p5", "xE", "xK"); f.AddGuide("yKp", 3, "p5", "yE", "yK"); f.AddGuide("xJp", 3, "p5", "xD", "xJ"); f.AddGuide("yJp", 3, "p5", "yD", "yJ"); f.AddGuide("aL", 1, "lptAng", "0", "cd4"); f.AddGuide("aA", 1, "ptAng", "cd4", "0"); f.AddGuide("aB", 1, "ptAng", "cd2", "0"); f.AddGuide("aJ", 1, "lptAng", "cd2", "0"); f.AddGuide("idx", 7, "rw1", "2700000"); f.AddGuide("idy", 12, "rh1", "2700000"); f.AddGuide("il", 1, "hc", "0", "idx"); f.AddGuide("ir", 1, "hc", "idx", "0"); f.AddGuide("it", 1, "vc", "0", "idy"); f.AddGuide("ib", 1, "vc", "idy", "0"); f.AddHandlePolar("adj2", "0", "maxAng", undefined, "0", "0", "xA", "yA"); f.AddHandlePolar("adj4", "0", "21599999", undefined, "0", "0", "xE", "yE"); f.AddHandlePolar(undefined, "0", "0", "adj1", "0", "maxAdj1", "xF", "yF"); f.AddHandlePolar(undefined, "0", "0", "adj5", "0", "25000", "xB", "yB"); f.AddCnx("aL", "xL", "yL"); f.AddCnx("lptAng", "xKp", "yKp"); f.AddCnx("ptAng", "xGp", "yGp"); f.AddCnx("aA", "xA", "yA"); f.AddCnx("aB", "xBp", "yBp"); f.AddCnx("aJ", "xJp", "yJp"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "xL", "yL"); f.AddPathCommand(2, "xKp", "yKp"); f.AddPathCommand(2, "xE", "yE"); f.AddPathCommand(3, "rw1", "rh1", "st2", "swAng"); f.AddPathCommand(2, "xGp", "yGp"); f.AddPathCommand(2, "xA", "yA"); f.AddPathCommand(2, "xBp", "yBp"); f.AddPathCommand(2, "xC", "yC"); f.AddPathCommand(3, "rw2", "rh2", "istAng", "iswAng"); f.AddPathCommand(2, "xJp", "yJp"); f.AddPathCommand(6); break; case "leftRightRibbon": f.AddAdj("adj1", 15, "50000"); f.AddAdj("adj2", 15, "50000"); f.AddAdj("adj3", 15, "16667"); f.AddGuide("a3", 10, "0", "adj3", "33333"); f.AddGuide("maxAdj1", 1, "100000", "0", "a3"); f.AddGuide("a1", 10, "0", "adj1", "maxAdj1"); f.AddGuide("w1", 1, "wd2", "0", "wd32"); f.AddGuide("maxAdj2", 0, "100000", "w1", "ss"); f.AddGuide("a2", 10, "0", "adj2", "maxAdj2"); f.AddGuide("x1", 0, "ss", "a2", "100000"); f.AddGuide("x4", 1, "r", "0", "x1"); f.AddGuide("dy1", 0, "h", "a1", "200000"); f.AddGuide("dy2", 0, "h", "a3", "-200000"); f.AddGuide("ly1", 1, "vc", "dy2", "dy1"); f.AddGuide("ry4", 1, "vc", "dy1", "dy2"); f.AddGuide("ly2", 1, "ly1", "dy1", "0"); f.AddGuide("ry3", 1, "b", "0", "ly2"); f.AddGuide("ly4", 0, "ly2", "2", "1"); f.AddGuide("ry1", 1, "b", "0", "ly4"); f.AddGuide("ly3", 1, "ly4", "0", "ly1"); f.AddGuide("ry2", 1, "b", "0", "ly3"); f.AddGuide("hR", 0, "a3", "ss", "400000"); f.AddGuide("x2", 1, "hc", "0", "wd32"); f.AddGuide("x3", 1, "hc", "wd32", "0"); f.AddGuide("y1", 1, "ly1", "hR", "0"); f.AddGuide("y2", 1, "ry2", "0", "hR"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "maxAdj1", "x4", "ry2"); f.AddHandleXY("adj2", "0", "maxAdj2", undefined, "0", "0", "x1", "t"); f.AddHandleXY(undefined, "0", "0", "adj3", "0", "33333", "x3", "ry2"); f.AddCnx("0", "r", "ry3"); f.AddCnx("cd4", "x4", "b"); f.AddCnx("cd4", "x1", "ly4"); f.AddCnx("cd2", "l", "ly2"); f.AddCnx("_3cd4", "x1", "t"); f.AddCnx("_3cd4", "x4", "ry1"); f.AddRect("x1", "ly1", "x4", "ry4"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "ly2"); f.AddPathCommand(2, "x1", "t"); f.AddPathCommand(2, "x1", "ly1"); f.AddPathCommand(2, "hc", "ly1"); f.AddPathCommand(3, "wd32", "hR", "_3cd4", "cd2"); f.AddPathCommand(3, "wd32", "hR", "_3cd4", "-10800000"); f.AddPathCommand(2, "x4", "ry2"); f.AddPathCommand(2, "x4", "ry1"); f.AddPathCommand(2, "r", "ry3"); f.AddPathCommand(2, "x4", "b"); f.AddPathCommand(2, "x4", "ry4"); f.AddPathCommand(2, "hc", "ry4"); f.AddPathCommand(3, "wd32", "hR", "cd4", "cd4"); f.AddPathCommand(2, "x2", "ly3"); f.AddPathCommand(2, "x1", "ly3"); f.AddPathCommand(2, "x1", "ly4"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darkenLess", false, undefined, undefined); f.AddPathCommand(1, "x3", "y1"); f.AddPathCommand(3, "wd32", "hR", "0", "cd4"); f.AddPathCommand(3, "wd32", "hR", "_3cd4", "-10800000"); f.AddPathCommand(2, "x3", "ry2"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "ly2"); f.AddPathCommand(2, "x1", "t"); f.AddPathCommand(2, "x1", "ly1"); f.AddPathCommand(2, "hc", "ly1"); f.AddPathCommand(3, "wd32", "hR", "_3cd4", "cd2"); f.AddPathCommand(3, "wd32", "hR", "_3cd4", "-10800000"); f.AddPathCommand(2, "x4", "ry2"); f.AddPathCommand(2, "x4", "ry1"); f.AddPathCommand(2, "r", "ry3"); f.AddPathCommand(2, "x4", "b"); f.AddPathCommand(2, "x4", "ry4"); f.AddPathCommand(2, "hc", "ry4"); f.AddPathCommand(3, "wd32", "hR", "cd4", "cd4"); f.AddPathCommand(2, "x2", "ly3"); f.AddPathCommand(2, "x1", "ly3"); f.AddPathCommand(2, "x1", "ly4"); f.AddPathCommand(6); f.AddPathCommand(1, "x3", "y1"); f.AddPathCommand(2, "x3", "ry2"); f.AddPathCommand(1, "x2", "y2"); f.AddPathCommand(2, "x2", "ly3"); break; case "leftRightUpArrow": f.AddAdj("adj1", 15, "25000"); f.AddAdj("adj2", 15, "25000"); f.AddAdj("adj3", 15, "25000"); f.AddGuide("a2", 10, "0", "adj2", "50000"); f.AddGuide("maxAdj1", 0, "a2", "2", "1"); f.AddGuide("a1", 10, "0", "adj1", "maxAdj1"); f.AddGuide("q1", 1, "100000", "0", "maxAdj1"); f.AddGuide("maxAdj3", 0, "q1", "1", "2"); f.AddGuide("a3", 10, "0", "adj3", "maxAdj3"); f.AddGuide("x1", 0, "ss", "a3", "100000"); f.AddGuide("dx2", 0, "ss", "a2", "100000"); f.AddGuide("x2", 1, "hc", "0", "dx2"); f.AddGuide("x5", 1, "hc", "dx2", "0"); f.AddGuide("dx3", 0, "ss", "a1", "200000"); f.AddGuide("x3", 1, "hc", "0", "dx3"); f.AddGuide("x4", 1, "hc", "dx3", "0"); f.AddGuide("x6", 1, "r", "0", "x1"); f.AddGuide("dy2", 0, "ss", "a2", "50000"); f.AddGuide("y2", 1, "b", "0", "dy2"); f.AddGuide("y4", 1, "b", "0", "dx2"); f.AddGuide("y3", 1, "y4", "0", "dx3"); f.AddGuide("y5", 1, "y4", "dx3", "0"); f.AddGuide("il", 0, "dx3", "x1", "dx2"); f.AddGuide("ir", 1, "r", "0", "il"); f.AddHandleXY("adj1", "0", "maxAdj1", undefined, "0", "0", "x3", "x1"); f.AddHandleXY("adj2", "0", "50000", undefined, "0", "0", "x2", "t"); f.AddHandleXY(undefined, "0", "0", "adj3", "0", "maxAdj3", "r", "x1"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "y4"); f.AddCnx("cd4", "hc", "y5"); f.AddCnx("0", "r", "y4"); f.AddRect("il", "y3", "ir", "y5"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "y4"); f.AddPathCommand(2, "x1", "y2"); f.AddPathCommand(2, "x1", "y3"); f.AddPathCommand(2, "x3", "y3"); f.AddPathCommand(2, "x3", "x1"); f.AddPathCommand(2, "x2", "x1"); f.AddPathCommand(2, "hc", "t"); f.AddPathCommand(2, "x5", "x1"); f.AddPathCommand(2, "x4", "x1"); f.AddPathCommand(2, "x4", "y3"); f.AddPathCommand(2, "x6", "y3"); f.AddPathCommand(2, "x6", "y2"); f.AddPathCommand(2, "r", "y4"); f.AddPathCommand(2, "x6", "b"); f.AddPathCommand(2, "x6", "y5"); f.AddPathCommand(2, "x1", "y5"); f.AddPathCommand(2, "x1", "b"); f.AddPathCommand(6); break; case "leftUpArrow": f.AddAdj("adj1", 15, "25000"); f.AddAdj("adj2", 15, "25000"); f.AddAdj("adj3", 15, "25000"); f.AddGuide("a2", 10, "0", "adj2", "50000"); f.AddGuide("maxAdj1", 0, "a2", "2", "1"); f.AddGuide("a1", 10, "0", "adj1", "maxAdj1"); f.AddGuide("maxAdj3", 1, "100000", "0", "maxAdj1"); f.AddGuide("a3", 10, "0", "adj3", "maxAdj3"); f.AddGuide("x1", 0, "ss", "a3", "100000"); f.AddGuide("dx2", 0, "ss", "a2", "50000"); f.AddGuide("x2", 1, "r", "0", "dx2"); f.AddGuide("y2", 1, "b", "0", "dx2"); f.AddGuide("dx4", 0, "ss", "a2", "100000"); f.AddGuide("x4", 1, "r", "0", "dx4"); f.AddGuide("y4", 1, "b", "0", "dx4"); f.AddGuide("dx3", 0, "ss", "a1", "200000"); f.AddGuide("x3", 1, "x4", "0", "dx3"); f.AddGuide("x5", 1, "x4", "dx3", "0"); f.AddGuide("y3", 1, "y4", "0", "dx3"); f.AddGuide("y5", 1, "y4", "dx3", "0"); f.AddGuide("il", 0, "dx3", "x1", "dx4"); f.AddGuide("cx1", 2, "x1", "x5", "2"); f.AddGuide("cy1", 2, "x1", "y5", "2"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "maxAdj1", "x3", "y3"); f.AddHandleXY("adj2", "0", "50000", undefined, "0", "0", "x2", "t"); f.AddHandleXY(undefined, "0", "0", "adj3", "0", "maxAdj3", "x3", "x1"); f.AddCnx("_3cd4", "x4", "t"); f.AddCnx("cd2", "x2", "x1"); f.AddCnx("_3cd4", "x1", "y2"); f.AddCnx("cd2", "l", "y4"); f.AddCnx("cd4", "x1", "b"); f.AddCnx("cd4", "cx1", "y5"); f.AddCnx("0", "x5", "cy1"); f.AddCnx("0", "r", "x1"); f.AddRect("il", "y3", "x4", "y5"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "y4"); f.AddPathCommand(2, "x1", "y2"); f.AddPathCommand(2, "x1", "y3"); f.AddPathCommand(2, "x3", "y3"); f.AddPathCommand(2, "x3", "x1"); f.AddPathCommand(2, "x2", "x1"); f.AddPathCommand(2, "x4", "t"); f.AddPathCommand(2, "r", "x1"); f.AddPathCommand(2, "x5", "x1"); f.AddPathCommand(2, "x5", "y5"); f.AddPathCommand(2, "x1", "y5"); f.AddPathCommand(2, "x1", "b"); f.AddPathCommand(6); break; case "lightningBolt": f.AddGuide("x1", 0, "w", "5022", "21600"); f.AddGuide("x3", 0, "w", "8472", "21600"); f.AddGuide("x4", 0, "w", "8757", "21600"); f.AddGuide("x5", 0, "w", "10012", "21600"); f.AddGuide("x8", 0, "w", "12860", "21600"); f.AddGuide("x9", 0, "w", "13917", "21600"); f.AddGuide("x11", 0, "w", "16577", "21600"); f.AddGuide("y1", 0, "h", "3890", "21600"); f.AddGuide("y2", 0, "h", "6080", "21600"); f.AddGuide("y4", 0, "h", "7437", "21600"); f.AddGuide("y6", 0, "h", "9705", "21600"); f.AddGuide("y7", 0, "h", "12007", "21600"); f.AddGuide("y10", 0, "h", "14277", "21600"); f.AddGuide("y11", 0, "h", "14915", "21600"); f.AddCnx("_3cd4", "x3", "t"); f.AddCnx("_3cd4", "l", "y1"); f.AddCnx("cd2", "x1", "y6"); f.AddCnx("cd2", "x5", "y11"); f.AddCnx("cd4", "r", "b"); f.AddCnx("0", "x11", "y7"); f.AddCnx("0", "x8", "y2"); f.AddRect("x4", "y4", "x9", "y10"); f.AddPathCommand(0, undefined, undefined, undefined, 21600, 21600); f.AddPathCommand(1, "8472", "0"); f.AddPathCommand(2, "12860", "6080"); f.AddPathCommand(2, "11050", "6797"); f.AddPathCommand(2, "16577", "12007"); f.AddPathCommand(2, "14767", "12877"); f.AddPathCommand(2, "21600", "21600"); f.AddPathCommand(2, "10012", "14915"); f.AddPathCommand(2, "12222", "13987"); f.AddPathCommand(2, "5022", "9705"); f.AddPathCommand(2, "7602", "8382"); f.AddPathCommand(2, "0", "3890"); f.AddPathCommand(6); break; case "line": f.AddCnx("cd4", "l", "t"); f.AddCnx("_3cd4", "r", "b"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "b"); break; case "lineInv": f.AddCnx("cd4", "l", "b"); f.AddCnx("_3cd4", "r", "t"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "b"); f.AddPathCommand(2, "r", "t"); break; case "mathDivide": f.AddAdj("adj1", 15, "23520"); f.AddAdj("adj2", 15, "5880"); f.AddAdj("adj3", 15, "11760"); f.AddGuide("a1", 10, "1000", "adj1", "36745"); f.AddGuide("ma1", 1, "0", "0", "a1"); f.AddGuide("ma3h", 2, "73490", "ma1", "4"); f.AddGuide("ma3w", 0, "36745", "w", "h"); f.AddGuide("maxAdj3", 16, "ma3h", "ma3w"); f.AddGuide("a3", 10, "1000", "adj3", "maxAdj3"); f.AddGuide("m4a3", 0, "-4", "a3", "1"); f.AddGuide("maxAdj2", 1, "73490", "m4a3", "a1"); f.AddGuide("a2", 10, "0", "adj2", "maxAdj2"); f.AddGuide("dy1", 0, "h", "a1", "200000"); f.AddGuide("yg", 0, "h", "a2", "100000"); f.AddGuide("rad", 0, "h", "a3", "100000"); f.AddGuide("dx1", 0, "w", "73490", "200000"); f.AddGuide("y3", 1, "vc", "0", "dy1"); f.AddGuide("y4", 1, "vc", "dy1", "0"); f.AddGuide("a", 1, "yg", "rad", "0"); f.AddGuide("y2", 1, "y3", "0", "a"); f.AddGuide("y1", 1, "y2", "0", "rad"); f.AddGuide("y5", 1, "b", "0", "y1"); f.AddGuide("x1", 1, "hc", "0", "dx1"); f.AddGuide("x3", 1, "hc", "dx1", "0"); f.AddGuide("x2", 1, "hc", "0", "rad"); f.AddHandleXY(undefined, "0", "0", "adj1", "1000", "36745", "l", "y3"); f.AddHandleXY(undefined, "0", "0", "adj2", "0", "maxAdj2", "r", "y2"); f.AddHandleXY("adj3", "1000", "maxAdj3", undefined, "0", "0", "x2", "t"); f.AddCnx("0", "x3", "vc"); f.AddCnx("cd4", "hc", "y5"); f.AddCnx("cd2", "x1", "vc"); f.AddCnx("_3cd4", "hc", "y1"); f.AddRect("x1", "y3", "x3", "y4"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "hc", "y1"); f.AddPathCommand(3, "rad", "rad", "_3cd4", "21600000"); f.AddPathCommand(6); f.AddPathCommand(1, "hc", "y5"); f.AddPathCommand(3, "rad", "rad", "cd4", "21600000"); f.AddPathCommand(6); f.AddPathCommand(1, "x1", "y3"); f.AddPathCommand(2, "x3", "y3"); f.AddPathCommand(2, "x3", "y4"); f.AddPathCommand(2, "x1", "y4"); f.AddPathCommand(6); break; case "mathEqual": f.AddAdj("adj1", 15, "23520"); f.AddAdj("adj2", 15, "11760"); f.AddGuide("a1", 10, "0", "adj1", "36745"); f.AddGuide("2a1", 0, "a1", "2", "1"); f.AddGuide("mAdj2", 1, "100000", "0", "2a1"); f.AddGuide("a2", 10, "0", "adj2", "mAdj2"); f.AddGuide("dy1", 0, "h", "a1", "100000"); f.AddGuide("dy2", 0, "h", "a2", "200000"); f.AddGuide("dx1", 0, "w", "73490", "200000"); f.AddGuide("y2", 1, "vc", "0", "dy2"); f.AddGuide("y3", 1, "vc", "dy2", "0"); f.AddGuide("y1", 1, "y2", "0", "dy1"); f.AddGuide("y4", 1, "y3", "dy1", "0"); f.AddGuide("x1", 1, "hc", "0", "dx1"); f.AddGuide("x2", 1, "hc", "dx1", "0"); f.AddGuide("yC1", 2, "y1", "y2", "2"); f.AddGuide("yC2", 2, "y3", "y4", "2"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "36745", "l", "y1"); f.AddHandleXY(undefined, "0", "0", "adj2", "0", "mAdj2", "r", "y2"); f.AddCnx("0", "x2", "yC1"); f.AddCnx("0", "x2", "yC2"); f.AddCnx("cd4", "hc", "y4"); f.AddCnx("cd2", "x1", "yC1"); f.AddCnx("cd2", "x1", "yC2"); f.AddCnx("_3cd4", "hc", "y1"); f.AddRect("x1", "y1", "x2", "y4"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y1"); f.AddPathCommand(2, "x2", "y1"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "x1", "y2"); f.AddPathCommand(6); f.AddPathCommand(1, "x1", "y3"); f.AddPathCommand(2, "x2", "y3"); f.AddPathCommand(2, "x2", "y4"); f.AddPathCommand(2, "x1", "y4"); f.AddPathCommand(6); break; case "mathMinus": f.AddAdj("adj1", 15, "23520"); f.AddGuide("a1", 10, "0", "adj1", "100000"); f.AddGuide("dy1", 0, "h", "a1", "200000"); f.AddGuide("dx1", 0, "w", "73490", "200000"); f.AddGuide("y1", 1, "vc", "0", "dy1"); f.AddGuide("y2", 1, "vc", "dy1", "0"); f.AddGuide("x1", 1, "hc", "0", "dx1"); f.AddGuide("x2", 1, "hc", "dx1", "0"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "100000", "l", "y1"); f.AddCnx("0", "x2", "vc"); f.AddCnx("cd4", "hc", "y2"); f.AddCnx("cd2", "x1", "vc"); f.AddCnx("_3cd4", "hc", "y1"); f.AddRect("x1", "y1", "x2", "y2"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y1"); f.AddPathCommand(2, "x2", "y1"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "x1", "y2"); f.AddPathCommand(6); break; case "mathMultiply": f.AddAdj("adj1", 15, "23520"); f.AddGuide("a1", 10, "0", "adj1", "51965"); f.AddGuide("th", 0, "ss", "a1", "100000"); f.AddGuide("a", 5, "w", "h"); f.AddGuide("sa", 12, "1", "a"); f.AddGuide("ca", 7, "1", "a"); f.AddGuide("ta", 14, "1", "a"); f.AddGuide("dl", 9, "w", "h", "0"); f.AddGuide("rw", 0, "dl", "51965", "100000"); f.AddGuide("lM", 1, "dl", "0", "rw"); f.AddGuide("xM", 0, "ca", "lM", "2"); f.AddGuide("yM", 0, "sa", "lM", "2"); f.AddGuide("dxAM", 0, "sa", "th", "2"); f.AddGuide("dyAM", 0, "ca", "th", "2"); f.AddGuide("xA", 1, "xM", "0", "dxAM"); f.AddGuide("yA", 1, "yM", "dyAM", "0"); f.AddGuide("xB", 1, "xM", "dxAM", "0"); f.AddGuide("yB", 1, "yM", "0", "dyAM"); f.AddGuide("xBC", 1, "hc", "0", "xB"); f.AddGuide("yBC", 0, "xBC", "ta", "1"); f.AddGuide("yC", 1, "yBC", "yB", "0"); f.AddGuide("xD", 1, "r", "0", "xB"); f.AddGuide("xE", 1, "r", "0", "xA"); f.AddGuide("yFE", 1, "vc", "0", "yA"); f.AddGuide("xFE", 0, "yFE", "1", "ta"); f.AddGuide("xF", 1, "xE", "0", "xFE"); f.AddGuide("xL", 1, "xA", "xFE", "0"); f.AddGuide("yG", 1, "b", "0", "yA"); f.AddGuide("yH", 1, "b", "0", "yB"); f.AddGuide("yI", 1, "b", "0", "yC"); f.AddGuide("xC2", 1, "r", "0", "xM"); f.AddGuide("yC3", 1, "b", "0", "yM"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "51965", "l", "th"); f.AddCnx("cd2", "xM", "yM"); f.AddCnx("_3cd4", "xC2", "yM"); f.AddCnx("0", "xC2", "yC3"); f.AddCnx("cd4", "xM", "yC3"); f.AddRect("xA", "yB", "xE", "yH"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "xA", "yA"); f.AddPathCommand(2, "xB", "yB"); f.AddPathCommand(2, "hc", "yC"); f.AddPathCommand(2, "xD", "yB"); f.AddPathCommand(2, "xE", "yA"); f.AddPathCommand(2, "xF", "vc"); f.AddPathCommand(2, "xE", "yG"); f.AddPathCommand(2, "xD", "yH"); f.AddPathCommand(2, "hc", "yI"); f.AddPathCommand(2, "xB", "yH"); f.AddPathCommand(2, "xA", "yG"); f.AddPathCommand(2, "xL", "vc"); f.AddPathCommand(6); break; case "mathNotEqual": f.AddAdj("adj1", 15, "23520"); f.AddAdj("adj2", 15, "6600000"); f.AddAdj("adj3", 15, "11760"); f.AddGuide("a1", 10, "0", "adj1", "50000"); f.AddGuide("crAng", 10, "4200000", "adj2", "6600000"); f.AddGuide("2a1", 0, "a1", "2", "1"); f.AddGuide("maxAdj3", 1, "100000", "0", "2a1"); f.AddGuide("a3", 10, "0", "adj3", "maxAdj3"); f.AddGuide("dy1", 0, "h", "a1", "100000"); f.AddGuide("dy2", 0, "h", "a3", "200000"); f.AddGuide("dx1", 0, "w", "73490", "200000"); f.AddGuide("x1", 1, "hc", "0", "dx1"); f.AddGuide("x8", 1, "hc", "dx1", "0"); f.AddGuide("y2", 1, "vc", "0", "dy2"); f.AddGuide("y3", 1, "vc", "dy2", "0"); f.AddGuide("y1", 1, "y2", "0", "dy1"); f.AddGuide("y4", 1, "y3", "dy1", "0"); f.AddGuide("cadj2", 1, "crAng", "0", "cd4"); f.AddGuide("xadj2", 14, "hd2", "cadj2"); f.AddGuide("len", 9, "xadj2", "hd2", "0"); f.AddGuide("bhw", 0, "len", "dy1", "hd2"); f.AddGuide("bhw2", 0, "bhw", "1", "2"); f.AddGuide("x7", 1, "hc", "xadj2", "bhw2"); f.AddGuide("dx67", 0, "xadj2", "y1", "hd2"); f.AddGuide("x6", 1, "x7", "0", "dx67"); f.AddGuide("dx57", 0, "xadj2", "y2", "hd2"); f.AddGuide("x5", 1, "x7", "0", "dx57"); f.AddGuide("dx47", 0, "xadj2", "y3", "hd2"); f.AddGuide("x4", 1, "x7", "0", "dx47"); f.AddGuide("dx37", 0, "xadj2", "y4", "hd2"); f.AddGuide("x3", 1, "x7", "0", "dx37"); f.AddGuide("dx27", 0, "xadj2", "2", "1"); f.AddGuide("x2", 1, "x7", "0", "dx27"); f.AddGuide("rx7", 1, "x7", "bhw", "0"); f.AddGuide("rx6", 1, "x6", "bhw", "0"); f.AddGuide("rx5", 1, "x5", "bhw", "0"); f.AddGuide("rx4", 1, "x4", "bhw", "0"); f.AddGuide("rx3", 1, "x3", "bhw", "0"); f.AddGuide("rx2", 1, "x2", "bhw", "0"); f.AddGuide("dx7", 0, "dy1", "hd2", "len"); f.AddGuide("rxt", 1, "x7", "dx7", "0"); f.AddGuide("lxt", 1, "rx7", "0", "dx7"); f.AddGuide("rx", 3, "cadj2", "rxt", "rx7"); f.AddGuide("lx", 3, "cadj2", "x7", "lxt"); f.AddGuide("dy3", 0, "dy1", "xadj2", "len"); f.AddGuide("dy4", 1, "0", "0", "dy3"); f.AddGuide("ry", 3, "cadj2", "dy3", "t"); f.AddGuide("ly", 3, "cadj2", "t", "dy4"); f.AddGuide("dlx", 1, "w", "0", "rx"); f.AddGuide("drx", 1, "w", "0", "lx"); f.AddGuide("dly", 1, "h", "0", "ry"); f.AddGuide("dry", 1, "h", "0", "ly"); f.AddGuide("xC1", 2, "rx", "lx", "2"); f.AddGuide("xC2", 2, "drx", "dlx", "2"); f.AddGuide("yC1", 2, "ry", "ly", "2"); f.AddGuide("yC2", 2, "y1", "y2", "2"); f.AddGuide("yC3", 2, "y3", "y4", "2"); f.AddGuide("yC4", 2, "dry", "dly", "2"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "50000", "l", "y1"); f.AddHandlePolar("adj2", "4200000", "6600000", undefined, "0", "0", "lx", "t"); f.AddHandleXY(undefined, "0", "0", "adj3", "0", "maxAdj3", "r", "y2"); f.AddCnx("0", "x8", "yC2"); f.AddCnx("0", "x8", "yC3"); f.AddCnx("cd4", "xC2", "yC4"); f.AddCnx("cd2", "x1", "yC2"); f.AddCnx("cd2", "x1", "yC3"); f.AddCnx("_3cd4", "xC1", "yC1"); f.AddRect("x1", "y1", "x8", "y4"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y1"); f.AddPathCommand(2, "x6", "y1"); f.AddPathCommand(2, "lx", "ly"); f.AddPathCommand(2, "rx", "ry"); f.AddPathCommand(2, "rx6", "y1"); f.AddPathCommand(2, "x8", "y1"); f.AddPathCommand(2, "x8", "y2"); f.AddPathCommand(2, "rx5", "y2"); f.AddPathCommand(2, "rx4", "y3"); f.AddPathCommand(2, "x8", "y3"); f.AddPathCommand(2, "x8", "y4"); f.AddPathCommand(2, "rx3", "y4"); f.AddPathCommand(2, "drx", "dry"); f.AddPathCommand(2, "dlx", "dly"); f.AddPathCommand(2, "x3", "y4"); f.AddPathCommand(2, "x1", "y4"); f.AddPathCommand(2, "x1", "y3"); f.AddPathCommand(2, "x4", "y3"); f.AddPathCommand(2, "x5", "y2"); f.AddPathCommand(2, "x1", "y2"); f.AddPathCommand(6); break; case "mathPlus": f.AddAdj("adj1", 15, "23520"); f.AddGuide("a1", 10, "0", "adj1", "73490"); f.AddGuide("dx1", 0, "w", "73490", "200000"); f.AddGuide("dy1", 0, "h", "73490", "200000"); f.AddGuide("dx2", 0, "ss", "a1", "200000"); f.AddGuide("x1", 1, "hc", "0", "dx1"); f.AddGuide("x2", 1, "hc", "0", "dx2"); f.AddGuide("x3", 1, "hc", "dx2", "0"); f.AddGuide("x4", 1, "hc", "dx1", "0"); f.AddGuide("y1", 1, "vc", "0", "dy1"); f.AddGuide("y2", 1, "vc", "0", "dx2"); f.AddGuide("y3", 1, "vc", "dx2", "0"); f.AddGuide("y4", 1, "vc", "dy1", "0"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "73490", "l", "y2"); f.AddCnx("0", "x4", "vc"); f.AddCnx("cd4", "hc", "y4"); f.AddCnx("cd2", "x1", "vc"); f.AddCnx("_3cd4", "hc", "y1"); f.AddRect("x1", "y2", "x4", "y3"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y2"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "x2", "y1"); f.AddPathCommand(2, "x3", "y1"); f.AddPathCommand(2, "x3", "y2"); f.AddPathCommand(2, "x4", "y2"); f.AddPathCommand(2, "x4", "y3"); f.AddPathCommand(2, "x3", "y3"); f.AddPathCommand(2, "x3", "y4"); f.AddPathCommand(2, "x2", "y4"); f.AddPathCommand(2, "x2", "y3"); f.AddPathCommand(2, "x1", "y3"); f.AddPathCommand(6); break; case "moon": f.AddAdj("adj", 15, "50000"); f.AddGuide("a", 10, "0", "adj", "875000"); f.AddGuide("g0", 0, "ss", "a", "100000"); f.AddGuide("g0w", 0, "g0", "w", "ss"); f.AddGuide("g1", 1, "ss", "0", "g0"); f.AddGuide("g2", 0, "g0", "g0", "g1"); f.AddGuide("g3", 0, "ss", "ss", "g1"); f.AddGuide("g4", 0, "g3", "2", "1"); f.AddGuide("g5", 1, "g4", "0", "g2"); f.AddGuide("g6", 1, "g5", "0", "g0"); f.AddGuide("g6w", 0, "g6", "w", "ss"); f.AddGuide("g7", 0, "g5", "1", "2"); f.AddGuide("g8", 1, "g7", "0", "g0"); f.AddGuide("dy1", 0, "g8", "hd2", "ss"); f.AddGuide("g10h", 1, "vc", "0", "dy1"); f.AddGuide("g11h", 1, "vc", "dy1", "0"); f.AddGuide("g12", 0, "g0", "9598", "32768"); f.AddGuide("g12w", 0, "g12", "w", "ss"); f.AddGuide("g13", 1, "ss", "0", "g12"); f.AddGuide("q1", 0, "ss", "ss", "1"); f.AddGuide("q2", 0, "g13", "g13", "1"); f.AddGuide("q3", 1, "q1", "0", "q2"); f.AddGuide("q4", 13, "q3"); f.AddGuide("dy4", 0, "q4", "hd2", "ss"); f.AddGuide("g15h", 1, "vc", "0", "dy4"); f.AddGuide("g16h", 1, "vc", "dy4", "0"); f.AddGuide("g17w", 1, "g6w", "0", "g0w"); f.AddGuide("g18w", 0, "g17w", "1", "2"); f.AddGuide("dx2p", 1, "g0w", "g18w", "w"); f.AddGuide("dx2", 0, "dx2p", "-1", "1"); f.AddGuide("dy2", 0, "hd2", "-1", "1"); f.AddGuide("stAng1", 5, "dx2", "dy2"); f.AddGuide("enAngp1", 5, "dx2", "hd2"); f.AddGuide("enAng1", 1, "enAngp1", "0", "21600000"); f.AddGuide("swAng1", 1, "enAng1", "0", "stAng1"); f.AddHandleXY("adj", "0", "87500", undefined, "0", "0", "g0w", "vc"); f.AddCnx("_3cd4", "r", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "r", "b"); f.AddCnx("0", "g0w", "vc"); f.AddRect("g12w", "g15h", "g0w", "g16h"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "r", "b"); f.AddPathCommand(3, "w", "hd2", "cd4", "cd2"); f.AddPathCommand(3, "g18w", "dy1", "stAng1", "swAng1"); f.AddPathCommand(6); break; case "nonIsoscelesTrapezoid": f.AddAdj("adj1", 15, "25000"); f.AddAdj("adj2", 15, "25000"); f.AddGuide("maxAdj", 0, "50000", "w", "ss"); f.AddGuide("a1", 10, "0", "adj1", "maxAdj"); f.AddGuide("a2", 10, "0", "adj2", "maxAdj"); f.AddGuide("x1", 0, "ss", "a1", "200000"); f.AddGuide("x2", 0, "ss", "a1", "100000"); f.AddGuide("dx3", 0, "ss", "a2", "100000"); f.AddGuide("x3", 1, "r", "0", "dx3"); f.AddGuide("x4", 2, "r", "x3", "2"); f.AddGuide("il", 0, "wd3", "a1", "maxAdj"); f.AddGuide("adjm", 8, "a1", "a2"); f.AddGuide("it", 0, "hd3", "adjm", "maxAdj"); f.AddGuide("irt", 0, "wd3", "a2", "maxAdj"); f.AddGuide("ir", 1, "r", "0", "irt"); f.AddHandleXY("adj1", "0", "maxAdj", undefined, "0", "0", "x2", "t"); f.AddHandleXY("adj2", "0", "maxAdj", undefined, "0", "0", "x3", "t"); f.AddCnx("0", "x4", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "x1", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("il", "it", "ir", "b"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "b"); f.AddPathCommand(2, "x2", "t"); f.AddPathCommand(2, "x3", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(6); break; case "noSmoking": f.AddAdj("adj", 15, "18750"); f.AddGuide("a", 10, "0", "adj", "50000"); f.AddGuide("dr", 0, "ss", "a", "100000"); f.AddGuide("iwd2", 1, "wd2", "0", "dr"); f.AddGuide("ihd2", 1, "hd2", "0", "dr"); f.AddGuide("ang", 5, "w", "h"); f.AddGuide("ct", 7, "ihd2", "ang"); f.AddGuide("st", 12, "iwd2", "ang"); f.AddGuide("m", 9, "ct", "st", "0"); f.AddGuide("n", 0, "iwd2", "ihd2", "m"); f.AddGuide("drd2", 0, "dr", "1", "2"); f.AddGuide("dang", 5, "n", "drd2"); f.AddGuide("2dang", 0, "dang", "2", "1"); f.AddGuide("swAng", 1, "-10800000", "2dang", "0"); f.AddGuide("t3", 5, "w", "h"); f.AddGuide("stAng1", 1, "t3", "0", "dang"); f.AddGuide("stAng2", 1, "stAng1", "0", "cd2"); f.AddGuide("ct1", 7, "ihd2", "stAng1"); f.AddGuide("st1", 12, "iwd2", "stAng1"); f.AddGuide("m1", 9, "ct1", "st1", "0"); f.AddGuide("n1", 0, "iwd2", "ihd2", "m1"); f.AddGuide("dx1", 7, "n1", "stAng1"); f.AddGuide("dy1", 12, "n1", "stAng1"); f.AddGuide("x1", 1, "hc", "dx1", "0"); f.AddGuide("y1", 1, "vc", "dy1", "0"); f.AddGuide("x2", 1, "hc", "0", "dx1"); f.AddGuide("y2", 1, "vc", "0", "dy1"); f.AddGuide("idx", 7, "wd2", "2700000"); f.AddGuide("idy", 12, "hd2", "2700000"); f.AddGuide("il", 1, "hc", "0", "idx"); f.AddGuide("ir", 1, "hc", "idx", "0"); f.AddGuide("it", 1, "vc", "0", "idy"); f.AddGuide("ib", 1, "vc", "idy", "0"); f.AddHandlePolar(undefined, "0", "0", "adj", "0", "50000", "dr", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("_3cd4", "il", "it"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "il", "ib"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd4", "ir", "ib"); f.AddCnx("0", "r", "vc"); f.AddCnx("_3cd4", "ir", "it"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y1"); f.AddPathCommand(3, "iwd2", "ihd2", "stAng1", "swAng"); f.AddPathCommand(2, "x1", "y1"); f.AddPathCommand(1, "x2", "y2"); f.AddPathCommand(3, "iwd2", "ihd2", "stAng2", "swAng"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(3, "wd2", "hd2", "cd2", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "_3cd4", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "0", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "cd4", "cd4"); f.AddPathCommand(6); break; case "notchedRightArrow": f.AddAdj("adj1", 15, "50000"); f.AddAdj("adj2", 15, "50000"); f.AddGuide("maxAdj2", 0, "100000", "w", "ss"); f.AddGuide("a1", 10, "0", "adj1", "100000"); f.AddGuide("a2", 10, "0", "adj2", "maxAdj2"); f.AddGuide("dx2", 0, "ss", "a2", "100000"); f.AddGuide("x2", 1, "r", "0", "dx2"); f.AddGuide("dy1", 0, "h", "a1", "200000"); f.AddGuide("y1", 1, "vc", "0", "dy1"); f.AddGuide("y2", 1, "vc", "dy1", "0"); f.AddGuide("x1", 0, "dy1", "dx2", "hd2"); f.AddGuide("x3", 1, "r", "0", "x1"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "100000", "r", "y1"); f.AddHandleXY("adj2", "0", "maxAdj2", undefined, "0", "0", "x2", "t"); f.AddCnx("_3cd4", "x2", "t"); f.AddCnx("cd2", "x1", "vc"); f.AddCnx("cd4", "x2", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("x1", "y1", "x3", "y2"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "y1"); f.AddPathCommand(2, "x2", "y1"); f.AddPathCommand(2, "x2", "t"); f.AddPathCommand(2, "r", "vc"); f.AddPathCommand(2, "x2", "b"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "l", "y2"); f.AddPathCommand(2, "x1", "vc"); f.AddPathCommand(6); break; case "octagon": f.AddAdj("adj", 15, "29289"); f.AddGuide("a", 10, "0", "adj", "50000"); f.AddGuide("x1", 0, "ss", "a", "100000"); f.AddGuide("x2", 1, "r", "0", "x1"); f.AddGuide("y2", 1, "b", "0", "x1"); f.AddGuide("il", 0, "x1", "1", "2"); f.AddGuide("ir", 1, "r", "0", "il"); f.AddGuide("ib", 1, "b", "0", "il"); f.AddHandleXY("adj", "0", "50000", undefined, "0", "0", "x1", "t"); f.AddCnx("0", "r", "x1"); f.AddCnx("0", "r", "y2"); f.AddCnx("cd4", "x2", "b"); f.AddCnx("cd4", "x1", "b"); f.AddCnx("cd2", "l", "y2"); f.AddCnx("cd2", "l", "x1"); f.AddCnx("_3cd4", "x1", "t"); f.AddCnx("_3cd4", "x2", "t"); f.AddRect("il", "il", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "x1"); f.AddPathCommand(2, "x1", "t"); f.AddPathCommand(2, "x2", "t"); f.AddPathCommand(2, "r", "x1"); f.AddPathCommand(2, "r", "y2"); f.AddPathCommand(2, "x2", "b"); f.AddPathCommand(2, "x1", "b"); f.AddPathCommand(2, "l", "y2"); f.AddPathCommand(6); break; case "parallelogram": f.AddAdj("adj", 15, "25000"); f.AddGuide("maxAdj", 0, "100000", "w", "ss"); f.AddGuide("a", 10, "0", "adj", "maxAdj"); f.AddGuide("x1", 0, "ss", "a", "200000"); f.AddGuide("x2", 0, "ss", "a", "100000"); f.AddGuide("x6", 1, "r", "0", "x1"); f.AddGuide("x5", 1, "r", "0", "x2"); f.AddGuide("x3", 0, "x5", "1", "2"); f.AddGuide("x4", 1, "r", "0", "x3"); f.AddGuide("il", 0, "wd2", "a", "maxAdj"); f.AddGuide("q1", 0, "5", "a", "maxAdj"); f.AddGuide("q2", 2, "1", "q1", "12"); f.AddGuide("il", 0, "q2", "w", "1"); f.AddGuide("it", 0, "q2", "h", "1"); f.AddGuide("ir", 1, "r", "0", "il"); f.AddGuide("ib", 1, "b", "0", "it"); f.AddGuide("q3", 0, "h", "hc", "x2"); f.AddGuide("y1", 10, "0", "q3", "h"); f.AddGuide("y2", 1, "b", "0", "y1"); f.AddHandleXY("adj", "0", "maxAdj", undefined, "0", "0", "x2", "t"); f.AddCnx("_3cd4", "hc", "y2"); f.AddCnx("_3cd4", "x4", "t"); f.AddCnx("0", "x6", "vc"); f.AddCnx("cd4", "x3", "b"); f.AddCnx("cd4", "hc", "y1"); f.AddCnx("cd2", "x1", "vc"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "b"); f.AddPathCommand(2, "x2", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "x5", "b"); f.AddPathCommand(6); break; case "pentagon": f.AddAdj("hf", 15, "105146"); f.AddAdj("vf", 15, "110557"); f.AddGuide("swd2", 0, "wd2", "hf", "100000"); f.AddGuide("shd2", 0, "hd2", "vf", "100000"); f.AddGuide("svc", 0, "vc", "vf", "100000"); f.AddGuide("dx1", 7, "swd2", "1080000"); f.AddGuide("dx2", 7, "swd2", "18360000"); f.AddGuide("dy1", 12, "shd2", "1080000"); f.AddGuide("dy2", 12, "shd2", "18360000"); f.AddGuide("x1", 1, "hc", "0", "dx1"); f.AddGuide("x2", 1, "hc", "0", "dx2"); f.AddGuide("x3", 1, "hc", "dx2", "0"); f.AddGuide("x4", 1, "hc", "dx1", "0"); f.AddGuide("y1", 1, "svc", "0", "dy1"); f.AddGuide("y2", 1, "svc", "0", "dy2"); f.AddGuide("it", 0, "y1", "dx2", "dx1"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "x1", "y1"); f.AddCnx("cd4", "x2", "y2"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd4", "x3", "y2"); f.AddCnx("0", "x4", "y1"); f.AddRect("x2", "it", "x3", "y2"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y1"); f.AddPathCommand(2, "hc", "t"); f.AddPathCommand(2, "x4", "y1"); f.AddPathCommand(2, "x3", "y2"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(6); break; case "pie": f.AddAdj("adj1", 15, "0"); f.AddAdj("adj2", 15, "16200000"); f.AddGuide("stAng", 10, "0", "adj1", "21599999"); f.AddGuide("enAng", 10, "0", "adj2", "21599999"); f.AddGuide("sw1", 1, "enAng", "0", "stAng"); f.AddGuide("sw2", 1, "sw1", "21600000", "0"); f.AddGuide("swAng", 3, "sw1", "sw1", "sw2"); f.AddGuide("wt1", 12, "wd2", "stAng"); f.AddGuide("ht1", 7, "hd2", "stAng"); f.AddGuide("dx1", 6, "wd2", "ht1", "wt1"); f.AddGuide("dy1", 11, "hd2", "ht1", "wt1"); f.AddGuide("x1", 1, "hc", "dx1", "0"); f.AddGuide("y1", 1, "vc", "dy1", "0"); f.AddGuide("wt2", 12, "wd2", "enAng"); f.AddGuide("ht2", 7, "hd2", "enAng"); f.AddGuide("dx2", 6, "wd2", "ht2", "wt2"); f.AddGuide("dy2", 11, "hd2", "ht2", "wt2"); f.AddGuide("x2", 1, "hc", "dx2", "0"); f.AddGuide("y2", 1, "vc", "dy2", "0"); f.AddGuide("idx", 7, "hc", "2700000"); f.AddGuide("idy", 12, "vc", "2700000"); f.AddGuide("il", 1, "hc", "0", "idx"); f.AddGuide("ir", 1, "hc", "idx", "0"); f.AddGuide("it", 1, "vc", "0", "idy"); f.AddGuide("ib", 1, "vc", "idy", "0"); f.AddHandlePolar("adj1", "0", "21599999", undefined, "0", "0", "x1", "y1"); f.AddHandlePolar("adj2", "0", "21599999", undefined, "0", "0", "x2", "y2"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y1"); f.AddPathCommand(3, "wd2", "hd2", "stAng", "swAng"); f.AddPathCommand(2, "hc", "vc"); f.AddPathCommand(6); break; case "pieWedge": f.AddGuide("g1", 7, "w", "13500000"); f.AddGuide("g2", 12, "h", "13500000"); f.AddGuide("x1", 1, "r", "g1", "0"); f.AddGuide("y1", 1, "b", "g2", "0"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddRect("x1", "y1", "r", "b"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "b"); f.AddPathCommand(3, "w", "h", "cd2", "cd4"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(6); break; case "plaque": f.AddAdj("adj", 15, "16667"); f.AddGuide("a", 10, "0", "adj", "50000"); f.AddGuide("x1", 0, "ss", "a", "100000"); f.AddGuide("x2", 1, "r", "0", "x1"); f.AddGuide("y2", 1, "b", "0", "x1"); f.AddGuide("il", 0, "x1", "70711", "100000"); f.AddGuide("ir", 1, "r", "0", "il"); f.AddGuide("ib", 1, "b", "0", "il"); f.AddHandleXY("adj", "0", "50000", undefined, "0", "0", "x1", "t"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("il", "il", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "x1"); f.AddPathCommand(3, "x1", "x1", "cd4", "-5400000"); f.AddPathCommand(2, "x2", "t"); f.AddPathCommand(3, "x1", "x1", "cd2", "-5400000"); f.AddPathCommand(2, "r", "y2"); f.AddPathCommand(3, "x1", "x1", "_3cd4", "-5400000"); f.AddPathCommand(2, "x1", "b"); f.AddPathCommand(3, "x1", "x1", "0", "-5400000"); f.AddPathCommand(6); break; case "plaqueTabs": f.AddGuide("md", 9, "w", "h", "0"); f.AddGuide("dx", 0, "1", "md", "20"); f.AddGuide("y1", 1, "0", "b", "dx"); f.AddGuide("x1", 1, "0", "r", "dx"); f.AddCnx("cd2", "l", "t"); f.AddCnx("cd2", "l", "dx"); f.AddCnx("cd2", "l", "y1"); f.AddCnx("cd2", "l", "b"); f.AddCnx("_3cd4", "dx", "t"); f.AddCnx("_3cd4", "x1", "t"); f.AddCnx("cd4", "dx", "b"); f.AddCnx("cd4", "x1", "b"); f.AddCnx("0", "r", "t"); f.AddCnx("0", "r", "dx"); f.AddCnx("0", "r", "y1"); f.AddCnx("0", "r", "b"); f.AddRect("dx", "dx", "x1", "y1"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "dx", "t"); f.AddPathCommand(3, "dx", "dx", "0", "cd4"); f.AddPathCommand(6); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "y1"); f.AddPathCommand(3, "dx", "dx", "_3cd4", "cd4"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "r", "t"); f.AddPathCommand(2, "r", "dx"); f.AddPathCommand(3, "dx", "dx", "cd4", "cd4"); f.AddPathCommand(6); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "x1", "b"); f.AddPathCommand(3, "dx", "dx", "cd2", "cd4"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(6); break; case "plus": f.AddAdj("adj", 15, "25000"); f.AddGuide("a", 10, "0", "adj", "50000"); f.AddGuide("x1", 0, "ss", "a", "100000"); f.AddGuide("x2", 1, "r", "0", "x1"); f.AddGuide("y2", 1, "b", "0", "x1"); f.AddGuide("d", 1, "w", "0", "h"); f.AddGuide("il", 3, "d", "l", "x1"); f.AddGuide("ir", 3, "d", "r", "x2"); f.AddGuide("it", 3, "d", "x1", "t"); f.AddGuide("ib", 3, "d", "y2", "b"); f.AddHandleXY("adj", "0", "50000", undefined, "0", "0", "x1", "t"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "x1"); f.AddPathCommand(2, "x1", "x1"); f.AddPathCommand(2, "x1", "t"); f.AddPathCommand(2, "x2", "t"); f.AddPathCommand(2, "x2", "x1"); f.AddPathCommand(2, "r", "x1"); f.AddPathCommand(2, "r", "y2"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "x2", "b"); f.AddPathCommand(2, "x1", "b"); f.AddPathCommand(2, "x1", "y2"); f.AddPathCommand(2, "l", "y2"); f.AddPathCommand(6); break; case "quadArrow": f.AddAdj("adj1", 15, "22500"); f.AddAdj("adj2", 15, "22500"); f.AddAdj("adj3", 15, "22500"); f.AddGuide("a2", 10, "0", "adj2", "50000"); f.AddGuide("maxAdj1", 0, "a2", "2", "1"); f.AddGuide("a1", 10, "0", "adj1", "maxAdj1"); f.AddGuide("q1", 1, "100000", "0", "maxAdj1"); f.AddGuide("maxAdj3", 0, "q1", "1", "2"); f.AddGuide("a3", 10, "0", "adj3", "maxAdj3"); f.AddGuide("x1", 0, "ss", "a3", "100000"); f.AddGuide("dx2", 0, "ss", "a2", "100000"); f.AddGuide("x2", 1, "hc", "0", "dx2"); f.AddGuide("x5", 1, "hc", "dx2", "0"); f.AddGuide("dx3", 0, "ss", "a1", "200000"); f.AddGuide("x3", 1, "hc", "0", "dx3"); f.AddGuide("x4", 1, "hc", "dx3", "0"); f.AddGuide("x6", 1, "r", "0", "x1"); f.AddGuide("y2", 1, "vc", "0", "dx2"); f.AddGuide("y5", 1, "vc", "dx2", "0"); f.AddGuide("y3", 1, "vc", "0", "dx3"); f.AddGuide("y4", 1, "vc", "dx3", "0"); f.AddGuide("y6", 1, "b", "0", "x1"); f.AddGuide("il", 0, "dx3", "x1", "dx2"); f.AddGuide("ir", 1, "r", "0", "il"); f.AddHandleXY("adj1", "0", "maxAdj1", undefined, "0", "0", "x3", "x1"); f.AddHandleXY("adj2", "0", "50000", undefined, "0", "0", "x2", "t"); f.AddHandleXY(undefined, "0", "0", "adj3", "0", "maxAdj3", "r", "x1"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("il", "y3", "ir", "y4"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(2, "x1", "y2"); f.AddPathCommand(2, "x1", "y3"); f.AddPathCommand(2, "x3", "y3"); f.AddPathCommand(2, "x3", "x1"); f.AddPathCommand(2, "x2", "x1"); f.AddPathCommand(2, "hc", "t"); f.AddPathCommand(2, "x5", "x1"); f.AddPathCommand(2, "x4", "x1"); f.AddPathCommand(2, "x4", "y3"); f.AddPathCommand(2, "x6", "y3"); f.AddPathCommand(2, "x6", "y2"); f.AddPathCommand(2, "r", "vc"); f.AddPathCommand(2, "x6", "y5"); f.AddPathCommand(2, "x6", "y4"); f.AddPathCommand(2, "x4", "y4"); f.AddPathCommand(2, "x4", "y6"); f.AddPathCommand(2, "x5", "y6"); f.AddPathCommand(2, "hc", "b"); f.AddPathCommand(2, "x2", "y6"); f.AddPathCommand(2, "x3", "y6"); f.AddPathCommand(2, "x3", "y4"); f.AddPathCommand(2, "x1", "y4"); f.AddPathCommand(2, "x1", "y5"); f.AddPathCommand(6); break; case "quadArrowCallout": f.AddAdj("adj1", 15, "18515"); f.AddAdj("adj2", 15, "18515"); f.AddAdj("adj3", 15, "18515"); f.AddAdj("adj4", 15, "48123"); f.AddGuide("a2", 10, "0", "adj2", "50000"); f.AddGuide("maxAdj1", 0, "a2", "2", "1"); f.AddGuide("a1", 10, "0", "adj1", "maxAdj1"); f.AddGuide("maxAdj3", 1, "50000", "0", "a2"); f.AddGuide("a3", 10, "0", "adj3", "maxAdj3"); f.AddGuide("q2", 0, "a3", "2", "1"); f.AddGuide("maxAdj4", 1, "100000", "0", "q2"); f.AddGuide("a4", 10, "a1", "adj4", "maxAdj4"); f.AddGuide("dx2", 0, "ss", "a2", "100000"); f.AddGuide("dx3", 0, "ss", "a1", "200000"); f.AddGuide("ah", 0, "ss", "a3", "100000"); f.AddGuide("dx1", 0, "w", "a4", "200000"); f.AddGuide("dy1", 0, "h", "a4", "200000"); f.AddGuide("x8", 1, "r", "0", "ah"); f.AddGuide("x2", 1, "hc", "0", "dx1"); f.AddGuide("x7", 1, "hc", "dx1", "0"); f.AddGuide("x3", 1, "hc", "0", "dx2"); f.AddGuide("x6", 1, "hc", "dx2", "0"); f.AddGuide("x4", 1, "hc", "0", "dx3"); f.AddGuide("x5", 1, "hc", "dx3", "0"); f.AddGuide("y8", 1, "b", "0", "ah"); f.AddGuide("y2", 1, "vc", "0", "dy1"); f.AddGuide("y7", 1, "vc", "dy1", "0"); f.AddGuide("y3", 1, "vc", "0", "dx2"); f.AddGuide("y6", 1, "vc", "dx2", "0"); f.AddGuide("y4", 1, "vc", "0", "dx3"); f.AddGuide("y5", 1, "vc", "dx3", "0"); f.AddHandleXY("adj1", "0", "maxAdj1", undefined, "0", "0", "x4", "ah"); f.AddHandleXY("adj2", "0", "50000", undefined, "0", "0", "x3", "t"); f.AddHandleXY(undefined, "0", "0", "adj3", "0", "maxAdj3", "r", "ah"); f.AddHandleXY(undefined, "0", "0", "adj4", "a1", "maxAdj4", "l", "y2"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("x2", "y2", "x7", "y7"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(2, "ah", "y3"); f.AddPathCommand(2, "ah", "y4"); f.AddPathCommand(2, "x2", "y4"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "x4", "y2"); f.AddPathCommand(2, "x4", "ah"); f.AddPathCommand(2, "x3", "ah"); f.AddPathCommand(2, "hc", "t"); f.AddPathCommand(2, "x6", "ah"); f.AddPathCommand(2, "x5", "ah"); f.AddPathCommand(2, "x5", "y2"); f.AddPathCommand(2, "x7", "y2"); f.AddPathCommand(2, "x7", "y4"); f.AddPathCommand(2, "x8", "y4"); f.AddPathCommand(2, "x8", "y3"); f.AddPathCommand(2, "r", "vc"); f.AddPathCommand(2, "x8", "y6"); f.AddPathCommand(2, "x8", "y5"); f.AddPathCommand(2, "x7", "y5"); f.AddPathCommand(2, "x7", "y7"); f.AddPathCommand(2, "x5", "y7"); f.AddPathCommand(2, "x5", "y8"); f.AddPathCommand(2, "x6", "y8"); f.AddPathCommand(2, "hc", "b"); f.AddPathCommand(2, "x3", "y8"); f.AddPathCommand(2, "x4", "y8"); f.AddPathCommand(2, "x4", "y7"); f.AddPathCommand(2, "x2", "y7"); f.AddPathCommand(2, "x2", "y5"); f.AddPathCommand(2, "ah", "y5"); f.AddPathCommand(2, "ah", "y6"); f.AddPathCommand(6); break; case "rect": f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); break; case "ribbon": f.AddAdj("adj1", 15, "16667"); f.AddAdj("adj2", 15, "50000"); f.AddGuide("a1", 10, "0", "adj1", "33333"); f.AddGuide("a2", 10, "25000", "adj2", "75000"); f.AddGuide("x10", 1, "r", "0", "wd8"); f.AddGuide("dx2", 0, "w", "a2", "200000"); f.AddGuide("x2", 1, "hc", "0", "dx2"); f.AddGuide("x9", 1, "hc", "dx2", "0"); f.AddGuide("x3", 1, "x2", "wd32", "0"); f.AddGuide("x8", 1, "x9", "0", "wd32"); f.AddGuide("x5", 1, "x2", "wd8", "0"); f.AddGuide("x6", 1, "x9", "0", "wd8"); f.AddGuide("x4", 1, "x5", "0", "wd32"); f.AddGuide("x7", 1, "x6", "wd32", "0"); f.AddGuide("y1", 0, "h", "a1", "200000"); f.AddGuide("y2", 0, "h", "a1", "100000"); f.AddGuide("y4", 1, "b", "0", "y2"); f.AddGuide("y3", 0, "y4", "1", "2"); f.AddGuide("hR", 0, "h", "a1", "400000"); f.AddGuide("y5", 1, "b", "0", "hR"); f.AddGuide("y6", 1, "y2", "0", "hR"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "33333", "hc", "y2"); f.AddHandleXY("adj2", "25000", "75000", undefined, "0", "0", "x2", "t"); f.AddCnx("_3cd4", "hc", "y2"); f.AddCnx("cd2", "wd8", "y3"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "x10", "y3"); f.AddRect("x2", "y2", "x9", "b"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "x4", "t"); f.AddPathCommand(3, "wd32", "hR", "_3cd4", "cd2"); f.AddPathCommand(2, "x3", "y1"); f.AddPathCommand(3, "wd32", "hR", "_3cd4", "-10800000"); f.AddPathCommand(2, "x8", "y2"); f.AddPathCommand(3, "wd32", "hR", "cd4", "-10800000"); f.AddPathCommand(2, "x7", "y1"); f.AddPathCommand(3, "wd32", "hR", "cd4", "cd2"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "x10", "y3"); f.AddPathCommand(2, "r", "y4"); f.AddPathCommand(2, "x9", "y4"); f.AddPathCommand(2, "x9", "y5"); f.AddPathCommand(3, "wd32", "hR", "0", "cd4"); f.AddPathCommand(2, "x3", "b"); f.AddPathCommand(3, "wd32", "hR", "cd4", "cd4"); f.AddPathCommand(2, "x2", "y4"); f.AddPathCommand(2, "l", "y4"); f.AddPathCommand(2, "wd8", "y3"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darkenLess", false, undefined, undefined); f.AddPathCommand(1, "x5", "hR"); f.AddPathCommand(3, "wd32", "hR", "0", "cd4"); f.AddPathCommand(2, "x3", "y1"); f.AddPathCommand(3, "wd32", "hR", "_3cd4", "-10800000"); f.AddPathCommand(2, "x5", "y2"); f.AddPathCommand(6); f.AddPathCommand(1, "x6", "hR"); f.AddPathCommand(3, "wd32", "hR", "cd2", "-5400000"); f.AddPathCommand(2, "x8", "y1"); f.AddPathCommand(3, "wd32", "hR", "_3cd4", "cd2"); f.AddPathCommand(2, "x6", "y2"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "x4", "t"); f.AddPathCommand(3, "wd32", "hR", "_3cd4", "cd2"); f.AddPathCommand(2, "x3", "y1"); f.AddPathCommand(3, "wd32", "hR", "_3cd4", "-10800000"); f.AddPathCommand(2, "x8", "y2"); f.AddPathCommand(3, "wd32", "hR", "cd4", "-10800000"); f.AddPathCommand(2, "x7", "y1"); f.AddPathCommand(3, "wd32", "hR", "cd4", "cd2"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "x10", "y3"); f.AddPathCommand(2, "r", "y4"); f.AddPathCommand(2, "x9", "y4"); f.AddPathCommand(2, "x9", "y5"); f.AddPathCommand(3, "wd32", "hR", "0", "cd4"); f.AddPathCommand(2, "x3", "b"); f.AddPathCommand(3, "wd32", "hR", "cd4", "cd4"); f.AddPathCommand(2, "x2", "y4"); f.AddPathCommand(2, "l", "y4"); f.AddPathCommand(2, "wd8", "y3"); f.AddPathCommand(6); f.AddPathCommand(1, "x5", "hR"); f.AddPathCommand(2, "x5", "y2"); f.AddPathCommand(1, "x6", "y2"); f.AddPathCommand(2, "x6", "hR"); f.AddPathCommand(1, "x2", "y4"); f.AddPathCommand(2, "x2", "y6"); f.AddPathCommand(1, "x9", "y6"); f.AddPathCommand(2, "x9", "y4"); break; case "ribbon2": f.AddAdj("adj1", 15, "16667"); f.AddAdj("adj2", 15, "50000"); f.AddGuide("a1", 10, "0", "adj1", "33333"); f.AddGuide("a2", 10, "25000", "adj2", "75000"); f.AddGuide("x10", 1, "r", "0", "wd8"); f.AddGuide("dx2", 0, "w", "a2", "200000"); f.AddGuide("x2", 1, "hc", "0", "dx2"); f.AddGuide("x9", 1, "hc", "dx2", "0"); f.AddGuide("x3", 1, "x2", "wd32", "0"); f.AddGuide("x8", 1, "x9", "0", "wd32"); f.AddGuide("x5", 1, "x2", "wd8", "0"); f.AddGuide("x6", 1, "x9", "0", "wd8"); f.AddGuide("x4", 1, "x5", "0", "wd32"); f.AddGuide("x7", 1, "x6", "wd32", "0"); f.AddGuide("dy1", 0, "h", "a1", "200000"); f.AddGuide("y1", 1, "b", "0", "dy1"); f.AddGuide("dy2", 0, "h", "a1", "100000"); f.AddGuide("y2", 1, "b", "0", "dy2"); f.AddGuide("y4", 1, "t", "dy2", "0"); f.AddGuide("y3", 2, "y4", "b", "2"); f.AddGuide("hR", 0, "h", "a1", "400000"); f.AddGuide("y6", 1, "b", "0", "hR"); f.AddGuide("y7", 1, "y1", "0", "hR"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "33333", "hc", "y2"); f.AddHandleXY("adj2", "25000", "75000", undefined, "0", "0", "x2", "b"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "wd8", "y3"); f.AddCnx("cd4", "hc", "y2"); f.AddCnx("0", "x10", "y3"); f.AddRect("x2", "t", "x9", "y2"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "b"); f.AddPathCommand(2, "x4", "b"); f.AddPathCommand(3, "wd32", "hR", "cd4", "-10800000"); f.AddPathCommand(2, "x3", "y1"); f.AddPathCommand(3, "wd32", "hR", "cd4", "cd2"); f.AddPathCommand(2, "x8", "y2"); f.AddPathCommand(3, "wd32", "hR", "_3cd4", "cd2"); f.AddPathCommand(2, "x7", "y1"); f.AddPathCommand(3, "wd32", "hR", "_3cd4", "-10800000"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "x10", "y3"); f.AddPathCommand(2, "r", "y4"); f.AddPathCommand(2, "x9", "y4"); f.AddPathCommand(2, "x9", "hR"); f.AddPathCommand(3, "wd32", "hR", "0", "-5400000"); f.AddPathCommand(2, "x3", "t"); f.AddPathCommand(3, "wd32", "hR", "_3cd4", "-5400000"); f.AddPathCommand(2, "x2", "y4"); f.AddPathCommand(2, "l", "y4"); f.AddPathCommand(2, "wd8", "y3"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darkenLess", false, undefined, undefined); f.AddPathCommand(1, "x5", "y6"); f.AddPathCommand(3, "wd32", "hR", "0", "-5400000"); f.AddPathCommand(2, "x3", "y1"); f.AddPathCommand(3, "wd32", "hR", "cd4", "cd2"); f.AddPathCommand(2, "x5", "y2"); f.AddPathCommand(6); f.AddPathCommand(1, "x6", "y6"); f.AddPathCommand(3, "wd32", "hR", "cd2", "cd4"); f.AddPathCommand(2, "x8", "y1"); f.AddPathCommand(3, "wd32", "hR", "cd4", "-10800000"); f.AddPathCommand(2, "x6", "y2"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "b"); f.AddPathCommand(2, "wd8", "y3"); f.AddPathCommand(2, "l", "y4"); f.AddPathCommand(2, "x2", "y4"); f.AddPathCommand(2, "x2", "hR"); f.AddPathCommand(3, "wd32", "hR", "cd2", "cd4"); f.AddPathCommand(2, "x8", "t"); f.AddPathCommand(3, "wd32", "hR", "_3cd4", "cd4"); f.AddPathCommand(2, "x9", "y4"); f.AddPathCommand(2, "x9", "y4"); f.AddPathCommand(2, "r", "y4"); f.AddPathCommand(2, "x10", "y3"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "x7", "b"); f.AddPathCommand(3, "wd32", "hR", "cd4", "cd2"); f.AddPathCommand(2, "x8", "y1"); f.AddPathCommand(3, "wd32", "hR", "cd4", "-10800000"); f.AddPathCommand(2, "x3", "y2"); f.AddPathCommand(3, "wd32", "hR", "_3cd4", "-10800000"); f.AddPathCommand(2, "x4", "y1"); f.AddPathCommand(3, "wd32", "hR", "_3cd4", "cd2"); f.AddPathCommand(6); f.AddPathCommand(1, "x5", "y2"); f.AddPathCommand(2, "x5", "y6"); f.AddPathCommand(1, "x6", "y6"); f.AddPathCommand(2, "x6", "y2"); f.AddPathCommand(1, "x2", "y7"); f.AddPathCommand(2, "x2", "y4"); f.AddPathCommand(1, "x9", "y4"); f.AddPathCommand(2, "x9", "y7"); break; case "rightArrow": f.AddAdj("adj1", 15, "50000"); f.AddAdj("adj2", 15, "50000"); f.AddGuide("maxAdj2", 0, "100000", "w", "ss"); f.AddGuide("a1", 10, "0", "adj1", "100000"); f.AddGuide("a2", 10, "0", "adj2", "maxAdj2"); f.AddGuide("dx1", 0, "ss", "a2", "100000"); f.AddGuide("x1", 1, "r", "0", "dx1"); f.AddGuide("dy1", 0, "h", "a1", "200000"); f.AddGuide("y1", 1, "vc", "0", "dy1"); f.AddGuide("y2", 1, "vc", "dy1", "0"); f.AddGuide("dx2", 0, "y1", "dx1", "hd2"); f.AddGuide("x2", 1, "x1", "dx2", "0"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "100000", "l", "y1"); f.AddHandleXY("adj2", "0", "maxAdj2", undefined, "0", "0", "x1", "t"); f.AddCnx("_3cd4", "x1", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "x1", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("l", "y1", "x2", "y2"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "y1"); f.AddPathCommand(2, "x1", "y1"); f.AddPathCommand(2, "x1", "t"); f.AddPathCommand(2, "r", "vc"); f.AddPathCommand(2, "x1", "b"); f.AddPathCommand(2, "x1", "y2"); f.AddPathCommand(2, "l", "y2"); f.AddPathCommand(6); break; case "rightArrowCallout": f.AddAdj("adj1", 15, "25000"); f.AddAdj("adj2", 15, "25000"); f.AddAdj("adj3", 15, "25000"); f.AddAdj("adj4", 15, "64977"); f.AddGuide("maxAdj2", 0, "50000", "h", "ss"); f.AddGuide("a2", 10, "0", "adj2", "maxAdj2"); f.AddGuide("maxAdj1", 0, "a2", "2", "1"); f.AddGuide("a1", 10, "0", "adj1", "maxAdj1"); f.AddGuide("maxAdj3", 0, "100000", "w", "ss"); f.AddGuide("a3", 10, "0", "adj3", "maxAdj3"); f.AddGuide("q2", 0, "a3", "ss", "w"); f.AddGuide("maxAdj4", 1, "100000", "0", "q2"); f.AddGuide("a4", 10, "0", "adj4", "maxAdj4"); f.AddGuide("dy1", 0, "ss", "a2", "100000"); f.AddGuide("dy2", 0, "ss", "a1", "200000"); f.AddGuide("y1", 1, "vc", "0", "dy1"); f.AddGuide("y2", 1, "vc", "0", "dy2"); f.AddGuide("y3", 1, "vc", "dy2", "0"); f.AddGuide("y4", 1, "vc", "dy1", "0"); f.AddGuide("dx3", 0, "ss", "a3", "100000"); f.AddGuide("x3", 1, "r", "0", "dx3"); f.AddGuide("x2", 0, "w", "a4", "100000"); f.AddGuide("x1", 0, "x2", "1", "2"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "maxAdj1", "x3", "y2"); f.AddHandleXY(undefined, "0", "0", "adj2", "0", "maxAdj2", "r", "y1"); f.AddHandleXY("adj3", "0", "maxAdj3", undefined, "0", "0", "x3", "t"); f.AddHandleXY("adj4", "0", "maxAdj4", undefined, "0", "0", "x2", "b"); f.AddCnx("_3cd4", "x1", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "x1", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("l", "t", "x2", "b"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "x2", "t"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "x3", "y2"); f.AddPathCommand(2, "x3", "y1"); f.AddPathCommand(2, "r", "vc"); f.AddPathCommand(2, "x3", "y4"); f.AddPathCommand(2, "x3", "y3"); f.AddPathCommand(2, "x2", "y3"); f.AddPathCommand(2, "x2", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); break; case "rightBrace": f.AddAdj("adj1", 15, "8333"); f.AddAdj("adj2", 15, "50000"); f.AddGuide("a2", 10, "0", "adj2", "100000"); f.AddGuide("q1", 1, "100000", "0", "a2"); f.AddGuide("q2", 16, "q1", "a2"); f.AddGuide("q3", 0, "q2", "1", "2"); f.AddGuide("maxAdj1", 0, "q3", "h", "ss"); f.AddGuide("a1", 10, "0", "adj1", "maxAdj1"); f.AddGuide("y1", 0, "ss", "a1", "100000"); f.AddGuide("y3", 0, "h", "a2", "100000"); f.AddGuide("y2", 1, "y3", "0", "y1"); f.AddGuide("y4", 1, "b", "0", "y1"); f.AddGuide("dx1", 7, "wd2", "2700000"); f.AddGuide("dy1", 12, "y1", "2700000"); f.AddGuide("ir", 1, "l", "dx1", "0"); f.AddGuide("it", 1, "y1", "0", "dy1"); f.AddGuide("ib", 1, "b", "dy1", "y1"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "maxAdj1", "hc", "y1"); f.AddHandleXY(undefined, "0", "0", "adj2", "0", "100000", "r", "y3"); f.AddCnx("cd4", "l", "t"); f.AddCnx("cd2", "r", "y3"); f.AddCnx("_3cd4", "l", "b"); f.AddRect("l", "it", "ir", "ib"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(3, "wd2", "y1", "_3cd4", "cd4"); f.AddPathCommand(2, "hc", "y2"); f.AddPathCommand(3, "wd2", "y1", "cd2", "-5400000"); f.AddPathCommand(3, "wd2", "y1", "_3cd4", "-5400000"); f.AddPathCommand(2, "hc", "y4"); f.AddPathCommand(3, "wd2", "y1", "0", "cd4"); f.AddPathCommand(6); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(3, "wd2", "y1", "_3cd4", "cd4"); f.AddPathCommand(2, "hc", "y2"); f.AddPathCommand(3, "wd2", "y1", "cd2", "-5400000"); f.AddPathCommand(3, "wd2", "y1", "_3cd4", "-5400000"); f.AddPathCommand(2, "hc", "y4"); f.AddPathCommand(3, "wd2", "y1", "0", "cd4"); break; case "rightBracket": f.AddAdj("adj", 15, "8333"); f.AddGuide("maxAdj", 0, "50000", "h", "ss"); f.AddGuide("a", 10, "0", "adj", "maxAdj"); f.AddGuide("y1", 0, "ss", "a", "100000"); f.AddGuide("y2", 1, "b", "0", "y1"); f.AddGuide("dx1", 7, "w", "2700000"); f.AddGuide("dy1", 12, "y1", "2700000"); f.AddGuide("ir", 1, "l", "dx1", "0"); f.AddGuide("it", 1, "y1", "0", "dy1"); f.AddGuide("ib", 1, "b", "dy1", "y1"); f.AddHandleXY(undefined, "0", "0", "adj", "0", "maxAdj", "r", "y1"); f.AddCnx("cd4", "l", "t"); f.AddCnx("_3cd4", "l", "b"); f.AddCnx("cd2", "r", "vc"); f.AddRect("l", "it", "ir", "ib"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(3, "w", "y1", "_3cd4", "cd4"); f.AddPathCommand(2, "r", "y2"); f.AddPathCommand(3, "w", "y1", "0", "cd4"); f.AddPathCommand(6); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(3, "w", "y1", "_3cd4", "cd4"); f.AddPathCommand(2, "r", "y2"); f.AddPathCommand(3, "w", "y1", "0", "cd4"); break; case "round1Rect": f.AddAdj("adj", 15, "16667"); f.AddGuide("a", 10, "0", "adj", "50000"); f.AddGuide("dx1", 0, "ss", "a", "100000"); f.AddGuide("x1", 1, "r", "0", "dx1"); f.AddGuide("idx", 0, "dx1", "29289", "100000"); f.AddGuide("ir", 1, "r", "0", "idx"); f.AddHandleXY("adj", "0", "50000", undefined, "0", "0", "x1", "t"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("l", "t", "ir", "b"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "x1", "t"); f.AddPathCommand(3, "dx1", "dx1", "_3cd4", "cd4"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); break; case "round2DiagRect": f.AddAdj("adj1", 15, "16667"); f.AddAdj("adj2", 15, "0"); f.AddGuide("a1", 10, "0", "adj1", "50000"); f.AddGuide("a2", 10, "0", "adj2", "50000"); f.AddGuide("x1", 0, "ss", "a1", "100000"); f.AddGuide("y1", 1, "b", "0", "x1"); f.AddGuide("a", 0, "ss", "a2", "100000"); f.AddGuide("x2", 1, "r", "0", "a"); f.AddGuide("y2", 1, "b", "0", "a"); f.AddGuide("dx1", 0, "x1", "29289", "100000"); f.AddGuide("dx2", 0, "a", "29289", "100000"); f.AddGuide("d", 1, "dx1", "0", "dx2"); f.AddGuide("dx", 3, "d", "dx1", "dx2"); f.AddGuide("ir", 1, "r", "0", "dx"); f.AddGuide("ib", 1, "b", "0", "dx"); f.AddHandleXY("adj1", "0", "50000", undefined, "0", "0", "x1", "t"); f.AddHandleXY("adj2", "0", "50000", undefined, "0", "0", "x2", "t"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("dx", "dx", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "x1", "t"); f.AddPathCommand(2, "x2", "t"); f.AddPathCommand(3, "a", "a", "_3cd4", "cd4"); f.AddPathCommand(2, "r", "y1"); f.AddPathCommand(3, "x1", "x1", "0", "cd4"); f.AddPathCommand(2, "a", "b"); f.AddPathCommand(3, "a", "a", "cd4", "cd4"); f.AddPathCommand(2, "l", "x1"); f.AddPathCommand(3, "x1", "x1", "cd2", "cd4"); f.AddPathCommand(6); break; case "round2SameRect": f.AddAdj("adj1", 15, "16667"); f.AddAdj("adj2", 15, "0"); f.AddGuide("a1", 10, "0", "adj1", "50000"); f.AddGuide("a2", 10, "0", "adj2", "50000"); f.AddGuide("tx1", 0, "ss", "a1", "100000"); f.AddGuide("tx2", 1, "r", "0", "tx1"); f.AddGuide("bx1", 0, "ss", "a2", "100000"); f.AddGuide("bx2", 1, "r", "0", "bx1"); f.AddGuide("by1", 1, "b", "0", "bx1"); f.AddGuide("d", 1, "tx1", "0", "bx1"); f.AddGuide("tdx", 0, "tx1", "29289", "100000"); f.AddGuide("bdx", 0, "bx1", "29289", "100000"); f.AddGuide("il", 3, "d", "tdx", "bdx"); f.AddGuide("ir", 1, "r", "0", "il"); f.AddGuide("ib", 1, "b", "0", "bdx"); f.AddHandleXY("adj1", "0", "50000", undefined, "0", "0", "tx2", "t"); f.AddHandleXY("adj2", "0", "50000", undefined, "0", "0", "bx1", "b"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("il", "tdx", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "tx1", "t"); f.AddPathCommand(2, "tx2", "t"); f.AddPathCommand(3, "tx1", "tx1", "_3cd4", "cd4"); f.AddPathCommand(2, "r", "by1"); f.AddPathCommand(3, "bx1", "bx1", "0", "cd4"); f.AddPathCommand(2, "bx1", "b"); f.AddPathCommand(3, "bx1", "bx1", "cd4", "cd4"); f.AddPathCommand(2, "l", "tx1"); f.AddPathCommand(3, "tx1", "tx1", "cd2", "cd4"); f.AddPathCommand(6); break; case "roundRect": f.AddAdj("adj", 15, "16667"); f.AddGuide("a", 10, "0", "adj", "50000"); f.AddGuide("x1", 0, "ss", "a", "100000"); f.AddGuide("x2", 1, "r", "0", "x1"); f.AddGuide("y2", 1, "b", "0", "x1"); f.AddGuide("il", 0, "x1", "29289", "100000"); f.AddGuide("ir", 1, "r", "0", "il"); f.AddGuide("ib", 1, "b", "0", "il"); f.AddHandleXY("adj", "0", "50000", undefined, "0", "0", "x1", "t"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("il", "il", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "x1"); f.AddPathCommand(3, "x1", "x1", "cd2", "cd4"); f.AddPathCommand(2, "x2", "t"); f.AddPathCommand(3, "x1", "x1", "_3cd4", "cd4"); f.AddPathCommand(2, "r", "y2"); f.AddPathCommand(3, "x1", "x1", "0", "cd4"); f.AddPathCommand(2, "x1", "b"); f.AddPathCommand(3, "x1", "x1", "cd4", "cd4"); f.AddPathCommand(6); break; case "rtTriangle": f.AddGuide("it", 0, "h", "7", "12"); f.AddGuide("ir", 0, "w", "7", "12"); f.AddGuide("ib", 0, "h", "11", "12"); f.AddCnx("_3cd4", "l", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "l", "b"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd4", "r", "b"); f.AddCnx("0", "hc", "vc"); f.AddRect("wd12", "it", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "b"); f.AddPathCommand(2, "l", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(6); break; case "smileyFace": f.AddAdj("adj", 15, "4653"); f.AddGuide("a", 10, "-4653", "adj", "4653"); f.AddGuide("x1", 0, "w", "4969", "21699"); f.AddGuide("x2", 0, "w", "6215", "21600"); f.AddGuide("x3", 0, "w", "13135", "21600"); f.AddGuide("x4", 0, "w", "16640", "21600"); f.AddGuide("y1", 0, "h", "7570", "21600"); f.AddGuide("y3", 0, "h", "16515", "21600"); f.AddGuide("dy2", 0, "h", "a", "100000"); f.AddGuide("y2", 1, "y3", "0", "dy2"); f.AddGuide("y4", 1, "y3", "dy2", "0"); f.AddGuide("dy3", 0, "h", "a", "50000"); f.AddGuide("y5", 1, "y4", "dy3", "0"); f.AddGuide("idx", 7, "wd2", "2700000"); f.AddGuide("idy", 12, "hd2", "2700000"); f.AddGuide("il", 1, "hc", "0", "idx"); f.AddGuide("ir", 1, "hc", "idx", "0"); f.AddGuide("it", 1, "vc", "0", "idy"); f.AddGuide("ib", 1, "vc", "idy", "0"); f.AddGuide("wR", 0, "w", "1125", "21600"); f.AddGuide("hR", 0, "h", "1125", "21600"); f.AddHandleXY(undefined, "0", "0", "adj", "-4653", "4653", "hc", "y4"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("_3cd4", "il", "it"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "il", "ib"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd4", "ir", "ib"); f.AddCnx("0", "r", "vc"); f.AddCnx("_3cd4", "ir", "it"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(3, "wd2", "hd2", "cd2", "21600000"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darkenLess", undefined, undefined, undefined); f.AddPathCommand(1, "x2", "y1"); f.AddPathCommand(3, "wR", "hR", "cd2", "21600000"); f.AddPathCommand(1, "x3", "y1"); f.AddPathCommand(3, "wR", "hR", "cd2", "21600000"); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y2"); f.AddPathCommand(4, "hc", "y5", "x4", "y2"); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(3, "wd2", "hd2", "cd2", "21600000"); f.AddPathCommand(6); break; case "snip1Rect": f.AddAdj("adj", 15, "16667"); f.AddGuide("a", 10, "0", "adj", "50000"); f.AddGuide("dx1", 0, "ss", "a", "100000"); f.AddGuide("x1", 1, "r", "0", "dx1"); f.AddGuide("it", 0, "dx1", "1", "2"); f.AddGuide("ir", 2, "x1", "r", "2"); f.AddHandleXY("adj", "0", "50000", undefined, "0", "0", "x1", "t"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("l", "it", "ir", "b"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "x1", "t"); f.AddPathCommand(2, "r", "dx1"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); break; case "snip2DiagRect": f.AddAdj("adj1", 15, "0"); f.AddAdj("adj2", 15, "16667"); f.AddGuide("a1", 10, "0", "adj1", "50000"); f.AddGuide("a2", 10, "0", "adj2", "50000"); f.AddGuide("lx1", 0, "ss", "a1", "100000"); f.AddGuide("lx2", 1, "r", "0", "lx1"); f.AddGuide("ly1", 1, "b", "0", "lx1"); f.AddGuide("rx1", 0, "ss", "a2", "100000"); f.AddGuide("rx2", 1, "r", "0", "rx1"); f.AddGuide("ry1", 1, "b", "0", "rx1"); f.AddGuide("d", 1, "lx1", "0", "rx1"); f.AddGuide("dx", 3, "d", "lx1", "rx1"); f.AddGuide("il", 0, "dx", "1", "2"); f.AddGuide("ir", 1, "r", "0", "il"); f.AddGuide("ib", 1, "b", "0", "il"); f.AddHandleXY("adj1", "0", "50000", undefined, "0", "0", "lx1", "t"); f.AddHandleXY("adj2", "0", "50000", undefined, "0", "0", "rx2", "t"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("il", "il", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "lx1", "t"); f.AddPathCommand(2, "rx2", "t"); f.AddPathCommand(2, "r", "rx1"); f.AddPathCommand(2, "r", "ly1"); f.AddPathCommand(2, "lx2", "b"); f.AddPathCommand(2, "rx1", "b"); f.AddPathCommand(2, "l", "ry1"); f.AddPathCommand(2, "l", "lx1"); f.AddPathCommand(6); break; case "snip2SameRect": f.AddAdj("adj1", 15, "16667"); f.AddAdj("adj2", 15, "0"); f.AddGuide("a1", 10, "0", "adj1", "50000"); f.AddGuide("a2", 10, "0", "adj2", "50000"); f.AddGuide("tx1", 0, "ss", "a1", "100000"); f.AddGuide("tx2", 1, "r", "0", "tx1"); f.AddGuide("bx1", 0, "ss", "a2", "100000"); f.AddGuide("bx2", 1, "r", "0", "bx1"); f.AddGuide("by1", 1, "b", "0", "bx1"); f.AddGuide("d", 1, "tx1", "0", "bx1"); f.AddGuide("dx", 3, "d", "tx1", "bx1"); f.AddGuide("il", 0, "dx", "1", "2"); f.AddGuide("ir", 1, "r", "0", "il"); f.AddGuide("it", 0, "tx1", "1", "2"); f.AddGuide("ib", 2, "by1", "b", "2"); f.AddHandleXY("adj1", "0", "50000", undefined, "0", "0", "tx2", "t"); f.AddHandleXY("adj2", "0", "50000", undefined, "0", "0", "bx1", "b"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "tx1", "t"); f.AddPathCommand(2, "tx2", "t"); f.AddPathCommand(2, "r", "tx1"); f.AddPathCommand(2, "r", "by1"); f.AddPathCommand(2, "bx2", "b"); f.AddPathCommand(2, "bx1", "b"); f.AddPathCommand(2, "l", "by1"); f.AddPathCommand(2, "l", "tx1"); f.AddPathCommand(6); break; case "snipRoundRect": f.AddAdj("adj1", 15, "16667"); f.AddAdj("adj2", 15, "16667"); f.AddGuide("a1", 10, "0", "adj1", "50000"); f.AddGuide("a2", 10, "0", "adj2", "50000"); f.AddGuide("x1", 0, "ss", "a1", "100000"); f.AddGuide("dx2", 0, "ss", "a2", "100000"); f.AddGuide("x2", 1, "r", "0", "dx2"); f.AddGuide("il", 0, "x1", "29289", "100000"); f.AddGuide("ir", 2, "x2", "r", "2"); f.AddHandleXY("adj1", "0", "50000", undefined, "0", "0", "x1", "t"); f.AddHandleXY("adj2", "0", "50000", undefined, "0", "0", "x2", "t"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("il", "il", "ir", "b"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "x1", "t"); f.AddPathCommand(2, "x2", "t"); f.AddPathCommand(2, "r", "dx2"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(2, "l", "x1"); f.AddPathCommand(3, "x1", "x1", "cd2", "cd4"); f.AddPathCommand(6); break; case "squareTabs": f.AddGuide("md", 9, "w", "h", "0"); f.AddGuide("dx", 0, "1", "md", "20"); f.AddGuide("y1", 1, "0", "b", "dx"); f.AddGuide("x1", 1, "0", "r", "dx"); f.AddCnx("cd2", "l", "t"); f.AddCnx("cd2", "l", "dx"); f.AddCnx("cd2", "l", "y1"); f.AddCnx("cd2", "l", "b"); f.AddCnx("cd2", "dx", "dx"); f.AddCnx("cd2", "dx", "x1"); f.AddCnx("_3cd4", "dx", "t"); f.AddCnx("_3cd4", "x1", "t"); f.AddCnx("cd4", "dx", "b"); f.AddCnx("cd4", "x1", "b"); f.AddCnx("0", "r", "t"); f.AddCnx("0", "r", "dx"); f.AddCnx("0", "r", "y1"); f.AddCnx("0", "r", "b"); f.AddCnx("0", "x1", "dx"); f.AddCnx("0", "x1", "y1"); f.AddRect("dx", "dx", "x1", "y1"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "dx", "t"); f.AddPathCommand(2, "dx", "dx"); f.AddPathCommand(2, "l", "dx"); f.AddPathCommand(6); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "y1"); f.AddPathCommand(2, "dx", "y1"); f.AddPathCommand(2, "dx", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "x1", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "dx"); f.AddPathCommand(2, "x1", "dx"); f.AddPathCommand(6); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y1"); f.AddPathCommand(2, "r", "y1"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "x1", "b"); f.AddPathCommand(6); break; case "star10": f.AddAdj("adj", 15, "42533"); f.AddAdj("hf", 15, "105146"); f.AddGuide("a", 10, "0", "adj", "50000"); f.AddGuide("swd2", 0, "wd2", "hf", "100000"); f.AddGuide("dx1", 0, "swd2", "95106", "100000"); f.AddGuide("dx2", 0, "swd2", "58779", "100000"); f.AddGuide("x1", 1, "hc", "0", "dx1"); f.AddGuide("x2", 1, "hc", "0", "dx2"); f.AddGuide("x3", 1, "hc", "dx2", "0"); f.AddGuide("x4", 1, "hc", "dx1", "0"); f.AddGuide("dy1", 0, "hd2", "80902", "100000"); f.AddGuide("dy2", 0, "hd2", "30902", "100000"); f.AddGuide("y1", 1, "vc", "0", "dy1"); f.AddGuide("y2", 1, "vc", "0", "dy2"); f.AddGuide("y3", 1, "vc", "dy2", "0"); f.AddGuide("y4", 1, "vc", "dy1", "0"); f.AddGuide("iwd2", 0, "swd2", "a", "50000"); f.AddGuide("ihd2", 0, "hd2", "a", "50000"); f.AddGuide("sdx1", 0, "iwd2", "80902", "100000"); f.AddGuide("sdx2", 0, "iwd2", "30902", "100000"); f.AddGuide("sdy1", 0, "ihd2", "95106", "100000"); f.AddGuide("sdy2", 0, "ihd2", "58779", "100000"); f.AddGuide("sx1", 1, "hc", "0", "iwd2"); f.AddGuide("sx2", 1, "hc", "0", "sdx1"); f.AddGuide("sx3", 1, "hc", "0", "sdx2"); f.AddGuide("sx4", 1, "hc", "sdx2", "0"); f.AddGuide("sx5", 1, "hc", "sdx1", "0"); f.AddGuide("sx6", 1, "hc", "iwd2", "0"); f.AddGuide("sy1", 1, "vc", "0", "sdy1"); f.AddGuide("sy2", 1, "vc", "0", "sdy2"); f.AddGuide("sy3", 1, "vc", "sdy2", "0"); f.AddGuide("sy4", 1, "vc", "sdy1", "0"); f.AddGuide("yAdj", 1, "vc", "0", "ihd2"); f.AddHandleXY(undefined, "0", "0", "adj", "0", "50000", "hc", "yAdj"); f.AddCnx("0", "x4", "y2"); f.AddCnx("0", "x4", "y3"); f.AddCnx("cd4", "x3", "y4"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd4", "x2", "y4"); f.AddCnx("cd2", "x1", "y3"); f.AddCnx("cd2", "x1", "y2"); f.AddCnx("_3cd4", "x2", "y1"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("_3cd4", "x3", "y1"); f.AddRect("sx2", "sy2", "sx5", "sy3"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y2"); f.AddPathCommand(2, "sx2", "sy2"); f.AddPathCommand(2, "x2", "y1"); f.AddPathCommand(2, "sx3", "sy1"); f.AddPathCommand(2, "hc", "t"); f.AddPathCommand(2, "sx4", "sy1"); f.AddPathCommand(2, "x3", "y1"); f.AddPathCommand(2, "sx5", "sy2"); f.AddPathCommand(2, "x4", "y2"); f.AddPathCommand(2, "sx6", "vc"); f.AddPathCommand(2, "x4", "y3"); f.AddPathCommand(2, "sx5", "sy3"); f.AddPathCommand(2, "x3", "y4"); f.AddPathCommand(2, "sx4", "sy4"); f.AddPathCommand(2, "hc", "b"); f.AddPathCommand(2, "sx3", "sy4"); f.AddPathCommand(2, "x2", "y4"); f.AddPathCommand(2, "sx2", "sy3"); f.AddPathCommand(2, "x1", "y3"); f.AddPathCommand(2, "sx1", "vc"); f.AddPathCommand(6); break; case "star12": f.AddAdj("adj", 15, "37500"); f.AddGuide("a", 10, "0", "adj", "50000"); f.AddGuide("dx1", 7, "wd2", "1800000"); f.AddGuide("dy1", 12, "hd2", "3600000"); f.AddGuide("x1", 1, "hc", "0", "dx1"); f.AddGuide("x3", 0, "w", "3", "4"); f.AddGuide("x4", 1, "hc", "dx1", "0"); f.AddGuide("y1", 1, "vc", "0", "dy1"); f.AddGuide("y3", 0, "h", "3", "4"); f.AddGuide("y4", 1, "vc", "dy1", "0"); f.AddGuide("iwd2", 0, "wd2", "a", "50000"); f.AddGuide("ihd2", 0, "hd2", "a", "50000"); f.AddGuide("sdx1", 7, "iwd2", "900000"); f.AddGuide("sdx2", 7, "iwd2", "2700000"); f.AddGuide("sdx3", 7, "iwd2", "4500000"); f.AddGuide("sdy1", 12, "ihd2", "4500000"); f.AddGuide("sdy2", 12, "ihd2", "2700000"); f.AddGuide("sdy3", 12, "ihd2", "900000"); f.AddGuide("sx1", 1, "hc", "0", "sdx1"); f.AddGuide("sx2", 1, "hc", "0", "sdx2"); f.AddGuide("sx3", 1, "hc", "0", "sdx3"); f.AddGuide("sx4", 1, "hc", "sdx3", "0"); f.AddGuide("sx5", 1, "hc", "sdx2", "0"); f.AddGuide("sx6", 1, "hc", "sdx1", "0"); f.AddGuide("sy1", 1, "vc", "0", "sdy1"); f.AddGuide("sy2", 1, "vc", "0", "sdy2"); f.AddGuide("sy3", 1, "vc", "0", "sdy3"); f.AddGuide("sy4", 1, "vc", "sdy3", "0"); f.AddGuide("sy5", 1, "vc", "sdy2", "0"); f.AddGuide("sy6", 1, "vc", "sdy1", "0"); f.AddGuide("yAdj", 1, "vc", "0", "ihd2"); f.AddHandleXY(undefined, "0", "0", "adj", "0", "50000", "hc", "yAdj"); f.AddCnx("0", "x4", "hd4"); f.AddCnx("0", "r", "vc"); f.AddCnx("0", "x4", "y3"); f.AddCnx("cd4", "x3", "y4"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd4", "wd4", "y4"); f.AddCnx("cd2", "x1", "y3"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd2", "x1", "hd4"); f.AddCnx("_3cd4", "wd4", "y1"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("_3cd4", "x3", "y1"); f.AddRect("sx2", "sy2", "sx5", "sy5"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(2, "sx1", "sy3"); f.AddPathCommand(2, "x1", "hd4"); f.AddPathCommand(2, "sx2", "sy2"); f.AddPathCommand(2, "wd4", "y1"); f.AddPathCommand(2, "sx3", "sy1"); f.AddPathCommand(2, "hc", "t"); f.AddPathCommand(2, "sx4", "sy1"); f.AddPathCommand(2, "x3", "y1"); f.AddPathCommand(2, "sx5", "sy2"); f.AddPathCommand(2, "x4", "hd4"); f.AddPathCommand(2, "sx6", "sy3"); f.AddPathCommand(2, "r", "vc"); f.AddPathCommand(2, "sx6", "sy4"); f.AddPathCommand(2, "x4", "y3"); f.AddPathCommand(2, "sx5", "sy5"); f.AddPathCommand(2, "x3", "y4"); f.AddPathCommand(2, "sx4", "sy6"); f.AddPathCommand(2, "hc", "b"); f.AddPathCommand(2, "sx3", "sy6"); f.AddPathCommand(2, "wd4", "y4"); f.AddPathCommand(2, "sx2", "sy5"); f.AddPathCommand(2, "x1", "y3"); f.AddPathCommand(2, "sx1", "sy4"); f.AddPathCommand(6); break; case "star16": f.AddAdj("adj", 15, "37500"); f.AddGuide("a", 10, "0", "adj", "50000"); f.AddGuide("dx1", 0, "wd2", "92388", "100000"); f.AddGuide("dx2", 0, "wd2", "70711", "100000"); f.AddGuide("dx3", 0, "wd2", "38268", "100000"); f.AddGuide("dy1", 0, "hd2", "92388", "100000"); f.AddGuide("dy2", 0, "hd2", "70711", "100000"); f.AddGuide("dy3", 0, "hd2", "38268", "100000"); f.AddGuide("x1", 1, "hc", "0", "dx1"); f.AddGuide("x2", 1, "hc", "0", "dx2"); f.AddGuide("x3", 1, "hc", "0", "dx3"); f.AddGuide("x4", 1, "hc", "dx3", "0"); f.AddGuide("x5", 1, "hc", "dx2", "0"); f.AddGuide("x6", 1, "hc", "dx1", "0"); f.AddGuide("y1", 1, "vc", "0", "dy1"); f.AddGuide("y2", 1, "vc", "0", "dy2"); f.AddGuide("y3", 1, "vc", "0", "dy3"); f.AddGuide("y4", 1, "vc", "dy3", "0"); f.AddGuide("y5", 1, "vc", "dy2", "0"); f.AddGuide("y6", 1, "vc", "dy1", "0"); f.AddGuide("iwd2", 0, "wd2", "a", "50000"); f.AddGuide("ihd2", 0, "hd2", "a", "50000"); f.AddGuide("sdx1", 0, "iwd2", "98079", "100000"); f.AddGuide("sdx2", 0, "iwd2", "83147", "100000"); f.AddGuide("sdx3", 0, "iwd2", "55557", "100000"); f.AddGuide("sdx4", 0, "iwd2", "19509", "100000"); f.AddGuide("sdy1", 0, "ihd2", "98079", "100000"); f.AddGuide("sdy2", 0, "ihd2", "83147", "100000"); f.AddGuide("sdy3", 0, "ihd2", "55557", "100000"); f.AddGuide("sdy4", 0, "ihd2", "19509", "100000"); f.AddGuide("sx1", 1, "hc", "0", "sdx1"); f.AddGuide("sx2", 1, "hc", "0", "sdx2"); f.AddGuide("sx3", 1, "hc", "0", "sdx3"); f.AddGuide("sx4", 1, "hc", "0", "sdx4"); f.AddGuide("sx5", 1, "hc", "sdx4", "0"); f.AddGuide("sx6", 1, "hc", "sdx3", "0"); f.AddGuide("sx7", 1, "hc", "sdx2", "0"); f.AddGuide("sx8", 1, "hc", "sdx1", "0"); f.AddGuide("sy1", 1, "vc", "0", "sdy1"); f.AddGuide("sy2", 1, "vc", "0", "sdy2"); f.AddGuide("sy3", 1, "vc", "0", "sdy3"); f.AddGuide("sy4", 1, "vc", "0", "sdy4"); f.AddGuide("sy5", 1, "vc", "sdy4", "0"); f.AddGuide("sy6", 1, "vc", "sdy3", "0"); f.AddGuide("sy7", 1, "vc", "sdy2", "0"); f.AddGuide("sy8", 1, "vc", "sdy1", "0"); f.AddGuide("idx", 7, "iwd2", "2700000"); f.AddGuide("idy", 12, "ihd2", "2700000"); f.AddGuide("il", 1, "hc", "0", "idx"); f.AddGuide("it", 1, "vc", "0", "idy"); f.AddGuide("ir", 1, "hc", "idx", "0"); f.AddGuide("ib", 1, "vc", "idy", "0"); f.AddGuide("yAdj", 1, "vc", "0", "ihd2"); f.AddHandleXY(undefined, "0", "0", "adj", "0", "50000", "hc", "yAdj"); f.AddCnx("0", "x5", "y2"); f.AddCnx("0", "x6", "y3"); f.AddCnx("0", "r", "vc"); f.AddCnx("0", "x6", "y4"); f.AddCnx("0", "x5", "y5"); f.AddCnx("cd4", "x4", "y6"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd4", "x3", "y6"); f.AddCnx("cd2", "x2", "y5"); f.AddCnx("cd2", "x1", "y4"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd2", "x1", "y3"); f.AddCnx("cd2", "x2", "y2"); f.AddCnx("_3cd4", "x3", "y1"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("_3cd4", "x4", "y1"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(2, "sx1", "sy4"); f.AddPathCommand(2, "x1", "y3"); f.AddPathCommand(2, "sx2", "sy3"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "sx3", "sy2"); f.AddPathCommand(2, "x3", "y1"); f.AddPathCommand(2, "sx4", "sy1"); f.AddPathCommand(2, "hc", "t"); f.AddPathCommand(2, "sx5", "sy1"); f.AddPathCommand(2, "x4", "y1"); f.AddPathCommand(2, "sx6", "sy2"); f.AddPathCommand(2, "x5", "y2"); f.AddPathCommand(2, "sx7", "sy3"); f.AddPathCommand(2, "x6", "y3"); f.AddPathCommand(2, "sx8", "sy4"); f.AddPathCommand(2, "r", "vc"); f.AddPathCommand(2, "sx8", "sy5"); f.AddPathCommand(2, "x6", "y4"); f.AddPathCommand(2, "sx7", "sy6"); f.AddPathCommand(2, "x5", "y5"); f.AddPathCommand(2, "sx6", "sy7"); f.AddPathCommand(2, "x4", "y6"); f.AddPathCommand(2, "sx5", "sy8"); f.AddPathCommand(2, "hc", "b"); f.AddPathCommand(2, "sx4", "sy8"); f.AddPathCommand(2, "x3", "y6"); f.AddPathCommand(2, "sx3", "sy7"); f.AddPathCommand(2, "x2", "y5"); f.AddPathCommand(2, "sx2", "sy6"); f.AddPathCommand(2, "x1", "y4"); f.AddPathCommand(2, "sx1", "sy5"); f.AddPathCommand(6); break; case "star24": f.AddAdj("adj", 15, "37500"); f.AddGuide("a", 10, "0", "adj", "50000"); f.AddGuide("dx1", 7, "wd2", "900000"); f.AddGuide("dx2", 7, "wd2", "1800000"); f.AddGuide("dx3", 7, "wd2", "2700000"); f.AddGuide("dx4", 15, "wd4"); f.AddGuide("dx5", 7, "wd2", "4500000"); f.AddGuide("dy1", 12, "hd2", "4500000"); f.AddGuide("dy2", 12, "hd2", "3600000"); f.AddGuide("dy3", 12, "hd2", "2700000"); f.AddGuide("dy4", 15, "hd4"); f.AddGuide("dy5", 12, "hd2", "900000"); f.AddGuide("x1", 1, "hc", "0", "dx1"); f.AddGuide("x2", 1, "hc", "0", "dx2"); f.AddGuide("x3", 1, "hc", "0", "dx3"); f.AddGuide("x4", 1, "hc", "0", "dx4"); f.AddGuide("x5", 1, "hc", "0", "dx5"); f.AddGuide("x6", 1, "hc", "dx5", "0"); f.AddGuide("x7", 1, "hc", "dx4", "0"); f.AddGuide("x8", 1, "hc", "dx3", "0"); f.AddGuide("x9", 1, "hc", "dx2", "0"); f.AddGuide("x10", 1, "hc", "dx1", "0"); f.AddGuide("y1", 1, "vc", "0", "dy1"); f.AddGuide("y2", 1, "vc", "0", "dy2"); f.AddGuide("y3", 1, "vc", "0", "dy3"); f.AddGuide("y4", 1, "vc", "0", "dy4"); f.AddGuide("y5", 1, "vc", "0", "dy5"); f.AddGuide("y6", 1, "vc", "dy5", "0"); f.AddGuide("y7", 1, "vc", "dy4", "0"); f.AddGuide("y8", 1, "vc", "dy3", "0"); f.AddGuide("y9", 1, "vc", "dy2", "0"); f.AddGuide("y10", 1, "vc", "dy1", "0"); f.AddGuide("iwd2", 0, "wd2", "a", "50000"); f.AddGuide("ihd2", 0, "hd2", "a", "50000"); f.AddGuide("sdx1", 0, "iwd2", "99144", "100000"); f.AddGuide("sdx2", 0, "iwd2", "92388", "100000"); f.AddGuide("sdx3", 0, "iwd2", "79335", "100000"); f.AddGuide("sdx4", 0, "iwd2", "60876", "100000"); f.AddGuide("sdx5", 0, "iwd2", "38268", "100000"); f.AddGuide("sdx6", 0, "iwd2", "13053", "100000"); f.AddGuide("sdy1", 0, "ihd2", "99144", "100000"); f.AddGuide("sdy2", 0, "ihd2", "92388", "100000"); f.AddGuide("sdy3", 0, "ihd2", "79335", "100000"); f.AddGuide("sdy4", 0, "ihd2", "60876", "100000"); f.AddGuide("sdy5", 0, "ihd2", "38268", "100000"); f.AddGuide("sdy6", 0, "ihd2", "13053", "100000"); f.AddGuide("sx1", 1, "hc", "0", "sdx1"); f.AddGuide("sx2", 1, "hc", "0", "sdx2"); f.AddGuide("sx3", 1, "hc", "0", "sdx3"); f.AddGuide("sx4", 1, "hc", "0", "sdx4"); f.AddGuide("sx5", 1, "hc", "0", "sdx5"); f.AddGuide("sx6", 1, "hc", "0", "sdx6"); f.AddGuide("sx7", 1, "hc", "sdx6", "0"); f.AddGuide("sx8", 1, "hc", "sdx5", "0"); f.AddGuide("sx9", 1, "hc", "sdx4", "0"); f.AddGuide("sx10", 1, "hc", "sdx3", "0"); f.AddGuide("sx11", 1, "hc", "sdx2", "0"); f.AddGuide("sx12", 1, "hc", "sdx1", "0"); f.AddGuide("sy1", 1, "vc", "0", "sdy1"); f.AddGuide("sy2", 1, "vc", "0", "sdy2"); f.AddGuide("sy3", 1, "vc", "0", "sdy3"); f.AddGuide("sy4", 1, "vc", "0", "sdy4"); f.AddGuide("sy5", 1, "vc", "0", "sdy5"); f.AddGuide("sy6", 1, "vc", "0", "sdy6"); f.AddGuide("sy7", 1, "vc", "sdy6", "0"); f.AddGuide("sy8", 1, "vc", "sdy5", "0"); f.AddGuide("sy9", 1, "vc", "sdy4", "0"); f.AddGuide("sy10", 1, "vc", "sdy3", "0"); f.AddGuide("sy11", 1, "vc", "sdy2", "0"); f.AddGuide("sy12", 1, "vc", "sdy1", "0"); f.AddGuide("idx", 7, "iwd2", "2700000"); f.AddGuide("idy", 12, "ihd2", "2700000"); f.AddGuide("il", 1, "hc", "0", "idx"); f.AddGuide("it", 1, "vc", "0", "idy"); f.AddGuide("ir", 1, "hc", "idx", "0"); f.AddGuide("ib", 1, "vc", "idy", "0"); f.AddGuide("yAdj", 1, "vc", "0", "ihd2"); f.AddHandleXY(undefined, "0", "0", "adj", "0", "50000", "hc", "yAdj"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(2, "sx1", "sy6"); f.AddPathCommand(2, "x1", "y5"); f.AddPathCommand(2, "sx2", "sy5"); f.AddPathCommand(2, "x2", "y4"); f.AddPathCommand(2, "sx3", "sy4"); f.AddPathCommand(2, "x3", "y3"); f.AddPathCommand(2, "sx4", "sy3"); f.AddPathCommand(2, "x4", "y2"); f.AddPathCommand(2, "sx5", "sy2"); f.AddPathCommand(2, "x5", "y1"); f.AddPathCommand(2, "sx6", "sy1"); f.AddPathCommand(2, "hc", "t"); f.AddPathCommand(2, "sx7", "sy1"); f.AddPathCommand(2, "x6", "y1"); f.AddPathCommand(2, "sx8", "sy2"); f.AddPathCommand(2, "x7", "y2"); f.AddPathCommand(2, "sx9", "sy3"); f.AddPathCommand(2, "x8", "y3"); f.AddPathCommand(2, "sx10", "sy4"); f.AddPathCommand(2, "x9", "y4"); f.AddPathCommand(2, "sx11", "sy5"); f.AddPathCommand(2, "x10", "y5"); f.AddPathCommand(2, "sx12", "sy6"); f.AddPathCommand(2, "r", "vc"); f.AddPathCommand(2, "sx12", "sy7"); f.AddPathCommand(2, "x10", "y6"); f.AddPathCommand(2, "sx11", "sy8"); f.AddPathCommand(2, "x9", "y7"); f.AddPathCommand(2, "sx10", "sy9"); f.AddPathCommand(2, "x8", "y8"); f.AddPathCommand(2, "sx9", "sy10"); f.AddPathCommand(2, "x7", "y9"); f.AddPathCommand(2, "sx8", "sy11"); f.AddPathCommand(2, "x6", "y10"); f.AddPathCommand(2, "sx7", "sy12"); f.AddPathCommand(2, "hc", "b"); f.AddPathCommand(2, "sx6", "sy12"); f.AddPathCommand(2, "x5", "y10"); f.AddPathCommand(2, "sx5", "sy11"); f.AddPathCommand(2, "x4", "y9"); f.AddPathCommand(2, "sx4", "sy10"); f.AddPathCommand(2, "x3", "y8"); f.AddPathCommand(2, "sx3", "sy9"); f.AddPathCommand(2, "x2", "y7"); f.AddPathCommand(2, "sx2", "sy8"); f.AddPathCommand(2, "x1", "y6"); f.AddPathCommand(2, "sx1", "sy7"); f.AddPathCommand(6); break; case "star32": f.AddAdj("adj", 15, "37500"); f.AddGuide("a", 10, "0", "adj", "50000"); f.AddGuide("dx1", 0, "wd2", "98079", "100000"); f.AddGuide("dx2", 0, "wd2", "92388", "100000"); f.AddGuide("dx3", 0, "wd2", "83147", "100000"); f.AddGuide("dx4", 7, "wd2", "2700000"); f.AddGuide("dx5", 0, "wd2", "55557", "100000"); f.AddGuide("dx6", 0, "wd2", "38268", "100000"); f.AddGuide("dx7", 0, "wd2", "19509", "100000"); f.AddGuide("dy1", 0, "hd2", "98079", "100000"); f.AddGuide("dy2", 0, "hd2", "92388", "100000"); f.AddGuide("dy3", 0, "hd2", "83147", "100000"); f.AddGuide("dy4", 12, "hd2", "2700000"); f.AddGuide("dy5", 0, "hd2", "55557", "100000"); f.AddGuide("dy6", 0, "hd2", "38268", "100000"); f.AddGuide("dy7", 0, "hd2", "19509", "100000"); f.AddGuide("x1", 1, "hc", "0", "dx1"); f.AddGuide("x2", 1, "hc", "0", "dx2"); f.AddGuide("x3", 1, "hc", "0", "dx3"); f.AddGuide("x4", 1, "hc", "0", "dx4"); f.AddGuide("x5", 1, "hc", "0", "dx5"); f.AddGuide("x6", 1, "hc", "0", "dx6"); f.AddGuide("x7", 1, "hc", "0", "dx7"); f.AddGuide("x8", 1, "hc", "dx7", "0"); f.AddGuide("x9", 1, "hc", "dx6", "0"); f.AddGuide("x10", 1, "hc", "dx5", "0"); f.AddGuide("x11", 1, "hc", "dx4", "0"); f.AddGuide("x12", 1, "hc", "dx3", "0"); f.AddGuide("x13", 1, "hc", "dx2", "0"); f.AddGuide("x14", 1, "hc", "dx1", "0"); f.AddGuide("y1", 1, "vc", "0", "dy1"); f.AddGuide("y2", 1, "vc", "0", "dy2"); f.AddGuide("y3", 1, "vc", "0", "dy3"); f.AddGuide("y4", 1, "vc", "0", "dy4"); f.AddGuide("y5", 1, "vc", "0", "dy5"); f.AddGuide("y6", 1, "vc", "0", "dy6"); f.AddGuide("y7", 1, "vc", "0", "dy7"); f.AddGuide("y8", 1, "vc", "dy7", "0"); f.AddGuide("y9", 1, "vc", "dy6", "0"); f.AddGuide("y10", 1, "vc", "dy5", "0"); f.AddGuide("y11", 1, "vc", "dy4", "0"); f.AddGuide("y12", 1, "vc", "dy3", "0"); f.AddGuide("y13", 1, "vc", "dy2", "0"); f.AddGuide("y14", 1, "vc", "dy1", "0"); f.AddGuide("iwd2", 0, "wd2", "a", "50000"); f.AddGuide("ihd2", 0, "hd2", "a", "50000"); f.AddGuide("sdx1", 0, "iwd2", "99518", "100000"); f.AddGuide("sdx2", 0, "iwd2", "95694", "100000"); f.AddGuide("sdx3", 0, "iwd2", "88192", "100000"); f.AddGuide("sdx4", 0, "iwd2", "77301", "100000"); f.AddGuide("sdx5", 0, "iwd2", "63439", "100000"); f.AddGuide("sdx6", 0, "iwd2", "47140", "100000"); f.AddGuide("sdx7", 0, "iwd2", "29028", "100000"); f.AddGuide("sdx8", 0, "iwd2", "9802", "100000"); f.AddGuide("sdy1", 0, "ihd2", "99518", "100000"); f.AddGuide("sdy2", 0, "ihd2", "95694", "100000"); f.AddGuide("sdy3", 0, "ihd2", "88192", "100000"); f.AddGuide("sdy4", 0, "ihd2", "77301", "100000"); f.AddGuide("sdy5", 0, "ihd2", "63439", "100000"); f.AddGuide("sdy6", 0, "ihd2", "47140", "100000"); f.AddGuide("sdy7", 0, "ihd2", "29028", "100000"); f.AddGuide("sdy8", 0, "ihd2", "9802", "100000"); f.AddGuide("sx1", 1, "hc", "0", "sdx1"); f.AddGuide("sx2", 1, "hc", "0", "sdx2"); f.AddGuide("sx3", 1, "hc", "0", "sdx3"); f.AddGuide("sx4", 1, "hc", "0", "sdx4"); f.AddGuide("sx5", 1, "hc", "0", "sdx5"); f.AddGuide("sx6", 1, "hc", "0", "sdx6"); f.AddGuide("sx7", 1, "hc", "0", "sdx7"); f.AddGuide("sx8", 1, "hc", "0", "sdx8"); f.AddGuide("sx9", 1, "hc", "sdx8", "0"); f.AddGuide("sx10", 1, "hc", "sdx7", "0"); f.AddGuide("sx11", 1, "hc", "sdx6", "0"); f.AddGuide("sx12", 1, "hc", "sdx5", "0"); f.AddGuide("sx13", 1, "hc", "sdx4", "0"); f.AddGuide("sx14", 1, "hc", "sdx3", "0"); f.AddGuide("sx15", 1, "hc", "sdx2", "0"); f.AddGuide("sx16", 1, "hc", "sdx1", "0"); f.AddGuide("sy1", 1, "vc", "0", "sdy1"); f.AddGuide("sy2", 1, "vc", "0", "sdy2"); f.AddGuide("sy3", 1, "vc", "0", "sdy3"); f.AddGuide("sy4", 1, "vc", "0", "sdy4"); f.AddGuide("sy5", 1, "vc", "0", "sdy5"); f.AddGuide("sy6", 1, "vc", "0", "sdy6"); f.AddGuide("sy7", 1, "vc", "0", "sdy7"); f.AddGuide("sy8", 1, "vc", "0", "sdy8"); f.AddGuide("sy9", 1, "vc", "sdy8", "0"); f.AddGuide("sy10", 1, "vc", "sdy7", "0"); f.AddGuide("sy11", 1, "vc", "sdy6", "0"); f.AddGuide("sy12", 1, "vc", "sdy5", "0"); f.AddGuide("sy13", 1, "vc", "sdy4", "0"); f.AddGuide("sy14", 1, "vc", "sdy3", "0"); f.AddGuide("sy15", 1, "vc", "sdy2", "0"); f.AddGuide("sy16", 1, "vc", "sdy1", "0"); f.AddGuide("idx", 7, "iwd2", "2700000"); f.AddGuide("idy", 12, "ihd2", "2700000"); f.AddGuide("il", 1, "hc", "0", "idx"); f.AddGuide("it", 1, "vc", "0", "idy"); f.AddGuide("ir", 1, "hc", "idx", "0"); f.AddGuide("ib", 1, "vc", "idy", "0"); f.AddGuide("yAdj", 1, "vc", "0", "ihd2"); f.AddHandleXY(undefined, "0", "0", "adj", "0", "50000", "hc", "yAdj"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(2, "sx1", "sy8"); f.AddPathCommand(2, "x1", "y7"); f.AddPathCommand(2, "sx2", "sy7"); f.AddPathCommand(2, "x2", "y6"); f.AddPathCommand(2, "sx3", "sy6"); f.AddPathCommand(2, "x3", "y5"); f.AddPathCommand(2, "sx4", "sy5"); f.AddPathCommand(2, "x4", "y4"); f.AddPathCommand(2, "sx5", "sy4"); f.AddPathCommand(2, "x5", "y3"); f.AddPathCommand(2, "sx6", "sy3"); f.AddPathCommand(2, "x6", "y2"); f.AddPathCommand(2, "sx7", "sy2"); f.AddPathCommand(2, "x7", "y1"); f.AddPathCommand(2, "sx8", "sy1"); f.AddPathCommand(2, "hc", "t"); f.AddPathCommand(2, "sx9", "sy1"); f.AddPathCommand(2, "x8", "y1"); f.AddPathCommand(2, "sx10", "sy2"); f.AddPathCommand(2, "x9", "y2"); f.AddPathCommand(2, "sx11", "sy3"); f.AddPathCommand(2, "x10", "y3"); f.AddPathCommand(2, "sx12", "sy4"); f.AddPathCommand(2, "x11", "y4"); f.AddPathCommand(2, "sx13", "sy5"); f.AddPathCommand(2, "x12", "y5"); f.AddPathCommand(2, "sx14", "sy6"); f.AddPathCommand(2, "x13", "y6"); f.AddPathCommand(2, "sx15", "sy7"); f.AddPathCommand(2, "x14", "y7"); f.AddPathCommand(2, "sx16", "sy8"); f.AddPathCommand(2, "r", "vc"); f.AddPathCommand(2, "sx16", "sy9"); f.AddPathCommand(2, "x14", "y8"); f.AddPathCommand(2, "sx15", "sy10"); f.AddPathCommand(2, "x13", "y9"); f.AddPathCommand(2, "sx14", "sy11"); f.AddPathCommand(2, "x12", "y10"); f.AddPathCommand(2, "sx13", "sy12"); f.AddPathCommand(2, "x11", "y11"); f.AddPathCommand(2, "sx12", "sy13"); f.AddPathCommand(2, "x10", "y12"); f.AddPathCommand(2, "sx11", "sy14"); f.AddPathCommand(2, "x9", "y13"); f.AddPathCommand(2, "sx10", "sy15"); f.AddPathCommand(2, "x8", "y14"); f.AddPathCommand(2, "sx9", "sy16"); f.AddPathCommand(2, "hc", "b"); f.AddPathCommand(2, "sx8", "sy16"); f.AddPathCommand(2, "x7", "y14"); f.AddPathCommand(2, "sx7", "sy15"); f.AddPathCommand(2, "x6", "y13"); f.AddPathCommand(2, "sx6", "sy14"); f.AddPathCommand(2, "x5", "y12"); f.AddPathCommand(2, "sx5", "sy13"); f.AddPathCommand(2, "x4", "y11"); f.AddPathCommand(2, "sx4", "sy12"); f.AddPathCommand(2, "x3", "y10"); f.AddPathCommand(2, "sx3", "sy11"); f.AddPathCommand(2, "x2", "y9"); f.AddPathCommand(2, "sx2", "sy10"); f.AddPathCommand(2, "x1", "y8"); f.AddPathCommand(2, "sx1", "sy9"); f.AddPathCommand(6); break; case "star4": f.AddAdj("adj", 15, "12500"); f.AddGuide("a", 10, "0", "adj", "50000"); f.AddGuide("iwd2", 0, "wd2", "a", "50000"); f.AddGuide("ihd2", 0, "hd2", "a", "50000"); f.AddGuide("sdx", 7, "iwd2", "2700000"); f.AddGuide("sdy", 12, "ihd2", "2700000"); f.AddGuide("sx1", 1, "hc", "0", "sdx"); f.AddGuide("sx2", 1, "hc", "sdx", "0"); f.AddGuide("sy1", 1, "vc", "0", "sdy"); f.AddGuide("sy2", 1, "vc", "sdy", "0"); f.AddGuide("yAdj", 1, "vc", "0", "ihd2"); f.AddHandleXY(undefined, "0", "0", "adj", "0", "50000", "hc", "yAdj"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("sx1", "sy1", "sx2", "sy2"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(2, "sx1", "sy1"); f.AddPathCommand(2, "hc", "t"); f.AddPathCommand(2, "sx2", "sy1"); f.AddPathCommand(2, "r", "vc"); f.AddPathCommand(2, "sx2", "sy2"); f.AddPathCommand(2, "hc", "b"); f.AddPathCommand(2, "sx1", "sy2"); f.AddPathCommand(6); break; case "star5": f.AddAdj("adj", 15, "19098"); f.AddAdj("hf", 15, "105146"); f.AddAdj("vf", 15, "110557"); f.AddGuide("a", 10, "0", "adj", "50000"); f.AddGuide("swd2", 0, "wd2", "hf", "100000"); f.AddGuide("shd2", 0, "hd2", "vf", "100000"); f.AddGuide("svc", 0, "vc", "vf", "100000"); f.AddGuide("dx1", 7, "swd2", "1080000"); f.AddGuide("dx2", 7, "swd2", "18360000"); f.AddGuide("dy1", 12, "shd2", "1080000"); f.AddGuide("dy2", 12, "shd2", "18360000"); f.AddGuide("x1", 1, "hc", "0", "dx1"); f.AddGuide("x2", 1, "hc", "0", "dx2"); f.AddGuide("x3", 1, "hc", "dx2", "0"); f.AddGuide("x4", 1, "hc", "dx1", "0"); f.AddGuide("y1", 1, "svc", "0", "dy1"); f.AddGuide("y2", 1, "svc", "0", "dy2"); f.AddGuide("iwd2", 0, "swd2", "a", "50000"); f.AddGuide("ihd2", 0, "shd2", "a", "50000"); f.AddGuide("sdx1", 7, "iwd2", "20520000"); f.AddGuide("sdx2", 7, "iwd2", "3240000"); f.AddGuide("sdy1", 12, "ihd2", "3240000"); f.AddGuide("sdy2", 12, "ihd2", "20520000"); f.AddGuide("sx1", 1, "hc", "0", "sdx1"); f.AddGuide("sx2", 1, "hc", "0", "sdx2"); f.AddGuide("sx3", 1, "hc", "sdx2", "0"); f.AddGuide("sx4", 1, "hc", "sdx1", "0"); f.AddGuide("sy1", 1, "svc", "0", "sdy1"); f.AddGuide("sy2", 1, "svc", "0", "sdy2"); f.AddGuide("sy3", 1, "svc", "ihd2", "0"); f.AddGuide("yAdj", 1, "svc", "0", "ihd2"); f.AddHandleXY(undefined, "0", "0", "adj", "0", "50000", "hc", "yAdj"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "x1", "y1"); f.AddCnx("cd4", "x2", "y2"); f.AddCnx("cd4", "x3", "y2"); f.AddCnx("0", "x4", "y1"); f.AddRect("sx1", "sy1", "sx4", "sy3"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y1"); f.AddPathCommand(2, "sx2", "sy1"); f.AddPathCommand(2, "hc", "t"); f.AddPathCommand(2, "sx3", "sy1"); f.AddPathCommand(2, "x4", "y1"); f.AddPathCommand(2, "sx4", "sy2"); f.AddPathCommand(2, "x3", "y2"); f.AddPathCommand(2, "hc", "sy3"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "sx1", "sy2"); f.AddPathCommand(6); break; case "star6": f.AddAdj("adj", 15, "28868"); f.AddAdj("hf", 15, "115470"); f.AddGuide("a", 10, "0", "adj", "50000"); f.AddGuide("swd2", 0, "wd2", "hf", "100000"); f.AddGuide("dx1", 7, "swd2", "1800000"); f.AddGuide("x1", 1, "hc", "0", "dx1"); f.AddGuide("x2", 1, "hc", "dx1", "0"); f.AddGuide("y2", 1, "vc", "hd4", "0"); f.AddGuide("iwd2", 0, "swd2", "a", "50000"); f.AddGuide("ihd2", 0, "hd2", "a", "50000"); f.AddGuide("sdx2", 0, "iwd2", "1", "2"); f.AddGuide("sx1", 1, "hc", "0", "iwd2"); f.AddGuide("sx2", 1, "hc", "0", "sdx2"); f.AddGuide("sx3", 1, "hc", "sdx2", "0"); f.AddGuide("sx4", 1, "hc", "iwd2", "0"); f.AddGuide("sdy1", 12, "ihd2", "3600000"); f.AddGuide("sy1", 1, "vc", "0", "sdy1"); f.AddGuide("sy2", 1, "vc", "sdy1", "0"); f.AddGuide("yAdj", 1, "vc", "0", "ihd2"); f.AddHandleXY(undefined, "0", "0", "adj", "0", "50000", "hc", "yAdj"); f.AddCnx("0", "x2", "hd4"); f.AddCnx("0", "x2", "y2"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "x1", "y2"); f.AddCnx("cd2", "x1", "hd4"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("sx1", "sy1", "sx4", "sy2"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "x1", "hd4"); f.AddPathCommand(2, "sx2", "sy1"); f.AddPathCommand(2, "hc", "t"); f.AddPathCommand(2, "sx3", "sy1"); f.AddPathCommand(2, "x2", "hd4"); f.AddPathCommand(2, "sx4", "vc"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "sx3", "sy2"); f.AddPathCommand(2, "hc", "b"); f.AddPathCommand(2, "sx2", "sy2"); f.AddPathCommand(2, "x1", "y2"); f.AddPathCommand(2, "sx1", "vc"); f.AddPathCommand(6); break; case "star7": f.AddAdj("adj", 15, "34601"); f.AddAdj("hf", 15, "102572"); f.AddAdj("vf", 15, "105210"); f.AddGuide("a", 10, "0", "adj", "50000"); f.AddGuide("swd2", 0, "wd2", "hf", "100000"); f.AddGuide("shd2", 0, "hd2", "vf", "100000"); f.AddGuide("svc", 0, "vc", "vf", "100000"); f.AddGuide("dx1", 0, "swd2", "97493", "100000"); f.AddGuide("dx2", 0, "swd2", "78183", "100000"); f.AddGuide("dx3", 0, "swd2", "43388", "100000"); f.AddGuide("dy1", 0, "shd2", "62349", "100000"); f.AddGuide("dy2", 0, "shd2", "22252", "100000"); f.AddGuide("dy3", 0, "shd2", "90097", "100000"); f.AddGuide("x1", 1, "hc", "0", "dx1"); f.AddGuide("x2", 1, "hc", "0", "dx2"); f.AddGuide("x3", 1, "hc", "0", "dx3"); f.AddGuide("x4", 1, "hc", "dx3", "0"); f.AddGuide("x5", 1, "hc", "dx2", "0"); f.AddGuide("x6", 1, "hc", "dx1", "0"); f.AddGuide("y1", 1, "svc", "0", "dy1"); f.AddGuide("y2", 1, "svc", "dy2", "0"); f.AddGuide("y3", 1, "svc", "dy3", "0"); f.AddGuide("iwd2", 0, "swd2", "a", "50000"); f.AddGuide("ihd2", 0, "shd2", "a", "50000"); f.AddGuide("sdx1", 0, "iwd2", "97493", "100000"); f.AddGuide("sdx2", 0, "iwd2", "78183", "100000"); f.AddGuide("sdx3", 0, "iwd2", "43388", "100000"); f.AddGuide("sx1", 1, "hc", "0", "sdx1"); f.AddGuide("sx2", 1, "hc", "0", "sdx2"); f.AddGuide("sx3", 1, "hc", "0", "sdx3"); f.AddGuide("sx4", 1, "hc", "sdx3", "0"); f.AddGuide("sx5", 1, "hc", "sdx2", "0"); f.AddGuide("sx6", 1, "hc", "sdx1", "0"); f.AddGuide("sdy1", 0, "ihd2", "90097", "100000"); f.AddGuide("sdy2", 0, "ihd2", "22252", "100000"); f.AddGuide("sdy3", 0, "ihd2", "62349", "100000"); f.AddGuide("sy1", 1, "svc", "0", "sdy1"); f.AddGuide("sy2", 1, "svc", "0", "sdy2"); f.AddGuide("sy3", 1, "svc", "sdy3", "0"); f.AddGuide("sy4", 1, "svc", "ihd2", "0"); f.AddGuide("yAdj", 1, "svc", "0", "ihd2"); f.AddHandleXY(undefined, "0", "0", "adj", "0", "50000", "hc", "yAdj"); f.AddCnx("0", "x5", "y1"); f.AddCnx("0", "x6", "y2"); f.AddCnx("cd4", "x4", "y3"); f.AddCnx("cd4", "x3", "y3"); f.AddCnx("cd2", "x1", "y2"); f.AddCnx("cd2", "x2", "y1"); f.AddCnx("_3cd4", "hc", "t"); f.AddRect("sx2", "sy1", "sx5", "sy3"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "x1", "y2"); f.AddPathCommand(2, "sx1", "sy2"); f.AddPathCommand(2, "x2", "y1"); f.AddPathCommand(2, "sx3", "sy1"); f.AddPathCommand(2, "hc", "t"); f.AddPathCommand(2, "sx4", "sy1"); f.AddPathCommand(2, "x5", "y1"); f.AddPathCommand(2, "sx6", "sy2"); f.AddPathCommand(2, "x6", "y2"); f.AddPathCommand(2, "sx5", "sy3"); f.AddPathCommand(2, "x4", "y3"); f.AddPathCommand(2, "hc", "sy4"); f.AddPathCommand(2, "x3", "y3"); f.AddPathCommand(2, "sx2", "sy3"); f.AddPathCommand(6); break; case "star8": f.AddAdj("adj", 15, "37500"); f.AddGuide("a", 10, "0", "adj", "50000"); f.AddGuide("dx1", 7, "wd2", "2700000"); f.AddGuide("x1", 1, "hc", "0", "dx1"); f.AddGuide("x2", 1, "hc", "dx1", "0"); f.AddGuide("dy1", 12, "hd2", "2700000"); f.AddGuide("y1", 1, "vc", "0", "dy1"); f.AddGuide("y2", 1, "vc", "dy1", "0"); f.AddGuide("iwd2", 0, "wd2", "a", "50000"); f.AddGuide("ihd2", 0, "hd2", "a", "50000"); f.AddGuide("sdx1", 0, "iwd2", "92388", "100000"); f.AddGuide("sdx2", 0, "iwd2", "38268", "100000"); f.AddGuide("sdy1", 0, "ihd2", "92388", "100000"); f.AddGuide("sdy2", 0, "ihd2", "38268", "100000"); f.AddGuide("sx1", 1, "hc", "0", "sdx1"); f.AddGuide("sx2", 1, "hc", "0", "sdx2"); f.AddGuide("sx3", 1, "hc", "sdx2", "0"); f.AddGuide("sx4", 1, "hc", "sdx1", "0"); f.AddGuide("sy1", 1, "vc", "0", "sdy1"); f.AddGuide("sy2", 1, "vc", "0", "sdy2"); f.AddGuide("sy3", 1, "vc", "sdy2", "0"); f.AddGuide("sy4", 1, "vc", "sdy1", "0"); f.AddGuide("yAdj", 1, "vc", "0", "ihd2"); f.AddHandleXY(undefined, "0", "0", "adj", "0", "50000", "hc", "yAdj"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "x2", "y2"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd4", "x1", "y2"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "x1", "y1"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("_3cd4", "x2", "y1"); f.AddRect("sx1", "sy1", "sx4", "sy4"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(2, "sx1", "sy2"); f.AddPathCommand(2, "x1", "y1"); f.AddPathCommand(2, "sx2", "sy1"); f.AddPathCommand(2, "hc", "t"); f.AddPathCommand(2, "sx3", "sy1"); f.AddPathCommand(2, "x2", "y1"); f.AddPathCommand(2, "sx4", "sy2"); f.AddPathCommand(2, "r", "vc"); f.AddPathCommand(2, "sx4", "sy3"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "sx3", "sy4"); f.AddPathCommand(2, "hc", "b"); f.AddPathCommand(2, "sx2", "sy4"); f.AddPathCommand(2, "x1", "y2"); f.AddPathCommand(2, "sx1", "sy3"); f.AddPathCommand(6); break; case "straightConnector1": f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, undefined, "none", undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "r", "b"); break; case "stripedRightArrow": f.AddAdj("adj1", 15, "50000"); f.AddAdj("adj2", 15, "50000"); f.AddGuide("maxAdj2", 0, "84375", "w", "ss"); f.AddGuide("a1", 10, "0", "adj1", "100000"); f.AddGuide("a2", 10, "0", "adj2", "maxAdj2"); f.AddGuide("x4", 0, "ss", "5", "32"); f.AddGuide("dx5", 0, "ss", "a2", "100000"); f.AddGuide("x5", 1, "r", "0", "dx5"); f.AddGuide("dy1", 0, "h", "a1", "200000"); f.AddGuide("y1", 1, "vc", "0", "dy1"); f.AddGuide("y2", 1, "vc", "dy1", "0"); f.AddGuide("dx6", 0, "dy1", "dx5", "hd2"); f.AddGuide("x6", 1, "r", "0", "dx6"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "100000", "l", "y1"); f.AddHandleXY("adj2", "0", "maxAdj2", undefined, "0", "0", "x5", "t"); f.AddCnx("_3cd4", "x5", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "x5", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("x4", "y1", "x6", "y2"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "y1"); f.AddPathCommand(2, "ssd32", "y1"); f.AddPathCommand(2, "ssd32", "y2"); f.AddPathCommand(2, "l", "y2"); f.AddPathCommand(6); f.AddPathCommand(1, "ssd16", "y1"); f.AddPathCommand(2, "ssd8", "y1"); f.AddPathCommand(2, "ssd8", "y2"); f.AddPathCommand(2, "ssd16", "y2"); f.AddPathCommand(6); f.AddPathCommand(1, "x4", "y1"); f.AddPathCommand(2, "x5", "y1"); f.AddPathCommand(2, "x5", "t"); f.AddPathCommand(2, "r", "vc"); f.AddPathCommand(2, "x5", "b"); f.AddPathCommand(2, "x5", "y2"); f.AddPathCommand(2, "x4", "y2"); f.AddPathCommand(6); break; case "sun": f.AddAdj("adj", 15, "25000"); f.AddGuide("a", 10, "12500", "adj", "46875"); f.AddGuide("g0", 1, "50000", "0", "a"); f.AddGuide("g1", 0, "g0", "30274", "32768"); f.AddGuide("g2", 0, "g0", "12540", "32768"); f.AddGuide("g3", 1, "g1", "50000", "0"); f.AddGuide("g4", 1, "g2", "50000", "0"); f.AddGuide("g5", 1, "50000", "0", "g1"); f.AddGuide("g6", 1, "50000", "0", "g2"); f.AddGuide("g7", 0, "g0", "23170", "32768"); f.AddGuide("g8", 1, "50000", "g7", "0"); f.AddGuide("g9", 1, "50000", "0", "g7"); f.AddGuide("g10", 0, "g5", "3", "4"); f.AddGuide("g11", 0, "g6", "3", "4"); f.AddGuide("g12", 1, "g10", "3662", "0"); f.AddGuide("g13", 1, "g11", "3662", "0"); f.AddGuide("g14", 1, "g11", "12500", "0"); f.AddGuide("g15", 1, "100000", "0", "g10"); f.AddGuide("g16", 1, "100000", "0", "g12"); f.AddGuide("g17", 1, "100000", "0", "g13"); f.AddGuide("g18", 1, "100000", "0", "g14"); f.AddGuide("ox1", 0, "w", "18436", "21600"); f.AddGuide("oy1", 0, "h", "3163", "21600"); f.AddGuide("ox2", 0, "w", "3163", "21600"); f.AddGuide("oy2", 0, "h", "18436", "21600"); f.AddGuide("x8", 0, "w", "g8", "100000"); f.AddGuide("x9", 0, "w", "g9", "100000"); f.AddGuide("x10", 0, "w", "g10", "100000"); f.AddGuide("x12", 0, "w", "g12", "100000"); f.AddGuide("x13", 0, "w", "g13", "100000"); f.AddGuide("x14", 0, "w", "g14", "100000"); f.AddGuide("x15", 0, "w", "g15", "100000"); f.AddGuide("x16", 0, "w", "g16", "100000"); f.AddGuide("x17", 0, "w", "g17", "100000"); f.AddGuide("x18", 0, "w", "g18", "100000"); f.AddGuide("x19", 0, "w", "a", "100000"); f.AddGuide("wR", 0, "w", "g0", "100000"); f.AddGuide("hR", 0, "h", "g0", "100000"); f.AddGuide("y8", 0, "h", "g8", "100000"); f.AddGuide("y9", 0, "h", "g9", "100000"); f.AddGuide("y10", 0, "h", "g10", "100000"); f.AddGuide("y12", 0, "h", "g12", "100000"); f.AddGuide("y13", 0, "h", "g13", "100000"); f.AddGuide("y14", 0, "h", "g14", "100000"); f.AddGuide("y15", 0, "h", "g15", "100000"); f.AddGuide("y16", 0, "h", "g16", "100000"); f.AddGuide("y17", 0, "h", "g17", "100000"); f.AddGuide("y18", 0, "h", "g18", "100000"); f.AddHandleXY("adj", "12500", "46875", undefined, "0", "0", "x19", "vc"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("x9", "y9", "x8", "y8"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "r", "vc"); f.AddPathCommand(2, "x15", "y18"); f.AddPathCommand(2, "x15", "y14"); f.AddPathCommand(6); f.AddPathCommand(1, "ox1", "oy1"); f.AddPathCommand(2, "x16", "y13"); f.AddPathCommand(2, "x17", "y12"); f.AddPathCommand(6); f.AddPathCommand(1, "hc", "t"); f.AddPathCommand(2, "x18", "y10"); f.AddPathCommand(2, "x14", "y10"); f.AddPathCommand(6); f.AddPathCommand(1, "ox2", "oy1"); f.AddPathCommand(2, "x13", "y12"); f.AddPathCommand(2, "x12", "y13"); f.AddPathCommand(6); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(2, "x10", "y14"); f.AddPathCommand(2, "x10", "y18"); f.AddPathCommand(6); f.AddPathCommand(1, "ox2", "oy2"); f.AddPathCommand(2, "x12", "y17"); f.AddPathCommand(2, "x13", "y16"); f.AddPathCommand(6); f.AddPathCommand(1, "hc", "b"); f.AddPathCommand(2, "x14", "y15"); f.AddPathCommand(2, "x18", "y15"); f.AddPathCommand(6); f.AddPathCommand(1, "ox1", "oy2"); f.AddPathCommand(2, "x17", "y16"); f.AddPathCommand(2, "x16", "y17"); f.AddPathCommand(6); f.AddPathCommand(1, "x19", "vc"); f.AddPathCommand(3, "wR", "hR", "cd2", "21600000"); f.AddPathCommand(6); break; case "swooshArrow": f.AddAdj("adj1", 15, "25000"); f.AddAdj("adj2", 15, "16667"); f.AddGuide("a1", 10, "1", "adj1", "75000"); f.AddGuide("maxAdj2", 0, "70000", "w", "ss"); f.AddGuide("a2", 10, "0", "adj2", "maxAdj2"); f.AddGuide("ad1", 0, "h", "a1", "100000"); f.AddGuide("ad2", 0, "ss", "a2", "100000"); f.AddGuide("xB", 1, "r", "0", "ad2"); f.AddGuide("yB", 1, "t", "ssd8", "0"); f.AddGuide("alfa", 0, "cd4", "1", "14"); f.AddGuide("dx0", 14, "ssd8", "alfa"); f.AddGuide("xC", 1, "xB", "0", "dx0"); f.AddGuide("dx1", 14, "ad1", "alfa"); f.AddGuide("yF", 1, "yB", "ad1", "0"); f.AddGuide("xF", 1, "xB", "dx1", "0"); f.AddGuide("xE", 1, "xF", "dx0", "0"); f.AddGuide("yE", 1, "yF", "ssd8", "0"); f.AddGuide("dy2", 1, "yE", "0", "t"); f.AddGuide("dy22", 0, "dy2", "1", "2"); f.AddGuide("dy3", 0, "h", "1", "20"); f.AddGuide("yD", 1, "t", "dy22", "dy3"); f.AddGuide("dy4", 0, "hd6", "1", "1"); f.AddGuide("yP1", 1, "hd6", "dy4", "0"); f.AddGuide("xP1", 15, "wd6"); f.AddGuide("dy5", 0, "hd6", "1", "2"); f.AddGuide("yP2", 1, "yF", "dy5", "0"); f.AddGuide("xP2", 15, "wd4"); f.AddHandleXY(undefined, "0", "0", "adj1", "1", "75000", "xF", "yF"); f.AddHandleXY("adj2", "0", "maxAdj2", undefined, "0", "0", "xB", "yB"); f.AddCnx("cd4", "l", "b"); f.AddCnx("_3cd4", "xC", "t"); f.AddCnx("0", "r", "yD"); f.AddCnx("cd4", "xE", "yE"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "b"); f.AddPathCommand(4, "xP1", "yP1", "xB", "yB"); f.AddPathCommand(2, "xC", "t"); f.AddPathCommand(2, "r", "yD"); f.AddPathCommand(2, "xE", "yE"); f.AddPathCommand(2, "xF", "yF"); f.AddPathCommand(4, "xP2", "yP2", "l", "b"); f.AddPathCommand(6); break; case "teardrop": f.AddAdj("adj", 15, "100000"); f.AddGuide("a", 10, "0", "adj", "200000"); f.AddGuide("r2", 13, "2"); f.AddGuide("tw", 0, "wd2", "r2", "1"); f.AddGuide("th", 0, "hd2", "r2", "1"); f.AddGuide("sw", 0, "tw", "a", "100000"); f.AddGuide("sh", 0, "th", "a", "100000"); f.AddGuide("dx1", 7, "sw", "2700000"); f.AddGuide("dy1", 12, "sh", "2700000"); f.AddGuide("x1", 1, "hc", "dx1", "0"); f.AddGuide("y1", 1, "vc", "0", "dy1"); f.AddGuide("x2", 2, "hc", "x1", "2"); f.AddGuide("y2", 2, "vc", "y1", "2"); f.AddGuide("idx", 7, "wd2", "2700000"); f.AddGuide("idy", 12, "hd2", "2700000"); f.AddGuide("il", 1, "hc", "0", "idx"); f.AddGuide("ir", 1, "hc", "idx", "0"); f.AddGuide("it", 1, "vc", "0", "idy"); f.AddGuide("ib", 1, "vc", "idy", "0"); f.AddHandleXY("adj", "0", "200000", undefined, "0", "0", "x1", "t"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "ir", "ib"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd4", "il", "ib"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("_3cd4", "il", "it"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("_3cd4", "x1", "y1"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "vc"); f.AddPathCommand(3, "wd2", "hd2", "cd2", "cd4"); f.AddPathCommand(4, "x2", "t", "x1", "y1"); f.AddPathCommand(4, "r", "y2", "r", "vc"); f.AddPathCommand(3, "wd2", "hd2", "0", "cd4"); f.AddPathCommand(3, "wd2", "hd2", "cd4", "cd4"); f.AddPathCommand(6); break; case "trapezoid": f.AddAdj("adj", 15, "25000"); f.AddGuide("maxAdj", 0, "50000", "w", "ss"); f.AddGuide("a", 10, "0", "adj", "maxAdj"); f.AddGuide("x1", 0, "ss", "a", "200000"); f.AddGuide("x2", 0, "ss", "a", "100000"); f.AddGuide("x3", 1, "r", "0", "x2"); f.AddGuide("x4", 1, "r", "0", "x1"); f.AddGuide("il", 0, "wd3", "a", "maxAdj"); f.AddGuide("it", 0, "hd3", "a", "maxAdj"); f.AddGuide("ir", 1, "r", "0", "il"); f.AddHandleXY("adj", "0", "maxAdj", undefined, "0", "0", "x2", "t"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "x1", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "x4", "vc"); f.AddRect("il", "it", "ir", "b"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "b"); f.AddPathCommand(2, "x2", "t"); f.AddPathCommand(2, "x3", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(6); break; case "triangle": f.AddAdj("adj", 15, "50000"); f.AddGuide("a", 10, "0", "adj", "100000"); f.AddGuide("x1", 0, "w", "a", "200000"); f.AddGuide("x2", 0, "w", "a", "100000"); f.AddGuide("x3", 1, "x1", "wd2", "0"); f.AddHandleXY("adj", "0", "100000", undefined, "0", "0", "x2", "t"); f.AddCnx("_3cd4", "x2", "t"); f.AddCnx("cd2", "x1", "vc"); f.AddCnx("cd4", "l", "b"); f.AddCnx("cd4", "x2", "b"); f.AddCnx("cd4", "r", "b"); f.AddCnx("0", "x3", "vc"); f.AddRect("x1", "vc", "x3", "b"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "b"); f.AddPathCommand(2, "x2", "t"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(6); break; case "upArrowCallout": f.AddAdj("adj1", 15, "25000"); f.AddAdj("adj2", 15, "25000"); f.AddAdj("adj3", 15, "25000"); f.AddAdj("adj4", 15, "64977"); f.AddGuide("maxAdj2", 0, "50000", "w", "ss"); f.AddGuide("a2", 10, "0", "adj2", "maxAdj2"); f.AddGuide("maxAdj1", 0, "a2", "2", "1"); f.AddGuide("a1", 10, "0", "adj1", "maxAdj1"); f.AddGuide("maxAdj3", 0, "100000", "h", "ss"); f.AddGuide("a3", 10, "0", "adj3", "maxAdj3"); f.AddGuide("q2", 0, "a3", "ss", "h"); f.AddGuide("maxAdj4", 1, "100000", "0", "q2"); f.AddGuide("a4", 10, "0", "adj4", "maxAdj4"); f.AddGuide("dx1", 0, "ss", "a2", "100000"); f.AddGuide("dx2", 0, "ss", "a1", "200000"); f.AddGuide("x1", 1, "hc", "0", "dx1"); f.AddGuide("x2", 1, "hc", "0", "dx2"); f.AddGuide("x3", 1, "hc", "dx2", "0"); f.AddGuide("x4", 1, "hc", "dx1", "0"); f.AddGuide("y1", 0, "ss", "a3", "100000"); f.AddGuide("dy2", 0, "h", "a4", "100000"); f.AddGuide("y2", 1, "b", "0", "dy2"); f.AddGuide("y3", 2, "y2", "b", "2"); f.AddHandleXY("adj1", "0", "maxAdj1", undefined, "0", "0", "x2", "y1"); f.AddHandleXY("adj2", "0", "maxAdj2", undefined, "0", "0", "x1", "t"); f.AddHandleXY(undefined, "0", "0", "adj3", "0", "maxAdj3", "r", "y1"); f.AddHandleXY(undefined, "0", "0", "adj4", "0", "maxAdj4", "l", "y2"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "y2"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "y2"); f.AddRect("l", "y2", "r", "b"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "y2"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "x2", "y1"); f.AddPathCommand(2, "x1", "y1"); f.AddPathCommand(2, "hc", "t"); f.AddPathCommand(2, "x4", "y1"); f.AddPathCommand(2, "x3", "y1"); f.AddPathCommand(2, "x3", "y2"); f.AddPathCommand(2, "r", "y2"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(6); break; case "upDownArrow": f.AddAdj("adj1", 15, "50000"); f.AddAdj("adj2", 15, "50000"); f.AddGuide("maxAdj2", 0, "50000", "h", "ss"); f.AddGuide("a1", 10, "0", "adj1", "100000"); f.AddGuide("a2", 10, "0", "adj2", "maxAdj2"); f.AddGuide("y2", 0, "ss", "a2", "100000"); f.AddGuide("y3", 1, "b", "0", "y2"); f.AddGuide("dx1", 0, "w", "a1", "200000"); f.AddGuide("x1", 1, "hc", "0", "dx1"); f.AddGuide("x2", 1, "hc", "dx1", "0"); f.AddGuide("dy1", 0, "x1", "y2", "wd2"); f.AddGuide("y1", 1, "y2", "0", "dy1"); f.AddGuide("y4", 1, "y3", "dy1", "0"); f.AddHandleXY("adj1", "0", "100000", undefined, "0", "0", "x1", "y3"); f.AddHandleXY(undefined, "0", "0", "adj2", "0", "maxAdj2", "l", "y2"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "y2"); f.AddCnx("cd2", "x1", "vc"); f.AddCnx("cd2", "l", "y3"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "y3"); f.AddCnx("0", "x2", "vc"); f.AddCnx("0", "r", "y2"); f.AddRect("x1", "y1", "x2", "y4"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "y2"); f.AddPathCommand(2, "hc", "t"); f.AddPathCommand(2, "r", "y2"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "x2", "y3"); f.AddPathCommand(2, "r", "y3"); f.AddPathCommand(2, "hc", "b"); f.AddPathCommand(2, "l", "y3"); f.AddPathCommand(2, "x1", "y3"); f.AddPathCommand(2, "x1", "y2"); f.AddPathCommand(6); break; case "upDownArrowCallout": f.AddAdj("adj1", 15, "25000"); f.AddAdj("adj2", 15, "25000"); f.AddAdj("adj3", 15, "25000"); f.AddAdj("adj4", 15, "48123"); f.AddGuide("maxAdj2", 0, "50000", "w", "ss"); f.AddGuide("a2", 10, "0", "adj2", "maxAdj2"); f.AddGuide("maxAdj1", 0, "a2", "2", "1"); f.AddGuide("a1", 10, "0", "adj1", "maxAdj1"); f.AddGuide("maxAdj3", 0, "50000", "h", "ss"); f.AddGuide("a3", 10, "0", "adj3", "maxAdj3"); f.AddGuide("q2", 0, "a3", "ss", "hd2"); f.AddGuide("maxAdj4", 1, "100000", "0", "q2"); f.AddGuide("a4", 10, "0", "adj4", "maxAdj4"); f.AddGuide("dx1", 0, "ss", "a2", "100000"); f.AddGuide("dx2", 0, "ss", "a1", "200000"); f.AddGuide("x1", 1, "hc", "0", "dx1"); f.AddGuide("x2", 1, "hc", "0", "dx2"); f.AddGuide("x3", 1, "hc", "dx2", "0"); f.AddGuide("x4", 1, "hc", "dx1", "0"); f.AddGuide("y1", 0, "ss", "a3", "100000"); f.AddGuide("y4", 1, "b", "0", "y1"); f.AddGuide("dy2", 0, "h", "a4", "200000"); f.AddGuide("y2", 1, "vc", "0", "dy2"); f.AddGuide("y3", 1, "vc", "dy2", "0"); f.AddHandleXY("adj1", "0", "maxAdj1", undefined, "0", "0", "x2", "y1"); f.AddHandleXY("adj2", "0", "maxAdj2", undefined, "0", "0", "x1", "t"); f.AddHandleXY(undefined, "0", "0", "adj3", "0", "maxAdj3", "r", "y1"); f.AddHandleXY(undefined, "0", "0", "adj4", "0", "maxAdj4", "l", "y2"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddRect("l", "y2", "r", "y3"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "y2"); f.AddPathCommand(2, "x2", "y2"); f.AddPathCommand(2, "x2", "y1"); f.AddPathCommand(2, "x1", "y1"); f.AddPathCommand(2, "hc", "t"); f.AddPathCommand(2, "x4", "y1"); f.AddPathCommand(2, "x3", "y1"); f.AddPathCommand(2, "x3", "y2"); f.AddPathCommand(2, "r", "y2"); f.AddPathCommand(2, "r", "y3"); f.AddPathCommand(2, "x3", "y3"); f.AddPathCommand(2, "x3", "y4"); f.AddPathCommand(2, "x4", "y4"); f.AddPathCommand(2, "hc", "b"); f.AddPathCommand(2, "x1", "y4"); f.AddPathCommand(2, "x2", "y4"); f.AddPathCommand(2, "x2", "y3"); f.AddPathCommand(2, "l", "y3"); f.AddPathCommand(6); break; case "uturnArrow": f.AddAdj("adj1", 15, "25000"); f.AddAdj("adj2", 15, "25000"); f.AddAdj("adj3", 15, "25000"); f.AddAdj("adj4", 15, "43750"); f.AddAdj("adj5", 15, "75000"); f.AddGuide("a2", 10, "0", "adj2", "25000"); f.AddGuide("maxAdj1", 0, "a2", "2", "1"); f.AddGuide("a1", 10, "0", "adj1", "maxAdj1"); f.AddGuide("q2", 0, "a1", "ss", "h"); f.AddGuide("q3", 1, "100000", "0", "q2"); f.AddGuide("maxAdj3", 0, "q3", "h", "ss"); f.AddGuide("a3", 10, "0", "adj3", "maxAdj3"); f.AddGuide("q1", 1, "a3", "a1", "0"); f.AddGuide("minAdj5", 0, "q1", "ss", "h"); f.AddGuide("a5", 10, "minAdj5", "adj5", "100000"); f.AddGuide("th", 0, "ss", "a1", "100000"); f.AddGuide("aw2", 0, "ss", "a2", "100000"); f.AddGuide("th2", 0, "th", "1", "2"); f.AddGuide("dh2", 1, "aw2", "0", "th2"); f.AddGuide("y5", 0, "h", "a5", "100000"); f.AddGuide("ah", 0, "ss", "a3", "100000"); f.AddGuide("y4", 1, "y5", "0", "ah"); f.AddGuide("x9", 1, "r", "0", "dh2"); f.AddGuide("bw", 0, "x9", "1", "2"); f.AddGuide("bs", 16, "bw", "y4"); f.AddGuide("maxAdj4", 0, "bs", "100000", "ss"); f.AddGuide("a4", 10, "0", "adj4", "maxAdj4"); f.AddGuide("bd", 0, "ss", "a4", "100000"); f.AddGuide("bd3", 1, "bd", "0", "th"); f.AddGuide("bd2", 8, "bd3", "0"); f.AddGuide("x3", 1, "th", "bd2", "0"); f.AddGuide("x8", 1, "r", "0", "aw2"); f.AddGuide("x6", 1, "x8", "0", "aw2"); f.AddGuide("x7", 1, "x6", "dh2", "0"); f.AddGuide("x4", 1, "x9", "0", "bd"); f.AddGuide("x5", 1, "x7", "0", "bd2"); f.AddGuide("cx", 2, "th", "x7", "2"); f.AddHandleXY("adj1", "0", "maxAdj1", undefined, "0", "0", "th", "b"); f.AddHandleXY("adj2", "0", "25000", undefined, "0", "0", "x6", "b"); f.AddHandleXY(undefined, "0", "0", "adj3", "0", "maxAdj3", "x6", "y4"); f.AddHandleXY("adj4", "0", "maxAdj4", undefined, "0", "0", "bd", "t"); f.AddHandleXY(undefined, "0", "0", "adj5", "minAdj5", "100000", "r", "y5"); f.AddCnx("cd4", "x6", "y4"); f.AddCnx("cd4", "x8", "y5"); f.AddCnx("0", "r", "y4"); f.AddCnx("_3cd4", "cx", "t"); f.AddCnx("cd4", "th2", "b"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "b"); f.AddPathCommand(2, "l", "bd"); f.AddPathCommand(3, "bd", "bd", "cd2", "cd4"); f.AddPathCommand(2, "x4", "t"); f.AddPathCommand(3, "bd", "bd", "_3cd4", "cd4"); f.AddPathCommand(2, "x9", "y4"); f.AddPathCommand(2, "r", "y4"); f.AddPathCommand(2, "x8", "y5"); f.AddPathCommand(2, "x6", "y4"); f.AddPathCommand(2, "x7", "y4"); f.AddPathCommand(2, "x7", "x3"); f.AddPathCommand(3, "bd2", "bd2", "0", "-5400000"); f.AddPathCommand(2, "x3", "th"); f.AddPathCommand(3, "bd2", "bd2", "_3cd4", "-5400000"); f.AddPathCommand(2, "th", "b"); f.AddPathCommand(6); break; case "verticalScroll": f.AddAdj("adj", 15, "12500"); f.AddGuide("a", 10, "0", "adj", "25000"); f.AddGuide("ch", 0, "ss", "a", "100000"); f.AddGuide("ch2", 0, "ch", "1", "2"); f.AddGuide("ch4", 0, "ch", "1", "4"); f.AddGuide("x3", 1, "ch", "ch2", "0"); f.AddGuide("x4", 1, "ch", "ch", "0"); f.AddGuide("x6", 1, "r", "0", "ch"); f.AddGuide("x7", 1, "r", "0", "ch2"); f.AddGuide("x5", 1, "x6", "0", "ch2"); f.AddGuide("y3", 1, "b", "0", "ch"); f.AddGuide("y4", 1, "b", "0", "ch2"); f.AddHandleXY(undefined, "0", "0", "adj", "0", "25000", "l", "ch"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("0", "ch", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd2", "x6", "vc"); f.AddRect("ch", "ch", "x6", "y4"); f.AddPathCommand(0, false, undefined, false, undefined, undefined); f.AddPathCommand(1, "ch2", "b"); f.AddPathCommand(3, "ch2", "ch2", "cd4", "-5400000"); f.AddPathCommand(2, "ch2", "y4"); f.AddPathCommand(3, "ch4", "ch4", "cd4", "-10800000"); f.AddPathCommand(2, "ch", "y3"); f.AddPathCommand(2, "ch", "ch2"); f.AddPathCommand(3, "ch2", "ch2", "cd2", "cd4"); f.AddPathCommand(2, "x7", "t"); f.AddPathCommand(3, "ch2", "ch2", "_3cd4", "cd2"); f.AddPathCommand(2, "x6", "ch"); f.AddPathCommand(2, "x6", "y4"); f.AddPathCommand(3, "ch2", "ch2", "0", "cd4"); f.AddPathCommand(6); f.AddPathCommand(1, "x4", "ch2"); f.AddPathCommand(3, "ch2", "ch2", "0", "cd4"); f.AddPathCommand(3, "ch4", "ch4", "cd4", "cd2"); f.AddPathCommand(6); f.AddPathCommand(0, false, "darkenLess", false, undefined, undefined); f.AddPathCommand(1, "x4", "ch2"); f.AddPathCommand(3, "ch2", "ch2", "0", "cd4"); f.AddPathCommand(3, "ch4", "ch4", "cd4", "cd2"); f.AddPathCommand(6); f.AddPathCommand(1, "ch", "y4"); f.AddPathCommand(3, "ch2", "ch2", "0", "_3cd4"); f.AddPathCommand(3, "ch4", "ch4", "_3cd4", "cd2"); f.AddPathCommand(6); f.AddPathCommand(0, false, "none", undefined, undefined, undefined); f.AddPathCommand(1, "ch", "y3"); f.AddPathCommand(2, "ch", "ch2"); f.AddPathCommand(3, "ch2", "ch2", "cd2", "cd4"); f.AddPathCommand(2, "x7", "t"); f.AddPathCommand(3, "ch2", "ch2", "_3cd4", "cd2"); f.AddPathCommand(2, "x6", "ch"); f.AddPathCommand(2, "x6", "y4"); f.AddPathCommand(3, "ch2", "ch2", "0", "cd4"); f.AddPathCommand(2, "ch2", "b"); f.AddPathCommand(3, "ch2", "ch2", "cd4", "cd2"); f.AddPathCommand(6); f.AddPathCommand(1, "x3", "t"); f.AddPathCommand(3, "ch2", "ch2", "_3cd4", "cd2"); f.AddPathCommand(3, "ch4", "ch4", "cd4", "cd2"); f.AddPathCommand(2, "x4", "ch2"); f.AddPathCommand(1, "x6", "ch"); f.AddPathCommand(2, "x3", "ch"); f.AddPathCommand(1, "ch2", "y3"); f.AddPathCommand(3, "ch4", "ch4", "_3cd4", "cd2"); f.AddPathCommand(2, "ch", "y4"); f.AddPathCommand(1, "ch2", "b"); f.AddPathCommand(3, "ch2", "ch2", "cd4", "-5400000"); f.AddPathCommand(2, "ch", "y3"); break; case "wave": f.AddAdj("adj1", 15, "12500"); f.AddAdj("adj2", 15, "0"); f.AddGuide("a1", 10, "0", "adj1", "20000"); f.AddGuide("a2", 10, "-10000", "adj2", "10000"); f.AddGuide("y1", 0, "h", "a1", "100000"); f.AddGuide("dy2", 0, "y1", "10", "3"); f.AddGuide("y2", 1, "y1", "0", "dy2"); f.AddGuide("y3", 1, "y1", "dy2", "0"); f.AddGuide("y4", 1, "b", "0", "y1"); f.AddGuide("y5", 1, "y4", "0", "dy2"); f.AddGuide("y6", 1, "y4", "dy2", "0"); f.AddGuide("dx1", 0, "w", "a2", "100000"); f.AddGuide("of2", 0, "w", "a2", "50000"); f.AddGuide("x1", 4, "dx1"); f.AddGuide("dx2", 3, "of2", "0", "of2"); f.AddGuide("x2", 1, "l", "0", "dx2"); f.AddGuide("dx5", 3, "of2", "of2", "0"); f.AddGuide("x5", 1, "r", "0", "dx5"); f.AddGuide("dx3", 2, "dx2", "x5", "3"); f.AddGuide("x3", 1, "x2", "dx3", "0"); f.AddGuide("x4", 2, "x3", "x5", "2"); f.AddGuide("x6", 1, "l", "dx5", "0"); f.AddGuide("x10", 1, "r", "dx2", "0"); f.AddGuide("x7", 1, "x6", "dx3", "0"); f.AddGuide("x8", 2, "x7", "x10", "2"); f.AddGuide("x9", 1, "r", "0", "x1"); f.AddGuide("xAdj", 1, "hc", "dx1", "0"); f.AddGuide("xAdj2", 1, "hc", "0", "dx1"); f.AddGuide("il", 8, "x2", "x6"); f.AddGuide("ir", 16, "x5", "x10"); f.AddGuide("it", 0, "h", "a1", "50000"); f.AddGuide("ib", 1, "b", "0", "it"); f.AddHandleXY(undefined, "0", "0", "adj1", "0", "20000", "l", "y1"); f.AddHandleXY("adj2", "-10000", "10000", undefined, "0", "0", "xAdj", "b"); f.AddCnx("cd4", "xAdj2", "y1"); f.AddCnx("cd2", "x1", "vc"); f.AddCnx("_3cd4", "xAdj", "y4"); f.AddCnx("0", "x9", "vc"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "x2", "y1"); f.AddPathCommand(5, "x3", "y2", "x4", "y3", "x5", "y1"); f.AddPathCommand(2, "x10", "y4"); f.AddPathCommand(5, "x8", "y6", "x7", "y5", "x6", "y4"); f.AddPathCommand(6); break; case "wedgeEllipseCallout": f.AddAdj("adj1", 15, "-20833"); f.AddAdj("adj2", 15, "62500"); f.AddGuide("dxPos", 0, "w", "adj1", "100000"); f.AddGuide("dyPos", 0, "h", "adj2", "100000"); f.AddGuide("xPos", 1, "hc", "dxPos", "0"); f.AddGuide("yPos", 1, "vc", "dyPos", "0"); f.AddGuide("sdx", 0, "dxPos", "h", "1"); f.AddGuide("sdy", 0, "dyPos", "w", "1"); f.AddGuide("pang", 5, "sdx", "sdy"); f.AddGuide("stAng", 1, "pang", "660000", "0"); f.AddGuide("enAng", 1, "pang", "0", "660000"); f.AddGuide("dx1", 7, "wd2", "stAng"); f.AddGuide("dy1", 12, "hd2", "stAng"); f.AddGuide("x1", 1, "hc", "dx1", "0"); f.AddGuide("y1", 1, "vc", "dy1", "0"); f.AddGuide("dx2", 7, "wd2", "enAng"); f.AddGuide("dy2", 12, "hd2", "enAng"); f.AddGuide("x2", 1, "hc", "dx2", "0"); f.AddGuide("y2", 1, "vc", "dy2", "0"); f.AddGuide("stAng1", 5, "dx1", "dy1"); f.AddGuide("enAng1", 5, "dx2", "dy2"); f.AddGuide("swAng1", 1, "enAng1", "0", "stAng1"); f.AddGuide("swAng2", 1, "swAng1", "21600000", "0"); f.AddGuide("swAng", 3, "swAng1", "swAng1", "swAng2"); f.AddGuide("idx", 7, "wd2", "2700000"); f.AddGuide("idy", 12, "hd2", "2700000"); f.AddGuide("il", 1, "hc", "0", "idx"); f.AddGuide("ir", 1, "hc", "idx", "0"); f.AddGuide("it", 1, "vc", "0", "idy"); f.AddGuide("ib", 1, "vc", "idy", "0"); f.AddHandleXY("adj1", "-2147483647", "2147483647", "adj2", "-2147483647", "2147483647", "xPos", "yPos"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("_3cd4", "il", "it"); f.AddCnx("cd4", "il", "ib"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("cd4", "ir", "ib"); f.AddCnx("0", "r", "vc"); f.AddCnx("_3cd4", "ir", "it"); f.AddCnx("pang", "xPos", "yPos"); f.AddRect("il", "it", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "xPos", "yPos"); f.AddPathCommand(2, "x1", "y1"); f.AddPathCommand(3, "wd2", "hd2", "stAng1", "swAng"); f.AddPathCommand(6); break; case "wedgeRectCallout": f.AddAdj("adj1", 15, "-20833"); f.AddAdj("adj2", 15, "62500"); f.AddGuide("dxPos", 0, "w", "adj1", "100000"); f.AddGuide("dyPos", 0, "h", "adj2", "100000"); f.AddGuide("xPos", 1, "hc", "dxPos", "0"); f.AddGuide("yPos", 1, "vc", "dyPos", "0"); f.AddGuide("dx", 1, "xPos", "0", "hc"); f.AddGuide("dy", 1, "yPos", "0", "vc"); f.AddGuide("dq", 0, "dxPos", "h", "w"); f.AddGuide("ady", 4, "dyPos"); f.AddGuide("adq", 4, "dq"); f.AddGuide("dz", 1, "ady", "0", "adq"); f.AddGuide("xg1", 3, "dxPos", "7", "2"); f.AddGuide("xg2", 3, "dxPos", "10", "5"); f.AddGuide("x1", 0, "w", "xg1", "12"); f.AddGuide("x2", 0, "w", "xg2", "12"); f.AddGuide("yg1", 3, "dyPos", "7", "2"); f.AddGuide("yg2", 3, "dyPos", "10", "5"); f.AddGuide("y1", 0, "h", "yg1", "12"); f.AddGuide("y2", 0, "h", "yg2", "12"); f.AddGuide("t1", 3, "dxPos", "l", "xPos"); f.AddGuide("xl", 3, "dz", "l", "t1"); f.AddGuide("t2", 3, "dyPos", "x1", "xPos"); f.AddGuide("xt", 3, "dz", "t2", "x1"); f.AddGuide("t3", 3, "dxPos", "xPos", "r"); f.AddGuide("xr", 3, "dz", "r", "t3"); f.AddGuide("t4", 3, "dyPos", "xPos", "x1"); f.AddGuide("xb", 3, "dz", "t4", "x1"); f.AddGuide("t5", 3, "dxPos", "y1", "yPos"); f.AddGuide("yl", 3, "dz", "y1", "t5"); f.AddGuide("t6", 3, "dyPos", "t", "yPos"); f.AddGuide("yt", 3, "dz", "t6", "t"); f.AddGuide("t7", 3, "dxPos", "yPos", "y1"); f.AddGuide("yr", 3, "dz", "y1", "t7"); f.AddGuide("t8", 3, "dyPos", "yPos", "b"); f.AddGuide("yb", 3, "dz", "t8", "b"); f.AddHandleXY("adj1", "-2147483647", "2147483647", "adj2", "-2147483647", "2147483647", "xPos", "yPos"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "xPos", "yPos"); f.AddRect("l", "t", "r", "b"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "t"); f.AddPathCommand(2, "x1", "t"); f.AddPathCommand(2, "xt", "yt"); f.AddPathCommand(2, "x2", "t"); f.AddPathCommand(2, "r", "t"); f.AddPathCommand(2, "r", "y1"); f.AddPathCommand(2, "xr", "yr"); f.AddPathCommand(2, "r", "y2"); f.AddPathCommand(2, "r", "b"); f.AddPathCommand(2, "x2", "b"); f.AddPathCommand(2, "xb", "yb"); f.AddPathCommand(2, "x1", "b"); f.AddPathCommand(2, "l", "b"); f.AddPathCommand(2, "l", "y2"); f.AddPathCommand(2, "xl", "yl"); f.AddPathCommand(2, "l", "y1"); f.AddPathCommand(6); break; case "wedgeRoundRectCallout": f.AddAdj("adj1", 15, "-20833"); f.AddAdj("adj2", 15, "62500"); f.AddAdj("adj3", 15, "16667"); f.AddGuide("dxPos", 0, "w", "adj1", "100000"); f.AddGuide("dyPos", 0, "h", "adj2", "100000"); f.AddGuide("xPos", 1, "hc", "dxPos", "0"); f.AddGuide("yPos", 1, "vc", "dyPos", "0"); f.AddGuide("dq", 0, "dxPos", "h", "w"); f.AddGuide("ady", 4, "dyPos"); f.AddGuide("adq", 4, "dq"); f.AddGuide("dz", 1, "ady", "0", "adq"); f.AddGuide("xg1", 3, "dxPos", "7", "2"); f.AddGuide("xg2", 3, "dxPos", "10", "5"); f.AddGuide("x1", 0, "w", "xg1", "12"); f.AddGuide("x2", 0, "w", "xg2", "12"); f.AddGuide("yg1", 3, "dyPos", "7", "2"); f.AddGuide("yg2", 3, "dyPos", "10", "5"); f.AddGuide("y1", 0, "h", "yg1", "12"); f.AddGuide("y2", 0, "h", "yg2", "12"); f.AddGuide("t1", 3, "dxPos", "l", "xPos"); f.AddGuide("xl", 3, "dz", "l", "t1"); f.AddGuide("t2", 3, "dyPos", "x1", "xPos"); f.AddGuide("xt", 3, "dz", "t2", "x1"); f.AddGuide("t3", 3, "dxPos", "xPos", "r"); f.AddGuide("xr", 3, "dz", "r", "t3"); f.AddGuide("t4", 3, "dyPos", "xPos", "x1"); f.AddGuide("xb", 3, "dz", "t4", "x1"); f.AddGuide("t5", 3, "dxPos", "y1", "yPos"); f.AddGuide("yl", 3, "dz", "y1", "t5"); f.AddGuide("t6", 3, "dyPos", "t", "yPos"); f.AddGuide("yt", 3, "dz", "t6", "t"); f.AddGuide("t7", 3, "dxPos", "yPos", "y1"); f.AddGuide("yr", 3, "dz", "y1", "t7"); f.AddGuide("t8", 3, "dyPos", "yPos", "b"); f.AddGuide("yb", 3, "dz", "t8", "b"); f.AddGuide("u1", 0, "ss", "adj3", "100000"); f.AddGuide("u2", 1, "r", "0", "u1"); f.AddGuide("v2", 1, "b", "0", "u1"); f.AddGuide("il", 0, "u1", "29289", "100000"); f.AddGuide("ir", 1, "r", "0", "il"); f.AddGuide("ib", 1, "b", "0", "il"); f.AddHandleXY("adj1", "-2147483647", "2147483647", "adj2", "-2147483647", "2147483647", "xPos", "yPos"); f.AddCnx("_3cd4", "hc", "t"); f.AddCnx("cd2", "l", "vc"); f.AddCnx("cd4", "hc", "b"); f.AddCnx("0", "r", "vc"); f.AddCnx("cd4", "xPos", "yPos"); f.AddRect("il", "il", "ir", "ib"); f.AddPathCommand(0, undefined, undefined, undefined, undefined, undefined); f.AddPathCommand(1, "l", "u1"); f.AddPathCommand(3, "u1", "u1", "cd2", "cd4"); f.AddPathCommand(2, "x1", "t"); f.AddPathCommand(2, "xt", "yt"); f.AddPathCommand(2, "x2", "t"); f.AddPathCommand(2, "u2", "t"); f.AddPathCommand(3, "u1", "u1", "_3cd4", "cd4"); f.AddPathCommand(2, "r", "y1"); f.AddPathCommand(2, "xr", "yr"); f.AddPathCommand(2, "r", "y2"); f.AddPathCommand(2, "r", "v2"); f.AddPathCommand(3, "u1", "u1", "0", "cd4"); f.AddPathCommand(2, "x2", "b"); f.AddPathCommand(2, "xb", "yb"); f.AddPathCommand(2, "x1", "b"); f.AddPathCommand(2, "u1", "b"); f.AddPathCommand(3, "u1", "u1", "cd4", "cd4"); f.AddPathCommand(2, "l", "y2"); f.AddPathCommand(2, "xl", "yl"); f.AddPathCommand(2, "l", "y1"); f.AddPathCommand(6); break; } if (typeof prst === "string" && prst.length > 0) { f.setPreset(prst); } return f; }
fluent93/DocumentServer
OfficeWeb/sdk/Common/Drawings/Format/CreateGeometry.js
JavaScript
agpl-3.0
416,165
#include "Communicator.h"
peer-node/flex
test/teleport_tests/main_tests/Communicator.cpp
C++
agpl-3.0
26
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. // // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the // compiled file. // // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details // about supported directives. // //= require jquery //= require jquery.turbolinks //= require jquery_ujs //= require jquery-ui/sortable //= require jquery-ui/effect-highlight //= require jquery-ui/widget //= require jquery-ui/mouse //= require jquery.ui.touch-punch //= require jquery.multi-select //= require twitter/bootstrap //= require turbolinks //= require bootstrap-select //= require jquery.multi-select //= require fullcalendar //= require lang-all //= require moment //= require filterrific/filterrific-jquery //= require moment //= require bootstrap-datetimepicker //= require moment/de //= require recurring_select //= require_tree . //= require jquery-ui/autocomplete //= require bootstrap-multiselect jQuery.fn.bootstrap_flash = function(message, options) { options = options || {}; options.timeout = options.timeout || 5000; options.type = options.type || 'notice'; options.type = options.type == 'notice'? 'success' : options.type; options.type = options.type == 'alert'? 'warning' : options.type; options.type = options.type == 'error'? 'danger' : options.type; flashbox = $('<div />').addClass('alert fade in alert-' + options.type); flashbox.append($('<button />').addClass('close').attr('data-dismiss', 'alert').text('×')); flashbox.append(message); this.append(flashbox); setTimeout(function(){ $('button', flashbox).click(); }, options.timeout); }
chrisma/event-und-raumplanung
app/assets/javascripts/application.js
JavaScript
agpl-3.0
1,950
'use strict'; var alphabet = require('./alphabet'); function decode(id) { var characters = alphabet.shuffled(); return { version: characters.indexOf(id.substr(0, 1)) & 0x0f, worker: characters.indexOf(id.substr(1, 1)) & 0x0f }; } module.exports = decode;
seraum/fortpress
base/util/uid/decode.js
JavaScript
agpl-3.0
285
// Copyright 2021 Canonical Ltd. // Licensed under the AGPLv3, see LICENCE file for details. package snap import ( "github.com/juju/errors" "github.com/juju/testing" jc "github.com/juju/testing/checkers" gc "gopkg.in/check.v1" ) type confinementSuite struct { testing.IsolationSuite } var _ = gc.Suite(&confinementSuite{}) func (s *confinementSuite) TestConfinementPolicy(c *gc.C) { tests := []struct { Policy ConfinementPolicy Err error }{{ Policy: StrictPolicy, }, { Policy: ClassicPolicy, }, { Policy: DevModePolicy, }, { Policy: JailModePolicy, }, { Policy: ConfinementPolicy("yolo"), Err: errors.NotValidf("yolo confinement"), }} for i, test := range tests { c.Logf("test %d - %s", i, test.Policy.String()) err := test.Policy.Validate() if err == nil && test.Err == nil { continue } c.Assert(err, gc.ErrorMatches, test.Err.Error()) } } type appSuite struct { testing.IsolationSuite } var _ = gc.Suite(&appSuite{}) func (s *appSuite) TestValidate(c *gc.C) { app := NewNamedApp("meshuggah") err := app.Validate() c.Assert(err, jc.ErrorIsNil) } func (s *appSuite) TestValidateWithConfinement(c *gc.C) { app := NewNamedApp("meshuggah") app.confinementPolicy = StrictPolicy err := app.Validate() c.Assert(err, jc.ErrorIsNil) } func (s *appSuite) TestNestedValidate(c *gc.C) { app := NewNamedApp("meshuggah") app.prerequisites = []Installable{NewNamedApp("faceless")} err := app.Validate() c.Assert(err, jc.ErrorIsNil) } func (s *appSuite) TestInvalidNestedValidate(c *gc.C) { nested := NewNamedApp("faceless") nested.confinementPolicy = ConfinementPolicy("yolo") app := NewNamedApp("meshuggah") app.prerequisites = []Installable{nested} err := app.Validate() c.Assert(err, gc.ErrorMatches, "yolo confinement not valid") } func (s *appSuite) TestInstall(c *gc.C) { app := NewNamedApp("meshuggah") cmd := app.Install() c.Assert(cmd, gc.DeepEquals, []string{"install", "meshuggah"}) } func (s *appSuite) TestNestedInstall(c *gc.C) { nested := NewNamedApp("faceless") app := NewNamedApp("meshuggah") app.prerequisites = []Installable{nested} cmd := app.Install() c.Assert(cmd, gc.DeepEquals, []string{"install", "meshuggah"}) }
freyes/juju
service/snap/app_test.go
GO
agpl-3.0
2,218
package org.nasa.ws.proxy; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for hemisphereOptions complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="hemisphereOptions"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="north" type="{http://www.w3.org/2001/XMLSchema}boolean"/> * &lt;element name="south" type="{http://www.w3.org/2001/XMLSchema}boolean"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "hemisphereOptions", propOrder = { "north", "south" }) public class HemisphereOptions { protected boolean north; protected boolean south; /** * Gets the value of the north property. * */ public boolean isNorth() { return north; } /** * Sets the value of the north property. * */ public void setNorth(boolean value) { this.north = value; } /** * Gets the value of the south property. * */ public boolean isSouth() { return south; } /** * Sets the value of the south property. * */ public void setSouth(boolean value) { this.south = value; } }
Deltaxel/FollowSat
server/src/main/java/org/nasa/ws/proxy/HemisphereOptions.java
Java
agpl-3.0
1,561
/* * ActivateNamedTerminalEvent.java * * Copyright (C) 2020 by RStudio, PBC * * Unless you have received this program directly from RStudio pursuant * to the terms of a commercial license agreement with RStudio, then * this program is licensed to you under the terms of version 3 of the * GNU Affero General Public License. This program is distributed WITHOUT * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT, * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details. * */ package org.rstudio.studio.client.workbench.views.terminal.events; import org.rstudio.core.client.js.JavaScriptSerializable; import org.rstudio.studio.client.application.events.CrossWindowEvent; import org.rstudio.studio.client.workbench.views.terminal.events.ActivateNamedTerminalEvent.Handler; import com.google.gwt.core.client.JavaScriptObject; import com.google.gwt.event.shared.EventHandler; @JavaScriptSerializable public class ActivateNamedTerminalEvent extends CrossWindowEvent<Handler> { public interface Handler extends EventHandler { void onActivateNamedTerminal(ActivateNamedTerminalEvent event); } public static class Data extends JavaScriptObject { protected Data() {} public final native String getId() /*-{ return this["id"]; }-*/; } public ActivateNamedTerminalEvent() { } public ActivateNamedTerminalEvent(Data data) { this(data.getId()); } public ActivateNamedTerminalEvent(String id) { id_ = id; } public String getId() { return id_; } @Override public Type<Handler> getAssociatedType() { return TYPE; } @Override protected void dispatch(Handler activateTerminalHandler) { activateTerminalHandler.onActivateNamedTerminal(this); } private String id_; public static final Type<Handler> TYPE = new Type<>(); }
JanMarvin/rstudio
src/gwt/src/org/rstudio/studio/client/workbench/views/terminal/events/ActivateNamedTerminalEvent.java
Java
agpl-3.0
1,976
/******************************************************************************* * This file is part of OpenNMS(R). * * Copyright (C) 2002-2017 The OpenNMS Group, Inc. * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc. * * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc. * * OpenNMS(R) 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. * * OpenNMS(R) 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 OpenNMS(R). If not, see: * http://www.gnu.org/licenses/ * * For more information contact: * OpenNMS(R) Licensing <license@opennms.org> * http://www.opennms.org/ * http://www.opennms.com/ *******************************************************************************/ package org.opennms.netmgt.syslogd; import java.io.IOException; import java.util.Collections; import java.util.List; import java.util.TimeZone; import org.opennms.netmgt.config.SyslogdConfig; import org.opennms.netmgt.config.syslogd.HideMatch; import org.opennms.netmgt.config.syslogd.UeiMatch; /** * This is a bean container that can be used as a {@link SyslogdConfig} * service. */ public final class SyslogConfigBean implements SyslogdConfig { private Integer m_syslogPort; private String m_listenAddress; private String m_forwardingRegexp; private Integer m_matchingGroupHost; private Integer m_matchingGroupMessage; private String m_parser; private String m_discardUei; private boolean m_newSuspectOnMessage; private int m_numThreads; private int m_queueSize; private int m_batchSize; private int m_batchIntervalMs; private TimeZone timeZone; @Override public int getSyslogPort() { return m_syslogPort; } public void setSyslogPort(int syslogPort) { m_syslogPort = syslogPort; } @Override public String getListenAddress() { return m_listenAddress; } public void setListenAddress(String listenAddress) { m_listenAddress = listenAddress; } @Override public boolean getNewSuspectOnMessage() { return m_newSuspectOnMessage; } public void setNewSuspectOnMessage(boolean newSuspectOnMessage) { m_newSuspectOnMessage = newSuspectOnMessage; } @Override public String getForwardingRegexp() { return m_forwardingRegexp; } public void setForwardingRegexp(String forwardingRegexp) { m_forwardingRegexp = forwardingRegexp; } @Override public Integer getMatchingGroupHost() { return m_matchingGroupHost; } public void setMatchingGroupHost(int matchingGroupHost) { m_matchingGroupHost = matchingGroupHost; } @Override public Integer getMatchingGroupMessage() { return m_matchingGroupMessage; } public void setMatchingGroupMessage(int matchingGroupMessage) { m_matchingGroupMessage = matchingGroupMessage; } @Override public String getParser() { return m_parser; } public void setParser(String parser) { m_parser = parser; } @Override public List<UeiMatch> getUeiList() { return Collections.emptyList(); } @Override public List<HideMatch> getHideMessages() { return Collections.emptyList(); } @Override public String getDiscardUei() { return m_discardUei; } public void setDiscardUei(String discardUei) { m_discardUei = discardUei; } @Override public int getNumThreads() { if (m_numThreads <= 0) { return Runtime.getRuntime().availableProcessors() * 2; } return m_numThreads; } public void setNumThreads(int numThreads) { m_numThreads = numThreads; } @Override public int getQueueSize() { return m_queueSize; } public void setQueueSize(int queueSize) { m_queueSize = queueSize; } @Override public int getBatchSize() { return m_batchSize; } public void setBatchSize(int batchSize) { m_batchSize = batchSize; } @Override public int getBatchIntervalMs() { return m_batchIntervalMs; } @Override public TimeZone getTimeZone() { return this.timeZone; } public void setTimeZone(TimeZone timeZone){ this.timeZone = timeZone; } public void setBatchIntervalMs(int batchIntervalMs) { m_batchIntervalMs = batchIntervalMs; } @Override public void reload() throws IOException { // pass } }
aihua/opennms
features/events/syslog/src/main/java/org/opennms/netmgt/syslogd/SyslogConfigBean.java
Java
agpl-3.0
4,698
<?php // created: 2016-09-06 02:05:09 $dictionary["Lead"]["fields"]["ts_departure_leads_1"] = array ( 'name' => 'ts_departure_leads_1', 'type' => 'link', 'relationship' => 'ts_departure_leads_1', 'source' => 'non-db', 'module' => 'ts_Departure', 'bean_name' => 'ts_Departure', 'vname' => 'LBL_TS_DEPARTURE_LEADS_1_FROM_TS_DEPARTURE_TITLE', 'id_name' => 'ts_departure_leads_1ts_departure_ida', ); $dictionary["Lead"]["fields"]["ts_departure_leads_1_name"] = array ( 'name' => 'ts_departure_leads_1_name', 'type' => 'relate', 'source' => 'non-db', 'vname' => 'LBL_TS_DEPARTURE_LEADS_1_FROM_TS_DEPARTURE_TITLE', 'save' => true, 'id_name' => 'ts_departure_leads_1ts_departure_ida', 'link' => 'ts_departure_leads_1', 'table' => 'ts_departure', 'module' => 'ts_Departure', 'rname' => 'name', ); $dictionary["Lead"]["fields"]["ts_departure_leads_1ts_departure_ida"] = array ( 'name' => 'ts_departure_leads_1ts_departure_ida', 'type' => 'link', 'relationship' => 'ts_departure_leads_1', 'source' => 'non-db', 'reportable' => false, 'side' => 'right', 'vname' => 'LBL_TS_DEPARTURE_LEADS_1_FROM_LEADS_TITLE', );
vivekdevrari/litecrm
custom/Extension/modules/relationships/vardefs/ts_departure_leads_1_Leads.php
PHP
agpl-3.0
1,152
/** * Copyright 2012 Neurowork Consulting S.L. * * This file is part of eMobc. * * ImageTextDescriptionActivityGenerator.java * eMobc Android Framework * * eMobc is free software: you can redistribute it and/or modify * it under the terms of the Affero GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * eMobc 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 General Public License for more details. * * You should have received a copy of the Affero GNU General Public License * along with eMobc. If not, see <http://www.gnu.org/licenses/>. * */ package com.emobc.android.activities.generators; import android.app.Activity; import android.graphics.drawable.Drawable; import android.util.Log; import android.view.Display; import android.view.View; import android.view.ViewGroup.LayoutParams; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.ScrollView; import android.widget.TextView; import android.widget.TextView.BufferType; import android.widget.Toast; import com.emobc.android.ActivityType; import com.emobc.android.NextLevel; import com.emobc.android.activities.R; import com.emobc.android.levels.AppLevel; import com.emobc.android.levels.AppLevelData; import com.emobc.android.levels.impl.ImageTextDescriptionLevelDataItem; import com.emobc.android.menu.CreateMenus; import com.emobc.android.utils.ImagesUtils; import com.emobc.android.utils.InvalidFileException; import com.emobc.android.utils.Utils; /** * Screen generator, responsible for specific components to initialize the * display type "IMAGE_TEXT_DESCRIPTION". It also creates the menus, rotations, and the format for * the components. * * @author Jonatan Alcocer Luna * @author Jorge E. Villaverde * @version 0.1 * @since 0.1 */ public class ImageTextDescriptionActivityGenerator extends LevelActivityGenerator { /** * */ private static final long serialVersionUID = -4968795028364590700L; private ImageTextDescriptionLevelDataItem item; public ImageTextDescriptionActivityGenerator(AppLevel appLevel, NextLevel nextLevel) { super(appLevel, nextLevel); } @Override protected int getContentViewResourceId(final Activity activity) { if(appLevel.getXib() != null && appLevel.getXib().length() > 0){ int id = getActivityLayoutIdFromString(activity, appLevel.getXib()); if(id > 0) return id; } return R.layout.image_text_descr; } @Override protected void loadAppLevelData(final Activity activity, final AppLevelData data) { item = (ImageTextDescriptionLevelDataItem)data.findByNextLevel(nextLevel); if(item == null){ showAlerDialog(activity, "No se ha encontrado el NextLevel:\n" + nextLevel.toString()); }else{ initializeHeader(activity, item); //Create Banner CreateMenus c = (CreateMenus)activity; c.createBanner(); Display display = activity.getWindowManager().getDefaultDisplay(); int height = display.getHeight(); if(Utils.hasLength(item.getImageFile())){ Drawable drawable; try { drawable = ImagesUtils.getDrawable(activity, item.getImageFile()); ImageView descrImaga = (ImageView)activity.findViewById(R.id.descr_image); descrImaga.setImageDrawable(drawable); } catch (InvalidFileException e) { Log.e("AppCoverData", e.getLocalizedMessage()); Toast.makeText(activity, e.getMessage(), Toast.LENGTH_SHORT).show(); } } //TODO: ¿por qué está esto así? if(Utils.hasLength(item.getText())){ TextView descrText = (TextView)activity.findViewById(R.id.basic_text); descrText.setText(item.getText(), BufferType.EDITABLE); if(height > 533){ ScrollView sv = (ScrollView)activity.findViewById(R.id.text_scroll); LayoutParams params = sv.getLayoutParams(); params.height += 35; sv.setLayoutParams(params); } } LinearLayout nextBtn = (LinearLayout) activity.findViewById(R.id.descr_mas); if(item.getNextLevel() != null && item.getNextLevel().isDefined()){ nextBtn.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { showNextLevel(activity, item.getNextLevel()); } }); nextBtn.setBackgroundResource(R.drawable.mas_selector); } else { nextBtn.setVisibility(View.GONE); } } } @Override protected ActivityType getActivityGeneratorType() { return ActivityType.IMAGE_TEXT_DESCRIPTION_ACTIVITY; } public ImageTextDescriptionLevelDataItem getItem() { return item; } }
emobc/emobc-android
src/com/emobc/android/activities/generators/ImageTextDescriptionActivityGenerator.java
Java
agpl-3.0
4,913
/* * Copyright (c) 2015 Memorial Sloan-Kettering Cancer Center. * * This library 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. The software and documentation provided hereunder * is on an "as is" basis, and Memorial Sloan-Kettering Cancer Center has no * obligations to provide maintenance, support, updates, enhancements or * modifications. In no event shall Memorial Sloan-Kettering Cancer Center be * liable to any party for direct, indirect, special, incidental or * consequential damages, including lost profits, arising out of the use of this * software and its documentation, even if Memorial Sloan-Kettering Cancer * Center has been advised of the possibility of such damage. */ /* * This file is part of cBioPortal. * * cBioPortal 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. * * 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/>. */ //TODO: Colors have conflicts when user save SELECTED_CASES/UNSELECTED_CALSES/ALL_CASES /* * @author Hongxin Zhang * @date Apr. 2014 */ /* * * Save curve function has been disabled. */ var StudyViewSurvivalPlotView = (function() { var oData = [], //The data before processing, orginal data oDataLength = 0, aData = {}, //The data after processing inputArr = [], survivalPlot = {}, kmEstimator = "", logRankTest = "", plotsInfo = {}, numOfPlots = 0, opts = [], // if survival plot has been initialized, the status will be set to true. initStatus = false; var curveInfo = {}; /*This color will be used for ALL_CASES, SELECTED_CASES AND UNSELECTED_CASES*/ // var uColor = ["#000000", "#dc3912", "#2986e2"]; // var reserveName = ["ALL_CASES", "SELECTED_CASES", "UNSELECTED_CASES"]; // var reserveDisplayName = ["All cases", "Selected cases", "Unselected cases"]; /*Store data for unique curves: the color of these will be changed when user * saving them, in that case, the survival plot needs to redraw this curve*/ // var uColorCurveData = {}; //Saved curve information is identified based on the curve name, //in other words, the name of each curve is identical. var savedCurveInfo = {}; /** * @param {type} _id cureve id * @returns {Array} return name array of saved curves */ function getSavedCurveName(_id) { if (_.isObject(savedCurveInfo[_id])) { return Object.keys(savedCurveInfo[_id]); } else { return []; } } function getInitStatus() { return initStatus; } /** * Containing all jQuery related functions * @param {type} _plotKey the plot key */ function addEvents(_plotKey) { var _opts = opts[_plotKey], _title = $("#" + _opts.divs.main + " charttitleh4").text(); if (!initStatus) { StudyViewUtil.showHideDivision( '#' + _opts.divs.main, '#' + _opts.divs.header ); } // $("#" + _opts.divs.pdf).unbind('submit'); // $("#" + _opts.divs.pdf).submit(function() { // setSVGElementValue(_opts.divs.bodySvg, // _opts.divs.pdfValue, _plotKey, _title); // }); // $("#" + _opts.divs.svg).unbind('submit'); // $("#" + _opts.divs.svg).submit(function() { // setSVGElementValue(_opts.divs.bodySvg, // _opts.divs.svgValue, _plotKey, _title); // }); // $("#" + _opts.divs.menu).unbind("click"); // $("#" + _opts.divs.menu).click(function() { // var _svgWidth = 0, // _label = $("#" + _opts.divs.bodyLabel), // _display = _label.css('display'); // // if (_display === "none") { // StudyViewUtil.changePosition( // '#' + _opts.divs.main, // '#' + _opts.divs.bodyLabel, // "#dc-plots"); // $('#' + _opts.divs.bodyLabel).children('float', ''); // _label.css('display', 'block'); // _svgWidth = $("#" + _opts.divs.bodyLabel + " svg").width(); // $("#" + _opts.divs.bodyLabel).width(_svgWidth + 15); // } else { // _label.css('display', 'none'); // } // }); // if ($("#" + _opts.divs.bodyLabel).css('display') === 'block') { // var _svgWidth = $("#" + _opts.divs.bodyLabel + " svg").width(); // $("#" + _opts.divs.bodyLabel).width(_svgWidth + 15); // } $("#" + _opts.divs.body).css('opacity', '1'); $("#" + _opts.divs.loader).css('display', 'none'); $('#' + _opts.divs.downloadIcon).qtip('destroy', true); $('#' + _opts.divs.downloadIcon).qtip({ id: "#" + _opts.divs.downloadIcon + "-qtip", style: { classes: 'qtip-light qtip-rounded qtip-shadow' }, show: {event: "click", delay: 0}, hide: {fixed:true, delay: 100, event: "mouseout"}, position: {my:'top center',at:'bottom center', viewport: $(window)}, content: { text: "<div style='display:inline-block;'>"+ "<button id='"+_opts.divs.pdf+"' style=\"width:50px\">PDF</button>"+ "</div>"+ "<br>"+ "<div style='display:inline-block;'>"+ "<button id='"+_opts.divs.svg+"' style=\"width:50px\">SVG</button>"+ "</div>"+ "<br>"+ "<div style='display:inline-block;'>"+ "<button id='"+_opts.divs.txt+"' style=\"width:50px\">TXT</button>"+ "</div>" }, events: { render: function(event, api) { $("#" + _opts.divs.pdf, api.elements.tooltip).click(function() { setSVGElementValue(_opts.divs.bodySvg, _opts.divs.pdfValue, _plotKey, _title, { filename: "Survival_Plot_result-" + StudyViewParams.params.studyId + ".pdf", contentType: "application/pdf", servletName: "svgtopdf.do" }); }); $("#" + _opts.divs.svg, api.elements.tooltip).click(function() { setSVGElementValue(_opts.divs.bodySvg, _opts.divs.svgValue, _plotKey, _title, { filename: "Survival_Plot_result-" + StudyViewParams.params.studyId + ".svg", }); }); $("#"+_opts.divs.txt).click(function(){ var content = ''; var subtitle; switch(_plotKey) { case 'OS': subtitle = 'Overall Survival'; break; case 'DFS': subtitle = 'Disease Free Survival'; break; } var attributes; attributes = aData[_plotKey]; var groupFlag = false; if(curveInfo[_plotKey].length > 1) groupFlag = true; if(groupFlag) { content = content + 'Sample ID' + '\t'; content = content + 'Status' + '\t'; content = content + subtitle + '\t'; content = content + 'Group'; var oldContent = {}; for(var i in attributes){ var row = '\r\n'; row += attributes[i].case_id + '\t'; row += attributes[i].originalStatus + '\t'; row += StudyViewUtil.restrictNumDigits(attributes[i].months) + '\t'; oldContent[attributes[i].case_id] = row; } var groupInfo = curveInfo[_plotKey]; for(var i=0; i<groupInfo.length; i++) { var group = groupInfo[i]; var name = group.name; var dataInfo = group.data.data.getData(); for(var j=0; j<dataInfo.length; j++) { var data = dataInfo[j]; oldContent[data.case_id] += name; } } for(var row in oldContent) { content += oldContent[row]; } } else { content = content + 'Sample ID' + '\t'; content = content + 'Status' + '\t'; content = content + subtitle; for(var i in attributes){ content += '\r\n'; content += attributes[i].case_id + '\t'; content += attributes[i].originalStatus + '\t'; content += StudyViewUtil.restrictNumDigits(attributes[i].months); } } var downloadOpts = { // filename: cancerStudyName + "_" + subtitle + ".txt", filename: StudyViewParams.params.studyId + "_" + subtitle + ".txt", contentType: "text/plain;charset=utf-8", preProcess: false }; cbio.download.initDownload(content, downloadOpts); }); // $("#study-view-scatter-plot-pdf", api.elements.tooltip).submit(function(){ // $("#study-view-scatter-plot-pdf-name").val("Scatter_Plot_result-"+ StudyViewParams.params.studyId +".pdf"); // setSVGElementValue("study-view-scatter-plot-body-svg", // "study-view-scatter-plot-pdf-value", // scatterPlotOptions, // _title); // }); // $("#study-view-scatter-plot-svg", api.elements.tooltip).submit(function(){ // $("#study-view-scatter-plot-svg-name").val("Scatter_Plot_result-"+ StudyViewParams.params.studyId +".svg"); // setSVGElementValue("study-view-scatter-plot-body-svg", // "study-view-scatter-plot-svg-value", // scatterPlotOptions, // _title); // }); } } }); } /** * Be used to create svg/pdf file * @param {type} _svgParentDivId svg container * @param {type} _idNeedToSetValue set the modified svg element value into * this selected element * @param {type} _plotKey * @param {type} _title the title appears above saved file * content, Exp. 'Scatter Plot' * @returns {undefined} */ function setSVGElementValue(_svgParentDivId, _idNeedToSetValue, _plotKey, _title, downloadOptions) { var _svgElement, _svgLabels, _svgTitle, _labelTextMaxLength = 0, _numOfLabels = 0, _svgWidth = 360, _svgheight = 360; _svgElement = cbio.download.serializeHtml($("#" + _svgParentDivId + " svg")[0]); _svgLabels = $("#" + opts[_plotKey].divs.bodyLabel + " svg"); _svgLabels.find('image').remove(); _svgLabels.find('text').each(function(i, obj) { var _value = $(obj).attr('oValue'); if (typeof _value === 'undefined') { _value = $(obj).text(); } if (_value.length > _labelTextMaxLength) { _labelTextMaxLength = _value.length; } $(obj).text(_value); _numOfLabels++; }); _svgWidth += _labelTextMaxLength * 14; if (_svgheight < _numOfLabels * 20) { _svgheight = _numOfLabels * 20 + 40; } _svgLabels = cbio.download.serializeHtml(_svgLabels[0]); _svgTitle = "<g><text text-anchor='middle' x='210' y='30' " + "style='font-weight:bold'>" + _title + "</text></g>"; _svgElement = "<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='" + _svgWidth + "px' height='" + _svgheight + "px' style='font-size:14px'>" + _svgTitle + "<g transform='translate(0,40)'>" + _svgElement + "</g><g transform='translate(370,50)'>" + _svgLabels + "</g></svg>"; cbio.download.initDownload( _svgElement, downloadOptions); $("#" + opts[_plotKey].divs.bodyLabel + " svg").remove(); drawLabels(_plotKey); //The style has been reset because of the addEvents function, so we //need to change the related components manully $("#" + opts[_plotKey].divs.header).css('display', 'block'); $("#" + opts[_plotKey].divs.main + " .study-view-drag-icon").css('display', 'block'); } function highlightCurve(_curveId) { var _hiddenDots = $("#" + _curveId + "-dots").find('path'), _hiddenDotsLength = _hiddenDots.length; for ( var i = 0; i < _hiddenDotsLength; i++) { $(_hiddenDots[i]).css('opacity', '.6'); } $("#" + _curveId + "-line").css('stroke-width', '3px'); } function resetCurve(_curveId) { var _hiddenDots = $("#" + _curveId + "-dots").find('path'), _hiddenDotsLength = _hiddenDots.length; for ( var i = 0; i < _hiddenDotsLength; i++) { $(_hiddenDots[i]).css('opacity', '0'); } $("#" + _curveId + "-line").css('stroke-width', ''); } //Save all related information with this curve. The saved curve(s) will be //showed again when redrawing survival plots function saveCurveInfoFunc(_this, _plotKey) { var _selectedIndex = $($(_this).parent()).index(), _selectedCurveInfo = curveInfo[_plotKey][_selectedIndex]; if (!savedCurveInfo.hasOwnProperty(_plotKey)) { savedCurveInfo[_plotKey] = {}; } /* if (StudyViewUtil.arrayFindByValue(uColor, _selectedCurveInfo.color)) { var _color = colorSelection(''); //If no more color available, have to set the color here if (!_color) { _color = '#111111'; } var _data = uColorCurveData[_selectedCurveInfo.color]; survivalPlot[_opts.index].removeCurve(_selectedCurveInfo.color.toString().substring(1)); _data.settings.line_color = _color; _data.settings.mouseover_color = _color; _data.settings.curveId = _color.toString().substring(1); survivalPlot[_opts.index].addCurve(_data); _selectedCurveInfo.color = _color; }*/ savedCurveInfo[_plotKey][_selectedCurveInfo.name] = _selectedCurveInfo; removeElement($(_this).parent()); //After saving curve, the related curve info should be delete from //curvesInfo StudyViewUtil.arrayDeleteByIndex(curveInfo[_plotKey], _selectedIndex); redrawLabel(_plotKey); } function removeElement(_this) { $(_this).remove(); } //Move saved curve infomation back to curveInfo function undoSavedCurve(_curveName, _plotKey) { var _targetCurve = savedCurveInfo[_plotKey][_curveName]; curveInfo[_plotKey].push(_targetCurve); } function removeSavedCurveFunc(_curveName, _plotKey) { delete savedCurveInfo[_plotKey][_curveName]; } function removeCurveFunc(_index, _plotKey) { curveInfo[_plotKey].splice(_index, 1); } //When user click pin icon, this dialog will be popped up and remind user //input the curve name. function nameCurveDialog(_this, _callBackFunc, _plotKey) { var _parent = $(_this).parent(), _value = $(_parent).find("text:first").attr('oValue'), _qtipContent = '<input type="text" style="float:left" value="'+ _value+'"/><button style="float:left">OK</button>'; $(_this).qtip({ content: { text: $(_qtipContent), // Create an input (style it using CSS) title: 'Please name your curve', button: 'Close' }, position: { my: 'left bottom', at: 'top right', target: $(_this), viewport: $(window) }, show: { ready: true }, hide: false, style: { tip: true, classes: 'qtip-blue' }, events: { render: function(event, api) { // Apply an event to the input element so we can close the tooltip when needed $('button', api.elements.tooltip).bind('click', function() { var _curveName = $('input', api.elements.tooltip).val(); var _modifiedName = _curveName; if (_curveName === '') { var _qtip = jQuery.extend(true, {}, StudyViewBoilerplate.warningQtip); _qtip.content.text = $("<span>No Name Inputed</span>"); _qtip.position.target = $(_this); $(_parent).qtip(_qtip); } else if (getSavedCurveName().indexOf(_curveName) !== -1) { var _qtip = jQuery.extend(true, {}, StudyViewBoilerplate.warningQtip); _qtip.content.text = $("<span>The curve name exists</span>"); _qtip.position.target = $(_this); $(_parent).qtip(_qtip); } else { var _index = _parent.find('text').attr('id'); //Destroy previous qtip first $('#' + _index).qtip('destroy', true); if (_curveName.length > 7) { var _qtip = jQuery.extend(true, {}, StudyViewBoilerplate.pieLabelQtip); _qtip.content.text = _curveName; _qtip.position.my = "left bottom"; _qtip.position.at = "top right"; $('#' + _index).qtip(_qtip); _modifiedName = _curveName.substring(0, 5) + "..."; } _parent.find('text') .text(_modifiedName) .attr('value', _curveName); //Update curve name with user inputted name curveInfo[_plotKey][$($(_this).parent()).index()].name = _curveName; _callBackFunc(_this, _plotKey); } //Set to True: call .hide() before destroy api.destroy(true); }); } } }); } /* * Generate survival plot division * @param {object} _opt */ function createDiv(_opt) { var _div = "<div id='" + _opt.divs.main + "' class='study-view-dc-chart w2 h1half study-view-survival-plot'>" + "<div id='" + _opt.divs.headerWrapper + "' class='study-view-survival-plot-header-wrapper'>" + "<chartTitleH4 oValue='" + _opt.title + "' id='" + _opt.divs.title + "' class='study-view-survival-plot-title'>" + _opt.title + "</chartTitleH4>" + "<div id='" + _opt.divs.header + "' class='study-view-survival-plot-header' style='float:right'>" + // "<form style='display:inline-block; float:left; margin-right:5px' action='svgtopdf.do' method='post' id='" + _opt.divs.pdf + "'>" + // "<input type='hidden' name='svgelement' id='" + _opt.divs.pdfValue + "'>" + // "<input type='hidden' name='filetype' value='pdf'>" + // "<input type='hidden' id='" + _opt.divs.pdfName + "' name='filename' value=''>" + // "<input type='submit' style='font-size:10px' value='PDF'>" + // "</form>" + // "<form style='display:inline-block; float:left; margin-right:5px' action='svgtopdf.do' method='post' id='" + _opt.divs.svg + "'>" + // "<input type='hidden' name='svgelement' id='" + _opt.divs.svgValue + "'>" + // "<input type='hidden' name='filetype' value='svg'>" + // "<input type='hidden' id='" + _opt.divs.svgName + "' name='filename' value=''>" + // "<input type='submit' style='font-size:10px' value='SVG'>" + // "</form>" + // "<img id='" + _opt.divs.menu + "' class='study-view-menu-icon' style='float:left; width:10px; height:10px;margin-top:4px; margin-right:4px;' class='study-view-menu-icon' src='images/menu.svg'/>" + "<img id='"+_opt.divs.downloadIcon+"' class='study-view-download-icon' src='images/in.svg' alt='download' />" + "<img style='float:left; width:10px; height:10px;margin-top:4px; margin-right:4px;' class='study-view-drag-icon' src='images/move.svg' alt='move' />" + "<span class='study-view-chart-plot-delete study-view-survival-plot-delete'>x</span>" + "</div></div>" + "<div id='" + _opt.divs.loader + "' class='study-view-loader'>" + "<img src='images/ajax-loader.gif' alt='loading' /></div>" + "<div id='" + _opt.divs.body + "' class='study-view-survival-plot-body'>" + "<div id='" + _opt.divs.bodySvg + "' style='float:left'></div>" + "<div id='" + _opt.divs.bodyLabel + "' class='study-view-survival-plot-body-label'></div>" + "</div></div>"; $("#study-view-charts").append(_div); } /* Convert input data into survivalProxy required format @param _plotInfo the plot basic information ---- format---- { identifier1: { name: '', property: [''], status: [['']], caseLists: { identifier1: { caseIds: [], color: '' }, identifier1: } }, identifier1: } */ function dataProcess(_plotInfo) { var _numOfValuedCase = 0; var _plotData = {}; for (var i = 0; i < oDataLength; i++) { if (oData[i].hasOwnProperty(_plotInfo.property[0]) && oData[i].hasOwnProperty(_plotInfo.property[1])) { var _time = oData[i][_plotInfo.property[0]], _status = oData[i][_plotInfo.property[1]].toUpperCase(), _caseID = oData[i].CASE_ID; _plotData[_caseID] = {}; _plotData[_caseID].case_id = _caseID; if (_plotInfo.status[0].indexOf(_status) !== -1) { _plotData[_caseID].status = '0'; } else if (_plotInfo.status[1].indexOf(_status) !== -1) { _plotData[_caseID].status = '1'; } else { _plotData[_caseID].status = 'NA'; } _plotData[_caseID].originalStatus = _status; if (isNaN(_time)) { _plotData[_caseID].months = 'NA'; } else { _plotData[_caseID].months = Number(_time); } } } //Refind search data, if only one or no case has months information, //the survival plot should not be initialized. for (var key in _plotData) { if (_plotData[key].months !== 'NA') { _numOfValuedCase++; } } if (_numOfValuedCase < 2) { _plotData = {}; } return _plotData; } /* * Put all cases into groups based on keys in _seperateAttr, if no _seoerateAttr * inputted, the _casesInfo will not be changed. * * @param {object} _casesInfo cases information object, if _seperateAttr * initialized, the _casesInfo only include group name and * group color. If not initalzied, it includes all information. * @param {string} _seperateAttr The unique attribute, like 'OS_MONTHS' */ function grouping(_casesInfo, _seperateAttr) { //If seperation attribute has been defined, the data will be put in //different group based on this attribute. var _trimedCasesInfo = jQuery.extend(true, {}, _casesInfo); /* if (_seperateAttr !== '' && _seperateAttr) { for (var i = 0; i < oDataLength; i++) { var _arr = oData[i][_seperateAttr], _caseID = oData[i].CASE_ID; if (!_trimedCasesInfo.hasOwnProperty(_arr)) { if (_trimedCasesInfo.hasOwnProperty('NA')) { _trimedCasesInfo['NA'].caseIds.push(_caseID); } else { //TODO: User may only draw survial based on current groups. //StudyViewUtil.echoWarningMessg("Unexpected attribute: " + _arr); } } else { _trimedCasesInfo[_arr].caseIds.push(_caseID); } } }*/ return _trimedCasesInfo; } /* * Initilize all options for current survival plot * @param _index The survival plot identifier * @return _opts The initilized option object */ function initOpts(_index, _key) { var _opts = {}; _opts.index = _index; _opts.key = _key; _opts.title = plotsInfo[_key].name; _opts.divs = {}; _opts.divs.main = "study-view-survival-plot-" + _index; _opts.divs.title = "study-view-survival-pot-title-" + _index; _opts.divs.header = "study-view-survival-plot-header-" + _index; _opts.divs.headerWrapper = "study-view-survival-plot-header-wrapper-" + _index; _opts.divs.body = "study-view-survival-plot-body-" + _index; _opts.divs.bodySvg = "study-view-survival-plot-body-svg-" + _index; _opts.divs.bodyLabel = "study-view-survival-plot-body-label-" + _index; _opts.divs.pdf = "study-view-survival-plot-pdf-" + _index; _opts.divs.pdfName = "study-view-survival-plot-pdf-name-" + _index; _opts.divs.pdfValue = "study-view-survival-plot-pdf-value-" + _index; _opts.divs.svg = "study-view-survival-plot-svg-" + _index; _opts.divs.svgName = "study-view-survival-plot-svg-name-" + _index; _opts.divs.svgValue = "study-view-survival-plot-svg-value-" + _index; _opts.divs.txt = "study-view-survival-plot-tsv-" + _index; _opts.divs.menu = "study-view-survival-plot-menu-" + _index; _opts.divs.loader = "study-view-survival-plot-loader-" + _index; _opts.divs.downloadIcon = "study-view-survival-download-icon-" + _index; //plot in _opts is for survival plot _opts.plot = jQuery.extend(true, {}, SurvivalCurveBroilerPlate); _opts.plot.text.xTitle = "Months Survival"; _opts.plot.text.yTitle = "Surviving"; _opts.plot.text.qTips.estimation = "Survival estimate"; _opts.plot.text.qTips.censoredEvent = "Time of last observation"; _opts.plot.text.qTips.failureEvent = "Time of death"; _opts.plot.text.qTips.id = 'Sample ID'; _opts.plot.settings.canvas_width = 365; _opts.plot.settings.canvas_height = 310; _opts.plot.settings.chart_width = 290; _opts.plot.settings.chart_height = 250; _opts.plot.settings.chart_left = 70; _opts.plot.settings.chart_top = 5; _opts.plot.settings.pval_x = 295; _opts.plot.settings.pval_y = 35; _opts.plot.settings.include_legend = false; _opts.plot.settings.include_pvalue = false; _opts.plot.style.axisX_title_pos_x = 200; _opts.plot.style.axisX_title_pos_y = 295; _opts.plot.style.axisY_title_pos_x = -120; _opts.plot.style.axisY_title_pos_y = 20; _opts.plot.style.pval_font_size = 10; _opts.plot.style.pval_font_style = 'normal'; _opts.plot.divs.curveDivId = "study-view-survival-plot-body-svg-" + _index; _opts.plot.divs.headerDivId = ""; _opts.plot.divs.infoTableDivId = "study-view-survival-plot-table-" + _index; _opts.plot.text.infoTableTitles.total_cases = "#total cases"; _opts.plot.text.infoTableTitles.num_of_events_cases = "#cases deceased"; _opts.plot.text.infoTableTitles.median = "median months survival"; _opts.plot.text.pValTitle = 'p='; _opts.plot.qtipFunc = cbio.util.getLinkToSampleView; if(_key === 'DFS') { _opts.plot.text.qTips.estimation = "Disease free estimate"; } return _opts; } function redrawView(_plotKey, _casesInfo) { var _color = ""; var opts = { settings:{ include_pvalue: false } }; var data = {}; inputArr = []; kmEstimator = new KmEstimator(); logRankTest = new LogRankTest(); //confidenceIntervals = new ConfidenceIntervals(); curveInfo[_plotKey] = []; for (var key in _casesInfo) { var instanceData = new SurvivalCurveProxy(); instanceData.init(aData[_plotKey], _casesInfo[key].caseIds, kmEstimator, logRankTest); //If no data return, will no draw this curve if (instanceData.getData().length > 0) { var instanceSettings = jQuery.extend(true, {}, SurvivalCurveBroilerPlate.subGroupSettings); _color = _casesInfo[key].color; if (_color) { instanceSettings.line_color = _color; instanceSettings.mouseover_color = _color; instanceSettings.curveId = _plotKey + "-" + _color.toString().substring(1); //Assemble the input var instance = {}; instance.data = instanceData; instance.settings = instanceSettings; inputArr.push(instance); // if (StudyViewUtil.arrayFindByValue(reserveName, key)) { // uColorCurveData[uColor[reserveName.indexOf(key)]] = instance; // } var _curveInfoDatum = { name: key, color: _color, caseList: _casesInfo[key].color, data: instance }; curveInfo[_plotKey].push(_curveInfoDatum); } else { //alert("Sorry, you can not create more than 30 curves."); //break; } } } var inputArrLength = inputArr.length; for (var i = 0; i < inputArrLength; i++) { survivalPlot[_plotKey].addCurve(inputArr[i]); } if(inputArrLength === 2) { opts.settings.include_pvalue = true; logRankTest.calc(inputArr[0].data.getData(), inputArr[1].data.getData(), function(_pval){ data.pval = _pval; survivalPlot[_plotKey].updateView(data, opts); }); }else{ survivalPlot[_plotKey].updateView({}, opts); } } /* * Initialize survival plot by calling survivalCurve component * * @param {object} _casesInfo Grouped cases information. * @param {object} _data The processed data by function dataprocess. * @param {object} _plotIndex The selected plot indentifier. */ function initView(_casesInfo, _data, _plotKey) { var _color = "", inputArr = []; kmEstimator = new KmEstimator(); logRankTest = new LogRankTest(); //confidenceIntervals = new ConfidenceIntervals(); curveInfo[_plotKey] = []; for (var key in _casesInfo) { var instanceData = new SurvivalCurveProxy(); instanceData.init(_data, _casesInfo[key].caseIds, kmEstimator, logRankTest); //If no data return, will no draw this curve if (instanceData.getData().length > 0) { var instanceSettings = jQuery.extend(true, {}, SurvivalCurveBroilerPlate.subGroupSettings); _color = _casesInfo[key].color; if (_color) { instanceSettings.line_color = _color; instanceSettings.mouseover_color = _color; instanceSettings.curveId = _plotKey + "-" + _color.toString().substring(1); //Assemble the input var instance = {}; instance.data = instanceData; instance.settings = instanceSettings; inputArr.push(instance); // if (StudyViewUtil.arrayFindByValue(reserveName, key)) { // uColorCurveData[uColor[reserveName.indexOf(key)]] = instance; // } var _curveInfoDatum = { name: key, color: _color, caseList: _casesInfo[key].caseIds, data: instance }; curveInfo[_plotKey].push(_curveInfoDatum); } else { alert("Sorry, you can not create more than 30 curves."); break; } } } if(curveInfo[_plotKey].size === 2) { opts[_plotKey].plot.settings.include_pvalue = true; } //We disabled pvalue calculation in here survivalPlot[_plotKey] = new SurvivalCurve(); survivalPlot[_plotKey].init(inputArr, opts[_plotKey].plot); } /** * Redraw curves based on selected cases and unselected cases * * @param {type} _casesInfo the same as _casesInfo in initView * @param {type} _selectedAttr the selected attribute which will be used to * seperate cases. Can be false or ''. */ function redraw(_casesInfo, _selectedAttr) { for (var key in plotsInfo) { var _curveInfoLength = curveInfo[key].length; for (var i = 0; i < _curveInfoLength; i++) { survivalPlot[key].removeCurve(key+ "-" + curveInfo[key][i].color.toString().substring(1)); } $("#" + opts[key].divs.main).qtip('destroy', true); kmEstimator = ""; logRankTest = ""; delete curveInfo[key]; var _tmpCasesInfo = grouping(_casesInfo, _selectedAttr[0]); redrawView(key, _tmpCasesInfo); drawLabels(key); if (typeof _selectedAttr !== 'undefined') { StudyViewUtil.changeTitle("#" + opts[key].divs.main + " chartTitleH4", _selectedAttr[1], false); } addEvents(key); } } /** * The main function to draw survival plot labels. * * @param {type} _plotKey the current selected plot indentifier. */ function drawLabels(_plotKey) { var _svg = '', _curveInfo = curveInfo[_plotKey], _savedCurveInfo = savedCurveInfo[_plotKey], _newLabelsLength = _curveInfo.length, _savedLabelsLength = getSavedCurveName(_plotKey).length, _numOfLabels = _newLabelsLength + _savedLabelsLength, _width = 0, _height = _numOfLabels * 20 - 5; $("#" + opts[_plotKey].divs.main + " svg").qtip('destroy', true); if (_numOfLabels === 0) { $("#" + opts[_plotKey].divs.bodyLabel).css('display', 'none'); } else { //TODO: this width is calculated by maximum name length multiply //a constant, need to be changed later for (var i = 0; i < _newLabelsLength; i++) { if (_curveInfo[i].name.length * 10 > _width) { _width = _curveInfo[i].name.length * 10; } } for (var key in _savedCurveInfo) { if (_savedCurveInfo[key].name.length * 10 > _width) { _width = _savedCurveInfo[key].name.length * 10; } } //_width += 45; _width += 30; $("#" + opts[_plotKey].divs.bodyLabel + " svg").remove(); if (_savedLabelsLength > 0) { _height += 20; } _svg = d3.select("#" + opts[_plotKey].divs.bodyLabel) .append("svg") .attr('width', _width) .attr("height", _height); drawNewLabels(_plotKey, _svg, 0, _width); if (_savedLabelsLength > 0) { //separator's height is 20px; drawSeparator(_svg, _newLabelsLength * 20, _width); drawSavedLabels(_plotKey, _svg, (_newLabelsLength + 1) * 20, _width); } } $("#" + opts[_plotKey].divs.main + " svg").qtip({ id: opts[_plotKey].divs.bodyLabel + "-qtip", style: { classes: 'qtip-light qtip-rounded qtip-shadow forceZindex'}, show: {event: "mouseover", delay: 0}, hide: {fixed:true, delay: 100, event: "mouseout"}, position: {my:'left top',at:'top right', viewport: $(window)}, content: $("#" + opts[_plotKey].divs.bodyLabel).html(), events: { render: function(event, api) { $('svg image', api.elements.tooltip).hover(function() { $(this).css('cursor', 'pointer'); }); $('svg image', api.elements.tooltip).unbind('click'); $('svg image', api.elements.tooltip).click(function() { if ($(this).attr('name') === 'pin') { //The following functions will be excuted after user inputting //the curve name, so we need to give it a call back function. nameCurveDialog(this, saveCurveInfoFunc, _plotKey); } else if ($(this).attr('name') === 'close') { var _parent = $(this).parent(), _name = $(_parent).find('text').attr('oValue'), _color = $(_parent).find('rect').attr('fill'), _index = $(this).parent().index(); $(_parent).remove(); removeCurveFunc(_index, _plotKey); redrawLabel(_plotKey); survivalPlot[_plotKey].removeCurve(_plotKey + "-" + _color.toString().substring(1)); } else if ($(this).attr('name') === 'saved-close') { var _parent = $(this).parent(), _name = $(_parent).find('text').attr('oValue'); $(_parent).remove(); undoSavedCurve(_name, _plotKey); removeSavedCurveFunc(_name, _plotKey); redrawLabel(_plotKey); } else { //TODO: Add more function } }); //$('#' + _opts.divs.main + ' svg rect').unbind('hover'); $('svg rect', api.elements.tooltip).hover(function() { $(this).css('cursor', 'pointer'); }); $('svg rect', api.elements.tooltip).unbind('click'); $('svg rect', api.elements.tooltip).click(function() { var _text = $($(this).parent()).find('text:first'), _rgbRect = StudyViewUtil.rgbStringConvert($(this).css('fill')), _rgbText = StudyViewUtil.rgbStringConvert($(_text).css('fill')), _rectColor = StudyViewUtil.rgbToHex(_rgbRect[0], _rgbRect[1], _rgbRect[2]), _textColor = StudyViewUtil.rgbToHex(_rgbText[0], _rgbText[1], _rgbText[2]); if (_textColor === '#000000') { $(_text).css('fill', 'red'); highlightCurve(_plotKey + "-" + _rectColor.substring(1)); } else { $(_text).css('fill', 'black'); resetCurve(_plotKey + "-" + _rectColor.substring(1)); } }); } } }); } /** * Draw 'Saved Curves' and black line between new labels and saved labels * * @param _svg the svg container. * @param _yPosition the vertical position of this separator * @param _width the width of svg */ function drawSeparator(_svg, _yPosition, _width) { var _g = _svg.append("g").attr('transform', 'translate(0, ' + _yPosition + ')'); _g.append("text") .attr('x', _width / 2) .attr('y', 12) .attr('fill', 'black') .attr('text-anchor', 'middle') .attr('class', 'study-view-survival-label-font-1') .text('Saved Curves'); _g.append("line") .attr('x1', 0) .attr('y1', 16) .attr('x2', _width) .attr('y2', 16) .attr('stroke', 'black') .attr('stroke-width', '2px'); } /** * Draw saved labels if have any * * @param _plotKey the plot identifier * @param _svg * @param _startedIndex * @param _svgWidth */ function drawSavedLabels(_plotKey, _svg, _startedIndex, _svgWidth) { var _savedLabelsLength = getSavedCurveName(_plotKey).length, _savedCurveInfo = savedCurveInfo[_plotKey]; if (_savedLabelsLength > 0) { var _index = 0; for (var key in _savedCurveInfo) { drawLabelBasicComponent(_plotKey, _svg, _index + _startedIndex, _savedCurveInfo[key].color, _savedCurveInfo[key].name, 'close', _svgWidth); _index++; } } } /** * Draw basic label componets: one rect, one lable name, * icons(pin or delete icons) * * @param {type} _plotKey the current selected plot identifier. * @param {type} _svg the svg where to draw labels. * @param {type} _index the label index in current plot. * @param {type} _color the label color. * @param {type} _textName the label name. * @param {type} _iconType 'pin' or 'close', pin will draw pin icon and * delete icon, close will only draw delete icon. * @param {type} _svgWidth the svg width. */ function drawLabelBasicComponent(_plotKey, _svg, _index, _color, _textName, _iconType, _svgWidth) { var _g = _svg.append("g").attr('transform', 'translate(0, ' + (_index * 20) + ')'); _g.append("rect") .attr('width', 10) .attr('height', 10) .attr('fill', _color); _g.append("text") .attr('x', 15) .attr('y', 10) .attr('fill', 'black') .attr('font', '12px') .attr('id', 'survival_label_text_' + _plotKey + "_" + _index) .attr('oValue', _textName) .text(_textName); if (_iconType === 'pin') { // Temporary disable save curve function // var _image = _g.append("image") // .attr('x', _svgWidth - 30) // .attr('y', '0') // .attr('height', '10px') // .attr('width', '10px'); // // _image.attr('xlink:href', 'images/pushpin.svg'); // _image.attr('name', 'pin'); var _image = _g.append("image") .attr('x', _svgWidth - 15) .attr('y', '1') .attr('height', '8px') .attr('width', '8px'); _image.attr('xlink:href', 'images/close.svg'); _image.attr('name', 'close'); } else if (_iconType === 'close') { var _image = _g.append("image") .attr('x', _svgWidth - 15) .attr('y', '1') .attr('height', '8px') .attr('width', '8px'); _image.attr('xlink:href', 'images/close.svg'); _image.attr('name', 'saved-close'); } else { //TODO: } } /** * Calling drawLabelBasicComponent to draw all new labels including * curve color, name and icontype = 'pin'. * * @param {type} _plotKey the selected plot identifier. * @param {type} _svg the svg where to draw labels. * @param {type} _startedIndex * @param {type} _svgWidth the svg width. */ function drawNewLabels(_plotKey, _svg, _startedIndex, _svgWidth) { var _numOfLabels = curveInfo[_plotKey].length; for (var i = 0; i < _numOfLabels; i++) { drawLabelBasicComponent( _plotKey, _svg, i + _startedIndex, curveInfo[_plotKey][i].color, curveInfo[_plotKey][i].name, 'pin', _svgWidth); } } /** * Will be called when user pin/delete labeles * @param {type} _plotKey */ function redrawLabel(_plotKey) { $("#" + opts[_plotKey].divs.bodyLabel + " svg").remove(); drawLabels(_plotKey); addEvents(_plotKey); } /** * * @param {type} _plotsInfo * @param {type} _data all data before prcessing, and clone it to oData. */ function createCurves(_plotsInfo, _data) { var _keys = Object.keys(_plotsInfo); numOfPlots = Object.keys(_plotsInfo).length; plotsInfo = _plotsInfo; oData = _data; oDataLength = _data.length; for (var i = 0; i < numOfPlots; i++) { plotBasicFuncs(i, _keys[i]); } //The initStatus will be used from other view initStatus = true; } function plotBasicFuncs(_index, _key) { var _casesInfo; aData[_key] = {}; opts[_key] = {}; aData[_key] = dataProcess(plotsInfo[_key]); /* for(var _key in aData[_index]){ console.log("-----"); console.log(_key); console.log(aData[_index][_key].months); console.log(aData[_index][_key].status); console.log(); } */ //If no data returned, this survival plot should not be initialized. if (Object.keys(aData[_key]).length !== 0) { opts[_key] = initOpts(_index, _key); createDiv(opts[_key]); _casesInfo = grouping(plotsInfo[_key].caseLists, ''); initView(_casesInfo, aData[_key], _key); drawLabels(_key); addEvents(_key); } else { console.log("No data for Survival Plot: " + _key); } } function getNumOfPlots() { return numOfPlots; } function detectLabelPosition() { for (var i = 0; i < numOfPlots; i++) { if ($("#" + opts[i].divs.bodyLabel).css('display') === 'block') { StudyViewUtil.changePosition( '#' + opts[i].divs.main, '#' + opts[i].divs.bodyLabel, "#summary"); } } } return { init: function(_plotsInfo, _data) { createCurves(_plotsInfo, _data); }, getInitStatus: getInitStatus, redraw: redraw, redrawLabel: redrawLabel, getNumOfPlots: getNumOfPlots, detectLabelPosition: detectLabelPosition }; })();
shrumit/cbioportal-gsoc-final
portal/src/main/webapp/js/src/study-view/view/StudyViewSurvivalPlotView.js
JavaScript
agpl-3.0
50,320
package org.forecat.shared.suggestions; import java.io.Serializable; import java.util.List; import java.util.Map; import org.forecat.client.exceptions.ForecatException; import org.forecat.shared.ranker.RankerShared; import org.forecat.shared.translation.SourceSegment; import com.google.gwt.user.client.rpc.IsSerializable; public class SuggestionsRanker extends SuggestionsShared implements IsSerializable, Serializable { SuggestionsShared base; RankerShared ranker; /** * */ private static final long serialVersionUID = -1080886143337665973L; @Override public List<SuggestionsOutput> obtainSuggestions(SuggestionsInput input, Map<String, List<SourceSegment>> segmentPairs, Map<String, Integer> segmentCounts) { List<SuggestionsOutput> output = base.obtainSuggestions(input, segmentPairs, segmentCounts); try { output = ranker.rankerService(input, output); } catch (ForecatException e) { e.printStackTrace(); } return output; } protected SuggestionsRanker() { } public SuggestionsRanker(SuggestionsShared base, RankerShared ranker) { super(); this.base = base; this.ranker = ranker; } }
jaspock/forecat
src/org/forecat/shared/suggestions/SuggestionsRanker.java
Java
agpl-3.0
1,139
/* * Copyright (C) 2017-2018 Matthias Fehring <kontakt@buschmann23.de> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "validatornumeric_p.h" using namespace Cutelyst; ValidatorNumeric::ValidatorNumeric(const QString &field, const Cutelyst::ValidatorMessages &messages, const QString &defValKey) : ValidatorRule(*new ValidatorNumericPrivate(field, messages, defValKey)) { } ValidatorNumeric::~ValidatorNumeric() { } ValidatorReturnType ValidatorNumeric::validate(Context *c, const ParamsMultiMap &params) const { ValidatorReturnType result; const QString v = value(params); if (!v.isEmpty()) { bool ok = false; const double _v = v.toDouble(&ok); if (Q_LIKELY(ok)) { result.value.setValue(_v); } else { qCDebug(C_VALIDATOR, "ValidatorNumeric: Validation failed for field %s at %s::%s: can not convert input value into a numeric value.", qPrintable(field()), qPrintable(c->controllerName()), qPrintable(c->actionName())); result.errorMessage = validationError(c); } } else { defaultValue(c, &result, "ValidatorNumeric"); } return result; } QString ValidatorNumeric::genericValidationError(Context *c, const QVariant &errorData) const { QString error; Q_UNUSED(errorData) const QString _label = label(c); if (_label.isEmpty()) { error = c->translate("Cutelyst::ValidatorNumeric", "Must be numeric, like 1, -2.5 or 3.454e3."); } else { //: %1 will be replaced by the field label error = c->translate("Cutelyst::ValidatorNumeric", "You have to enter a numeric value into the “%1” field, like 1, -2.5 or 3.454e3.").arg(_label); } return error; }
buschmann23/cutelyst
Cutelyst/Plugins/Utils/Validator/validatornumeric.cpp
C++
lgpl-2.1
2,430
<?php // (c) Copyright 2002-2012 by authors of the Tiki Wiki CMS Groupware Project // // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. // $Id: comments_zone.php 40059 2012-03-07 06:25:54Z pkdille $ //this script may only be included - so its better to die if called directly. $access->check_script($_SERVER['SCRIPT_NAME'], basename(__FILE__)); /* * Show comments zone on page load by default */ $comzone = $_REQUEST['comzone']; if ( $comzone == 'show' ) { if ( strstr($_SERVER['REQUEST_URI'], 'tiki-read_article') and $prefs['feature_article_comments'] == 'y' ) $prefs['show_comzone'] = 'y'; if ( strstr($_SERVER['REQUEST_URI'], 'tiki-poll_results') and $prefs['feature_poll_comments'] == 'y' ) $prefs['show_comzone'] = 'y'; if ( strstr($_SERVER['REQUEST_URI'], 'tiki-index') and $prefs['feature_wiki_comments'] == 'y' ) $prefs['show_comzone'] = 'y'; if ( strstr($_SERVER['REQUEST_URI'], 'tiki-view_faq') and $prefs['feature_faq_comments'] == 'y' ) $prefs['show_comzone'] = 'y'; if ( strstr($_SERVER['REQUEST_URI'], 'tiki-browse_gallery') and $prefs['feature_image_galleries_comments'] == 'y' ) $prefs['show_comzone'] = 'y'; if ( strstr($_SERVER['REQUEST_URI'], 'tiki-list_file_gallery') and $prefs['feature_file_galleries_comments'] == 'y' ) $prefs['show_comzone'] = 'y'; if ( strstr($_SERVER['REQUEST_URI'], 'tiki-view_blog_post') and $prefs['feature_blogposts_comments'] == 'y' ) $prefs['show_comzone'] = 'y'; if ( strstr($_SERVER['REQUEST_URI'], 'tiki-map') and $prefs['feature_map_comments'] == 'y' ) $prefs['show_comzone'] = 'y'; if ( $prefs['show_comzone'] == 'y' ) $smarty->assign('show_comzone', 'y'); }
railfuture/tiki-website
lib/setup/comments_zone.php
PHP
lgpl-2.1
1,776
// --------------------------------------------------------------------- // // Copyright (C) 2006 - 2013 by the deal.II authors // // This file is part of the deal.II library. // // The deal.II library is free software; you can use it, redistribute // it, and/or modify it under the terms of the GNU Lesser General // Public License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // The full text of the license can be found in the file LICENSE at // the top level of the deal.II distribution. // // --------------------------------------------------------------------- // check operator<< for SymmetricTensor<2,dim> and SymmetricTensor<4,dim> #include "../tests.h" #include <deal.II/base/symmetric_tensor.h> #include <deal.II/base/logstream.h> #include <deal.II/lac/vector.h> #include <fstream> #include <iomanip> int main () { std::ofstream logfile("output"); deallog << std::setprecision(3); deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); { const unsigned int dim=2; SymmetricTensor<2,dim> t; t[0][0] = 1; t[1][1] = 2; t[0][1] = 3; deallog << t << std::endl; } { const unsigned int dim=3; SymmetricTensor<4,dim> t; t[0][0][0][0] = t[1][0][1][0] = t[1][1][1][1] = t[2][2][2][2] = t[2][0][2][0] = 3; deallog << t << std::endl; } deallog << "OK" << std::endl; }
flow123d/dealii
tests/base/symmetric_tensor_22.cc
C++
lgpl-2.1
1,481
package net.minecraft.client.gui; import java.io.IOException; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.client.resources.I18n; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.gen.FlatGeneratorInfo; import net.minecraft.world.gen.FlatLayerInfo; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class GuiCreateFlatWorld extends GuiScreen { private final GuiCreateWorld createWorldGui; private FlatGeneratorInfo theFlatGeneratorInfo = FlatGeneratorInfo.getDefaultFlatGenerator(); /** The title given to the flat world currently in creation */ private String flatWorldTitle; private String field_146394_i; private String field_146391_r; private GuiCreateFlatWorld.Details createFlatWorldListSlotGui; private GuiButton field_146389_t; private GuiButton field_146388_u; private GuiButton field_146386_v; private static final String __OBFID = "CL_00000687"; public GuiCreateFlatWorld(GuiCreateWorld p_i1029_1_, String p_i1029_2_) { this.createWorldGui = p_i1029_1_; this.func_146383_a(p_i1029_2_); } public String func_146384_e() { return this.theFlatGeneratorInfo.toString(); } public void func_146383_a(String p_146383_1_) { this.theFlatGeneratorInfo = FlatGeneratorInfo.createFlatGeneratorFromString(p_146383_1_); } /** * Adds the buttons (and other controls) to the screen in question. */ public void initGui() { this.buttonList.clear(); this.flatWorldTitle = I18n.format("createWorld.customize.flat.title", new Object[0]); this.field_146394_i = I18n.format("createWorld.customize.flat.tile", new Object[0]); this.field_146391_r = I18n.format("createWorld.customize.flat.height", new Object[0]); this.createFlatWorldListSlotGui = new GuiCreateFlatWorld.Details(); this.buttonList.add(this.field_146389_t = new GuiButton(2, this.width / 2 - 154, this.height - 52, 100, 20, I18n.format("createWorld.customize.flat.addLayer", new Object[0]) + " (NYI)")); this.buttonList.add(this.field_146388_u = new GuiButton(3, this.width / 2 - 50, this.height - 52, 100, 20, I18n.format("createWorld.customize.flat.editLayer", new Object[0]) + " (NYI)")); this.buttonList.add(this.field_146386_v = new GuiButton(4, this.width / 2 - 155, this.height - 52, 150, 20, I18n.format("createWorld.customize.flat.removeLayer", new Object[0]))); this.buttonList.add(new GuiButton(0, this.width / 2 - 155, this.height - 28, 150, 20, I18n.format("gui.done", new Object[0]))); this.buttonList.add(new GuiButton(5, this.width / 2 + 5, this.height - 52, 150, 20, I18n.format("createWorld.customize.presets", new Object[0]))); this.buttonList.add(new GuiButton(1, this.width / 2 + 5, this.height - 28, 150, 20, I18n.format("gui.cancel", new Object[0]))); this.field_146389_t.visible = this.field_146388_u.visible = false; this.theFlatGeneratorInfo.func_82645_d(); this.func_146375_g(); } /** * Handles mouse input. */ public void handleMouseInput() throws IOException { super.handleMouseInput(); this.createFlatWorldListSlotGui.handleMouseInput(); } protected void actionPerformed(GuiButton button) throws IOException { int i = this.theFlatGeneratorInfo.getFlatLayers().size() - this.createFlatWorldListSlotGui.field_148228_k - 1; if (button.id == 1) { this.mc.displayGuiScreen(this.createWorldGui); } else if (button.id == 0) { this.createWorldGui.chunkProviderSettingsJson = this.func_146384_e(); this.mc.displayGuiScreen(this.createWorldGui); } else if (button.id == 5) { this.mc.displayGuiScreen(new GuiFlatPresets(this)); } else if (button.id == 4 && this.func_146382_i()) { this.theFlatGeneratorInfo.getFlatLayers().remove(i); this.createFlatWorldListSlotGui.field_148228_k = Math.min(this.createFlatWorldListSlotGui.field_148228_k, this.theFlatGeneratorInfo.getFlatLayers().size() - 1); } this.theFlatGeneratorInfo.func_82645_d(); this.func_146375_g(); } public void func_146375_g() { boolean flag = this.func_146382_i(); this.field_146386_v.enabled = flag; this.field_146388_u.enabled = flag; this.field_146388_u.enabled = false; this.field_146389_t.enabled = false; } private boolean func_146382_i() { return this.createFlatWorldListSlotGui.field_148228_k > -1 && this.createFlatWorldListSlotGui.field_148228_k < this.theFlatGeneratorInfo.getFlatLayers().size(); } /** * Draws the screen and all the components in it. Args : mouseX, mouseY, renderPartialTicks */ public void drawScreen(int mouseX, int mouseY, float partialTicks) { this.drawDefaultBackground(); this.createFlatWorldListSlotGui.drawScreen(mouseX, mouseY, partialTicks); this.drawCenteredString(this.fontRendererObj, this.flatWorldTitle, this.width / 2, 8, 16777215); int k = this.width / 2 - 92 - 16; this.drawString(this.fontRendererObj, this.field_146394_i, k, 32, 16777215); this.drawString(this.fontRendererObj, this.field_146391_r, k + 2 + 213 - this.fontRendererObj.getStringWidth(this.field_146391_r), 32, 16777215); super.drawScreen(mouseX, mouseY, partialTicks); } @SideOnly(Side.CLIENT) class Details extends GuiSlot { public int field_148228_k = -1; private static final String __OBFID = "CL_00000688"; public Details() { super(GuiCreateFlatWorld.this.mc, GuiCreateFlatWorld.this.width, GuiCreateFlatWorld.this.height, 43, GuiCreateFlatWorld.this.height - 60, 24); } private void func_148225_a(int p_148225_1_, int p_148225_2_, ItemStack p_148225_3_) { this.func_148226_e(p_148225_1_ + 1, p_148225_2_ + 1); GlStateManager.enableRescaleNormal(); if (p_148225_3_ != null && p_148225_3_.getItem() != null) { RenderHelper.enableGUIStandardItemLighting(); GuiCreateFlatWorld.this.itemRender.renderItemIntoGUI(p_148225_3_, p_148225_1_ + 2, p_148225_2_ + 2); RenderHelper.disableStandardItemLighting(); } GlStateManager.disableRescaleNormal(); } private void func_148226_e(int p_148226_1_, int p_148226_2_) { this.func_148224_c(p_148226_1_, p_148226_2_, 0, 0); } private void func_148224_c(int p_148224_1_, int p_148224_2_, int p_148224_3_, int p_148224_4_) { GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(Gui.statIcons); float f = 0.0078125F; float f1 = 0.0078125F; boolean flag = true; boolean flag1 = true; Tessellator tessellator = Tessellator.getInstance(); WorldRenderer worldrenderer = tessellator.getWorldRenderer(); worldrenderer.startDrawingQuads(); worldrenderer.addVertexWithUV((double)(p_148224_1_ + 0), (double)(p_148224_2_ + 18), (double)GuiCreateFlatWorld.this.zLevel, (double)((float)(p_148224_3_ + 0) * 0.0078125F), (double)((float)(p_148224_4_ + 18) * 0.0078125F)); worldrenderer.addVertexWithUV((double)(p_148224_1_ + 18), (double)(p_148224_2_ + 18), (double)GuiCreateFlatWorld.this.zLevel, (double)((float)(p_148224_3_ + 18) * 0.0078125F), (double)((float)(p_148224_4_ + 18) * 0.0078125F)); worldrenderer.addVertexWithUV((double)(p_148224_1_ + 18), (double)(p_148224_2_ + 0), (double)GuiCreateFlatWorld.this.zLevel, (double)((float)(p_148224_3_ + 18) * 0.0078125F), (double)((float)(p_148224_4_ + 0) * 0.0078125F)); worldrenderer.addVertexWithUV((double)(p_148224_1_ + 0), (double)(p_148224_2_ + 0), (double)GuiCreateFlatWorld.this.zLevel, (double)((float)(p_148224_3_ + 0) * 0.0078125F), (double)((float)(p_148224_4_ + 0) * 0.0078125F)); tessellator.draw(); } protected int getSize() { return GuiCreateFlatWorld.this.theFlatGeneratorInfo.getFlatLayers().size(); } /** * The element in the slot that was clicked, boolean for whether it was double clicked or not */ protected void elementClicked(int slotIndex, boolean isDoubleClick, int mouseX, int mouseY) { this.field_148228_k = slotIndex; GuiCreateFlatWorld.this.func_146375_g(); } /** * Returns true if the element passed in is currently selected */ protected boolean isSelected(int slotIndex) { return slotIndex == this.field_148228_k; } protected void drawBackground() {} protected void drawSlot(int entryID, int p_180791_2_, int p_180791_3_, int p_180791_4_, int p_180791_5_, int p_180791_6_) { FlatLayerInfo flatlayerinfo = (FlatLayerInfo)GuiCreateFlatWorld.this.theFlatGeneratorInfo.getFlatLayers().get(GuiCreateFlatWorld.this.theFlatGeneratorInfo.getFlatLayers().size() - entryID - 1); IBlockState iblockstate = flatlayerinfo.func_175900_c(); Block block = iblockstate.getBlock(); Item item = Item.getItemFromBlock(block); ItemStack itemstack = block != Blocks.air && item != null ? new ItemStack(item, 1, block.getMetaFromState(iblockstate)) : null; String s = itemstack == null ? "Air" : item.getItemStackDisplayName(itemstack); if (item == null) { if (block != Blocks.water && block != Blocks.flowing_water) { if (block == Blocks.lava || block == Blocks.flowing_lava) { item = Items.lava_bucket; } } else { item = Items.water_bucket; } if (item != null) { itemstack = new ItemStack(item, 1, block.getMetaFromState(iblockstate)); s = block.getLocalizedName(); } } this.func_148225_a(p_180791_2_, p_180791_3_, itemstack); GuiCreateFlatWorld.this.fontRendererObj.drawString(s, p_180791_2_ + 18 + 5, p_180791_3_ + 3, 16777215); String s1; if (entryID == 0) { s1 = I18n.format("createWorld.customize.flat.layer.top", new Object[] {Integer.valueOf(flatlayerinfo.getLayerCount())}); } else if (entryID == GuiCreateFlatWorld.this.theFlatGeneratorInfo.getFlatLayers().size() - 1) { s1 = I18n.format("createWorld.customize.flat.layer.bottom", new Object[] {Integer.valueOf(flatlayerinfo.getLayerCount())}); } else { s1 = I18n.format("createWorld.customize.flat.layer", new Object[] {Integer.valueOf(flatlayerinfo.getLayerCount())}); } GuiCreateFlatWorld.this.fontRendererObj.drawString(s1, p_180791_2_ + 2 + 213 - GuiCreateFlatWorld.this.fontRendererObj.getStringWidth(s1), p_180791_3_ + 3, 16777215); } protected int getScrollBarX() { return this.width - 70; } } }
trixmot/mod1
build/tmp/recompileMc/sources/net/minecraft/client/gui/GuiCreateFlatWorld.java
Java
lgpl-2.1
11,943
using System.Collections.Generic; using System.Linq.Expressions; using NHibernate.Linq.Clauses; using Remotion.Linq; using Remotion.Linq.Clauses; using Remotion.Linq.Clauses.Expressions; using Remotion.Linq.Parsing; namespace NHibernate.Linq.Visitors { public interface IJoiner { Expression AddJoin(Expression expression, string key); bool CanAddJoin(Expression expression); void MakeInnerIfJoined(string key); } public class Joiner : IJoiner { private readonly Dictionary<string, NhJoinClause> _joins = new Dictionary<string, NhJoinClause>(); private readonly NameGenerator _nameGenerator; private readonly QueryModel _queryModel; internal Joiner(QueryModel queryModel) { _nameGenerator = new NameGenerator(queryModel); _queryModel = queryModel; } public IEnumerable<NhJoinClause> Joins { get { return _joins.Values; } } public Expression AddJoin(Expression expression, string key) { NhJoinClause join; if (!_joins.TryGetValue(key, out join)) { join = new NhJoinClause(_nameGenerator.GetNewName(), expression.Type, expression); _queryModel.BodyClauses.Add(join); _joins.Add(key, join); } return new QuerySourceReferenceExpression(@join); } public void MakeInnerIfJoined(string key) { // key is not joined if it occurs only at tails of expressions, e.g. // a.B == null, a.B != null, a.B == c.D etc. NhJoinClause nhJoinClause; if (_joins.TryGetValue(key, out nhJoinClause)) { nhJoinClause.MakeInner(); } } public bool CanAddJoin(Expression expression) { var source = QuerySourceExtractor.GetQuerySource(expression); if (_queryModel.MainFromClause == source) return true; var bodyClause = source as IBodyClause; if (bodyClause != null && _queryModel.BodyClauses.Contains(bodyClause)) return true; var resultOperatorBase = source as ResultOperatorBase; return resultOperatorBase != null && _queryModel.ResultOperators.Contains(resultOperatorBase); } private class QuerySourceExtractor : ExpressionTreeVisitor { private IQuerySource _querySource; public static IQuerySource GetQuerySource(Expression expression) { var sourceExtractor = new QuerySourceExtractor(); sourceExtractor.VisitExpression(expression); return sourceExtractor._querySource; } protected override Expression VisitQuerySourceReferenceExpression(QuerySourceReferenceExpression expression) { _querySource = expression.ReferencedQuerySource; return base.VisitQuerySourceReferenceExpression(expression); } } } }
alobakov/nhibernate-core
src/NHibernate/Linq/Visitors/JoinBuilder.cs
C#
lgpl-2.1
2,566
/**************************************************************************** ** ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the QtMediaServices module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions ** contained in the Technology Preview License Agreement accompanying ** this package. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. ** ** ** ** ** ** ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #include <QtMediaServices/qmediatimerange.h> QT_BEGIN_NAMESPACE /*! \class QMediaTimeInterval \brief The QMediaTimeInterval class represents a time interval with integer precision. \ingroup multimedia \since 4.7 An interval is specified by an inclusive start() and end() time. These must be set in the constructor, as this is an immutable class. The specific units of time represented by the class have not been defined - it is suitable for any times which can be represented by a signed 64 bit integer. The isNormal() method determines if a time interval is normal (a normal time interval has start() <= end()). An abnormal interval can be converted in to a normal interval by calling the normalized() method. The contains() method determines if a specified time lies within the time interval. The translated() method returns a time interval which has been translated forwards or backwards through time by a specified offset. \sa QMediaTimeRange */ /*! \fn QMediaTimeInterval::QMediaTimeInterval() Constructs an empty interval. */ QMediaTimeInterval::QMediaTimeInterval() : s(0) , e(0) { } /*! \fn QMediaTimeInterval::QMediaTimeInterval(qint64 start, qint64 end) Constructs an interval with the specified \a start and \a end times. */ QMediaTimeInterval::QMediaTimeInterval(qint64 start, qint64 end) : s(start) , e(end) { } /*! \fn QMediaTimeInterval::QMediaTimeInterval(const QMediaTimeInterval &other) Constructs an interval by taking a copy of \a other. */ QMediaTimeInterval::QMediaTimeInterval(const QMediaTimeInterval &other) : s(other.s) , e(other.e) { } /*! \fn QMediaTimeInterval::start() const Returns the start time of the interval. \sa end() */ qint64 QMediaTimeInterval::start() const { return s; } /*! \fn QMediaTimeInterval::end() const Returns the end time of the interval. \sa start() */ qint64 QMediaTimeInterval::end() const { return e; } /*! \fn QMediaTimeInterval::contains(qint64 time) const Returns true if the time interval contains the specified \a time. That is, start() <= time <= end(). */ bool QMediaTimeInterval::contains(qint64 time) const { return isNormal() ? (s <= time && time <= e) : (e <= time && time <= s); } /*! \fn QMediaTimeInterval::isNormal() const Returns true if this time interval is normal. A normal time interval has start() <= end(). \sa normalized() */ bool QMediaTimeInterval::isNormal() const { return s <= e; } /*! \fn QMediaTimeInterval::normalized() const Returns a normalized version of this interval. If the start() time of the interval is greater than the end() time, then the returned interval has the start and end times swapped. */ QMediaTimeInterval QMediaTimeInterval::normalized() const { if(s > e) return QMediaTimeInterval(e, s); return *this; } /*! \fn QMediaTimeInterval::translated(qint64 offset) const Returns a copy of this time interval, translated by a value of \a offset. An interval can be moved forward through time with a positive offset, or backward through time with a negative offset. */ QMediaTimeInterval QMediaTimeInterval::translated(qint64 offset) const { return QMediaTimeInterval(s + offset, e + offset); } /*! \fn operator==(const QMediaTimeInterval &a, const QMediaTimeInterval &b) \relates QMediaTimeRange Returns true if \a a is exactly equal to \a b. */ bool operator==(const QMediaTimeInterval &a, const QMediaTimeInterval &b) { return a.start() == b.start() && a.end() == b.end(); } /*! \fn operator!=(const QMediaTimeInterval &a, const QMediaTimeInterval &b) \relates QMediaTimeRange Returns true if \a a is not exactly equal to \a b. */ bool operator!=(const QMediaTimeInterval &a, const QMediaTimeInterval &b) { return a.start() != b.start() || a.end() != b.end(); } class QMediaTimeRangePrivate : public QSharedData { public: QMediaTimeRangePrivate(); QMediaTimeRangePrivate(const QMediaTimeRangePrivate &other); QMediaTimeRangePrivate(const QMediaTimeInterval &interval); QList<QMediaTimeInterval> intervals; void addInterval(const QMediaTimeInterval &interval); void removeInterval(const QMediaTimeInterval &interval); }; QMediaTimeRangePrivate::QMediaTimeRangePrivate() : QSharedData() { } QMediaTimeRangePrivate::QMediaTimeRangePrivate(const QMediaTimeRangePrivate &other) : QSharedData() , intervals(other.intervals) { } QMediaTimeRangePrivate::QMediaTimeRangePrivate(const QMediaTimeInterval &interval) : QSharedData() { if(interval.isNormal()) intervals << interval; } void QMediaTimeRangePrivate::addInterval(const QMediaTimeInterval &interval) { // Handle normalized intervals only if(!interval.isNormal()) return; // Find a place to insert the interval int i; for (i = 0; i < intervals.count(); i++) { // Insert before this element if(interval.s < intervals[i].s) { intervals.insert(i, interval); break; } } // Interval needs to be added to the end of the list if (i == intervals.count()) intervals.append(interval); // Do we need to correct the element before us? if(i > 0 && intervals[i - 1].e >= interval.s - 1) i--; // Merge trailing ranges while (i < intervals.count() - 1 && intervals[i].e >= intervals[i + 1].s - 1) { intervals[i].e = qMax(intervals[i].e, intervals[i + 1].e); intervals.removeAt(i + 1); } } void QMediaTimeRangePrivate::removeInterval(const QMediaTimeInterval &interval) { // Handle normalized intervals only if(!interval.isNormal()) return; for (int i = 0; i < intervals.count(); i++) { QMediaTimeInterval r = intervals[i]; if (r.e < interval.s) { // Before the removal interval continue; } else if (interval.e < r.s) { // After the removal interval - stop here break; } else if (r.s < interval.s && interval.e < r.e) { // Split case - a single range has a chunk removed intervals[i].e = interval.s -1; addInterval(QMediaTimeInterval(interval.e + 1, r.e)); break; } else if (r.s < interval.s) { // Trimming Tail Case intervals[i].e = interval.s - 1; } else if (interval.e < r.e) { // Trimming Head Case - we can stop after this intervals[i].s = interval.e + 1; break; } else { // Complete coverage case intervals.removeAt(i); --i; } } } /*! \class QMediaTimeRange \brief The QMediaTimeRange class represents a set of zero or more disjoint time intervals. \ingroup multimedia \since 4.7 \reentrant The earliestTime(), latestTime(), intervals() and isEmpty() methods are used to get information about the current time range. The addInterval(), removeInterval() and clear() methods are used to modify the current time range. When adding or removing intervals from the time range, existing intervals within the range may be expanded, trimmed, deleted, merged or split to ensure that all intervals within the time range remain distinct and disjoint. As a consequence, all intervals added or removed from a time range must be \l{QMediaTimeInterval::isNormal()}{normal}. \sa QMediaTimeInterval */ /*! \fn QMediaTimeRange::QMediaTimeRange() Constructs an empty time range. */ QMediaTimeRange::QMediaTimeRange() : d(new QMediaTimeRangePrivate) { } /*! \fn QMediaTimeRange::QMediaTimeRange(qint64 start, qint64 end) Constructs a time range that contains an initial interval from \a start to \a end inclusive. If the interval is not \l{QMediaTimeInterval::isNormal()}{normal}, the resulting time range will be empty. \sa addInterval() */ QMediaTimeRange::QMediaTimeRange(qint64 start, qint64 end) : d(new QMediaTimeRangePrivate(QMediaTimeInterval(start, end))) { } /*! \fn QMediaTimeRange::QMediaTimeRange(const QMediaTimeInterval &interval) Constructs a time range that contains an intitial interval, \a interval. If \a interval is not \l{QMediaTimeInterval::isNormal()}{normal}, the resulting time range will be empty. \sa addInterval() */ QMediaTimeRange::QMediaTimeRange(const QMediaTimeInterval &interval) : d(new QMediaTimeRangePrivate(interval)) { } /*! \fn QMediaTimeRange::QMediaTimeRange(const QMediaTimeRange &range) Constructs a time range by copying another time \a range. */ QMediaTimeRange::QMediaTimeRange(const QMediaTimeRange &range) : d(range.d) { } /*! \fn QMediaTimeRange::~QMediaTimeRange() Destructor. */ QMediaTimeRange::~QMediaTimeRange() { } /*! \fn QMediaTimeRange::operator=(const QMediaTimeRange &other) Takes a copy of the \a other time range and returns itself. */ QMediaTimeRange &QMediaTimeRange::operator=(const QMediaTimeRange &other) { d = other.d; return *this; } /*! \fn QMediaTimeRange::operator=(const QMediaTimeInterval &interval) Sets the time range to a single continuous interval, \a interval. */ QMediaTimeRange &QMediaTimeRange::operator=(const QMediaTimeInterval &interval) { d = new QMediaTimeRangePrivate(interval); return *this; } /*! \fn QMediaTimeRange::earliestTime() const Returns the earliest time within the time range. For empty time ranges, this value is equal to zero. \sa latestTime() */ qint64 QMediaTimeRange::earliestTime() const { if (!d->intervals.isEmpty()) return d->intervals[0].s; return 0; } /*! \fn QMediaTimeRange::latestTime() const Returns the latest time within the time range. For empty time ranges, this value is equal to zero. \sa earliestTime() */ qint64 QMediaTimeRange::latestTime() const { if (!d->intervals.isEmpty()) return d->intervals[d->intervals.count() - 1].e; return 0; } /*! \fn QMediaTimeRange::addInterval(qint64 start, qint64 end) \overload Adds the interval specified by \a start and \a end to the time range. \sa addInterval() */ void QMediaTimeRange::addInterval(qint64 start, qint64 end) { d->addInterval(QMediaTimeInterval(start, end)); } /*! \fn QMediaTimeRange::addInterval(const QMediaTimeInterval &interval) Adds the specified \a interval to the time range. Adding intervals which are not \l{QMediaTimeInterval::isNormal()}{normal} is invalid, and will be ignored. If the specified interval is adjacent to, or overlaps existing intervals within the time range, these intervals will be merged. This operation takes \l{linear time} \sa removeInterval() */ void QMediaTimeRange::addInterval(const QMediaTimeInterval &interval) { d->addInterval(interval); } /*! \fn QMediaTimeRange::addTimeRange(const QMediaTimeRange &range) Adds each of the intervals in \a range to this time range. Equivalent to calling addInterval() for each interval in \a range. */ void QMediaTimeRange::addTimeRange(const QMediaTimeRange &range) { foreach(const QMediaTimeInterval &i, range.intervals()) { d->addInterval(i); } } /*! \fn QMediaTimeRange::removeInterval(qint64 start, qint64 end) \overload Removes the interval specified by \a start and \a end from the time range. \sa removeInterval() */ void QMediaTimeRange::removeInterval(qint64 start, qint64 end) { d->removeInterval(QMediaTimeInterval(start, end)); } /*! \fn QMediaTimeRange::removeInterval(const QMediaTimeInterval &interval) Removes the specified \a interval from the time range. Removing intervals which are not \l{QMediaTimeInterval::isNormal()}{normal} is invalid, and will be ignored. Intervals within the time range will be trimmed, split or deleted such that no intervals within the time range include any part of the target interval. This operation takes \l{linear time} \sa addInterval() */ void QMediaTimeRange::removeInterval(const QMediaTimeInterval &interval) { d->removeInterval(interval); } /*! \fn QMediaTimeRange::removeTimeRange(const QMediaTimeRange &range) Removes each of the intervals in \a range from this time range. Equivalent to calling removeInterval() for each interval in \a range. */ void QMediaTimeRange::removeTimeRange(const QMediaTimeRange &range) { foreach(const QMediaTimeInterval &i, range.intervals()) { d->removeInterval(i); } } /*! \fn QMediaTimeRange::operator+=(const QMediaTimeRange &other) Adds each interval in \a other to the time range and returns the result. */ QMediaTimeRange& QMediaTimeRange::operator+=(const QMediaTimeRange &other) { addTimeRange(other); return *this; } /*! \fn QMediaTimeRange::operator+=(const QMediaTimeInterval &interval) Adds the specified \a interval to the time range and returns the result. */ QMediaTimeRange& QMediaTimeRange::operator+=(const QMediaTimeInterval &interval) { addInterval(interval); return *this; } /*! \fn QMediaTimeRange::operator-=(const QMediaTimeRange &other) Removes each interval in \a other from the time range and returns the result. */ QMediaTimeRange& QMediaTimeRange::operator-=(const QMediaTimeRange &other) { removeTimeRange(other); return *this; } /*! \fn QMediaTimeRange::operator-=(const QMediaTimeInterval &interval) Removes the specified \a interval from the time range and returns the result. */ QMediaTimeRange& QMediaTimeRange::operator-=(const QMediaTimeInterval &interval) { removeInterval(interval); return *this; } /*! \fn QMediaTimeRange::clear() Removes all intervals from the time range. \sa removeInterval() */ void QMediaTimeRange::clear() { d->intervals.clear(); } /*! \fn QMediaTimeRange::intervals() const Returns the list of intervals covered by this time range. */ QList<QMediaTimeInterval> QMediaTimeRange::intervals() const { return d->intervals; } /*! \fn QMediaTimeRange::isEmpty() const Returns true if there are no intervals within the time range. \sa intervals() */ bool QMediaTimeRange::isEmpty() const { return d->intervals.isEmpty(); } /*! \fn QMediaTimeRange::isContinuous() const Returns true if the time range consists of a continuous interval. That is, there is one or fewer disjoint intervals within the time range. */ bool QMediaTimeRange::isContinuous() const { return (d->intervals.count() <= 1); } /*! \fn QMediaTimeRange::contains(qint64 time) const Returns true if the specified \a time lies within the time range. */ bool QMediaTimeRange::contains(qint64 time) const { for (int i = 0; i < d->intervals.count(); i++) { if (d->intervals[i].contains(time)) return true; if (time < d->intervals[i].s) break; } return false; } /*! \fn operator==(const QMediaTimeRange &a, const QMediaTimeRange &b) \relates QMediaTimeRange Returns true if all intervals in \a a are present in \a b. */ bool operator==(const QMediaTimeRange &a, const QMediaTimeRange &b) { if (a.intervals().count() != b.intervals().count()) return false; for (int i = 0; i < a.intervals().count(); i++) { if(a.intervals()[i] != b.intervals()[i]) return false; } return true; } /*! \fn operator!=(const QMediaTimeRange &a, const QMediaTimeRange &b) \relates QMediaTimeRange Returns true if one or more intervals in \a a are not present in \a b. */ bool operator!=(const QMediaTimeRange &a, const QMediaTimeRange &b) { return !(a == b); } /*! \fn operator+(const QMediaTimeRange &r1, const QMediaTimeRange &r2) Returns a time range containing the union between \a r1 and \a r2. */ QMediaTimeRange operator+(const QMediaTimeRange &r1, const QMediaTimeRange &r2) { return (QMediaTimeRange(r1) += r2); } /*! \fn operator-(const QMediaTimeRange &r1, const QMediaTimeRange &r2) Returns a time range containing \a r2 subtracted from \a r1. */ QMediaTimeRange operator-(const QMediaTimeRange &r1, const QMediaTimeRange &r2) { return (QMediaTimeRange(r1) -= r2); } QT_END_NAMESPACE
igor-sfdc/qt-wk
src/multimedia/mediaservices/base/qmediatimerange.cpp
C++
lgpl-2.1
17,978
<?php // (c) Copyright 2002-2012 by authors of the Tiki Wiki CMS Groupware Project // // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. // $Id: CommentSource.php 40234 2012-03-17 19:17:41Z changi67 $ class Search_ContentSource_CommentSource implements Search_ContentSource_Interface { private $types; private $db; private $permissionMap; function __construct($types) { $this->types = $types; $this->db = TikiDb::get(); $this->permissionMap = TikiLib::lib('object')->map_object_type_to_permission(); } function getDocuments() { $comments = $this->db->table('tiki_comments'); return $comments->fetchColumn( 'threadId', array( 'objectType' => $comments->in($this->types), ) ); } function getDocument($objectId, Search_Type_Factory_Interface $typeFactory) { $commentslib = TikiLib::lib('comments'); $comment = $commentslib->get_comment($objectId); $url = $commentslib->getHref($comment['objectType'], $comment['object'], $objectId); $url = str_replace('&amp;', '&', $url); $data = array( 'title' => $typeFactory->sortable($comment['title']), 'language' => $typeFactory->identifier('unknown'), 'modification_date' => $typeFactory->timestamp($comment['commentDate']), 'contributors' => $typeFactory->multivalue(array($comment['userName'])), 'comment_content' => $typeFactory->wikitext($comment['data']), 'parent_thread_id' => $typeFactory->identifier($comment['parentId']), 'parent_object_type' => $typeFactory->identifier($comment['objectType']), 'parent_object_id' => $typeFactory->identifier($comment['object']), 'parent_view_permission' => $typeFactory->identifier($this->getParentPermissionForType($comment['objectType'])), 'global_view_permission' => $typeFactory->identifier('tiki_p_read_comments'), 'url' => $typeFactory->identifier($url), ); return $data; } function getProvidedFields() { return array( 'title', 'language', 'modification_date', 'contributors', 'url', 'comment_content', 'parent_thread_id', 'parent_view_permission', 'parent_object_id', 'parent_object_type', 'global_view_permission', ); } function getGlobalFields() { return array( 'title' => true, 'comment_content' => false, ); } private function getParentPermissionForType($type) { return $this->permissionMap[$type]; } }
railfuture/tiki-website
lib/core/Search/ContentSource/CommentSource.php
PHP
lgpl-2.1
2,495
package ic2.api.energy.tile; /** * Represents a slot (or set of slots) that can have electric items in them to be charged * * @author Chocohead */ public interface IChargingSlot { /** * Called when the energy component is ticked to fill the slots * * @param amount The amount of energy available for the slot(s) * @return The amount of energy used charging the items in the slot(s) */ public double charge(double amount); }
XFireEyeZ/Magical-Tech
src/main/java/ic2/api/energy/tile/IChargingSlot.java
Java
lgpl-2.1
440
# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. from collections import defaultdict import os import pickle import time import imp from cerbero.config import CONFIG_DIR, Platform, Architecture, Distro,\ DistroVersion, License from cerbero.build.build import BuildType from cerbero.build.source import SourceType from cerbero.errors import FatalError, RecipeNotFoundError, InvalidRecipeError from cerbero.utils import _, shell, parse_file from cerbero.utils import messages as m from cerbero.build import recipe as crecipe COOKBOOK_NAME = 'cookbook' COOKBOOK_FILE = os.path.join(CONFIG_DIR, COOKBOOK_NAME) class RecipeStatus (object): ''' Stores the current build status of a L{cerbero.recipe.Recipe} @ivar steps: list of steps currently done @type steps: list @ivar needs_build: whether the recipe needs to be build or not True when all steps where successful @type needs_build: bool @ivar mtime: modification time of the recipe file, used to reset the state when the recipe was modified @type mtime: float @ivar filepath: recipe's file path @type filepath: str @ivar built_version: string with the last version built @type built_version: str @ivar file_hash: hash of the file with the recipe description @type file_hash: int ''' def __init__(self, filepath, steps=[], needs_build=True, mtime=time.time(), built_version=None, file_hash=0): self.steps = steps self.needs_build = needs_build self.mtime = mtime self.filepath = filepath self.built_version = built_version self.file_hash = file_hash def touch(self): ''' Touches the recipe updating its modification time ''' self.mtime = time.time() def __repr__(self): return "Steps: %r Needs Build: %r" % (self.steps, self.needs_build) class CookBook (object): ''' Stores a list of recipes and their build status saving it's state to a cache file @ivar recipes: dictionary with L{cerbero.recipe.Recipe} availables @type recipes: dict @ivar status: dictionary with the L{cerbero.cookbook.RecipeStatus} @type status: dict ''' RECIPE_EXT = '.recipe' def __init__(self, config, load=True): self.set_config(config) self.recipes = {} # recipe_name -> recipe self._mtimes = {} if not load: return self._restore_cache() if not os.path.exists(config.recipes_dir): raise FatalError(_("Recipes dir %s not found") % config.recipes_dir) self.update() def set_config(self, config): ''' Set the configuration used @param config: configuration used @type config: L{cerbero.config.Config} ''' self._config = config def get_config(self): ''' Gets the configuration used @return: current configuration @rtype: L{cerbero.config.Config} ''' return self._config def set_status(self, status): ''' Sets the recipes status @param status: the recipes status @rtype: dict ''' self.status = status def update(self): ''' Reloads the recipes list and updates the cookbook ''' self._load_recipes() self.save() def get_recipes_list(self): ''' Gets the list of recipes @return: list of recipes @rtype: list ''' recipes = self.recipes.values() recipes.sort(key=lambda x: x.name) return recipes def add_recipe(self, recipe): ''' Adds a new recipe to the cookbook @param recipe: the recipe to add @type recipe: L{cerbero.build.cookbook.Recipe} ''' self.recipes[recipe.name] = recipe def get_recipe(self, name): ''' Gets a recipe from its name @param name: name of the recipe @type name: str ''' if name not in self.recipes: raise RecipeNotFoundError(name) return self.recipes[name] def update_step_status(self, recipe_name, step): ''' Updates the status of a recipe's step @param recipe_name: name of the recipe @type recipe: str @param step: name of the step @type step: str ''' status = self._recipe_status(recipe_name) status.steps.append(step) status.touch() self.status[recipe_name] = status self.save() def update_build_status(self, recipe_name, built_version): ''' Updates the recipe's build status @param recipe_name: name of the recipe @type recipe_name: str @param built_version: built version ir None to reset it @type built_version: str ''' status = self._recipe_status(recipe_name) status.needs_build = built_version == None status.built_version = built_version status.touch() self.status[recipe_name] = status self.save() def recipe_built_version (self, recipe_name): ''' Get the las built version of a recipe from the build status @param recipe_name: name of the recipe @type recipe_name: str ''' try: return self._recipe_status(recipe_name).built_version except: return None def step_done(self, recipe_name, step): ''' Whether is step is done or not @param recipe_name: name of the recipe @type recipe_name: str @param step: name of the step @type step: bool ''' return step in self._recipe_status(recipe_name).steps def reset_recipe_status(self, recipe_name): ''' Resets the build status of a recipe @param recipe_name: name of the recipe @type recipe_name: str ''' if recipe_name in self.status: del self.status[recipe_name] self.save() def recipe_needs_build(self, recipe_name): ''' Whether a recipe needs to be build or not @param recipe_name: name of the recipe @type recipe_name: str @return: True if the recipe needs to be build @rtype: bool ''' return self._recipe_status(recipe_name).needs_build def list_recipe_deps(self, recipe_name): ''' List the dependencies that needs to be built in the correct build order for a recipe @param recipe_name: name of the recipe @type recipe_name: str @return: list of L{cerbero.recipe.Recipe} @rtype: list ''' recipe = self.get_recipe(recipe_name) return self._find_deps(recipe, {}, []) def list_recipe_reverse_deps(self, recipe_name): ''' List the dependencies that depends on this recipe @param recipe_name: name of the recipe @type recipe_name: str @return: list of reverse dependencies L{cerbero.recipe.Recipe} @rtype: list ''' recipe = self.get_recipe(recipe_name) return [r for r in self.recipes.values() if recipe.name in r.deps] def _runtime_deps (self): return [x.name for x in self.recipes.values() if x.runtime_dep] def _cache_file(self, config): if config.cache_file is not None: return os.path.join(CONFIG_DIR, config.cache_file) else: return COOKBOOK_FILE def _restore_cache(self): try: with open(self._cache_file(self.get_config()), 'rb') as f: self.status = pickle.load(f) except Exception: self.status = {} m.warning(_("Could not recover status")) def save(self): try: cache_file = self._cache_file(self.get_config()) if not os.path.exists(os.path.dirname(cache_file)): os.makedirs(os.path.dirname(cache_file)) with open(cache_file, 'wb') as f: pickle.dump(self.status, f) except IOError, ex: m.warning(_("Could not cache the CookBook: %s") % ex) def _find_deps(self, recipe, state={}, ordered=[]): if state.get(recipe, 'clean') == 'processed': return if state.get(recipe, 'clean') == 'in-progress': raise FatalError(_("Dependency Cycle")) state[recipe] = 'in-progress' recipe_deps = recipe.list_deps() if not recipe.runtime_dep: recipe_deps = self._runtime_deps () + recipe_deps for recipe_name in recipe_deps: try: recipedep = self.get_recipe(recipe_name) except RecipeNotFoundError, e: raise FatalError(_("Recipe %s has a unknown dependency %s" % (recipe.name, recipe_name))) self._find_deps(recipedep, state, ordered) state[recipe] = 'processed' ordered.append(recipe) return ordered def _recipe_status(self, recipe_name): recipe = self.get_recipe(recipe_name) if recipe_name not in self.status: filepath = None if hasattr(recipe, '__file__'): filepath = recipe.__file__ self.status[recipe_name] = RecipeStatus(filepath, steps=[], file_hash=shell.file_hash(filepath)) return self.status[recipe_name] def _load_recipes(self): self.recipes = {} recipes = defaultdict(dict) recipes_repos = self._config.get_recipes_repos() for reponame, (repodir, priority) in recipes_repos.iteritems(): recipes[int(priority)].update(self._load_recipes_from_dir(repodir)) # Add recipes by asceding pripority for key in sorted(recipes.keys()): self.recipes.update(recipes[key]) # Check for updates in the recipe file to reset the status for recipe in self.recipes.values(): if recipe.name not in self.status: continue st = self.status[recipe.name] # filepath attribute was added afterwards if not hasattr(st, 'filepath') or not getattr(st, 'filepath'): st.filepath = recipe.__file__ rmtime = os.path.getmtime(recipe.__file__) if rmtime > st.mtime: # The mtime is different, check the file hash now # Use getattr as file_hash we added later saved_hash = getattr(st, 'file_hash', 0) if os.path.exists (st.filepath): current_hash = shell.file_hash(st.filepath) else: current_hash = None if saved_hash == current_hash: # Update the status with the mtime st.touch() else: self.reset_recipe_status(recipe.name) def _load_recipes_from_dir(self, repo): recipes = {} recipes_files = shell.find_files('*%s' % self.RECIPE_EXT, repo) recipes_files.extend(shell.find_files('*/*%s' % self.RECIPE_EXT, repo)) try: custom = None m_path = os.path.join(repo, 'custom.py') if os.path.exists(m_path): custom = imp.load_source('custom', m_path) except Exception: custom = None for f in recipes_files: # Try to load the custom.py module located in the recipes dir # which can contain private classes to extend cerbero's recipes # and reuse them in our private repository try: recipe = self._load_recipe_from_file(f, custom) except RecipeNotFoundError: m.warning(_("Could not found a valid recipe in %s") % f) if recipe is None: continue recipes[recipe.name] = recipe return recipes def _load_recipe_from_file(self, filepath, custom=None): mod_name, file_ext = os.path.splitext(os.path.split(filepath)[-1]) if self._config.target_arch == Architecture.UNIVERSAL: if self._config.target_platform in [Platform.IOS, Platform.DARWIN]: recipe = crecipe.UniversalFlatRecipe(self._config) else: recipe = crecipe.UniversalRecipe(self._config) for c in self._config.arch_config.keys(): try: d = {'Platform': Platform, 'Architecture': Architecture, 'BuildType': BuildType, 'SourceType': SourceType, 'Distro': Distro, 'DistroVersion': DistroVersion, 'License': License, 'recipe': crecipe, 'os': os, 'BuildSteps': crecipe.BuildSteps, 'InvalidRecipeError': InvalidRecipeError, 'FatalError': FatalError, 'custom': custom, '_': _, 'shell': shell} parse_file(filepath, d) conf = self._config.arch_config[c] if self._config.target_arch == Architecture.UNIVERSAL: if self._config.target_platform not in [Platform.IOS, Platform.DARWIN]: conf.prefix = os.path.join(self._config.prefix, c) r = d['Recipe'](conf) r.__file__ = os.path.abspath(filepath) self._config.arch_config[c].do_setup_env() r.prepare() if self._config.target_arch == Architecture.UNIVERSAL: recipe.add_recipe(r) else: return r except InvalidRecipeError: pass except Exception, ex: m.warning("Error loading recipe in file %s %s" % (filepath, ex)) if self._config.target_arch == Architecture.UNIVERSAL: if not recipe.is_empty(): return recipe return None
freedesktop-unofficial-mirror/gstreamer-sdk__cerbero
cerbero/build/cookbook.py
Python
lgpl-2.1
14,881
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="sr" sourcelanguage="en"> <context> <name>CmdDrawingAnnotation</name> <message> <location filename="../../Command.cpp" line="481"/> <source>Drawing</source> <translation>Цртеж</translation> </message> <message> <location filename="../../Command.cpp" line="482"/> <source>&amp;Annotation</source> <translation>&amp;Опиc</translation> </message> <message> <location filename="../../Command.cpp" line="483"/> <location filename="../../Command.cpp" line="485"/> <source>Inserts an Annotation view in the active drawing</source> <translation>Додај видни Опиc активном цртежу</translation> </message> </context> <context> <name>CmdDrawingClip</name> <message> <location filename="../../Command.cpp" line="529"/> <source>Drawing</source> <translation>Цртеж</translation> </message> <message> <location filename="../../Command.cpp" line="530"/> <source>&amp;Clip</source> <translation type="unfinished">&amp;Clip</translation> </message> <message> <location filename="../../Command.cpp" line="531"/> <location filename="../../Command.cpp" line="533"/> <source>Inserts a clip group in the active drawing</source> <translation type="unfinished">Inserts a clip group in the active drawing</translation> </message> </context> <context> <name>CmdDrawingDraftView</name> <message> <location filename="../../Command.cpp" line="728"/> <source>Drawing</source> <translation>Цртеж</translation> </message> <message> <location filename="../../Command.cpp" line="729"/> <source>&amp;Draft View</source> <translation type="unfinished">&amp;Draft View</translation> </message> <message> <location filename="../../Command.cpp" line="730"/> <location filename="../../Command.cpp" line="732"/> <source>Inserts a Draft view of the selected object(s) in the active drawing</source> <translation type="unfinished">Inserts a Draft view of the selected object(s) in the active drawing</translation> </message> </context> <context> <name>CmdDrawingExportPage</name> <message> <location filename="../../Command.cpp" line="635"/> <source>File</source> <translation>Датотека</translation> </message> <message> <location filename="../../Command.cpp" line="636"/> <source>&amp;Export page...</source> <translation>Извоз странице...</translation> </message> <message> <location filename="../../Command.cpp" line="637"/> <location filename="../../Command.cpp" line="639"/> <source>Export a page to an SVG file</source> <translation>Извези страницу у 'SVG' датотеку</translation> </message> </context> <context> <name>CmdDrawingNewA3Landscape</name> <message> <location filename="../../Command.cpp" line="275"/> <source>Drawing</source> <translation>Цртеж</translation> </message> <message> <location filename="../../Command.cpp" line="276"/> <location filename="../../Command.cpp" line="277"/> <source>Insert new A3 landscape drawing</source> <translation>Убаците Нови А3 пејзажни цртеж</translation> </message> </context> <context> <name>CmdDrawingNewPage</name> <message> <location filename="../../Command.cpp" line="97"/> <source>Drawing</source> <translation>Цртеж</translation> </message> <message> <location filename="../../Command.cpp" line="98"/> <location filename="../../Command.cpp" line="99"/> <source>Insert new drawing</source> <translation>Уметни нови цртеж</translation> </message> </context> <context> <name>CmdDrawingNewView</name> <message> <location filename="../../Command.cpp" line="314"/> <source>Drawing</source> <translation>Цртеж</translation> </message> <message> <location filename="../../Command.cpp" line="315"/> <source>Insert view in drawing</source> <translation>Убаците приказ у цртеж</translation> </message> <message> <location filename="../../Command.cpp" line="316"/> <source>Insert a new View of a Part in the active drawing</source> <translation>Убаците нови поглед дела у активном цртежу</translation> </message> </context> <context> <name>CmdDrawingOpen</name> <message> <location filename="../../Command.cpp" line="60"/> <source>Drawing</source> <translation>Цртеж</translation> </message> <message> <location filename="../../Command.cpp" line="61"/> <source>Open SVG...</source> <translation>Отвори 'SVG' ...</translation> </message> <message> <location filename="../../Command.cpp" line="62"/> <source>Open a scalable vector graphic</source> <translation>Отворите 'скалабилну векторску графику'</translation> </message> </context> <context> <name>CmdDrawingOpenBrowserView</name> <message> <location filename="../../Command.cpp" line="443"/> <source>Drawing</source> <translation>Цртеж</translation> </message> <message> <location filename="../../Command.cpp" line="444"/> <source>Open &amp;browser view</source> <translation>Отвори &amp;поглед у прегледачу</translation> </message> <message> <location filename="../../Command.cpp" line="445"/> <location filename="../../Command.cpp" line="447"/> <source>Opens the selected page in a browser view</source> <translation>Отвара одабрану cтраницу у прегледачу</translation> </message> </context> <context> <name>CmdDrawingOrthoViews</name> <message> <location filename="../../Command.cpp" line="393"/> <source>Drawing</source> <translation>Цртеж</translation> </message> <message> <location filename="../../Command.cpp" line="394"/> <source>Insert orthographic views</source> <translation>Уметни ортографcке погледе</translation> </message> <message> <location filename="../../Command.cpp" line="395"/> <source>Insert an orthographic projection of a part in the active drawing</source> <translation type="unfinished">Insert an orthographic projection of a part in the active drawing</translation> </message> </context> <context> <name>CmdDrawingProjectShape</name> <message> <location filename="../../Command.cpp" line="692"/> <source>Drawing</source> <translation>Цртеж</translation> </message> <message> <location filename="../../Command.cpp" line="693"/> <source>Project shape...</source> <translation>Пројекција облика...</translation> </message> <message> <location filename="../../Command.cpp" line="694"/> <location filename="../../Command.cpp" line="695"/> <source>Project shape onto a user-defined plane</source> <translation>Пројектуј облик на раван дефиниcану од cтране кориcника</translation> </message> </context> <context> <name>CmdDrawingSpreadsheetView</name> <message> <location filename="../../Command.cpp" line="759"/> <source>Drawing</source> <translation>Цртеж</translation> </message> <message> <location filename="../../Command.cpp" line="760"/> <source>&amp;Spreadsheet View</source> <translation type="unfinished">&amp;Spreadsheet View</translation> </message> <message> <location filename="../../Command.cpp" line="761"/> <location filename="../../Command.cpp" line="763"/> <source>Inserts a view of a selected spreadsheet in the active drawing</source> <translation type="unfinished">Inserts a view of a selected spreadsheet in the active drawing</translation> </message> </context> <context> <name>CmdDrawingSymbol</name> <message> <location filename="../../Command.cpp" line="574"/> <source>Drawing</source> <translation>Цртеж</translation> </message> <message> <location filename="../../Command.cpp" line="575"/> <source>&amp;Symbol</source> <translation>&amp;Симбол</translation> </message> <message> <location filename="../../Command.cpp" line="576"/> <location filename="../../Command.cpp" line="578"/> <source>Inserts a symbol from a svg file in the active drawing</source> <translation>Уметни cимбол из svg датотеке у активни цртеж</translation> </message> </context> <context> <name>DrawingGui::DrawingView</name> <message> <location filename="../../DrawingView.cpp" line="219"/> <source>&amp;Background</source> <translation>Позадина &amp;amp;</translation> </message> <message> <location filename="../../DrawingView.cpp" line="225"/> <source>&amp;Outline</source> <translation>&amp;amp; Оивичење</translation> </message> <message> <location filename="../../DrawingView.cpp" line="231"/> <source>&amp;Native</source> <translation>Матерњи &amp;amp;</translation> </message> <message> <location filename="../../DrawingView.cpp" line="235"/> <source>&amp;OpenGL</source> <translation>&amp;'OpenGL'</translation> </message> <message> <location filename="../../DrawingView.cpp" line="238"/> <source>&amp;Image</source> <translation>&amp;Слика</translation> </message> <message> <location filename="../../DrawingView.cpp" line="242"/> <source>&amp;High Quality Antialiasing</source> <translation>&amp;Антиалиасинг високог квалитета</translation> </message> <message> <location filename="../../DrawingView.cpp" line="284"/> <source>Open SVG File</source> <translation>Отвори 'SVG' датотеку</translation> </message> <message> <location filename="../../DrawingView.cpp" line="285"/> <source>Could not open file '%1'.</source> <translation>Не могу да отворим датотеку "%1".</translation> </message> <message> <location filename="../../DrawingView.cpp" line="408"/> <source>&amp;Renderer</source> <translation>Приказивач</translation> </message> <message> <location filename="../../DrawingView.cpp" line="513"/> <source>Export PDF</source> <translation>Извоз у ПДФ-у</translation> </message> <message> <location filename="../../DrawingView.cpp" line="514"/> <source>PDF file</source> <translation>PDF датотека</translation> </message> <message> <location filename="../../DrawingView.cpp" line="530"/> <source>Page sizes</source> <translation>Величина странице</translation> </message> <message> <location filename="../../DrawingView.cpp" line="532"/> <location filename="../../DrawingView.cpp" line="545"/> <source>A0</source> <translation>A0</translation> </message> <message> <location filename="../../DrawingView.cpp" line="534"/> <location filename="../../DrawingView.cpp" line="547"/> <source>A1</source> <translation>A1</translation> </message> <message> <location filename="../../DrawingView.cpp" line="536"/> <location filename="../../DrawingView.cpp" line="549"/> <source>A2</source> <translation>A2</translation> </message> <message> <location filename="../../DrawingView.cpp" line="538"/> <location filename="../../DrawingView.cpp" line="551"/> <source>A3</source> <translation>A3</translation> </message> <message> <location filename="../../DrawingView.cpp" line="540"/> <location filename="../../DrawingView.cpp" line="553"/> <source>A4</source> <translation>A4</translation> </message> <message> <location filename="../../DrawingView.cpp" line="542"/> <location filename="../../DrawingView.cpp" line="555"/> <source>A5</source> <translation>A5</translation> </message> <message> <location filename="../../DrawingView.cpp" line="666"/> <source>Different orientation</source> <translation>Другачија оријентација</translation> </message> <message> <location filename="../../DrawingView.cpp" line="667"/> <source>The printer uses a different orientation than the drawing. Do you want to continue?</source> <translation type="unfinished">The printer uses a different orientation than the drawing. Do you want to continue?</translation> </message> <message> <location filename="../../DrawingView.cpp" line="674"/> <location filename="../../DrawingView.cpp" line="682"/> <source>Different paper size</source> <translation>Другачија величина папира</translation> </message> <message> <location filename="../../DrawingView.cpp" line="675"/> <location filename="../../DrawingView.cpp" line="683"/> <source>The printer uses a different paper size than the drawing. Do you want to continue?</source> <translation>Штампач кориcти другачију величину папира од цртежа. Да ли желиш да наcтавиш?</translation> </message> <message> <location filename="../../DrawingView.cpp" line="694"/> <source>Opening file failed</source> <translation>Отварање датотеке неуcпешно</translation> </message> <message> <location filename="../../DrawingView.cpp" line="695"/> <source>Can't open file '%1' for writing.</source> <translation type="unfinished">Can't open file '%1' for writing.</translation> </message> </context> <context> <name>DrawingGui::TaskOrthoViews</name> <message> <location filename="../../TaskOrthoViews.ui" line="26"/> <source>Orthographic Projection</source> <translation>Ортографcка Пројекција</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="46"/> <location filename="../../TaskOrthoViews.ui" line="71"/> <location filename="../../TaskOrthoViews.ui" line="96"/> <location filename="../../TaskOrthoViews.ui" line="121"/> <location filename="../../TaskOrthoViews.ui" line="146"/> <location filename="../../TaskOrthoViews.ui" line="177"/> <location filename="../../TaskOrthoViews.ui" line="202"/> <location filename="../../TaskOrthoViews.ui" line="227"/> <location filename="../../TaskOrthoViews.ui" line="252"/> <location filename="../../TaskOrthoViews.ui" line="277"/> <location filename="../../TaskOrthoViews.ui" line="302"/> <location filename="../../TaskOrthoViews.ui" line="362"/> <source>Right click for axonometric settings</source> <translation type="unfinished">Right click for axonometric settings</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="324"/> <source>Primary view</source> <translation>Примарни поглед</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="340"/> <source>Secondary Views</source> <translation>Cекундарни поглед</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="412"/> <source>General</source> <translation>Glavno</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="421"/> <source>Auto scale / position</source> <translation>Аутоматска размера/постављање</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="436"/> <source>Scale</source> <translation>увеличај/умањи</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="468"/> <source>Top left x / y</source> <translation>Горе лево x / y</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="516"/> <source>Spacing dx / dy</source> <translation type="unfinished">Spacing dx / dy</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="561"/> <source>Show hidden lines</source> <translation>Прикажи невидљиве линије</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="568"/> <source>Show smooth lines</source> <translation>Прикажи глатке линије</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="579"/> <source>Axonometric</source> <translation>Аксонометријски</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="587"/> <source>Axis out and right</source> <translation type="unfinished">Axis out and right</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="594"/> <source>Vertical tilt</source> <translation type="unfinished">Vertical tilt</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="605"/> <location filename="../../TaskOrthoViews.ui" line="805"/> <source>X +ve</source> <translation>X +ve</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="610"/> <location filename="../../TaskOrthoViews.ui" line="685"/> <location filename="../../TaskOrthoViews.ui" line="810"/> <source>Y +ve</source> <translation>Y +ve</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="615"/> <location filename="../../TaskOrthoViews.ui" line="690"/> <location filename="../../TaskOrthoViews.ui" line="815"/> <source>Z +ve</source> <translation>Z +ve</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="620"/> <location filename="../../TaskOrthoViews.ui" line="820"/> <source>X -ve</source> <translation>X -ve</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="625"/> <location filename="../../TaskOrthoViews.ui" line="695"/> <location filename="../../TaskOrthoViews.ui" line="825"/> <source>Y -ve</source> <translation>Y -ve</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="630"/> <location filename="../../TaskOrthoViews.ui" line="700"/> <location filename="../../TaskOrthoViews.ui" line="830"/> <source>Z -ve</source> <translation>Z -ve</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="642"/> <source>Isometric</source> <translation>Изометрично</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="647"/> <source>Dimetric</source> <translation>Дијаметрално</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="652"/> <source>Trimetric</source> <translation type="unfinished">Trimetric</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="660"/> <source> Scale</source> <translation> Размера</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="667"/> <source>View projection</source> <translation type="unfinished">View projection</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="674"/> <source> Axis aligned up</source> <translation> Оса поравната на горе</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="715"/> <location filename="../../TaskOrthoViews.ui" line="738"/> <source>Flip</source> <translation>Обрни</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="728"/> <source> Trimetric</source> <translation type="unfinished"> Trimetric</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="756"/> <source>Projection</source> <translation>Пројекција</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="767"/> <source>Third Angle</source> <translation>Трећи угао</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="772"/> <source>First Angle</source> <translation>Први угао</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="791"/> <source>View from:</source> <translation>Поглед од:</translation> </message> <message> <location filename="../../TaskOrthoViews.ui" line="838"/> <source>Axis aligned right:</source> <translation>Оса поравната на десну страну:</translation> </message> </context> <context> <name>DrawingGui::TaskProjection</name> <message> <location filename="../../TaskDialog.cpp" line="51"/> <source>Visible sharp edges</source> <translation>Видљиве оштре ивице</translation> </message> <message> <location filename="../../TaskDialog.cpp" line="52"/> <source>Visible smooth edges</source> <translation>Видљиве глатке ивице</translation> </message> <message> <location filename="../../TaskDialog.cpp" line="53"/> <source>Visible sewn edges</source> <translation>Видљиви шивени рубови</translation> </message> <message> <location filename="../../TaskDialog.cpp" line="54"/> <source>Visible outline edges</source> <translation>Видљиве cпољне ивице</translation> </message> <message> <location filename="../../TaskDialog.cpp" line="55"/> <source>Visible isoparameters</source> <translation>Видљиви изометријcки параметри</translation> </message> <message> <location filename="../../TaskDialog.cpp" line="56"/> <source>Hidden sharp edges</source> <translation>Cкривене оштре ивице</translation> </message> <message> <location filename="../../TaskDialog.cpp" line="57"/> <source>Hidden smooth edges</source> <translation>Cкривени глатки рубови</translation> </message> <message> <location filename="../../TaskDialog.cpp" line="58"/> <source>Hidden sewn edges</source> <translation>Cакривени шивени рубови</translation> </message> <message> <location filename="../../TaskDialog.cpp" line="59"/> <source>Hidden outline edges</source> <translation>Cкривене cпољне ивице</translation> </message> <message> <location filename="../../TaskDialog.cpp" line="60"/> <source>Hidden isoparameters</source> <translation>Cкривени изометријcки параметри</translation> </message> <message> <location filename="../../TaskDialog.cpp" line="77"/> <source>Project shapes</source> <translation>Пројекција облика</translation> </message> <message> <location filename="../../TaskDialog.cpp" line="91"/> <source>No active document</source> <translation>Нема активног документа</translation> </message> <message> <location filename="../../TaskDialog.cpp" line="92"/> <source>There is currently no active document to complete the operation</source> <translation>Тренутно нема активног документа да cе доврши операција</translation> </message> <message> <location filename="../../TaskDialog.cpp" line="97"/> <source>No active view</source> <translation type="unfinished">No active view</translation> </message> <message> <location filename="../../TaskDialog.cpp" line="98"/> <source>There is currently no active view to complete the operation</source> <translation type="unfinished">There is currently no active view to complete the operation</translation> </message> </context> <context> <name>Drawing_NewPage</name> <message> <location filename="../../Command.cpp" line="223"/> <source>Landscape</source> <translation>Положено</translation> </message> <message> <location filename="../../Command.cpp" line="225"/> <source>Portrait</source> <translation>Усправно</translation> </message> <message> <location filename="../../Command.cpp" line="229"/> <source>%1%2 %3</source> <translation>%1%2 %3</translation> </message> <message> <location filename="../../Command.cpp" line="234"/> <source>Insert new %1%2 %3 drawing</source> <translation>Уметни нови %1%2 %3 цртеж</translation> </message> <message> <location filename="../../Command.cpp" line="241"/> <source>%1%2 %3 (%4)</source> <translation>%1%2 %3 (%4)</translation> </message> <message> <location filename="../../Command.cpp" line="247"/> <source>Insert new %1%2 %3 (%4) drawing</source> <translation>Уметни нови%1%2 %3 (%4) цртеж</translation> </message> </context> <context> <name>QObject</name> <message> <location filename="../../Command.cpp" line="72"/> <location filename="../../Command.cpp" line="595"/> <source>Choose an SVG file to open</source> <translation>Изаберите 'SVG' датотеку за отварање</translation> </message> <message> <location filename="../../Command.cpp" line="73"/> <location filename="../../Command.cpp" line="596"/> <location filename="../../Command.cpp" line="654"/> <source>Scalable Vector Graphic</source> <translation type="unfinished">Scalable Vector Graphic</translation> </message> <message> <location filename="../../Command.cpp" line="327"/> <location filename="../../Command.cpp" line="406"/> <location filename="../../Command.cpp" line="456"/> <location filename="../../Command.cpp" line="648"/> <location filename="../../Command.cpp" line="772"/> <source>Wrong selection</source> <translation>Погрешан избор</translation> </message> <message> <location filename="../../Command.cpp" line="328"/> <source>Select a Part object.</source> <translation>Изаберите део објекта.</translation> </message> <message> <location filename="../../Command.cpp" line="336"/> <location filename="../../Command.cpp" line="415"/> <location filename="../../Command.cpp" line="496"/> <location filename="../../Command.cpp" line="544"/> <location filename="../../Command.cpp" line="589"/> <location filename="../../Command.cpp" line="778"/> <source>No page found</source> <translation>Cтраница није пронађена</translation> </message> <message> <location filename="../../Command.cpp" line="337"/> <location filename="../../Command.cpp" line="416"/> <location filename="../../Command.cpp" line="497"/> <location filename="../../Command.cpp" line="545"/> <location filename="../../Command.cpp" line="590"/> <location filename="../../Command.cpp" line="779"/> <source>Create a page first.</source> <translation>Прво направите cтраницу.</translation> </message> <message> <location filename="../../Command.cpp" line="407"/> <source>Select exactly one Part object.</source> <translation>Изаберите само један Део.</translation> </message> <message> <location filename="../../Command.cpp" line="457"/> <location filename="../../Command.cpp" line="649"/> <source>Select one Page object.</source> <translation>Изаберите објекат једне странице</translation> </message> <message> <location filename="../../Command.cpp" line="655"/> <source>All Files</source> <translation>Све датотеке</translation> </message> <message> <location filename="../../Command.cpp" line="657"/> <source>Export page</source> <translation>Извоз странице</translation> </message> <message> <location filename="../../Command.cpp" line="773"/> <source>Select exactly one Spreadsheet object.</source> <translation>Изаберите само једну унакрсну табелу.</translation> </message> <message> <location filename="../../TaskOrthoViews.cpp" line="54"/> <location filename="../../TaskOrthoViews.cpp" line="982"/> <source>Make axonometric...</source> <translation type="unfinished">Make axonometric...</translation> </message> <message> <location filename="../../TaskOrthoViews.cpp" line="55"/> <location filename="../../TaskOrthoViews.cpp" line="983"/> <source>Edit axonometric settings...</source> <translation type="unfinished">Edit axonometric settings...</translation> </message> <message> <location filename="../../TaskOrthoViews.cpp" line="56"/> <location filename="../../TaskOrthoViews.cpp" line="984"/> <source>Make orthographic</source> <translation type="unfinished">Make orthographic</translation> </message> <message> <location filename="../../ViewProviderPage.cpp" line="152"/> <source>Show drawing</source> <translation>Прикажи цртеж</translation> </message> </context> <context> <name>Workbench</name> <message> <location filename="../../Workbench.cpp" line="37"/> <source>Drawing</source> <translation>Цртеж</translation> </message> </context> </TS>
Fat-Zer/FreeCAD_sf_master
src/Mod/Drawing/Gui/Resources/translations/Drawing_sr.ts
TypeScript
lgpl-2.1
31,325
// Copyright (C) 2007 Ruben Smits <ruben dot smits at mech dot kuleuven dot be> // Copyright (C) 2008 Julia Jesse // Version: 1.0 // Author: Ruben Smits <ruben dot smits at mech dot kuleuven dot be> // Maintainer: Ruben Smits <ruben dot smits at mech dot kuleuven dot be> // URL: http://www.orocos.org/kdl // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // This library 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 // Lesser General Public License for more details. // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #ifndef KDL_TREE_FKSOLVER_HPP #define KDL_TREE_FKSOLVER_HPP #include <string> #include "tree.hpp" //#include "framevel.hpp" //#include "frameacc.hpp" #include "jntarray.hpp" //#include "jntarrayvel.hpp" //#include "jntarrayacc.hpp" namespace KDL { /** * \brief This <strong>abstract</strong> class encapsulates a * solver for the forward position kinematics for a KDL::Tree. * * @ingroup KinematicFamily */ //Forward definition class TreeFkSolverPos { public: /** * Calculate forward position kinematics for a KDL::Tree, * from joint coordinates to cartesian pose. * * @param q_in input joint coordinates * @param p_out reference to output cartesian pose * * @return if < 0 something went wrong */ virtual int JntToCart(const JntArray& q_in, Frame& p_out, std::string segmentName)=0; virtual ~TreeFkSolverPos(){}; }; /** * \brief This <strong>abstract</strong> class encapsulates a solver * for the forward velocity kinematics for a KDL::Tree. * * @ingroup KinematicFamily */ // class TreeFkSolverVel { // public: /** * Calculate forward position and velocity kinematics, from * joint coordinates to cartesian coordinates. * * @param q_in input joint coordinates (position and velocity) * @param out output cartesian coordinates (position and velocity) * * @return if < 0 something went wrong */ // virtual int JntToCart(const JntArrayVel& q_in, FrameVel& out,int segmentNr=-1)=0; // virtual ~TreeFkSolverVel(){}; // }; /** * \brief This <strong>abstract</strong> class encapsulates a solver * for the forward acceleration kinematics for a KDL::Tree. * * @ingroup KinematicFamily */ // class TreeFkSolverAcc { // public: /** * Calculate forward position, velocity and accelaration * kinematics, from joint coordinates to cartesian coordinates * * @param q_in input joint coordinates (position, velocity and * acceleration @param out output cartesian coordinates (position, velocity * and acceleration * * @return if < 0 something went wrong */ // virtual int JntToCart(const JntArrayAcc& q_in, FrameAcc& out,int segmentNr=-1)=0; // virtual ~TreeFkSolverAcc()=0; // }; }//end of namespace KDL #endif
shakhimardanov/orocos_kdl_diamondback
src/treefksolver.hpp
C++
lgpl-2.1
3,578
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.0" language="es-ES" sourcelanguage="en"> <context> <name>CmdCompleteConstraintAxle</name> <message> <location filename="../../Command.cpp" line="+42"/> <source>Complete</source> <translation>Completa</translation> </message> <message> <location line="+1"/> <source>Constraint Axle...</source> <translation>Restricción de eje...</translation> </message> <message> <location line="+1"/> <source>set a axle constraint between two objects</source> <translation>definir una restricción de eje entre dos objetos</translation> </message> </context> <context> <name>Test_Test</name> <message> <location filename="../../Workbench.cpp" line="+57"/> <source>Self-test...</source> <translation>Auto-prueba...</translation> </message> <message> <location line="+1"/> <source>Runs a self-test to check if the application works properly</source> <translation>Ejecuta una auto-prueba para comprobar si la aplicación funciona correctamente</translation> </message> </context> <context> <name>Workbench</name> <message> <location line="-9"/> <source>Dr&amp;awing</source> <translation>Dibujar</translation> </message> <message> <location line="-1"/> <source>S&amp;ketch</source> <translation>Croquis</translation> </message> <message> <location line="+2"/> <source>&amp;Raytracing</source> <translation>&amp;Raytracing</translation> </message> <message> <location line="+1"/> <source>&amp;Drafting</source> <translation>&amp;Borrador</translation> </message> <message> <location line="+1"/> <source>Sketch based</source> <translation>Basado en croquis</translation> </message> <message> <location line="+1"/> <source>Primitives</source> <translation>Primitivas</translation> </message> <message> <location line="+1"/> <source>Object appearance</source> <translation type="unfinished"></translation> </message> <message> <source>Parametric</source> <translation type="obsolete">Paramétrico</translation> </message> <message> <source>Object appearence</source> <translation type="obsolete">Apariencia del objeto</translation> </message> <message> <location line="+1"/> <source>Wire Tools</source> <translation>Herramientas de alambre</translation> </message> </context> </TS>
usakhelo/FreeCAD
src/Mod/Complete/Gui/Resources/translations/Complete_es-ES.ts
TypeScript
lgpl-2.1
2,704
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * Head6DOF_GUI.java * * Created on Jul 7, 2011, 11:51:37 PM */ package org.ine.telluride.jaer.tell2011.head6axis; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Point; import java.awt.event.MouseEvent; import java.awt.geom.Point2D; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.JPanel; import net.sf.jaer.hardwareinterface.HardwareInterfaceException; /** * Allows mouse control of head. * @author tobi * @editor philipp */ public class Head6DOF_GUI extends javax.swing.JFrame implements PropertyChangeListener { private static Logger log = Logger.getLogger("Head6DOF_ServoController"); Head6DOF_ServoController controller = null; private int w = 200, h = 200; /** Creates new form Head6DOF_GUI */ public Head6DOF_GUI(Head6DOF_ServoController contrl) { controller = contrl; controller.getSupport().addPropertyChangeListener(this); initComponents(); eyePanel.setPreferredSize(new Dimension(w, h)); headPanel.setPreferredSize(new Dimension(w, h)); pack(); } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { eyePanel = new javax.swing.JPanel(); vergenceSlider = new javax.swing.JSlider(); headPanel = new javax.swing.JPanel(); jPanel1 = new javax.swing.JPanel(); txtCommand = new javax.swing.JTextField(); labelCommand = new javax.swing.JLabel(); btnExecuteCommand = new javax.swing.JButton(); labelCaution = new javax.swing.JLabel(); txtareaPossibleCommands = new javax.swing.JTextArea(); setTitle("HeadControl"); eyePanel.setBackground(new java.awt.Color(255, 255, 255)); eyePanel.setBorder(javax.swing.BorderFactory.createTitledBorder("eye direction")); eyePanel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { eyePanelMouseClicked(evt); } }); eyePanel.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() { public void mouseDragged(java.awt.event.MouseEvent evt) { eyePanelMouseDragged(evt); } }); javax.swing.GroupLayout eyePanelLayout = new javax.swing.GroupLayout(eyePanel); eyePanel.setLayout(eyePanelLayout); eyePanelLayout.setHorizontalGroup( eyePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 0, Short.MAX_VALUE) ); eyePanelLayout.setVerticalGroup( eyePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 161, Short.MAX_VALUE) ); vergenceSlider.setToolTipText("vergence"); vergenceSlider.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); vergenceSlider.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { vergenceSliderStateChanged(evt); } }); headPanel.setBackground(new java.awt.Color(255, 255, 255)); headPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("head direction")); headPanel.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() { public void mouseDragged(java.awt.event.MouseEvent evt) { headPanelMouseDragged(evt); } }); javax.swing.GroupLayout headPanelLayout = new javax.swing.GroupLayout(headPanel); headPanel.setLayout(headPanelLayout); headPanelLayout.setHorizontalGroup( headPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 0, Short.MAX_VALUE) ); headPanelLayout.setVerticalGroup( headPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 161, Short.MAX_VALUE) ); txtCommand.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtCommandActionPerformed(evt); } }); labelCommand.setText("Command:"); btnExecuteCommand.setText("Execute Command"); btnExecuteCommand.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnExecuteCommandActionPerformed(evt); } }); labelCaution.setText("CAUTION: Not protected by pan / tilt limits"); txtareaPossibleCommands.setEditable(false); txtareaPossibleCommands.setBackground(new java.awt.Color(240, 240, 240)); txtareaPossibleCommands.setColumns(20); txtareaPossibleCommands.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N txtareaPossibleCommands.setRows(5); txtareaPossibleCommands.setText("Possible Commands:\n\n!Px,yyyy => sets servo x (0-5) to position yyyy\n\ns0 = Head pan: " + Integer.toString(controller.servoOffsets[0] - 450) + " - " + Integer.toString(controller.servoOffsets[0] + 450) + "\ns1 = Head tilt: " + Integer.toString(controller.servoOffsets[1] - 450) + " - " + Integer.toString(controller.servoOffsets[1] + 450) + "\ns2 = Left eye pan: " + Integer.toString(controller.servoOffsets[2] - 450) + " - " + Integer.toString(controller.servoOffsets[2] + 450) + "\ns3 = Left eye tilt: " + Integer.toString(controller.servoOffsets[3] - 450) + " - " + Integer.toString(controller.servoOffsets[3] + 450) + "\ns4 = Right eye pan: " + Integer.toString(controller.servoOffsets[4] - 450) + " - " + Integer.toString(controller.servoOffsets[4] + 450) + "\ns5 = Right eye: " + Integer.toString(controller.servoOffsets[5] - 450) + " - " + Integer.toString(controller.servoOffsets[5] + 450) + "\n\nwith vergence = 0"); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(11, 11, 11) .addComponent(labelCommand) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(txtCommand, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnExecuteCommand, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(labelCaution, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addGap(24, 24, 24)) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(txtareaPossibleCommands, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(55, 55, 55) .addComponent(labelCaution) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtCommand, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(labelCommand) .addComponent(btnExecuteCommand)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(txtareaPossibleCommands, javax.swing.GroupLayout.PREFERRED_SIZE, 193, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(eyePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(vergenceSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 381, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(headPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(eyePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0) .addComponent(vergenceSlider, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0) .addComponent(headPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); pack(); }// </editor-fold>//GEN-END:initComponents private void eyePanelMouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_eyePanelMouseDragged float p = getPan(evt), t = getTilt(evt); try { controller.setEyeGazeDirection(p, t); repaint(); } catch (Exception ex) { log.warning(ex.toString()); } }//GEN-LAST:event_eyePanelMouseDragged private void headPanelMouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_headPanelMouseDragged float p = getPan(evt), t = getTilt(evt); try { controller.setHeadDirection(p, t); repaint(); } catch (Exception ex) { log.warning(ex.toString()); } }//GEN-LAST:event_headPanelMouseDragged private float vergenceFromSlider(){ int v=vergenceSlider.getValue(); float vergence=controller.VERGENCE_LIMIT*(v-50f)/50f; return vergence; } private void vergenceSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_vergenceSliderStateChanged float vergence=vergenceFromSlider(); try { controller.setVergence(vergence); } catch (HardwareInterfaceException | IOException ex) { log.warning(ex.toString()); } }//GEN-LAST:event_vergenceSliderStateChanged private void eyePanelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_eyePanelMouseClicked float p = getPan(evt), t = getTilt(evt); try { controller.setEyeGazeDirection(p, t); repaint(); } catch (Exception ex) { log.warning(ex.toString()); } }//GEN-LAST:event_eyePanelMouseClicked private void txtCommandActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtCommandActionPerformed // TODO add your handling code here: }//GEN-LAST:event_txtCommandActionPerformed private void btnExecuteCommandActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnExecuteCommandActionPerformed if (!txtCommand.getText().trim().equals("")) { String cmd = this.txtCommand.getText(); try { controller.serialPort.writeLn(cmd); log.info("sending " + this.txtCommand.getText() + " to robot head"); } catch (IOException ex) { Logger.getLogger(Head6DOF_GUI.class.getName()).log(Level.SEVERE, null, ex); } } else { log.info("Command textfield is empty"); } }//GEN-LAST:event_btnExecuteCommandActionPerformed private float getPan(MouseEvent evt) { int x = evt.getX(); int w=((JPanel)evt.getSource()).getWidth(); float pan = (float) x / w; // 0-1 pan=2*pan-1; // log.info("computed x="+x+" w="+w+" pan="+pan); return pan; } private float getTilt(MouseEvent evt) { int y = evt.getY(); int h=((JPanel)evt.getSource()).getHeight(); float tilt = (float) (h - y) / h; tilt=tilt*2-1; // log.info("computed y="+y+" h="+h+" tilt="+tilt); return tilt; } private Point p2 = new Point(); // converts from gaze to to panel coordinates private Point gaze2pix(JPanel pan, Point2D.Float gaze) { int h=pan.getHeight(), w=pan.getWidth(); // (g+1)/2 ranges 0:1 p2.setLocation((gaze.x + 1) / 2 * w, h-((gaze.y + 1) / 2 * h)); // y starts from top in AWT, so flip y here return p2; } public void resetVergenceSlider() { vergenceSlider.setValue((int) (vergenceSlider.getMaximum()-vergenceSlider.getMinimum())/2); } @Override public void paint(Graphics g) { final int r = 6; super.paint(g); Head6DOF_ServoController.GazeDirection gaze = controller.gazeDirection; // current state of all servos in -1:1 coordinates g= eyePanel.getGraphics(); Point p = gaze2pix(eyePanel, gaze.eyeDirection); g.drawLine(p.x, p.y + r, p.x, p.y - r); g.drawLine(p.x - r, p.y, p.x + r, p.y); g = headPanel.getGraphics(); p = gaze2pix(headPanel, gaze.headDirection); g.drawLine(p.x, p.y + r, p.x, p.y - r); g.drawLine(p.x - r, p.y, p.x + r, p.y); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton btnExecuteCommand; private javax.swing.JPanel eyePanel; private javax.swing.JPanel headPanel; private javax.swing.JPanel jPanel1; private javax.swing.JLabel labelCaution; private javax.swing.JLabel labelCommand; private javax.swing.JTextField txtCommand; private javax.swing.JTextArea txtareaPossibleCommands; private javax.swing.JSlider vergenceSlider; // End of variables declaration//GEN-END:variables @Override public void propertyChange(PropertyChangeEvent evt) { log.info("got property change event "+evt.getPropertyName()); repaint(); } }
viktorbahr/jaer
src/org/ine/telluride/jaer/tell2011/head6axis/Head6DOF_GUI.java
Java
lgpl-2.1
16,438
// uzrichard.C --- Using Richard's Equation to calculate water flow. // // Copyright 1996-2001 Per Abrahamsen and Søren Hansen // Copyright 2000-2001 KVL. // // This file is part of Daisy. // // Daisy is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser Public License as published by // the Free Software Foundation; either version 2.1 of the License, or // (at your option) any later version. // // Daisy 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 Lesser Public License for more details. // // You should have received a copy of the GNU Lesser Public License // along with Daisy; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #define BUILD_DLL #include "uzmodel.h" #include "block_model.h" #include "groundwater.h" #include "surface.h" #include "geometry_vert.h" #include "soil.h" #include "soil_heat.h" #include "mathlib.h" #include "frame.h" #include "log.h" #include "average.h" #include "librarian.h" #include "treelog.h" #include <sstream> #include <memory> class UZRichard : public UZmodel { // Parameters. const int debug; const int max_time_step_reductions; const int time_step_reduction; const int max_iterations; const int max_number_of_small_time_steps; const int msg_number_of_small_time_steps; const double max_absolute_difference; const double max_relative_difference; std::auto_ptr<const Average> K_average; // Simulate. private: bool richard (Treelog&, const GeometryVert& geo, const Soil& soil, const SoilHeat& soil_heat, int first, const Surface& top, size_t top_edge, int last, const Groundwater& bottom, size_t bottom_edge, const std::vector<double>& S, const std::vector<double>& h_old, const std::vector<double>& Theta_old, const std::vector<double>& h_ice, std::vector<double>& h, std::vector<double>& Theta, size_t q_offset, std::vector<double>& q, double dt); bool converges (const std::vector<double>& previous, const std::vector<double>& current) const; void internode (const Soil&, const SoilHeat&, int first, int last, const std::vector<double>& h_ice, const std::vector<double>& K, std::vector<double>& Kplus) const; void q_darcy (const GeometryVert& geo, int first, int last, const std::vector<double>& h_previous, const std::vector<double>& h, const std::vector<double>& Theta_previous, const std::vector<double>& Theta, const std::vector<double>& Kplus, const std::vector<double>& S, double ddt, double *const q); public: void tick (Treelog&, const GeometryVert& geo, const Soil& soil, const SoilHeat&, unsigned int first, const Surface& top, size_t top_edge, unsigned int last, const Groundwater& bottom, const size_t bottom_edge, const std::vector<double>& S, const std::vector<double>& h_old, const std::vector<double>& Theta_old, const std::vector<double>& h_ice, std::vector<double>& h, std::vector<double>& Theta, size_t q_offset, std::vector<double>& q_base, double dt); // Create and Destroy. public: void has_macropores (bool); // Tell UZ that there is macropores. UZRichard (const BlockModel& par); ~UZRichard (); }; bool UZRichard::richard (Treelog& msg, const GeometryVert& geo, const Soil& soil, const SoilHeat& soil_heat, /* const */ int first, const Surface& top, const size_t top_edge, const int last, const Groundwater& bottom, const size_t bottom_edge, const std::vector<double>& S, const std::vector<double>& h_old, const std::vector<double>& Theta_old, const std::vector<double>& h_ice, std::vector<double>& h_new, std::vector<double>& Theta_new, const size_t q_offset, std::vector<double>& q_base, const double dt) { std::ostringstream tmp; tmp << "UZ Richard: " << first << " to " << last; Treelog::Open nest (msg, tmp.str ()); // Input variables for solving a tridiagonal matrix. const unsigned int size = last - first + 1; const Surface::top_t top_type = top.top_type (geo, top_edge); const double h_top = top.h_top (geo, top_edge); daisy_assert (h_top < 1000.0); daisy_assert (h_top > -1000.0); const double q_top = top.q_top (geo, top_edge, dt); daisy_approximate (h_top, -q_top * dt); const Groundwater::bottom_t bottom_type = bottom.bottom_type (); const double q_bottom_forced = (bottom_type == Groundwater::forced_flux) ? bottom.q_bottom (bottom_edge) : -42.42e42; // Find relevant fluxes. daisy_assert (geo.edge_to (top_edge) == Geometry::cell_above); daisy_assert (first + q_offset >= top_edge); daisy_assert (last + q_offset + 1 < geo.edge_size ()); daisy_assert (q_base.size () > q_offset + last + 1); double *const q = &q_base[q_offset]; if (size < 2) throw ("Richard's equation need at least two numerical layers"); std::vector<double> a (size); std::vector<double> b (size); std::vector<double> c (size); std::vector<double> d (size); // Intermeditate results. std::vector<double> h (size); std::vector<double> h_previous (size); std::vector<double> h_conv (size); std::vector<double> Theta_previous (size); std::vector<double> Theta (size); std::vector<double> Ksum (size); std::vector<double> Kold (size); std::vector<double> K (size + 1); std::vector<double> Kplus (size); // For lysimeter bottom. const double h_lim = geo.zplus (last) - geo.cell_z (last); daisy_assert (h_lim < 0.0); // Keep track of water going to the top. double top_water = 0.0; double available_water; bool flux = true; if (top_type == Surface::soil) { available_water = (Theta_old[first] - soil.Theta (first, -20000.0, h_ice[first])) * geo.dz (first); } else { available_water = h_top; if (available_water > soil.K (first, 0.0, h_ice[first], soil_heat.T (first)) * dt + (soil.Theta (first, 0.0, h_ice[first]) - Theta_old[first]) * geo.dz (first)) flux = false; } // First guess is the old value. copy (&h_old[first], &h_old[last + 1], h.begin ()); copy (&Theta_old[first], &Theta_old[last + 1], Theta.begin ()); bool switched_top = false; // Switched top this timestep? double time_left = dt; // How much of the large time step left. double ddt = dt; // We start with small == large time step. int number_of_time_step_reductions = 0; int iterations_with_this_time_step = 0; int n_small_time_steps = 0; while (time_left > 0.0) { // Initialization for each small time step. int iterations_used = 0; if (ddt > time_left) ddt = time_left; std::auto_ptr<Treelog::Open> nest; if (n_small_time_steps > 0 && (n_small_time_steps%msg_number_of_small_time_steps) == 0) { std::ostringstream tmp_ddt; tmp_ddt << "Time t = " << (dt - time_left) << "; ddt = " << ddt << "; steps " << n_small_time_steps << "; time left = " << time_left; nest.reset (new Treelog::Open (msg, tmp_ddt.str ())); msg.touch (); msg.flush (); } n_small_time_steps++; if (n_small_time_steps > max_number_of_small_time_steps) { msg.debug ("Too many small timesteps"); throw "Too many small timesteps"; } for (unsigned int i = 0; i < size; i++) { Ksum[i] = 0.0; Kold[i] = soil.K (first + i, h[i], h_ice[first + i], soil_heat.T (first + i)); } h_previous = h; Theta_previous = Theta; if (!flux && top_type != Surface::soil) h[0] = h_top - geo.cell_z (first) + top_water; // Amount of water we put into the top this small time step. double delta_top_water = 88.0e88; // Bottom flux. double q_bottom = 42.42e42; daisy_assert (size > 0); switch (bottom_type) { case Groundwater::lysimeter: if (h[size - 1] > h_lim) q_bottom = -Kold[size-1]; else q_bottom = 0.0; break; case Groundwater::forced_flux: q_bottom = q_bottom_forced; break; case Groundwater::free_drainage: q_bottom = - Kold[size - 1]; break; case Groundwater::pressure: break; default: daisy_panic ("Unknown bottom type"); } do { h_conv = h; iterations_used++; if (iterations_used > max_iterations) { if (debug > 1) { std::ostringstream tmp; tmp << "Too many iterations: " << "available_water = " << available_water << ", time left = " << time_left << ", ddt = " << ddt; msg.message (tmp.str ()); } goto failure; } // Calculate parameters. for (unsigned int i = 0; i < size; i++) { Ksum[i] += soil.K (first + i, h[i], h_ice[first + i], soil_heat.T (first + i)); K[i] = (Ksum[i] / iterations_used + Kold[i]) / 2.0; } K[size] = K[size - 1]; internode (soil, soil_heat, first, last, h_ice, K, Kplus); // Calculate cells. for (unsigned int i = 0; i < size; i++) { const double Cw1 = soil.Cw1 (first + i, h[i], h_ice[first + i]); // const double Cw2 = max (1e-5, soil.Cw2 (first + i, h[i])); const double Cw2 = soil.Cw2 (first + i, h[i]); const double dz = geo.dz (first + i); const double z = geo.cell_z (first + i); if (i == 0) { if (flux) { // Calculate upper boundary. const double dz_plus = z - geo.cell_z (first + i + 1); b[i] = Cw2 + (ddt / dz) * (Kplus[i] / dz_plus); d[i] = Theta[i] - Cw1 - ddt * S[first + i] + (ddt / dz) * (available_water / time_left - Kplus[i]); // Same as pressure boudnary. a[i] = 0.0; c[i] = - (ddt / dz) * (Kplus[i] / dz_plus); } } else if (i == 1 && !flux) { // Calculate upper boundary. const double dz_plus = z - geo.cell_z (first + i + 1); const double dz_minus = geo.cell_z (first + i - 1) - z; double h_above; if (top_type == Surface::soil) { const double Theta_ddt = Theta_old[first] + top_water / geo.dz (first); h_above = soil.h (first, Theta_ddt); } else { h_above = h[0]; daisy_assert (approximate (h_above, h_top - geo.cell_z (first) + top_water)); } b[i] = Cw2 + (ddt / dz) * (Kplus[i - 1] / dz_minus + Kplus[i] / dz_plus); d[i] = Theta[i] - Cw1 - ddt * S[first + i] + (ddt / dz) * (Kplus[i - 1] * (1 + h_above / dz_minus) - Kplus[i]); a[i] = 0.0; c[i] = - (ddt / dz) * (Kplus[i] / dz_plus); } else if (i == size - 1) { // Calculate lower boundary const double dz_minus = geo.cell_z (first + i - 1) - z; if (bottom_type == Groundwater::pressure) { const double z_bottom = geo.zplus (first + i); const double dz_plus = z - z_bottom; const double bottom_pressure = bottom.table () - z_bottom; b[i] = Cw2 + (ddt / dz) * ( Kplus[i - 1] / dz_minus + Kplus[i] / dz_plus); d[i] = Theta[i] - Cw1 - ddt * S[first + i] + (ddt / dz) * (Kplus[i - 1] - Kplus[i] * (1.0 - bottom_pressure/ dz_plus)); } else if (bottom_type == Groundwater::lysimeter && std::isnormal (q_bottom)) { // Active lysimeter, use fake pressure bottom. const double dz_plus = z - geo.zplus (first + i); const double K_sat = soil.K (first + i, 0.0, h_ice[first + i], soil_heat.T (first + i)); b[i] = Cw2 + (ddt / dz) * ( Kplus[i - 1] / dz_minus + K_sat / dz_plus); d[i] = Theta[i] - Cw1 - ddt * S[first + i] + (ddt / dz) * (Kplus[i - 1] - K_sat); } else { // Flux bottom. b[i] = Cw2 + (ddt / dz) * (Kplus[i - 1] / dz_minus); d[i] = Theta[i] - Cw1 - ddt * S[first + i] + (ddt / dz) * (Kplus[i - 1] + q_bottom); } a[i] = - (ddt / dz) * (Kplus[i - 1] / dz_minus); c[i] = 0.0; } else { // Calculate intermediate cells. const double dz_minus = geo.cell_z (first + i - 1) - z; const double dz_plus = z - geo.cell_z (first + i + 1); a[i] = - (ddt / dz) * (Kplus[i - 1] / dz_minus); b[i] = Cw2 + (ddt / dz) * ( Kplus[i - 1] / dz_minus + Kplus[i] / dz_plus); c[i] = - (ddt / dz) * (Kplus[i] / dz_plus); d[i] = Theta[i] - Cw1 - ddt * S[first + i] + (ddt / dz) * (Kplus[i - 1] - Kplus[i] ); } } tridia (flux ? 0 : 1, size, a, b, c, d, h.begin ()); daisy_assert (h.size () > 1); if (h[0] < -1e9 || h[1] < -1e9 || h[size-1] < -1e9) { if (debug > 0) { std::ostringstream tmp; tmp << "ABSURD: h[0] = " << h[0] << " h[1] = " << h[1] << " h[" << (size-1) << "] = " << h[size-1] << " stepping down"; msg.message (tmp.str ()); } goto failure; } } while (!converges (h_conv, h)); // Calculate new water content. for (unsigned int i = 0; i < size; i++) Theta[i] = soil.Theta (first + i, h[i], h_ice[first + i]); if (flux) { if (h[0] > 0.0) { if (debug > 0) msg.message ("Flux top with saturated soil"); goto failure; } // Yeah, it worked! delta_top_water = -(available_water / time_left) * ddt; } else { daisy_assert (!flux); // Find flux. switch (bottom_type) { case Groundwater::forced_flux: case Groundwater::free_drainage: q[last + 1] = q_bottom; for (int i = last; i >= first; i--) q[i] = - (((Theta[i - first] - Theta_previous[i-first]) / ddt) + S[i]) * geo.dz (i) + q[i + 1]; break; case Groundwater::pressure: case Groundwater::lysimeter: q_darcy (geo, first, last, h_previous, h, Theta_previous, Theta, Kplus, S, ddt, q); break; default: daisy_panic ("Unknown bottom type"); } // We take water from flux pond first. delta_top_water = q[first] * ddt; if (available_water + delta_top_water < -1e-30) // We don't have more water in the pressure top. { if (debug > 1) { std::ostringstream tmp; tmp << "Couldn't accept top flux: " << "available_water = " << available_water << ", delta_top_water = " << delta_top_water << ", time left = " << time_left << ", ddt = " << ddt; if (debug > 2) { tmp << "\nh ="; for (size_t c = 0; c < size; c++) tmp << "\t" << h[c]; tmp << "\nTheta ="; for (size_t c = 0; c < size; c++) tmp << "\t" << Theta[c]; tmp << "\nS ="; for (size_t c = 0; c < size; c++) tmp << "\t" << S[first + c]; tmp << "\nK ="; for (size_t c = 0; c < size; c++) tmp << "\t" << K[c]; } msg.message (tmp.str ()); } goto failure; } // Yeah, it works! } // Acceptance mode. top_water += delta_top_water; available_water += delta_top_water; time_left -= ddt; switched_top = false; iterations_with_this_time_step++; if (iterations_with_this_time_step > time_step_reduction) { number_of_time_step_reductions--; iterations_with_this_time_step = 0; ddt *= time_step_reduction; } continue; // Failure mode. failure: number_of_time_step_reductions++; if (number_of_time_step_reductions > max_time_step_reductions) { if (switched_top) { if (debug > 1) msg.message ("Been there, tried that."); return false; } flux = !flux; if (debug > 1) { std::ostringstream tmp; if (flux) tmp << "Trying flux top"; else tmp << "Trying pressure top"; if (debug > 2) { tmp << "\nh ="; for (size_t c = 0; c < size; c++) tmp << "\t" << h_previous[c]; tmp << "\nTheta ="; for (size_t c = 0; c < size; c++) tmp << "\t" << Theta[c]; tmp << "\nS ="; for (size_t c = 0; c < size; c++) tmp << "\t" << S[first + c]; tmp << "\nK ="; for (size_t c = 0; c < size; c++) tmp << "\t" << K[c]; } msg.message (tmp.str ()); } switched_top = true; ddt = time_left; number_of_time_step_reductions = 0; } else ddt /= time_step_reduction; Theta = Theta_previous; h = h_previous; } // Make it official. daisy_assert (h_new.size () >= first + size); copy (h.begin (), h.end (), &h_new[first]); daisy_assert (Theta_new.size () >= first + size); copy (Theta.begin (), Theta.end (), &Theta_new[first]); // Check upper boundary. daisy_assert (h_top < 1000.0); daisy_assert (h_top > -1000.0); if (!(top_type == Surface::soil || balance (h_top, available_water, top_water))) { std::ostringstream tmp; tmp << "h_top = " << h_top << ", available_water = " << available_water << ", top_water = " << top_water; msg.error (tmp.str ()); } // We know flux on upper border, use mass preservation to // calculate flux below given the change in water content. if (top_type == Surface::soil) first++; q[first] = top_water / dt; for (int i = first; i <= last; i++) { q[i + 1] = (((Theta_new[i] - Theta_old[i]) / dt) + S[i]) * geo.dz (i) + q[i]; } for (unsigned int i = 0; i < size; i++) if (!std::isfinite (h[i])) { std::ostringstream tmp; tmp << "h[" << i << "] = " << h[i]; msg.error (tmp.str ()); return false; } return true; } bool UZRichard::converges (const std::vector<double>& previous, const std::vector<double>& current) const { size_t size = previous.size (); daisy_assert (current.size () == size); for (unsigned int i = 0; i < size; i++) { if ( fabs (current[i] - previous[i]) > max_absolute_difference && ( iszero (previous[i]) || iszero (current[i]) || ( fabs ((current[i] - previous[i]) / previous[i]) > max_relative_difference))) return false; } return true; } void UZRichard::internode (const Soil& soil, const SoilHeat& soil_heat, int first, int last, const std::vector<double>& h_ice, const std::vector<double>& K, std::vector<double>& Kplus) const { int size = last - first + 1; daisy_assert (K_average.get ()); for (int i = 0; i < size; i++) Kplus[i] = (*K_average)(K[i], K[i + 1]); for (int i = 0; i < size; i++) { double Ksat = soil.K (first + i, 0.0, h_ice[first + i], soil_heat.T (first + i)); Kplus[i] = std::min (Ksat, Kplus[i]); if (i > 0) Kplus[i - 1] = std::min (Ksat, Kplus[i - 1]); } } void UZRichard::q_darcy (const GeometryVert& geo, const int first, const int last, const std::vector<double>& /* h_previous */, const std::vector<double>& h, const std::vector<double>& Theta_previous, const std::vector<double>& Theta, const std::vector<double>& Kplus, const std::vector<double>& S, const double ddt, double *const q) { // Find an unsaturated area. // Start looking 3/4 towards the bottom. const double start_pos = geo.cell_z (first) + (geo.cell_z (last) - geo.cell_z (first)) * 3.0 / 4.0; int start = first; while (start < last && geo.zplus (start + 1) > start_pos) start++; if (!(start < last - 2)) { std::ostringstream tmp; tmp << "We need at least 2 numeric cells below 3/4 depth for \ calculating flow with pressure top.\n"; tmp << "3/4 depth is " << start_pos << " [cm]\n" << "cell " << start << " ends at " << geo.zplus (start) << " [cm]\n" << "first " << first << " ends at " << geo.zplus (first) << " [cm]\n" << "last " << last << " ends at " << geo.zplus (last) << " [cm]"; throw (tmp.str ()); } if (!(start > first + 1)) { std::ostringstream tmp; tmp << "We need at least 1 numeric cell above 3/4 depth for \ calculating flow with pressure top.\n"; tmp << "3/4 depth is " << start_pos << " [cm]\n" << "cell " << start << " ends at " << geo.zplus (start) << " [cm]\n" << "first " << first << " ends at " << geo.zplus (first) << " [cm]\n" << "last " << last << " ends at " << geo.zplus (last) << " [cm]"; throw (tmp.str ()); } #ifdef REQUIRE_UNSATURATED_DARCY for (; start > first; start--) { if (h[start - first] < 0.0 && h[start + 1 - first] < 0.0) break; } if (start == first) throw ("We couldn't find an unsaturated area."); #endif // REQUIRE_UNSATURATED_DARCY // Use Darcy equation to find flux here. q[start + 1] = -Kplus[start - first] * ( ( (h[start - first] - h[start + 1 - first]) / (geo.cell_z (start) - geo.cell_z (start + 1))) + 1); // Use mass preservation to find flux below and above. for (int i = start + 1; i <= last; i++) { q[i + 1] = (((Theta[i - first] - Theta_previous[i-first]) / ddt) + S[i]) * geo.dz (i) + q[i]; } for (int i = start; i >= first; i--) { q[i] = - (((Theta[i - first] - Theta_previous[i-first]) / ddt) + S[i]) * geo.dz (i) + q[i + 1]; } } void UZRichard::tick (Treelog& msg, const GeometryVert& geo, const Soil& soil, const SoilHeat& soil_heat, unsigned int first, const Surface& top, const size_t top_edge, const unsigned int last, const Groundwater& bottom, const size_t bottom_edge, const std::vector<double>& S, const std::vector<double>& h_old, const std::vector<double>& Theta_old, const std::vector<double>& h_ice, std::vector<double>& h, std::vector<double>& Theta, const size_t q_offset, std::vector<double>& q_base, const double dt) { if (!richard (msg, geo, soil, soil_heat, first, top, top_edge, last, bottom, bottom_edge, S, h_old, Theta_old, h_ice, h, Theta, q_offset, q_base, dt)) throw "Richard's equation doesn't converge"; } void UZRichard::has_macropores (const bool has_them) { if (K_average.get ()) return; if (has_them) K_average = Average::build_geometric (); else K_average = Average::build_arithmetic (); daisy_assert (K_average.get ()); } UZRichard::UZRichard (const BlockModel& al) : UZmodel (al), // Parameters. debug (al.integer ("debug")), max_time_step_reductions (al.integer ("max_time_step_reductions")), time_step_reduction (al.integer ("time_step_reduction")), max_iterations (al.integer ("max_iterations")), max_number_of_small_time_steps (al.integer ("max_number_of_small_time_steps")), msg_number_of_small_time_steps (al.integer ("msg_number_of_small_time_steps")), max_absolute_difference (al.number ("max_absolute_difference")), max_relative_difference (al.number ("max_relative_difference")), K_average (al.check ("K_average") ? Librarian::build_item<Average> (al, "K_average") : NULL) { } UZRichard::~UZRichard () { } // Add the UZRichard syntax to the syntax table. static struct UZRichardSyntax : DeclareModel { Model* make (const BlockModel& al) const { return new UZRichard (al); } UZRichardSyntax () : DeclareModel (UZmodel::component, "richards", "\ A numerical solution to Richard's Equation.") { } void load_frame (Frame& frame) const { frame.declare_integer ("debug", Attribute::Const, "\ Print additional debug messages, higher numbers means more messages."); frame.set ("debug", 0); frame.declare_integer ("max_time_step_reductions", Attribute::Const, "\ Number of times we may reduce the time step before giving up"); frame.set ("max_time_step_reductions", 16); frame.declare_integer ("time_step_reduction", Attribute::Const, "Divide the time step with this at each reduction."); frame.set ("time_step_reduction", 4); frame.declare_integer ("max_iterations", Attribute::Const, "\ Maximum number of iterations when seeking convergence before reducing\n\ the time step."); frame.set ("max_iterations", 25); frame.declare_integer ("max_number_of_small_time_steps", Attribute::Const, "\ Maximum number of small time steps in a large time step."); frame.set ("max_number_of_small_time_steps", 200000); frame.declare_integer ("msg_number_of_small_time_steps", Attribute::Const, "\ Number of small time steps in a large time step between message."); frame.set ("msg_number_of_small_time_steps", 5000); frame.declare ("max_absolute_difference", "cm", Attribute::Const, "\ Maximum absolute difference in 'h' values for convergence."); frame.set ("max_absolute_difference", 0.02); frame.declare ("max_relative_difference", Attribute::None (), Attribute::Const, "\ Maximum relative difference in 'h' values for convergence."); frame.set ("max_relative_difference", 0.001); frame.declare_object ("K_average", Average::component, Attribute::OptionalConst, Attribute::Singleton, "Model for calculating average K between cells.\n\ The default model is 'geometric' if there are macropores, and\n\ 'arithmetic' otherwise."); } } UZRichard_syntax; // uzrichards.C ends here.
sativa/daisy-model
uzrichard.C
C++
lgpl-2.1
27,446
""" Implementation of the XDG Menu Specification http://standards.freedesktop.org/menu-spec/ Example code: from xdg.Menu import parse, Menu, MenuEntry def print_menu(menu, tab=0): for submenu in menu.Entries: if isinstance(submenu, Menu): print ("\t" * tab) + unicode(submenu) print_menu(submenu, tab+1) elif isinstance(submenu, MenuEntry): print ("\t" * tab) + unicode(submenu.DesktopEntry) print_menu(parse()) """ import os import locale import subprocess import ast try: import xml.etree.cElementTree as etree except ImportError: import xml.etree.ElementTree as etree from xdg.BaseDirectory import xdg_data_dirs, xdg_config_dirs from xdg.DesktopEntry import DesktopEntry from xdg.Exceptions import ParsingError from xdg.util import PY3 import xdg.Locale import xdg.Config def _strxfrm(s): """Wrapper around locale.strxfrm that accepts unicode strings on Python 2. See Python bug #2481. """ if (not PY3) and isinstance(s, unicode): s = s.encode('utf-8') return locale.strxfrm(s) DELETED = "Deleted" NO_DISPLAY = "NoDisplay" HIDDEN = "Hidden" EMPTY = "Empty" NOT_SHOW_IN = "NotShowIn" NO_EXEC = "NoExec" class Menu: """Menu containing sub menus under menu.Entries Contains both Menu and MenuEntry items. """ def __init__(self): # Public stuff self.Name = "" self.Directory = None self.Entries = [] self.Doc = "" self.Filename = "" self.Depth = 0 self.Parent = None self.NotInXml = False # Can be True, False, DELETED, NO_DISPLAY, HIDDEN, EMPTY or NOT_SHOW_IN self.Show = True self.Visible = 0 # Private stuff, only needed for parsing self.AppDirs = [] self.DefaultLayout = None self.Deleted = None self.Directories = [] self.DirectoryDirs = [] self.Layout = None self.MenuEntries = [] self.Moves = [] self.OnlyUnallocated = None self.Rules = [] self.Submenus = [] def __str__(self): return self.Name def __add__(self, other): for dir in other.AppDirs: self.AppDirs.append(dir) for dir in other.DirectoryDirs: self.DirectoryDirs.append(dir) for directory in other.Directories: self.Directories.append(directory) if other.Deleted is not None: self.Deleted = other.Deleted if other.OnlyUnallocated is not None: self.OnlyUnallocated = other.OnlyUnallocated if other.Layout: self.Layout = other.Layout if other.DefaultLayout: self.DefaultLayout = other.DefaultLayout for rule in other.Rules: self.Rules.append(rule) for move in other.Moves: self.Moves.append(move) for submenu in other.Submenus: self.addSubmenu(submenu) return self # FIXME: Performance: cache getName() def __cmp__(self, other): return locale.strcoll(self.getName(), other.getName()) def _key(self): """Key function for locale-aware sorting.""" return _strxfrm(self.getName()) def __lt__(self, other): try: other = other._key() except AttributeError: pass return self._key() < other def __eq__(self, other): try: return self.Name == unicode(other) except NameError: # unicode() becomes str() in Python 3 return self.Name == str(other) """ PUBLIC STUFF """ def getEntries(self, show_hidden=False): """Interator for a list of Entries visible to the user.""" for entry in self.Entries: if show_hidden: yield entry elif entry.Show is True: yield entry # FIXME: Add searchEntry/seaqrchMenu function # search for name/comment/genericname/desktopfileid # return multiple items def getMenuEntry(self, desktopfileid, deep=False): """Searches for a MenuEntry with a given DesktopFileID.""" for menuentry in self.MenuEntries: if menuentry.DesktopFileID == desktopfileid: return menuentry if deep: for submenu in self.Submenus: submenu.getMenuEntry(desktopfileid, deep) def getMenu(self, path): """Searches for a Menu with a given path.""" array = path.split("/", 1) for submenu in self.Submenus: if submenu.Name == array[0]: if len(array) > 1: return submenu.getMenu(array[1]) else: return submenu def getPath(self, org=False, toplevel=False): """Returns this menu's path in the menu structure.""" parent = self names = [] while 1: if org: names.append(parent.Name) else: names.append(parent.getName()) if parent.Depth > 0: parent = parent.Parent else: break names.reverse() path = "" if not toplevel: names.pop(0) for name in names: path = os.path.join(path, name) return path def getName(self): """Returns the menu's localised name.""" try: return self.Directory.DesktopEntry.getName() except AttributeError: return self.Name def getGenericName(self): """Returns the menu's generic name.""" try: return self.Directory.DesktopEntry.getGenericName() except AttributeError: return "" def getComment(self): """Returns the menu's comment text.""" try: return self.Directory.DesktopEntry.getComment() except AttributeError: return "" def getIcon(self): """Returns the menu's icon, filename or simple name""" try: return self.Directory.DesktopEntry.getIcon() except AttributeError: return "" def sort(self): self.Entries = [] self.Visible = 0 for submenu in self.Submenus: submenu.sort() _submenus = set() _entries = set() for order in self.Layout.order: if order[0] == "Filename": _entries.add(order[1]) elif order[0] == "Menuname": _submenus.add(order[1]) for order in self.Layout.order: if order[0] == "Separator": separator = Separator(self) if len(self.Entries) > 0 and isinstance(self.Entries[-1], Separator): separator.Show = False self.Entries.append(separator) elif order[0] == "Filename": menuentry = self.getMenuEntry(order[1]) if menuentry: self.Entries.append(menuentry) elif order[0] == "Menuname": submenu = self.getMenu(order[1]) if submenu: if submenu.Layout.inline: self.merge_inline(submenu) else: self.Entries.append(submenu) elif order[0] == "Merge": if order[1] == "files" or order[1] == "all": self.MenuEntries.sort() for menuentry in self.MenuEntries: if menuentry.DesktopFileID not in _entries: self.Entries.append(menuentry) elif order[1] == "menus" or order[1] == "all": self.Submenus.sort() for submenu in self.Submenus: if submenu.Name not in _submenus: if submenu.Layout.inline: self.merge_inline(submenu) else: self.Entries.append(submenu) # getHidden / NoDisplay / OnlyShowIn / NotOnlyShowIn / Deleted / NoExec for entry in self.Entries: entry.Show = True self.Visible += 1 if isinstance(entry, Menu): if entry.Deleted is True: entry.Show = DELETED self.Visible -= 1 elif isinstance(entry.Directory, MenuEntry): if entry.Directory.DesktopEntry.getNoDisplay(): entry.Show = NO_DISPLAY self.Visible -= 1 elif entry.Directory.DesktopEntry.getHidden(): entry.Show = HIDDEN self.Visible -= 1 elif isinstance(entry, MenuEntry): if entry.DesktopEntry.getNoDisplay(): entry.Show = NO_DISPLAY self.Visible -= 1 elif entry.DesktopEntry.getHidden(): entry.Show = HIDDEN self.Visible -= 1 elif entry.DesktopEntry.getTryExec() and not entry.DesktopEntry.findTryExec(): entry.Show = NO_EXEC self.Visible -= 1 elif xdg.Config.windowmanager: if (entry.DesktopEntry.OnlyShowIn != [] and ( xdg.Config.windowmanager not in entry.DesktopEntry.OnlyShowIn ) ) or ( xdg.Config.windowmanager in entry.DesktopEntry.NotShowIn ): entry.Show = NOT_SHOW_IN self.Visible -= 1 elif isinstance(entry, Separator): self.Visible -= 1 # remove separators at the beginning and at the end if len(self.Entries) > 0: if isinstance(self.Entries[0], Separator): self.Entries[0].Show = False if len(self.Entries) > 1: if isinstance(self.Entries[-1], Separator): self.Entries[-1].Show = False # show_empty tag for entry in self.Entries[:]: if isinstance(entry, Menu) and not entry.Layout.show_empty and entry.Visible == 0: entry.Show = EMPTY self.Visible -= 1 if entry.NotInXml is True: self.Entries.remove(entry) """ PRIVATE STUFF """ def addSubmenu(self, newmenu): for submenu in self.Submenus: if submenu == newmenu: submenu += newmenu break else: self.Submenus.append(newmenu) newmenu.Parent = self newmenu.Depth = self.Depth + 1 # inline tags def merge_inline(self, submenu): """Appends a submenu's entries to this menu See the <Menuname> section of the spec about the "inline" attribute """ if len(submenu.Entries) == 1 and submenu.Layout.inline_alias: menuentry = submenu.Entries[0] menuentry.DesktopEntry.set("Name", submenu.getName(), locale=True) menuentry.DesktopEntry.set("GenericName", submenu.getGenericName(), locale=True) menuentry.DesktopEntry.set("Comment", submenu.getComment(), locale=True) self.Entries.append(menuentry) elif len(submenu.Entries) <= submenu.Layout.inline_limit or submenu.Layout.inline_limit == 0: if submenu.Layout.inline_header: header = Header(submenu.getName(), submenu.getGenericName(), submenu.getComment()) self.Entries.append(header) for entry in submenu.Entries: self.Entries.append(entry) else: self.Entries.append(submenu) class Move: "A move operation" def __init__(self, old="", new=""): self.Old = old self.New = new def __cmp__(self, other): return cmp(self.Old, other.Old) class Layout: "Menu Layout class" def __init__(self, show_empty=False, inline=False, inline_limit=4, inline_header=True, inline_alias=False): self.show_empty = show_empty self.inline = inline self.inline_limit = inline_limit self.inline_header = inline_header self.inline_alias = inline_alias self._order = [] self._default_order = [ ['Merge', 'menus'], ['Merge', 'files'] ] @property def order(self): return self._order if self._order else self._default_order @order.setter def order(self, order): self._order = order class Rule: """Include / Exclude Rules Class""" TYPE_INCLUDE, TYPE_EXCLUDE = 0, 1 @classmethod def fromFilename(cls, type, filename): tree = ast.Expression( body=ast.Compare( left=ast.Str(filename), ops=[ast.Eq()], comparators=[ast.Attribute( value=ast.Name(id='menuentry', ctx=ast.Load()), attr='DesktopFileID', ctx=ast.Load() )] ), lineno=1, col_offset=0 ) ast.fix_missing_locations(tree) rule = Rule(type, tree) return rule def __init__(self, type, expression): # Type is TYPE_INCLUDE or TYPE_EXCLUDE self.Type = type # expression is ast.Expression self.expression = expression self.code = compile(self.expression, '<compiled-menu-rule>', 'eval') def __str__(self): return ast.dump(self.expression) def apply(self, menuentries, run): for menuentry in menuentries: if run == 2 and (menuentry.MatchedInclude is True or menuentry.Allocated is True): continue if eval(self.code): if self.Type is Rule.TYPE_INCLUDE: menuentry.Add = True menuentry.MatchedInclude = True else: menuentry.Add = False return menuentries class MenuEntry: "Wrapper for 'Menu Style' Desktop Entries" TYPE_USER = "User" TYPE_SYSTEM = "System" TYPE_BOTH = "Both" def __init__(self, filename, dir="", prefix=""): # Create entry self.DesktopEntry = DesktopEntry(os.path.join(dir, filename)) self.setAttributes(filename, dir, prefix) # Can True, False DELETED, HIDDEN, EMPTY, NOT_SHOW_IN or NO_EXEC self.Show = True # Semi-Private self.Original = None self.Parents = [] # Private Stuff self.Allocated = False self.Add = False self.MatchedInclude = False # Caching self.Categories = self.DesktopEntry.getCategories() def save(self): """Save any changes to the desktop entry.""" if self.DesktopEntry.tainted: self.DesktopEntry.write() def getDir(self): """Return the directory containing the desktop entry file.""" return self.DesktopEntry.filename.replace(self.Filename, '') def getType(self): """Return the type of MenuEntry, System/User/Both""" if not xdg.Config.root_mode: if self.Original: return self.TYPE_BOTH elif xdg_data_dirs[0] in self.DesktopEntry.filename: return self.TYPE_USER else: return self.TYPE_SYSTEM else: return self.TYPE_USER def setAttributes(self, filename, dir="", prefix=""): self.Filename = filename self.Prefix = prefix self.DesktopFileID = os.path.join(prefix, filename).replace("/", "-") if not os.path.isabs(self.DesktopEntry.filename): self.__setFilename() def updateAttributes(self): if self.getType() == self.TYPE_SYSTEM: self.Original = MenuEntry(self.Filename, self.getDir(), self.Prefix) self.__setFilename() def __setFilename(self): if not xdg.Config.root_mode: path = xdg_data_dirs[0] else: path = xdg_data_dirs[1] if self.DesktopEntry.getType() == "Application": dir_ = os.path.join(path, "applications") else: dir_ = os.path.join(path, "desktop-directories") self.DesktopEntry.filename = os.path.join(dir_, self.Filename) def __cmp__(self, other): return locale.strcoll(self.DesktopEntry.getName(), other.DesktopEntry.getName()) def _key(self): """Key function for locale-aware sorting.""" return _strxfrm(self.DesktopEntry.getName()) def __lt__(self, other): try: other = other._key() except AttributeError: pass return self._key() < other def __eq__(self, other): if self.DesktopFileID == str(other): return True else: return False def __repr__(self): return self.DesktopFileID class Separator: "Just a dummy class for Separators" def __init__(self, parent): self.Parent = parent self.Show = True class Header: "Class for Inline Headers" def __init__(self, name, generic_name, comment): self.Name = name self.GenericName = generic_name self.Comment = comment def __str__(self): return self.Name TYPE_DIR, TYPE_FILE = 0, 1 def _check_file_path(value, filename, type): path = os.path.dirname(filename) if not os.path.isabs(value): value = os.path.join(path, value) value = os.path.abspath(value) if not os.path.exists(value): return False if type == TYPE_DIR and os.path.isdir(value): return value if type == TYPE_FILE and os.path.isfile(value): return value return False def _get_menu_file_path(filename): dirs = list(xdg_config_dirs) if xdg.Config.root_mode is True: dirs.pop(0) for d in dirs: menuname = os.path.join(d, "menus", filename) if os.path.isfile(menuname): return menuname def _to_bool(value): if isinstance(value, bool): return value return value.lower() == "true" # remove duplicate entries from a list def _dedupe(_list): _set = {} _list.reverse() _list = [_set.setdefault(e, e) for e in _list if e not in _set] _list.reverse() return _list class XMLMenuBuilder(object): def __init__(self, debug=False): self.debug = debug def parse(self, filename=None): """Load an applications.menu file. filename : str, optional The default is ``$XDG_CONFIG_DIRS/menus/${XDG_MENU_PREFIX}applications.menu``. """ # convert to absolute path if filename and not os.path.isabs(filename): filename = _get_menu_file_path(filename) # use default if no filename given if not filename: candidate = os.environ.get('XDG_MENU_PREFIX', '') + "applications.menu" filename = _get_menu_file_path(candidate) if not filename: raise ParsingError('File not found', "/etc/xdg/menus/%s" % candidate) # check if it is a .menu file if not filename.endswith(".menu"): raise ParsingError('Not a .menu file', filename) # create xml parser try: tree = etree.parse(filename) except: raise ParsingError('Not a valid .menu file', filename) # parse menufile self._merged_files = set() self._directory_dirs = set() self.cache = MenuEntryCache() menu = self.parse_menu(tree.getroot(), filename) menu.tree = tree menu.filename = filename self.handle_moves(menu) self.post_parse(menu) # generate the menu self.generate_not_only_allocated(menu) self.generate_only_allocated(menu) # and finally sort menu.sort() return menu def parse_menu(self, node, filename): menu = Menu() self.parse_node(node, filename, menu) return menu def parse_node(self, node, filename, parent=None): num_children = len(node) for child in node: tag, text = child.tag, child.text text = text.strip() if text else None if tag == 'Menu': menu = self.parse_menu(child, filename) parent.addSubmenu(menu) elif tag == 'AppDir' and text: self.parse_app_dir(text, filename, parent) elif tag == 'DefaultAppDirs': self.parse_default_app_dir(filename, parent) elif tag == 'DirectoryDir' and text: self.parse_directory_dir(text, filename, parent) elif tag == 'DefaultDirectoryDirs': self.parse_default_directory_dir(filename, parent) elif tag == 'Name' and text: parent.Name = text elif tag == 'Directory' and text: parent.Directories.append(text) elif tag == 'OnlyUnallocated': parent.OnlyUnallocated = True elif tag == 'NotOnlyUnallocated': parent.OnlyUnallocated = False elif tag == 'Deleted': parent.Deleted = True elif tag == 'NotDeleted': parent.Deleted = False elif tag == 'Include' or tag == 'Exclude': parent.Rules.append(self.parse_rule(child)) elif tag == 'MergeFile': if child.attrib.get("type", None) == "parent": self.parse_merge_file("applications.menu", child, filename, parent) elif text: self.parse_merge_file(text, child, filename, parent) elif tag == 'MergeDir' and text: self.parse_merge_dir(text, child, filename, parent) elif tag == 'DefaultMergeDirs': self.parse_default_merge_dirs(child, filename, parent) elif tag == 'Move': parent.Moves.append(self.parse_move(child)) elif tag == 'Layout': if num_children > 1: parent.Layout = self.parse_layout(child) elif tag == 'DefaultLayout': if num_children > 1: parent.DefaultLayout = self.parse_layout(child) elif tag == 'LegacyDir' and text: self.parse_legacy_dir(text, child.attrib.get("prefix", ""), filename, parent) elif tag == 'KDELegacyDirs': self.parse_kde_legacy_dirs(filename, parent) def parse_layout(self, node): layout = Layout( show_empty=_to_bool(node.attrib.get("show_empty", False)), inline=_to_bool(node.attrib.get("inline", False)), inline_limit=int(node.attrib.get("inline_limit", 4)), inline_header=_to_bool(node.attrib.get("inline_header", True)), inline_alias=_to_bool(node.attrib.get("inline_alias", False)) ) for child in node: tag, text = child.tag, child.text text = text.strip() if text else None if tag == "Menuname" and text: layout.order.append([ "Menuname", text, _to_bool(child.attrib.get("show_empty", False)), _to_bool(child.attrib.get("inline", False)), int(child.attrib.get("inline_limit", 4)), _to_bool(child.attrib.get("inline_header", True)), _to_bool(child.attrib.get("inline_alias", False)) ]) elif tag == "Separator": layout.order.append(['Separator']) elif tag == "Filename" and text: layout.order.append(["Filename", text]) elif tag == "Merge": layout.order.append([ "Merge", child.attrib.get("type", "all") ]) return layout def parse_move(self, node): old, new = "", "" for child in node: tag, text = child.tag, child.text text = text.strip() if text else None if tag == "Old" and text: old = text elif tag == "New" and text: new = text return Move(old, new) # ---------- <Rule> parsing def parse_rule(self, node): type = Rule.TYPE_INCLUDE if node.tag == 'Include' else Rule.TYPE_EXCLUDE tree = ast.Expression(lineno=1, col_offset=0) expr = self.parse_bool_op(node, ast.Or()) if expr: tree.body = expr else: tree.body = ast.Name('False', ast.Load()) ast.fix_missing_locations(tree) return Rule(type, tree) def parse_bool_op(self, node, operator): values = [] for child in node: rule = self.parse_rule_node(child) if rule: values.append(rule) num_values = len(values) if num_values > 1: return ast.BoolOp(operator, values) elif num_values == 1: return values[0] return None def parse_rule_node(self, node): tag = node.tag if tag == 'Or': return self.parse_bool_op(node, ast.Or()) elif tag == 'And': return self.parse_bool_op(node, ast.And()) elif tag == 'Not': expr = self.parse_bool_op(node, ast.Or()) return ast.UnaryOp(ast.Not(), expr) if expr else None elif tag == 'All': return ast.Name('True', ast.Load()) elif tag == 'Category': category = node.text return ast.Compare( left=ast.Str(category), ops=[ast.In()], comparators=[ast.Attribute( value=ast.Name(id='menuentry', ctx=ast.Load()), attr='Categories', ctx=ast.Load() )] ) elif tag == 'Filename': filename = node.text return ast.Compare( left=ast.Str(filename), ops=[ast.Eq()], comparators=[ast.Attribute( value=ast.Name(id='menuentry', ctx=ast.Load()), attr='DesktopFileID', ctx=ast.Load() )] ) # ---------- App/Directory Dir Stuff def parse_app_dir(self, value, filename, parent): value = _check_file_path(value, filename, TYPE_DIR) if value: parent.AppDirs.append(value) def parse_default_app_dir(self, filename, parent): for d in reversed(xdg_data_dirs): self.parse_app_dir(os.path.join(d, "applications"), filename, parent) def parse_directory_dir(self, value, filename, parent): value = _check_file_path(value, filename, TYPE_DIR) if value: parent.DirectoryDirs.append(value) def parse_default_directory_dir(self, filename, parent): for d in reversed(xdg_data_dirs): self.parse_directory_dir(os.path.join(d, "desktop-directories"), filename, parent) # ---------- Merge Stuff def parse_merge_file(self, value, child, filename, parent): if child.attrib.get("type", None) == "parent": for d in xdg_config_dirs: rel_file = filename.replace(d, "").strip("/") if rel_file != filename: for p in xdg_config_dirs: if d == p: continue if os.path.isfile(os.path.join(p, rel_file)): self.merge_file(os.path.join(p, rel_file), child, parent) break else: value = _check_file_path(value, filename, TYPE_FILE) if value: self.merge_file(value, child, parent) def parse_merge_dir(self, value, child, filename, parent): value = _check_file_path(value, filename, TYPE_DIR) if value: for item in os.listdir(value): try: if item.endswith(".menu"): self.merge_file(os.path.join(value, item), child, parent) except UnicodeDecodeError: continue def parse_default_merge_dirs(self, child, filename, parent): basename = os.path.splitext(os.path.basename(filename))[0] for d in reversed(xdg_config_dirs): self.parse_merge_dir(os.path.join(d, "menus", basename + "-merged"), child, filename, parent) def merge_file(self, filename, child, parent): # check for infinite loops if filename in self._merged_files: if self.debug: raise ParsingError('Infinite MergeFile loop detected', filename) else: return self._merged_files.add(filename) # load file try: tree = etree.parse(filename) except IOError: if self.debug: raise ParsingError('File not found', filename) else: return except: if self.debug: raise ParsingError('Not a valid .menu file', filename) else: return root = tree.getroot() self.parse_node(root, filename, parent) # ---------- Legacy Dir Stuff def parse_legacy_dir(self, dir_, prefix, filename, parent): m = self.merge_legacy_dir(dir_, prefix, filename, parent) if m: parent += m def merge_legacy_dir(self, dir_, prefix, filename, parent): dir_ = _check_file_path(dir_, filename, TYPE_DIR) if dir_ and dir_ not in self._directory_dirs: self._directory_dirs.add(dir_) m = Menu() m.AppDirs.append(dir_) m.DirectoryDirs.append(dir_) m.Name = os.path.basename(dir_) m.NotInXml = True for item in os.listdir(dir_): try: if item == ".directory": m.Directories.append(item) elif os.path.isdir(os.path.join(dir_, item)): m.addSubmenu(self.merge_legacy_dir( os.path.join(dir_, item), prefix, filename, parent )) except UnicodeDecodeError: continue self.cache.add_menu_entries([dir_], prefix, True) menuentries = self.cache.get_menu_entries([dir_], False) for menuentry in menuentries: categories = menuentry.Categories if len(categories) == 0: r = Rule.fromFilename(Rule.TYPE_INCLUDE, menuentry.DesktopFileID) m.Rules.append(r) if not dir_ in parent.AppDirs: categories.append("Legacy") menuentry.Categories = categories return m def parse_kde_legacy_dirs(self, filename, parent): try: proc = subprocess.Popen( ['kde-config', '--path', 'apps'], stdout=subprocess.PIPE, universal_newlines=True ) output = proc.communicate()[0].splitlines() except OSError: # If kde-config doesn't exist, ignore this. return try: for dir_ in output[0].split(":"): self.parse_legacy_dir(dir_, "kde", filename, parent) except IndexError: pass def post_parse(self, menu): # unallocated / deleted if menu.Deleted is None: menu.Deleted = False if menu.OnlyUnallocated is None: menu.OnlyUnallocated = False # Layout Tags if not menu.Layout or not menu.DefaultLayout: if menu.DefaultLayout: menu.Layout = menu.DefaultLayout elif menu.Layout: if menu.Depth > 0: menu.DefaultLayout = menu.Parent.DefaultLayout else: menu.DefaultLayout = Layout() else: if menu.Depth > 0: menu.Layout = menu.Parent.DefaultLayout menu.DefaultLayout = menu.Parent.DefaultLayout else: menu.Layout = Layout() menu.DefaultLayout = Layout() # add parent's app/directory dirs if menu.Depth > 0: menu.AppDirs = menu.Parent.AppDirs + menu.AppDirs menu.DirectoryDirs = menu.Parent.DirectoryDirs + menu.DirectoryDirs # remove duplicates menu.Directories = _dedupe(menu.Directories) menu.DirectoryDirs = _dedupe(menu.DirectoryDirs) menu.AppDirs = _dedupe(menu.AppDirs) # go recursive through all menus for submenu in menu.Submenus: self.post_parse(submenu) # reverse so handling is easier menu.Directories.reverse() menu.DirectoryDirs.reverse() menu.AppDirs.reverse() # get the valid .directory file out of the list for directory in menu.Directories: for dir in menu.DirectoryDirs: if os.path.isfile(os.path.join(dir, directory)): menuentry = MenuEntry(directory, dir) if not menu.Directory: menu.Directory = menuentry elif menuentry.Type == MenuEntry.TYPE_SYSTEM: if menu.Directory.Type == MenuEntry.TYPE_USER: menu.Directory.Original = menuentry if menu.Directory: break # Finally generate the menu def generate_not_only_allocated(self, menu): for submenu in menu.Submenus: self.generate_not_only_allocated(submenu) if menu.OnlyUnallocated is False: self.cache.add_menu_entries(menu.AppDirs) menuentries = [] for rule in menu.Rules: menuentries = rule.apply(self.cache.get_menu_entries(menu.AppDirs), 1) for menuentry in menuentries: if menuentry.Add is True: menuentry.Parents.append(menu) menuentry.Add = False menuentry.Allocated = True menu.MenuEntries.append(menuentry) def generate_only_allocated(self, menu): for submenu in menu.Submenus: self.generate_only_allocated(submenu) if menu.OnlyUnallocated is True: self.cache.add_menu_entries(menu.AppDirs) menuentries = [] for rule in menu.Rules: menuentries = rule.apply(self.cache.get_menu_entries(menu.AppDirs), 2) for menuentry in menuentries: if menuentry.Add is True: menuentry.Parents.append(menu) # menuentry.Add = False # menuentry.Allocated = True menu.MenuEntries.append(menuentry) def handle_moves(self, menu): for submenu in menu.Submenus: self.handle_moves(submenu) # parse move operations for move in menu.Moves: move_from_menu = menu.getMenu(move.Old) if move_from_menu: # FIXME: this is assigned, but never used... move_to_menu = menu.getMenu(move.New) menus = move.New.split("/") oldparent = None while len(menus) > 0: if not oldparent: oldparent = menu newmenu = oldparent.getMenu(menus[0]) if not newmenu: newmenu = Menu() newmenu.Name = menus[0] if len(menus) > 1: newmenu.NotInXml = True oldparent.addSubmenu(newmenu) oldparent = newmenu menus.pop(0) newmenu += move_from_menu move_from_menu.Parent.Submenus.remove(move_from_menu) class MenuEntryCache: "Class to cache Desktop Entries" def __init__(self): self.cacheEntries = {} self.cacheEntries['legacy'] = [] self.cache = {} def add_menu_entries(self, dirs, prefix="", legacy=False): for dir_ in dirs: if not dir_ in self.cacheEntries: self.cacheEntries[dir_] = [] self.__addFiles(dir_, "", prefix, legacy) def __addFiles(self, dir_, subdir, prefix, legacy): for item in os.listdir(os.path.join(dir_, subdir)): if item.endswith(".desktop"): try: menuentry = MenuEntry(os.path.join(subdir, item), dir_, prefix) except ParsingError: continue self.cacheEntries[dir_].append(menuentry) if legacy: self.cacheEntries['legacy'].append(menuentry) elif os.path.isdir(os.path.join(dir_, subdir, item)) and not legacy: self.__addFiles(dir_, os.path.join(subdir, item), prefix, legacy) def get_menu_entries(self, dirs, legacy=True): entries = [] ids = set() # handle legacy items appdirs = dirs[:] if legacy: appdirs.append("legacy") # cache the results again key = "".join(appdirs) try: return self.cache[key] except KeyError: pass for dir_ in appdirs: for menuentry in self.cacheEntries[dir_]: try: if menuentry.DesktopFileID not in ids: ids.add(menuentry.DesktopFileID) entries.append(menuentry) elif menuentry.getType() == MenuEntry.TYPE_SYSTEM: # FIXME: This is only 99% correct, but still... idx = entries.index(menuentry) entry = entries[idx] if entry.getType() == MenuEntry.TYPE_USER: entry.Original = menuentry except UnicodeDecodeError: continue self.cache[key] = entries return entries def parse(filename=None, debug=False): """Helper function. Equivalent to calling xdg.Menu.XMLMenuBuilder().parse(filename) """ return XMLMenuBuilder(debug).parse(filename)
0312birdzhang/pyxdg
xdg/Menu.py
Python
lgpl-2.1
38,726
package net.minecraft.network.play.server; import java.io.IOException; import net.minecraft.network.INetHandler; import net.minecraft.network.Packet; import net.minecraft.network.PacketBuffer; import net.minecraft.network.play.INetHandlerPlayClient; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class S2BPacketChangeGameState implements Packet { public static final String[] MESSAGE_NAMES = new String[] {"tile.bed.notValid"}; private int state; private float field_149141_c; private static final String __OBFID = "CL_00001301"; public S2BPacketChangeGameState() {} public S2BPacketChangeGameState(int stateIn, float p_i45194_2_) { this.state = stateIn; this.field_149141_c = p_i45194_2_; } /** * Reads the raw packet data from the data stream. */ public void readPacketData(PacketBuffer buf) throws IOException { this.state = buf.readUnsignedByte(); this.field_149141_c = buf.readFloat(); } /** * Writes the raw packet data to the data stream. */ public void writePacketData(PacketBuffer buf) throws IOException { buf.writeByte(this.state); buf.writeFloat(this.field_149141_c); } /** * Passes this Packet on to the NetHandler for processing. */ public void processPacket(INetHandlerPlayClient handler) { handler.handleChangeGameState(this); } @SideOnly(Side.CLIENT) public int func_149138_c() { return this.state; } /** * Passes this Packet on to the NetHandler for processing. */ public void processPacket(INetHandler handler) { this.processPacket((INetHandlerPlayClient)handler); } @SideOnly(Side.CLIENT) public float func_149137_d() { return this.field_149141_c; } }
trixmot/mod1
build/tmp/recompileMc/sources/net/minecraft/network/play/server/S2BPacketChangeGameState.java
Java
lgpl-2.1
1,888
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RoctracerDev(CMakePackage): """ROC-tracer library: Runtimes Generic Callback/Activity APIs. The goal of the implementation is to provide a generic independent from specific runtime profiler to trace API and asyncronous activity.""" homepage = "https://github.com/ROCm-Developer-Tools/roctracer" git = "https://github.com/ROCm-Developer-Tools/roctracer.git" url = "https://github.com/ROCm-Developer-Tools/roctracer/archive/rocm-4.5.0.tar.gz" maintainers = ['srekolam', 'arjun-raj-kuppala'] version('4.5.0', sha256='83dcd8987e129b14da0fe74e24ce8d027333f8fedc9247a402d3683765983296') version('4.3.1', sha256='88ada5f256a570792d1326a305663e94cf2c3b0cbd99f7e745326923882dafd2') version('4.3.0', sha256='c3d9f408df8d4dc0e9c0026217b8c684f68e775da80b215fecb3cd24419ee6d3') version('4.2.0', sha256='62a9c0cb1ba50b1c39a0636c886ac86e75a1a71cbf5fec05801517ceb0e67a37') version('4.1.0', sha256='5d93de4e92895b6eb5f9d098f5dbd182d33923bd9b2ab69cf5a1abbf91d70695', deprecated=True) version('4.0.0', sha256='f47859a46173228b597c463eda850b870e810534af5efd5f2a746067ef04edee', deprecated=True) version('3.10.0', sha256='ac4a1d059fc34377e906071fd0e56f5434a7e0e4ded9db8faf9217a115239dec', deprecated=True) version('3.9.0', sha256='0678f9faf45058b16923948c66d77ba2c072283c975d167899caef969169b292', deprecated=True) version('3.8.0', sha256='5154a84ce7568cd5dba756e9508c34ae9fc62f4b0b5731f93c2ad68b21537ed1', deprecated=True) version('3.7.0', sha256='6fa5b771e990f09c242237ab334b9f01039ec7d54ccde993e719c5d6577d1518', deprecated=True) version('3.5.0', sha256='7af5326c9ca695642b4265232ec12864a61fd6b6056aa7c4ecd9e19c817f209e', deprecated=True) variant('build_type', default='Release', values=("Release", "Debug", "RelWithDebInfo"), description='CMake build type') depends_on('cmake@3:', type='build') depends_on('python@:2', type='build', when='@:4.1.0') depends_on('python@3:', type='build', when='@4.2.0:') depends_on('py-cppheaderparser', type='build') for ver in ['3.5.0', '3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0', '4.1.0', '4.2.0', '4.3.0', '4.3.1', '4.5.0']: depends_on('hsakmt-roct@' + ver, when='@' + ver) depends_on('hsa-rocr-dev@' + ver, when='@' + ver) depends_on('rocminfo@' + ver, when='@' + ver) depends_on('hip@' + ver, when='@' + ver) for ver in ['4.2.0', '4.3.0', '4.3.1', '4.5.0']: depends_on('rocprofiler-dev@' + ver, when='@' + ver) def setup_build_environment(self, build_env): spec = self.spec build_env.set("HIP_PATH", spec['hip'].prefix) def patch(self): filter_file('${CMAKE_PREFIX_PATH}/hsa', '${HSA_RUNTIME_INC_PATH}', 'src/CMakeLists.txt', string=True) kwargs = {'ignore_absent': False, 'backup': False, 'string': False} with working_dir('script'): match = '^#!/usr/bin/python[23]' python = self.spec['python'].command.path substitute = "#!{python}".format(python=python) if self.spec.satisfies('@:4.3.2'): files = [ 'check_trace.py', 'gen_ostream_ops.py', 'hsaap.py', 'kfdap.py' ] else: files = [ 'check_trace.py', 'gen_ostream_ops.py', 'hsaap.py' ] filter_file(match, substitute, *files, **kwargs) def cmake_args(self): args = ['-DHIP_VDI=1', '-DCMAKE_MODULE_PATH={0}/cmake_modules'.format( self.stage.source_path), '-DHSA_RUNTIME_HSA_INC_PATH={0}/include'.format( self.spec['hsa-rocr-dev'].prefix) ] return args
LLNL/spack
var/spack/repos/builtin/packages/roctracer-dev/package.py
Python
lgpl-2.1
4,005
/* This file is part of the KDE project. Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 2.1 or 3 of the License. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library. If not, see <http://www.gnu.org/licenses/>. */ #include "abstractvideooutput.h" #include "utils.h" #ifndef QT_NO_DEBUG #include "objectdump.h" #endif #include <QtCore/private/qcore_symbian_p.h> // for qt_TSize2QSize #include <QMoveEvent> #include <QResizeEvent> #include <QApplication> // for QApplication::activeWindow #include <coecntrl.h> QT_BEGIN_NAMESPACE using namespace Phonon; using namespace Phonon::MMF; /*! \class MMF::AbstractVideoOutput \internal */ //----------------------------------------------------------------------------- // Constants //----------------------------------------------------------------------------- static const Phonon::VideoWidget::AspectRatio DefaultAspectRatio = Phonon::VideoWidget::AspectRatioAuto; static const Phonon::VideoWidget::ScaleMode DefaultScaleMode = Phonon::VideoWidget::FitInView; //----------------------------------------------------------------------------- // Constructor / destructor //----------------------------------------------------------------------------- MMF::AbstractVideoOutput::AbstractVideoOutput(QWidget *parent) : QWidget(parent) , m_aspectRatio(DefaultAspectRatio) , m_scaleMode(DefaultScaleMode) { } MMF::AbstractVideoOutput::~AbstractVideoOutput() { } void MMF::AbstractVideoOutput::setVideoSize(const QSize &frameSize) { TRACE_CONTEXT(AbstractVideoOutput::setVideoSize, EVideoInternal); TRACE("oldSize %d %d newSize %d %d", m_videoFrameSize.width(), m_videoFrameSize.height(), frameSize.width(), frameSize.height()); if (frameSize != m_videoFrameSize) { m_videoFrameSize = frameSize; updateGeometry(); } } //----------------------------------------------------------------------------- // QWidget //----------------------------------------------------------------------------- QSize MMF::AbstractVideoOutput::sizeHint() const { // TODO: replace this with a more sensible default QSize result(320, 240); if (!m_videoFrameSize.isNull()) result = m_videoFrameSize; return result; } //----------------------------------------------------------------------------- // Public functions //----------------------------------------------------------------------------- RWindowBase* MMF::AbstractVideoOutput::videoWindow() const { CCoeControl *control = internalWinId(); if (!control) control = effectiveWinId(); RWindowBase *window = 0; if (control) window = control->DrawableWindow(); return window; } QSize MMF::AbstractVideoOutput::videoWindowSize() const { QSize result; if (RWindowBase *const window = videoWindow()) result = qt_TSize2QSize(window->Size()); return result; } Phonon::VideoWidget::AspectRatio MMF::AbstractVideoOutput::aspectRatio() const { return m_aspectRatio; } void MMF::AbstractVideoOutput::setAspectRatio (Phonon::VideoWidget::AspectRatio aspectRatio) { if (m_aspectRatio != aspectRatio) { m_aspectRatio = aspectRatio; emit aspectRatioChanged(); } } Phonon::VideoWidget::ScaleMode MMF::AbstractVideoOutput::scaleMode() const { return m_scaleMode; } void MMF::AbstractVideoOutput::setScaleMode (Phonon::VideoWidget::ScaleMode scaleMode) { if (m_scaleMode != scaleMode) { m_scaleMode = scaleMode; emit scaleModeChanged(); } } //----------------------------------------------------------------------------- // Private functions //----------------------------------------------------------------------------- void MMF::AbstractVideoOutput::dump() const { #ifndef QT_NO_DEBUG TRACE_CONTEXT(AbstractVideoOutput::dump, EVideoInternal); QScopedPointer<ObjectDump::QVisitor> visitor(new ObjectDump::QVisitor); visitor->setPrefix("Phonon::MMF"); // to aid searchability of logs ObjectDump::addDefaultAnnotators(*visitor); if (QWidget *window = QApplication::activeWindow()) { TRACE("Dumping from root window 0x%08x:", window); ObjectDump::dumpTreeFromLeaf(*window, *visitor); } TRACE("Dumping tree from leaf 0x%08x:", this); ObjectDump::dumpTreeFromLeaf(*this, *visitor); QScopedPointer<ObjectDump::QDumper> dumper(new ObjectDump::QDumper); dumper->setPrefix("Phonon::MMF"); // to aid searchability of logs ObjectDump::addDefaultAnnotators(*dumper); TRACE_0("Dumping AbstractVideoOutput:"); dumper->dumpObject(*this); #endif } QT_END_NAMESPACE
igor-sfdc/qt-wk
src/3rdparty/phonon/mmf/abstractvideooutput.cpp
C++
lgpl-2.1
5,132
/* * eXist Open Source Native XML Database * Copyright (C) 2001-04 The eXist Project * http://exist-db.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id$ */ package org.exist.xquery; import org.exist.memtree.MemTreeBuilder; import org.exist.memtree.NodeImpl; import org.exist.xquery.util.ExpressionDumper; import org.exist.xquery.value.Item; import org.exist.xquery.value.Sequence; /** * Constructs an in-memory CDATA node. * * @author wolf */ public class CDATAConstructor extends NodeConstructor { private final String cdata; /** * @param context */ public CDATAConstructor(XQueryContext context, String content) { super(context); this.cdata = content; } /* (non-Javadoc) * @see org.exist.xquery.Expression#eval(org.exist.xquery.value.Sequence, org.exist.xquery.value.Item) */ public Sequence eval(Sequence contextSequence, Item contextItem) throws XPathException { if (context.getProfiler().isEnabled()) { context.getProfiler().start(this); context.getProfiler().message(this, Profiler.DEPENDENCIES, "DEPENDENCIES", Dependency.getDependenciesName(this.getDependencies())); if (contextSequence != null) context.getProfiler().message(this, Profiler.START_SEQUENCES, "CONTEXT SEQUENCE", contextSequence); if (contextItem != null) context.getProfiler().message(this, Profiler.START_SEQUENCES, "CONTEXT ITEM", contextItem.toSequence()); } if (newDocumentContext) context.pushDocumentContext(); try { MemTreeBuilder builder = context.getDocumentBuilder(); int nodeNr = builder.cdataSection(cdata); NodeImpl node = builder.getDocument().getNode(nodeNr); if (context.getProfiler().isEnabled()) context.getProfiler().end(this, "", node); return node; } finally { if (newDocumentContext) context.popDocumentContext(); } } /* (non-Javadoc) * @see org.exist.xquery.Expression#analyze(org.exist.xquery.Expression, int) */ public void analyze(AnalyzeContextInfo contextInfo) throws XPathException { super.analyze(contextInfo); } /* (non-Javadoc) * @see org.exist.xquery.Expression#dump(org.exist.xquery.util.ExpressionDumper) */ public void dump(ExpressionDumper dumper) { dumper.display("<![CDATA[").display(cdata).display("]]>"); } public String toString() { return "<![CDATA[" + cdata.toString() + "]]>"; } }
orbeon/eXist-1.4.x
src/org/exist/xquery/CDATAConstructor.java
Java
lgpl-2.1
3,333