├── DIC.as ├── DIC.as3proj ├── DIC.fla ├── Todo.txt ├── TodoGraphics.txt ├── assets ├── pf_ronda_seven.swf └── pf_ronda_seven.ttf ├── bin └── DIC.swf ├── classes ├── ClassDictionary.as ├── ColorDictionary.as ├── PartPool.as ├── SaveTranslator.as ├── ViewerData.as ├── character │ ├── Character.as │ ├── CharacterData.as │ ├── CharacterProperties.as │ ├── PartNames.as │ ├── PartPainter.as │ └── layers │ │ ├── AbstractLayer.as │ │ ├── BackLayer.as │ │ ├── BodyLayer.as │ │ ├── FrontLayer.as │ │ └── ShaderLayer.as ├── components │ ├── CoC_CellRenderer.as │ ├── IViewerComponent.as │ ├── TiTS_CellRenderer.as │ ├── ViewerArrows.as │ ├── ViewerArrowsStyles.as │ ├── ViewerButton.as │ ├── ViewerButtonStyles.as │ ├── ViewerCellRendererStyles.as │ ├── ViewerLabelStyles.as │ ├── ViewerNotes.as │ ├── ViewerPicker.as │ ├── ViewerPickerStyles.as │ ├── ViewerScroll.as │ ├── ViewerScrollStyles.as │ ├── ViewerScrollbar.as │ ├── ViewerScrollbarStyles.as │ ├── ViewerSelect.as │ ├── ViewerSelectStyles.as │ ├── ViewerSlider.as │ ├── ViewerSliderBar.as │ ├── ViewerSliderStyles.as │ └── ViewerTextFormat.as ├── elements │ └── GoblinNPC.as ├── events │ └── NoteEvent.as ├── save │ ├── AssClass.as │ ├── BreastRowClass.as │ ├── CockClass.as │ ├── Creature.as │ ├── ItemSlotClass.as │ ├── KeyItemClass.as │ ├── PerkClass.as │ ├── StatusAffectClass.as │ └── VaginaClass.as └── utils │ ├── ArrayUtils.as │ ├── BitmapUtils.as │ ├── MCUtils.as │ ├── MathUtils.as │ └── ObjectUtils.as ├── com ├── ColorJizz │ ├── AbstractColor.as │ ├── CIELCh.as │ ├── CIELab.as │ ├── CMY.as │ ├── CMYK.as │ ├── HSV.as │ ├── Hex.as │ ├── RGB.as │ ├── XYZ.as │ └── Yxy.as ├── GTween_V2_01.swc ├── Miner.swc ├── MonsterDebugger.swc ├── PNGEncoder2.swc ├── as3commons-collections-1.3.0.swc ├── flexunit-0.90.swc └── sibirjak │ ├── asdpc │ ├── button │ │ ├── Button.as │ │ ├── ButtonEvent.as │ │ ├── ButtonStyles.as │ │ ├── IButton.as │ │ └── skins │ │ │ └── ButtonSkin.as │ ├── core │ │ ├── BindableView.as │ │ ├── Container.as │ │ ├── DisplayObjectAdapter.as │ │ ├── IBindableView.as │ │ ├── IControl.as │ │ ├── IDataRendererSkin.as │ │ ├── IDisplayObject.as │ │ ├── IDisplayObjectContainer.as │ │ ├── ISkin.as │ │ ├── IView.as │ │ ├── Skin.as │ │ ├── View.as │ │ ├── asdpc_internal.as │ │ ├── constants │ │ │ ├── Direction.as │ │ │ ├── Position.as │ │ │ └── Visibility.as │ │ ├── dataprovider │ │ │ ├── DataProviderEvent.as │ │ │ ├── DataProviderEventDispatcher.as │ │ │ ├── DataSourceAdapterFactory.as │ │ │ ├── IDataSourceAdapter.as │ │ │ ├── IMapAdapter.as │ │ │ ├── Index.as │ │ │ ├── adapter │ │ │ │ ├── ArrayAdapter.as │ │ │ │ ├── GenericAdapter.as │ │ │ │ ├── ListAdapter.as │ │ │ │ ├── MapAdapter.as │ │ │ │ ├── SetAdapter.as │ │ │ │ └── XMLAdapter.as │ │ │ └── genericToStringFunction.as │ │ ├── managers │ │ │ ├── BindingManager.as │ │ │ ├── IPopUpControl.as │ │ │ ├── IPopUpControlPopUp.as │ │ │ ├── IStyleManagerClient.as │ │ │ ├── IViewPropertyManagerClient.as │ │ │ ├── StageProxy.as │ │ │ ├── StyleManager.as │ │ │ └── ViewPropertyManager.as │ │ └── skins │ │ │ ├── BackgroundSkin.as │ │ │ └── GlassFrame.as │ ├── listview │ │ ├── IListView.as │ │ ├── ListItemData.as │ │ ├── ListItemEvent.as │ │ ├── ListView.as │ │ ├── ListViewEvent.as │ │ ├── ListViewStyles.as │ │ ├── core │ │ │ ├── IListItemRenderer.as │ │ │ ├── ItemIndexManager.as │ │ │ ├── ListItemRendererData.as │ │ │ ├── ListItemRendererEvent.as │ │ │ └── ListItemRendererPool.as │ │ └── renderer │ │ │ ├── IListItemContent.as │ │ │ ├── ListItemContent.as │ │ │ ├── ListItemContentStyles.as │ │ │ ├── ListItemIcon.as │ │ │ ├── ListItemIconStyles.as │ │ │ ├── ListItemRenderer.as │ │ │ ├── ListItemRendererStyles.as │ │ │ ├── assets │ │ │ └── document.png │ │ │ └── skins │ │ │ └── ListItemBackgroundSkin.as │ ├── scrollbar │ │ ├── IScrollBar.as │ │ ├── ScrollBar.as │ │ ├── ScrollBarStyles.as │ │ ├── ScrollEvent.as │ │ ├── core │ │ │ └── Thumb.as │ │ └── skins │ │ │ ├── ScrollButtonIconSkin.as │ │ │ ├── ScrollThumbIconSkin.as │ │ │ └── ScrollTrackSkin.as │ ├── textfield │ │ ├── ILabel.as │ │ ├── ITextInput.as │ │ ├── Label.as │ │ ├── LabelEvent.as │ │ ├── LabelStyles.as │ │ ├── TextInput.as │ │ ├── TextInputEvent.as │ │ ├── TextInputStyles.as │ │ └── core │ │ │ ├── ITextField.as │ │ │ ├── TextFieldBase.as │ │ │ └── TextFieldBaseStyles.as │ ├── tooltip │ │ ├── ToolTip.as │ │ ├── core │ │ │ └── ToolTipLabel.as │ │ └── skins │ │ │ └── ToolTipSkin.as │ └── treeview │ │ ├── ITreeView.as │ │ ├── TreeNodeData.as │ │ ├── TreeNodeEvent.as │ │ ├── TreeView.as │ │ ├── TreeViewEvent.as │ │ ├── TreeViewStyles.as │ │ ├── constants │ │ └── TreeNodeState.as │ │ ├── core │ │ ├── IListDataProvider.as │ │ ├── ITreeNode.as │ │ ├── ITreeNodeRenderer.as │ │ ├── ListDataProvider.as │ │ ├── TreeNode.as │ │ ├── TreeNodeRendererData.as │ │ └── TreeNodeRendererEvent.as │ │ └── renderer │ │ ├── Connector.as │ │ ├── ConnectorContainer.as │ │ ├── DirectoryIcon.as │ │ ├── DirectoryIconStyles.as │ │ ├── DisclosureButton.as │ │ ├── IConnectorSkin.as │ │ ├── TreeNodeRenderer.as │ │ ├── TreeNodeRendererStyles.as │ │ ├── assets │ │ ├── document.png │ │ ├── folder.png │ │ └── folder_open.png │ │ └── skins │ │ ├── BaseConnectorSkin.as │ │ ├── DisclosureButtonArrowIconSkin.as │ │ ├── DisclosureButtonBoxIconSkin.as │ │ ├── DottedConnectorSkin.as │ │ └── SolidConnectorSkin.as │ └── asdpcbeta │ ├── checkbox │ ├── CheckBox.as │ └── skins │ │ ├── CheckBoxIconSkin.as │ │ └── CheckBoxSkin.as │ ├── colorpicker │ ├── ColorPicker.as │ ├── ColorPickerEvent.as │ ├── assets │ │ ├── button_open_icon.png │ │ └── color_swatch.png │ ├── core │ │ ├── ColorPickerWindow.as │ │ ├── ColorPickerWindowContent.as │ │ ├── ColorPreview.as │ │ ├── ColorSwatch.as │ │ ├── ColorSwatchBorder.as │ │ ├── ColorUtil.as │ │ ├── Palette.as │ │ └── SwatchChart.as │ └── skins │ │ └── ColorPickerIconSkin.as │ ├── core │ └── managers │ │ └── PopUpManager.as │ ├── layout │ ├── AbstractLayout.as │ ├── GridLayout.as │ ├── GridLayoutStyles.as │ ├── HLayout.as │ ├── HLayoutStyles.as │ ├── LayoutStyles.as │ ├── VLayout.as │ └── VLayoutStyles.as │ ├── radiobutton │ ├── IRadioButton.as │ ├── RadioButton.as │ ├── RadioGroup.as │ ├── RadioGroupEvent.as │ └── skins │ │ ├── RadioButtonIconSkin.as │ │ └── RadioButtonSkin.as │ ├── scrollbar │ ├── IScrollPane.as │ ├── ScrollPane.as │ └── ScrollPaneStyles.as │ ├── selectbox │ ├── SelectBox.as │ ├── SelectBoxEvent.as │ ├── SelectBoxStyles.as │ ├── assets │ │ └── button_open_icon.png │ ├── core │ │ └── SelectBoxWindow.as │ └── skins │ │ └── SelectBoxListSkin.as │ ├── slider │ ├── Slider.as │ ├── SliderEvent.as │ ├── SliderStyles.as │ ├── core │ │ └── SliderThumb.as │ └── skins │ │ ├── SliderThumbSkin.as │ │ └── SliderTrackSkin.as │ ├── tabbar │ ├── TabBar.as │ ├── TabBarStyles.as │ ├── TabItem.as │ └── skins │ │ └── TabItemSkin.as │ └── window │ ├── Window.as │ ├── WindowEvent.as │ ├── WindowStyles.as │ ├── core │ ├── ITitleBar.as │ ├── TitleBar.as │ └── WindowPosition.as │ └── skins │ ├── MinimiseIconSkin.as │ ├── TitleBarSkin.as │ ├── WindowSkin.as │ ├── minimise.gif │ └── window.gif ├── data ├── CoC_Defaulter.json ├── CoC_Dictionary.json ├── DIC_BitsColor.json ├── DIC_ChildrenNames.json ├── DIC_Cycler.json ├── DIC_EyesColor.json ├── DIC_HairColor.json ├── DIC_SkinColor.json ├── Defaulter.txt ├── TiTS_Defaulter.json └── TiTS_Dictionary.json ├── doc └── Documention.odt ├── filters ├── AlphaMixer.pbj └── AlphaShader.pbj ├── includes ├── communication.as ├── elements.as ├── events.as ├── menus.as ├── save.as └── screenshots.as └── obj └── pmd.old /DIC.fla: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fenoxo/CharacterViewer/c43ceebe47241e30fe7639c3e9f7ed9205d0242a/DIC.fla -------------------------------------------------------------------------------- /assets/pf_ronda_seven.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fenoxo/CharacterViewer/c43ceebe47241e30fe7639c3e9f7ed9205d0242a/assets/pf_ronda_seven.swf -------------------------------------------------------------------------------- /assets/pf_ronda_seven.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fenoxo/CharacterViewer/c43ceebe47241e30fe7639c3e9f7ed9205d0242a/assets/pf_ronda_seven.ttf -------------------------------------------------------------------------------- /bin/DIC.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fenoxo/CharacterViewer/c43ceebe47241e30fe7639c3e9f7ed9205d0242a/bin/DIC.swf -------------------------------------------------------------------------------- /classes/ViewerData.as: -------------------------------------------------------------------------------- 1 | package classes 2 | { 3 | /** 4 | * Passed as an argument to characters and layers to give them access 5 | * to the dictionnaries, the pool, and the translator. 6 | * @author Sbaf 7 | */ 8 | public class ViewerData 9 | { 10 | [Embed(source = "./../data/CoC_Dictionary.json", mimeType='application/octet-stream')] 11 | private static var CoC_Class_JSON:Class; 12 | [Embed(source = "./../data/CoC_Defaulter.json", mimeType='application/octet-stream')] 13 | private static var CoC_Default_JSON:Class; 14 | [Embed(source = "./../data/TiTS_Dictionary.json", mimeType='application/octet-stream')] 15 | private static var TiTS_Class_JSON:Class; 16 | [Embed(source = "./../data/TiTS_Defaulter.json", mimeType='application/octet-stream')] 17 | private static var TiTS_Default_JSON:Class; 18 | [Embed(source = "./../data/DIC_Cycler.json", mimeType='application/octet-stream')] 19 | private static var DIC_Cycler_JSON:Class; 20 | 21 | private static var initialized:Boolean = false; 22 | 23 | private var CoCDict:ClassDictionary; 24 | private var TiTSDict:ClassDictionary; 25 | public var classDict:ClassDictionary; 26 | public var colorDict:ColorDictionary; 27 | public var translator:SaveTranslator; 28 | public var partPool:PartPool; 29 | 30 | public var isTiTS:Boolean = false; 31 | 32 | /** 33 | * Initialize a new ViewerData instance. Since the JSON classes are set to null, 34 | * it should not and cannot not be initialized twice. 35 | */ 36 | public function ViewerData() 37 | { 38 | if (initialized) 39 | throw new Error("Viewer Data cannot be instanciated twice."); 40 | initialized = true; 41 | } 42 | 43 | /** 44 | * Will create, initialize and store every global elements, 45 | * like the pool, the dictionaries and the translator. 46 | * Will set the JSON classes to null for garbadge collecting. 47 | */ 48 | public function init() 49 | { 50 | partPool = new PartPool(); 51 | colorDict = new ColorDictionary(); 52 | colorDict.init(); 53 | translator = new SaveTranslator(); 54 | 55 | CoCDict = new ClassDictionary(CoC_Class_JSON, CoC_Default_JSON, DIC_Cycler_JSON, partPool); 56 | TiTSDict = new ClassDictionary(TiTS_Class_JSON, TiTS_Default_JSON, DIC_Cycler_JSON, partPool); 57 | 58 | setMode(false); 59 | 60 | CoC_Class_JSON = null; 61 | CoC_Default_JSON = null; 62 | TiTS_Class_JSON = null; 63 | TiTS_Default_JSON = null; 64 | DIC_Cycler_JSON = null; 65 | } 66 | 67 | /** 68 | * Changes the active dictionary. 69 | * @param isTiTS 70 | */ 71 | public function setMode(isTiTS):void 72 | { 73 | if (isTiTS) 74 | { 75 | classDict = TiTSDict; 76 | } 77 | else 78 | { 79 | classDict = CoCDict; 80 | } 81 | this.isTiTS = isTiTS; 82 | } 83 | } 84 | } -------------------------------------------------------------------------------- /classes/character/CharacterData.as: -------------------------------------------------------------------------------- 1 | package classes.character { 2 | 3 | import classes.save.Creature; 4 | 5 | /** 6 | * Contains object used only by a particular Character object and its children. 7 | * All those objects are set with the Character object and disposed with it, 8 | * the exception being the player object, which may be used by other characters 9 | * after being reseted. It should not be used in any way after drawing and coloring. 10 | * @author 11 | */ 12 | public class CharacterData 13 | { 14 | public var painter:PartPainter;//The character's PartPainter instance 15 | public var player:Creature;//The global player instance, set to null after drawing 16 | public var prop:CharacterProperties;//The character's properties object. 17 | 18 | /** 19 | * Returns a new CharacterData instance, creates a new CharacterProperties instance. 20 | * @param The character's PartPainter instance. 21 | * @param The global player instance. 22 | */ 23 | public function CharacterData(partPainter:PartPainter, player:Creature) 24 | { 25 | this.painter = partPainter; 26 | this.player = player; 27 | this.prop = new CharacterProperties(player); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /classes/character/CharacterProperties.as: -------------------------------------------------------------------------------- 1 | package classes.character 2 | { 3 | import classes.save.Creature; 4 | /** 5 | * Contains the characters properties, used for various purpose, like deciding 6 | * if the clit slider should be enabled, or getting the femininity index for part creating. 7 | * @author 8 | */ 9 | public class CharacterProperties 10 | { 11 | public var playerName:String;//The name of the player 12 | 13 | public var finishedDrawing:Boolean = false;//If the character is finished drawing 14 | //If true, any modification should induce recoloring and/or shader invalidating. 15 | 16 | public var heightMod:Number;//The ratio by which to multiply any value in inch. 17 | public var tallness:Number;//The tallness of the character in inch. 18 | public var realBallSize:Number;//The unlimited, scaled ball size. 19 | public var realClitSize:Number;//The unlimited, scale clit size. 20 | 21 | public var masculine:int;//1 if femininity < 50, 0 elsewise. 22 | public var hasBalls:Boolean;//If the character has balls. 23 | public var hasVag:Boolean;//If the character has a vagina 24 | public var hasClit:Boolean;//If the character has a clit 25 | public var hasBigBalls:Boolean;//If the character has scalable balls. 26 | public var hasBigClit:Boolean;//If the character has a scalable clit. 27 | 28 | public var skinColor:String;//The character's skin color name. 29 | public var hairColor:String;//The character's hair color name. 30 | public var eyeColor:String;//The character's eye color name. 31 | //"Random" if to be randomized next time the character is colored. 32 | //"Defined" if not to be modified but by the eyeTint setter. 33 | public var skinType:int; //The character's skin type ID. 34 | 35 | public function CharacterProperties(player:Creature) 36 | { 37 | playerName = player.short; 38 | 39 | tallness = player.tallness; 40 | heightMod = 82 / tallness; 41 | realBallSize = player.ballSize * heightMod; 42 | realClitSize = player.clitLength * heightMod; 43 | 44 | masculine = (player.femininity < 50) ? 1 : 0; 45 | hasBalls = player.balls > 0; 46 | hasBigBalls = (realBallSize >= 8) && hasBalls; 47 | hasVag = player.vaginas.length > 0; 48 | 49 | skinType = player.skinType; 50 | eyeColor = player.eyeColor; 51 | skinColor = player.skinTone; 52 | hairColor = player.hairColor; 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /classes/character/PartNames.as: -------------------------------------------------------------------------------- 1 | package classes.character 2 | { 3 | /** 4 | * Used to store a part's children names. 5 | * @author Sbaf 6 | */ 7 | public class PartNames 8 | { 9 | public var SF:String;//Skin fill 10 | public var SS:String;//Skin shad 11 | public var HF:String;//Hair fill 12 | public var HS:String;//Hair shad 13 | public var BF:String;//Bits fill 14 | public var BS:String;//Bits shad 15 | public var EF:String;//Eyes fill 16 | 17 | public function PartNames(names:Object) 18 | { 19 | this.SF = names.SF; 20 | this.SS = names.SS; 21 | this.HF = names.HF; 22 | this.HS = names.HS; 23 | this.BF = names.BF; 24 | this.BS = names.BS; 25 | this.EF = names.EF; 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /classes/character/layers/BackLayer.as: -------------------------------------------------------------------------------- 1 | package classes.character.layers 2 | { 3 | import classes.character.CharacterData; 4 | import classes.utils.MCUtils 5 | import classes.ViewerData; 6 | import flash.display.MovieClip; 7 | import flash.display.Sprite; 8 | 9 | /** 10 | * The layer containing the "hairBack" and "tail" parts. 11 | * This layer is not shaded. 12 | * @author 13 | */ 14 | public class BackLayer extends AbstractLayer 15 | { 16 | public static const tailNames:Array = ["tail_0", "tail_1", "tail_2", "tail_3", "tail_4", "tail_5", "tail_6", "tail_7", "tail_8"]; 17 | 18 | public function BackLayer(viewerData:ViewerData, characterData:CharacterData) 19 | { 20 | super(viewerData, characterData); 21 | } 22 | 23 | override public function drawLayer():void 24 | { 25 | addTails(); 26 | addBackHair(); 27 | super.drawLayer(); 28 | } 29 | 30 | /** 31 | * Add a tail or, if the player is a kitsune, adds the necessary number of tails and rotate them. 32 | * Utimately to be replaced with 10 fox tail types for each possible number tails. 33 | */ 34 | private function addTails():void 35 | { 36 | if (player.tailType == 13 && !isTiTS) 37 | { 38 | var len:int = Math.min(player.tailVenom, 9); 39 | 40 | for ( var u:int = 0; u < len; u++) 41 | { 42 | var foundPart:MovieClip = classDict.findPart("tail", player.tailType); 43 | 44 | if (u % 4 == 0) MCUtils.scale(foundPart.MC); 45 | if (u % 4 == 1) MCUtils.scale(foundPart.MC, 1.0, -1.0); 46 | if (u % 4 == 2) MCUtils.scale(foundPart.MC, -1.0, 1.0); 47 | if (u % 4 == 3) MCUtils.scale(foundPart.MC, -1.0); 48 | 49 | var rot:Number = ((Math.random() * 10) -5) * len; 50 | 51 | foundPart.MC.rotation = rot; 52 | painter.addPart(tailNames[u], foundPart); 53 | addChild(foundPart); 54 | } 55 | } 56 | else 57 | { 58 | foundPart = classDict.findPart("tail", player.tailType); 59 | painter.addPart("tail", foundPart); 60 | addChild(foundPart); 61 | } 62 | } 63 | 64 | /** 65 | * Adds the character back hair piece. 66 | */ 67 | private function addBackHair():void 68 | { 69 | var n:int = translator.getRealHairIndex(player.hairLength); 70 | 71 | var foundPart:MovieClip = classDict.findPart("hair", n, 0, 1); 72 | addChild(foundPart); 73 | painter.addPart("hairBack", foundPart); 74 | } 75 | } 76 | } -------------------------------------------------------------------------------- /classes/character/layers/FrontLayer.as: -------------------------------------------------------------------------------- 1 | package classes.character.layers 2 | { 3 | import classes.character.CharacterData; 4 | import classes.ViewerData; 5 | import flash.display.MovieClip; 6 | import flash.display.Sprite; 7 | 8 | /** 9 | * The uppermost layer. Contains hairFront and ears, will contain eyes and horns when added. 10 | * THis layer is not shaded. 11 | * @author 12 | */ 13 | public class FrontLayer extends AbstractLayer 14 | { 15 | 16 | public function FrontLayer(viewerData:ViewerData, characterData:CharacterData) 17 | { 18 | super(viewerData, characterData); 19 | } 20 | 21 | override public function drawLayer():void 22 | { 23 | //addPart("eyes", player.eyeType); 24 | addFrontHair(); 25 | //addHorns(); 26 | addEars(); 27 | super.drawLayer(); 28 | } 29 | 30 | private function addFrontHair():void 31 | { 32 | var n:int = translator.getRealHairIndex(player.hairLength); 33 | 34 | var foundPart:MovieClip = classDict.findPart("hair", n, 0, 0); 35 | painter.addPart("hairFront", foundPart); 36 | addChild(foundPart); 37 | } 38 | 39 | private function addEars():void 40 | { 41 | var u:int = int(player.hairLength > 10); 42 | var foundPart:MovieClip = classDict.findPart("ears", player.earType, 0, u); 43 | painter.addPart("ears", foundPart); 44 | addChild(foundPart); 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /classes/components/CoC_CellRenderer.as: -------------------------------------------------------------------------------- 1 | package classes.components 2 | { 3 | import fl.controls.listClasses.CellRenderer; 4 | import flash.text.TextFormat; 5 | import flash.display.Sprite; 6 | 7 | 8 | public class CoC_CellRenderer extends CellRenderer 9 | { 10 | public function CoC_CellRenderer() 11 | { 12 | this.setStyle("embedFonts", true); 13 | this.setStyle("upSkin", CoC_CellRenderer_upSkin); 14 | this.setStyle("overSkin", CoC_CellRenderer_downSkin); 15 | this.setStyle("downSkin", CoC_CellRenderer_downSkin); 16 | this.setStyle("disabledSkin", Sprite); 17 | this.setStyle("selectedUpSkin", CoC_CellRenderer_downSkin); 18 | this.setStyle("selectedOverSkin", CoC_CellRenderer_downSkin); 19 | this.setStyle("selectedDownSkin", CoC_CellRenderer_downSkin); 20 | this.setStyle("selectedDisabledSkin", Sprite); 21 | } 22 | } 23 | } 24 | /*public function CoC_CellRenderer() 25 | { 26 | this.setStyle("upSkin", CoC_CellRenderer_upSkin); 27 | this.setStyleArray(CellRendererStyles.CoC_rendererStyle); 28 | super(); 29 | } 30 | 31 | public function setStyleArray(styles:Array) 32 | { 33 | for (var i:int = 0; i < styles.length; i += 2) 34 | { 35 | this.setStyle(styles[i], styles[i + 1]); 36 | } 37 | }*/ -------------------------------------------------------------------------------- /classes/components/IViewerComponent.as: -------------------------------------------------------------------------------- 1 | package classes.components 2 | { 3 | import com.sibirjak.asdpc.core.IDisplayObject; 4 | 5 | /** 6 | * The interface contains the declaration of functions 7 | * common to every single viewer components. 8 | * It is necessary to have a variable able to contain 9 | * every viewer components. 10 | * @author 11 | */ 12 | public interface IViewerComponent 13 | { 14 | function get x():Number; 15 | function get y():Number; 16 | function get name():String; 17 | function set x(value:Number):void; 18 | function set y(value:Number):void; 19 | function set name(value:String):void; 20 | function setMode(isTiTS:Boolean):void; 21 | function setCompSize(width:Number, height:Number):void; 22 | } 23 | } -------------------------------------------------------------------------------- /classes/components/TiTS_CellRenderer.as: -------------------------------------------------------------------------------- 1 | package classes.components 2 | { 3 | import fl.controls.listClasses.CellRenderer; 4 | import flash.text.TextFormat; 5 | import flash.display.Sprite; 6 | 7 | public class TiTS_CellRenderer extends CellRenderer 8 | { 9 | public function TiTS_CellRenderer() 10 | { 11 | this.setStyle("embedFonts", true); 12 | this.setStyle("textFormat", ViewerTextFormat.TiTSFormat); 13 | this.setStyle("disabledTextFormat", ViewerTextFormat.TiTSFormat); 14 | 15 | this.setStyle("upSkin", Sprite); 16 | this.setStyle("overSkin", TiTS_CellRenderer_downSkin); 17 | this.setStyle("downSkin", TiTS_CellRenderer_downSkin); 18 | this.setStyle("disabledSkin", Sprite); 19 | this.setStyle("selectedUpSkin", TiTS_CellRenderer_downSkin); 20 | this.setStyle("selectedOverSkin", TiTS_CellRenderer_downSkin); 21 | this.setStyle("selectedDownSkin", TiTS_CellRenderer_downSkin); 22 | this.setStyle("selectedDisabledSkin", Sprite); 23 | } 24 | } 25 | } 26 | /*public function TiTS_CellRenderer() 27 | { 28 | this.setStyleArray(CellRendererStyles.TiTS_rendererStyle); 29 | super(); 30 | } 31 | 32 | public function setStyleArray(styles:Array) 33 | { 34 | for (var i:int = 0; i < styles.length; i += 2) 35 | { 36 | this.setStyle(styles[i], styles[i + 1]); 37 | } 38 | }*/ -------------------------------------------------------------------------------- /classes/components/ViewerArrowsStyles.as: -------------------------------------------------------------------------------- 1 | package classes.components 2 | { 3 | /** 4 | * ... 5 | * @author 6 | */ 7 | public class ViewerArrowsStyles 8 | { 9 | public static const CoC_arrowLeftStyle:Array = 10 | [ 11 | "button_upSkin", CoC_ArrowLeft_upSkin, 12 | "button_downSkin", CoC_ArrowLeft_downSkin, 13 | "button_overSkin", CoC_ArrowLeft_overSkin, 14 | "button_disabledSkin", CoC_ArrowLeft_downSkin, 15 | "button_autoRepeatDelay", 500, 16 | "button_autoRepeatRate", 100 17 | ]; 18 | 19 | public static const CoC_arrowRightStyle:Array = 20 | [ 21 | "button_upSkin", CoC_ArrowRight_upSkin, 22 | "button_downSkin", CoC_ArrowRight_downSkin, 23 | "button_overSkin", CoC_ArrowRight_overSkin, 24 | "button_disabledSkin", CoC_ArrowRight_downSkin, 25 | "button_autoRepeatDelay", 500, 26 | "button_autoRepeatRate", 100 27 | ]; 28 | 29 | public static const TiTS_arrowLeftStyle:Array = 30 | [ 31 | "button_upSkin", TiTS_ArrowLeft_upSkin, 32 | "button_downSkin", TiTS_ArrowLeft_downSkin, 33 | "button_overSkin", TiTS_ArrowLeft_overSkin, 34 | "button_disabledSkin", TiTS_ArrowLeft_downSkin, 35 | "button_autoRepeatDelay", 500, 36 | "button_autoRepeatRate", 100 37 | ]; 38 | 39 | public static const TiTS_arrowRightStyle:Array = 40 | [ 41 | "button_upSkin", TiTS_ArrowRight_upSkin, 42 | "button_downSkin", TiTS_ArrowRight_downSkin, 43 | "button_overSkin", TiTS_ArrowRight_overSkin, 44 | "button_disabledSkin", TiTS_ArrowRight_downSkin, 45 | "button_autoRepeatDelay", 500, 46 | "button_autoRepeatRate", 100 47 | ]; 48 | } 49 | } -------------------------------------------------------------------------------- /classes/components/ViewerButtonStyles.as: -------------------------------------------------------------------------------- 1 | package classes.components 2 | { 3 | /** 4 | * ... 5 | * @author ... 6 | */ 7 | internal class ViewerButtonStyles 8 | { 9 | public static const TiTS_buttonStyle:Array = [ 10 | "button_upSkin", TiTS_Button_upSkin, 11 | "button_downSkin", TiTS_Button_downSkin, 12 | "button_overSkin", TiTS_Button_overSkin, 13 | "button_disabledSkin", TiTS_Button_downSkin, 14 | "button_autoRepeatDelay", 500, 15 | "button_autoRepeatRate", 100 16 | ]; 17 | 18 | public static const CoC_buttonStyle:Array = [ 19 | "button_upSkin", CoC_Button_upSkin, 20 | "button_downSkin", CoC_Button_downSkin, 21 | "button_overSkin", CoC_Button_overSkin, 22 | "button_disabledSkin", CoC_Button_downSkin, 23 | "button_autoRepeatDelay", 500, 24 | "button_autoRepeatRate", 100 25 | ]; 26 | } 27 | } -------------------------------------------------------------------------------- /classes/components/ViewerCellRendererStyles.as: -------------------------------------------------------------------------------- 1 | package classes.components 2 | { 3 | import flash.display.Sprite; 4 | 5 | /** 6 | * ... 7 | * @author 8 | */ 9 | public class ViewerCellRendererStyles 10 | { 11 | public static const CoC_rendererStyle:Array = [ 12 | "embedFonts", true, 13 | "upSkin", CoC_CellRenderer_upSkin, 14 | "overSkin", CoC_CellRenderer_downSkin, 15 | "downSkin", CoC_CellRenderer_downSkin, 16 | "disabledSkin", Sprite, 17 | "selectedUpSkin", CoC_CellRenderer_downSkin, 18 | "selectedOverSkin", CoC_CellRenderer_downSkin, 19 | "selectedDownSkin", CoC_CellRenderer_downSkin, 20 | "selectedDisabledSkin", Sprite 21 | ]; 22 | 23 | public static const TiTS_rendererStyle:Array = [ 24 | "embedFonts", true, 25 | "upSkin", Sprite, 26 | "overSkin", TiTS_CellRenderer_downSkin, 27 | "downSkin", TiTS_CellRenderer_downSkin, 28 | "disabledSkin", Sprite, 29 | "selectedUpSkin", TiTS_CellRenderer_downSkin, 30 | "selectedOverSkin", TiTS_CellRenderer_downSkin, 31 | "selectedDownSkin", TiTS_CellRenderer_downSkin, 32 | "selectedDisabledSkin", Sprite 33 | ]; 34 | } 35 | } -------------------------------------------------------------------------------- /classes/components/ViewerLabelStyles.as: -------------------------------------------------------------------------------- 1 | package classes.components 2 | { 3 | import flash.text.AntiAliasType; 4 | 5 | /** 6 | * ... 7 | * @author ... 8 | */ 9 | public class ViewerLabelStyles 10 | { 11 | public static const base_labelStyle:Array = [ 12 | "label_horizontalAlign", "center", 13 | "label_verticalAlign", "middle", 14 | "label_fittingMode", "scale" 15 | ]; 16 | 17 | public static const TiTS_labelStyle:Array = [ 18 | "textFieldBase_antiAliasType", AntiAliasType.ADVANCED, 19 | "textFieldBase_embedFont", false, 20 | "textFieldBase_color", 0xFFFFFF, 21 | "textFieldBase_font", new TiTS_Font().fontName, 22 | "textFieldBase_size", 20 23 | ]; 24 | 25 | public static const CoC_labelStyle:Array = [ 26 | "textFieldBase_antiAliasType", AntiAliasType.ADVANCED, 27 | "textFieldBase_embedFont", false, 28 | "textFieldBase_color", 0x000000, 29 | "textFieldBase_font", new CoC_Font().fontName, 30 | "textFieldBase_size", 20 31 | ]; 32 | } 33 | } -------------------------------------------------------------------------------- /classes/components/ViewerNotes.as: -------------------------------------------------------------------------------- 1 | package classes.components 2 | { 3 | import flash.display.Sprite; 4 | import flash.text.AntiAliasType; 5 | import flash.text.TextField; 6 | import flash.text.TextFormat; 7 | 8 | /** 9 | * ... 10 | * @author 11 | */ 12 | public class ViewerNotes extends Sprite 13 | { 14 | private var notes:TextField; 15 | private var scrollBar:ViewerScrollbar; 16 | 17 | public function ViewerNotes() 18 | { 19 | notes = new TextField(); 20 | notes.wordWrap = true; 21 | notes.antiAliasType = AntiAliasType.ADVANCED; 22 | notes.sharpness = 100; 23 | notes.thickness = 100; 24 | this.addChild(notes); 25 | 26 | scrollBar = new ViewerScrollbar(notes); 27 | this.addChild(scrollBar); 28 | this.setCompSize(210, 310); 29 | } 30 | 31 | public function toNote(note:String = "", isToAdd:Boolean = false):void 32 | { 33 | if (!notes) 34 | { 35 | throw new Error("Note cannot be null. Check the menu note declaration."); 36 | } 37 | if (isToAdd && notes.text != "") 38 | { 39 | scrollBar.scrollPosition = scrollBar.maxScrollPosition; 40 | notes.text.concat("\r\r", note); 41 | } 42 | else 43 | { 44 | scrollBar.scrollPosition = scrollBar.minScrollPosition; 45 | notes.text = note; 46 | } 47 | scrollBar.update(); 48 | } 49 | 50 | public function setMode(isTiTS:Boolean):void 51 | { 52 | notes.defaultTextFormat = (isTiTS) ? ViewerTextFormat.TiTSNotesFormat : ViewerTextFormat.CoCNotesFormat; 53 | 54 | scrollBar.setMode(isTiTS); 55 | } 56 | 57 | public function setCompSize(_width:Number, _height:Number):void 58 | { 59 | notes.width = _width; 60 | notes.height = _height; 61 | 62 | scrollBar.width = 13; 63 | scrollBar.height = _height + 20; 64 | scrollBar.x = _width; 65 | scrollBar.y = -13; 66 | } 67 | } 68 | } -------------------------------------------------------------------------------- /classes/components/ViewerPicker.as: -------------------------------------------------------------------------------- 1 | package classes.components 2 | { 3 | import fl.controls.ColorPicker; 4 | import fl.events.ColorPickerEvent; 5 | import flash.events.Event; 6 | 7 | /** 8 | * ... 9 | * @author 10 | */ 11 | public class ViewerPicker extends ColorPicker implements IViewerComponent 12 | { 13 | public var action:Function; 14 | public var argument:String; 15 | 16 | public function ViewerPicker(action:Function = null, argument:String = null) 17 | { 18 | super(); 19 | this.setSize(140, 36); 20 | 21 | this.action = action; 22 | this.argument = argument; 23 | this.editable = false; 24 | this.showTextField = false; 25 | 26 | this.addEventListener(ColorPickerEvent.CHANGE, onChange); 27 | this.addEventListener(Event.REMOVED_FROM_STAGE, onRemoved); 28 | } 29 | 30 | private function onChange(event:ColorPickerEvent = null):void 31 | { 32 | if ((action) != null) 33 | { 34 | if (argument) 35 | { 36 | action(argument, event.color); 37 | } 38 | else 39 | { 40 | action(event.color); 41 | } 42 | } 43 | } 44 | 45 | private function onRemoved(event:Event = null):void 46 | { 47 | this.removeEventListener(ColorPickerEvent.CHANGE, onChange); 48 | this.removeEventListener(Event.REMOVED_FROM_STAGE, onRemoved); 49 | } 50 | 51 | public function setMode(isTiTS:Boolean):void 52 | { 53 | if (isTiTS) 54 | { 55 | this.setStyleArray(ViewerPickerStyles.TiTS_pickerStyle); 56 | } 57 | else 58 | { 59 | this.setStyleArray(ViewerPickerStyles.CoC_pickerStyle); 60 | } 61 | } 62 | 63 | public function setCompSize(width:Number, height:Number):void 64 | { 65 | this.setSize(width, height); 66 | } 67 | 68 | public function setStyleArray(styles:Array):void 69 | { 70 | for (var i:int = 0; i < styles.length; i += 2) 71 | { 72 | this.setStyle(styles[i], styles[i + 1]); 73 | } 74 | } 75 | } 76 | } -------------------------------------------------------------------------------- /classes/components/ViewerPickerStyles.as: -------------------------------------------------------------------------------- 1 | package classes.components 2 | { 3 | import com.sibirjak.asdpc.button.Button; 4 | /** 5 | * ... 6 | * @author ... 7 | */ 8 | internal class ViewerPickerStyles 9 | { 10 | public static var TiTS_pickerStyle:Array = [ 11 | "upSkin", TiTS_ColorPicker_upSkin, 12 | "downSkin", TiTS_ColorPicker_downSkin, 13 | "overSkin", TiTS_ColorPicker_overSkin, 14 | "disabledSkin", null, 15 | 16 | "colorWell", TiTS_ColorPicker_colorWell, 17 | "background", TiTS_ColorPicker_backgroundSkin, 18 | "swatchSkin", TiTS_ColorPicker_swatchSkin, 19 | "swatchSelectedSkin", TiTS_ColorPicker_swatchSelectedSkin, 20 | "textFieldSkin", null, 21 | "focusRectSkin", null, 22 | 23 | "backgroundPadding", 10, 24 | "swatchPadding", 0, 25 | "swatchHeight", 20, 26 | "swatchWidth", 20, 27 | "columnCount", 36 28 | ]; 29 | 30 | public static var CoC_pickerStyle:Array = [ 31 | "upSkin", CoC_ColorPicker_upSkin, 32 | "downSkin", CoC_ColorPicker_downSkin, 33 | "overSkin", CoC_ColorPicker_overSkin, 34 | "disabledSkin", null, 35 | 36 | "colorWell", CoC_ColorPicker_colorWell, 37 | "background", CoC_ColorPicker_backgroundSkin, 38 | "swatchSkin", CoC_ColorPicker_swatchSkin, 39 | "swatchSelectedSkin", CoC_ColorPicker_swatchSelectedSkin, 40 | "textFieldSkin", null, 41 | "focusRectSkin", null, 42 | 43 | "backgroundPadding", 10, 44 | "swatchPadding", 0, 45 | "swatchHeight", 20, 46 | "swatchWidth", 20, 47 | "columnCount", 36 48 | ]; 49 | } 50 | } -------------------------------------------------------------------------------- /classes/components/ViewerScrollStyles.as: -------------------------------------------------------------------------------- 1 | package classes.components 2 | { 3 | import flash.display.Sprite; 4 | /** 5 | * ... 6 | * @author 7 | */ 8 | public class ViewerScrollStyles 9 | { 10 | public static const TiTS_scrollStyles:Array = 11 | [ 12 | "skin", TiTS_List_skin, 13 | "contentPadding", 1, 14 | "focusRectSkin", Sprite, 15 | "cellRenderer", TiTS_CellRenderer, 16 | 17 | "thumbIcon", Sprite, 18 | "thumbUpSkin", TiTS_CB_ScrollThumb, 19 | "thumbDownSkin", TiTS_CB_ScrollThumb, 20 | "thumbOverSkin", TiTS_CB_ScrollThumb, 21 | "thumbDisabledSkin", TiTS_CB_ScrollThumb, 22 | 23 | "trackUpSkin", Sprite, 24 | "trackDownSkin", Sprite, 25 | "trackOverSkin", Sprite, 26 | "trackDisabledSkin", Sprite, 27 | 28 | "upArrowUpSkin", Sprite, 29 | "upArrowDownSkin", Sprite, 30 | "upArrowOverSkin", Sprite, 31 | "upArrowDisabledSkin", Sprite, 32 | 33 | "downArrowUpSkin", Sprite, 34 | "downArrowDownSkin", Sprite, 35 | "downArrowOverSkin", Sprite, 36 | "downArrowDisabledSkin", Sprite 37 | ]; 38 | } 39 | } -------------------------------------------------------------------------------- /classes/components/ViewerScrollbar.as: -------------------------------------------------------------------------------- 1 | package classes.components 2 | { 3 | import com.sibirjak.asdpc.button.Button; 4 | import com.sibirjak.asdpc.scrollbar.ScrollBar; 5 | import fl.controls.UIScrollBar; 6 | import flash.display.DisplayObject; 7 | import flash.events.Event; 8 | 9 | /** 10 | * ... 11 | * @author 12 | */ 13 | public class ViewerScrollbar extends UIScrollBar 14 | { 15 | private var _mode:int = -1; 16 | 17 | public function ViewerScrollbar(owner:DisplayObject) 18 | { 19 | super(); 20 | this.scrollTarget = owner; 21 | } 22 | 23 | public function setMode(isTiTS:Boolean):void 24 | { 25 | if (isTiTS && _mode == 0) 26 | { 27 | this.setStyleArray(ViewerScrollbarStyles.TiTS_scrollbarStyle); 28 | this.height += 32; 29 | this.y -= 15; 30 | this.x += 2; 31 | _mode = 1; 32 | } 33 | else if (!isTiTS && _mode != 0) 34 | { 35 | this.setStyleArray(ViewerScrollbarStyles.CoC_scrollbarStyle); 36 | this.height -= 32; 37 | this.y += 15; 38 | this.x -= 2; 39 | _mode = 0; 40 | } 41 | } 42 | 43 | public function setCompSize(width:Number, height:Number):void 44 | { 45 | this.setSize(width, height); 46 | } 47 | 48 | public function setStyleArray(styles:Array) 49 | { 50 | for (var i:int = 0; i < styles.length; i += 2) 51 | { 52 | this.setStyle(styles[i], styles[i + 1]); 53 | } 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /classes/components/ViewerScrollbarStyles.as: -------------------------------------------------------------------------------- 1 | package classes.components 2 | { 3 | import flash.text.AntiAliasType; 4 | import flash.display.Sprite; 5 | 6 | /** 7 | * ... 8 | * @author ... 9 | */ 10 | internal class ViewerScrollbarStyles 11 | { 12 | public static const TiTS_scrollbarStyle:Array = [ 13 | "thumbIcon", Sprite, 14 | "thumbUpSkin", TiTS_ScrollThumb_upSkin, 15 | "thumbDownSkin", TiTS_ScrollThumb_downSkin, 16 | "thumbOverSkin", TiTS_ScrollThumb_downSkin, 17 | "thumbDisabledSkin", Sprite, 18 | "upArrowUpSkin", Sprite, 19 | "upArrowDownSkin", Sprite, 20 | "upArrowOverSkin", Sprite, 21 | "upArrowDisabledSkin", Sprite, 22 | "trackUpSkin", Sprite, 23 | "trackDownSkin", Sprite, 24 | "trackOverSkin", Sprite, 25 | "trackDisabledSkin", Sprite, 26 | "downArrowUpSkin", Sprite, 27 | "downArrowDownSkin", Sprite, 28 | "downArrowOverSkin", Sprite, 29 | "downArrowDisabledSkin", Sprite, 30 | "repeatDelay", 500, 31 | "repeatInterval", 35 32 | ]; 33 | 34 | public static const CoC_scrollbarStyle:Array = [ 35 | "thumbIcon", Sprite, 36 | "thumbUpSkin", CoC_ScrollThumb_upSkin, 37 | "thumbDownSkin", CoC_ScrollThumb_downSkin, 38 | "thumbOverSkin", CoC_ScrollThumb_overSkin, 39 | "thumbDisabledSkin", Sprite, 40 | "upArrowUpSkin", CoC_ScrollArrow_upSkin, 41 | "upArrowDownSkin", CoC_ScrollArrow_downSkin, 42 | "upArrowOverSkin", CoC_ScrollArrow_overSkin, 43 | "upArrowDisabledSkin", Sprite, 44 | "trackUpSkin", Sprite, 45 | "trackDownSkin", Sprite, 46 | "trackOverSkin", Sprite, 47 | "trackDisabledSkin", Sprite, 48 | "downArrowUpSkin", CoC_ScrollArrow_upSkin, 49 | "downArrowDownSkin", CoC_ScrollArrow_downSkin, 50 | "downArrowOverSkin", CoC_ScrollArrow_overSkin, 51 | "downArrowDisabledSkin", Sprite, 52 | "repeatDelay", 500, 53 | "repeatInterval", 36 54 | ]; 55 | } 56 | } -------------------------------------------------------------------------------- /classes/components/ViewerSelectStyles.as: -------------------------------------------------------------------------------- 1 | package classes.components 2 | { 3 | import flash.display.Sprite; 4 | import com.sibirjak.asdpc.button.Button; 5 | import com.sibirjak.asdpc.textfield.Label; 6 | import com.sibirjak.asdpcbeta.selectbox.SelectBox; 7 | 8 | /** 9 | * ... 10 | * @author ... 11 | */ 12 | internal class ViewerSelectStyles 13 | { 14 | public static const CoC_selectStyle:Array = [ 15 | "buttonWidth", 0, 16 | 17 | "skin", CoC_List_skin, 18 | "listSkin", CoC_List_skin, 19 | "focusRectSkin", Sprite, 20 | "cellRenderer", CoC_CellRenderer, 21 | 22 | "upSkin", CoC_ComboBox_upSkin, 23 | "downSkin", CoC_ComboBox_downSkin, 24 | "overSkin", CoC_ComboBox_overSkin, 25 | "disabledSkin", CoC_ComboBox_downSkin, 26 | 27 | "trackUpSkin", Sprite, 28 | "trackDownSkin", Sprite, 29 | "trackOverSkin", Sprite, 30 | "trackDisabledSkin", Sprite, 31 | 32 | "thumbIcon", Sprite, 33 | "thumbArrowUpSkin", CoC_CB_ScrollThumb_upSkin, 34 | 35 | "thumbUpSkin", CoC_CB_ScrollThumb_upSkin, 36 | "thumbDownSkin", CoC_CB_ScrollThumb_downSkin, 37 | "thumbOverSkin", CoC_CB_ScrollThumb_overSkin, 38 | "thumbDisabledSkin", Sprite, 39 | 40 | "upArrowUpSkin", CoC_CB_ScrollArrowUp_upSkin, 41 | "upArrowDownSkin", CoC_CB_ScrollArrowUp_downSkin, 42 | "upArrowOverSkin", CoC_CB_ScrollArrowUp_overSkin, 43 | "upArrowDisabledSkin", Sprite, 44 | 45 | "downArrowUpSkin", CoC_CB_ScrollArrowDown_upSkin, 46 | "downArrowDownSkin", CoC_CB_ScrollArrowDown_overSkin, 47 | "downArrowOverSkin", CoC_CB_ScrollArrowDown_downSkin, 48 | "downArrowDisabledSkin", Sprite 49 | ]; 50 | 51 | public static const TiTS_selectStyle:Array = [ 52 | "buttonWidth", 6, 53 | 54 | "skin", TiTS_List_skin, 55 | "listSkin", TiTS_List_skin, 56 | "focusRectSkin", Sprite, 57 | "cellRenderer", TiTS_CellRenderer, 58 | 59 | "upSkin", TiTS_ComboBox_upSkin, 60 | "downSkin", TiTS_ComboBox_downSkin, 61 | "overSkin", TiTS_ComboBox_overSkin, 62 | "disabledSkin", TiTS_ComboBox_downSkin, 63 | 64 | "thumbIcon", Sprite, 65 | "thumbArrowUpSkin", TiTS_CB_ScrollThumb, 66 | 67 | "thumbUpSkin", TiTS_CB_ScrollThumb, 68 | "thumbDownSkin", TiTS_CB_ScrollThumb, 69 | "thumbOverSkin", TiTS_CB_ScrollThumb, 70 | "thumbDisabledSkin", Sprite, 71 | 72 | "trackUpSkin", Sprite, 73 | "trackDownSkin", Sprite, 74 | "trackOverSkin", Sprite, 75 | "trackDisabledSkin", Sprite, 76 | 77 | "upArrowUpSkin", Sprite, 78 | "upArrowDownSkin", Sprite, 79 | "upArrowOverSkin", Sprite, 80 | "upArrowDisabledSkin", Sprite, 81 | 82 | "downArrowUpSkin", Sprite, 83 | "downArrowDownSkin", Sprite, 84 | "downArrowOverSkin", Sprite, 85 | "downArrowDisabledSkin", Sprite 86 | ]; 87 | } 88 | } -------------------------------------------------------------------------------- /classes/components/ViewerSliderBar.as: -------------------------------------------------------------------------------- 1 | package classes.components 2 | { 3 | import flash.display.Shape; 4 | 5 | /** 6 | * ... 7 | * @author 8 | */ 9 | public class ViewerSliderBar extends Shape 10 | { 11 | 12 | public function ViewerSliderBar(color:uint, width:Number, padding:Number) 13 | { 14 | with (this.graphics) 15 | { 16 | beginFill(color, 1); 17 | drawRect(0, 0, width - 2 * padding, 8); 18 | endFill(); 19 | } 20 | 21 | this.x = padding; 22 | this.y = 2; 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /classes/components/ViewerSliderStyles.as: -------------------------------------------------------------------------------- 1 | package classes.components 2 | { 3 | import com.sibirjak.asdpcbeta.slider.skins.SliderThumbSkin; 4 | import com.sibirjak.asdpcbeta.slider.skins.SliderTrackSkin; 5 | import com.sibirjak.asdpcbeta.slider.Slider; 6 | /** 7 | * ... 8 | * @author ... 9 | */ 10 | internal class ViewerSliderStyles 11 | { 12 | public static const CoC_sliderStyle:Array = [ 13 | Slider.style.thumbPadding, 4, 14 | Slider.style.thumbHeight, 18, 15 | Slider.style.thumbWidth, 16, 16 | Slider.style.trackSize, 8 17 | ]; 18 | 19 | public static const TiTS_sliderStyle:Array = [ 20 | Slider.style.thumbPadding, 4, 21 | Slider.style.thumbHeight, 20, 22 | Slider.style.thumbWidth, 20, 23 | Slider.style.trackSize, 8 24 | ]; 25 | 26 | public static const CoC_trackStyle:Array = [ 27 | "button_upSkin", CoC_SliderTrack_skin, 28 | "button_disabledSkin", CoC_SliderTrack_disabledSkin 29 | ]; 30 | 31 | public static const TiTS_trackStyle:Array = [ 32 | "button_upSkin", null, 33 | "button_disabledSkin", null 34 | ]; 35 | 36 | public static const CoC_thumbStyle:Array = [ 37 | "button_upSkin", CoC_SliderThumb_upSkin, 38 | "button_overSkin", CoC_SliderThumb_overSkin, 39 | "button_disabledSkin", null 40 | ]; 41 | 42 | public static const TiTS_thumbStyle:Array = [ 43 | "button_upSkin", TiTS_SliderThumb_upSkin, 44 | "button_overSkin", TiTS_SliderThumb_overSkin, 45 | "button_disabledSkin", null 46 | ]; 47 | } 48 | } -------------------------------------------------------------------------------- /classes/components/ViewerTextFormat.as: -------------------------------------------------------------------------------- 1 | package classes.components 2 | { 3 | import flash.text.TextFormat; 4 | /** 5 | * ... 6 | * @author 7 | */ 8 | public class ViewerTextFormat 9 | { 10 | public static const CoCFormat:TextFormat = new TextFormat(new CoC_Font().fontName, 18, 0x000000); 11 | public static const TiTSFormat:TextFormat = new TextFormat(new TiTS_Font().fontName, 18, 0xFFFFFF); 12 | 13 | public static const CoCDisabledFormat:TextFormat = new TextFormat(new CoC_Font().fontName, 18, 0x888888); 14 | public static const TiTSDisabledFormat:TextFormat = new TextFormat(new TiTS_Font().fontName, 18, 0x888888); 15 | 16 | public static const CoCNotesFormat:TextFormat = new TextFormat(new CoC_Font().fontName, 24, 0x000000); 17 | public static const TiTSNotesFormat:TextFormat = new TextFormat(new TiTS_Font().fontName, 24, 0xFFFFFF); 18 | } 19 | } -------------------------------------------------------------------------------- /classes/elements/GoblinNPC.as: -------------------------------------------------------------------------------- 1 | package classes.elements { 2 | 3 | import com.gskinner.geom.ColorMatrix; 4 | import flash.display.MovieClip; 5 | import flash.events.Event; 6 | import flash.filters.ColorMatrixFilter; 7 | import flash.geom.ColorTransform; 8 | 9 | 10 | public class GoblinNPC extends MovieClip { 11 | 12 | private var cm:ColorMatrix = new ColorMatrix(); 13 | private var cmf:ColorMatrixFilter = new ColorMatrixFilter(); 14 | 15 | public function GoblinNPC() { 16 | this.addEventListener(Event.ADDED_TO_STAGE, onAdded, false, 0, true); 17 | } 18 | 19 | public function onAdded(event:Event):void 20 | { 21 | cm.adjustHue(Math.random() * 360); 22 | cmf.matrix = cm.toArray(); 23 | hair.filters = [cmf]; 24 | 25 | cm.adjustHue(Math.random() * 360); 26 | cmf.matrix = cm.toArray(); 27 | flask.filters = [cmf]; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /classes/events/NoteEvent.as: -------------------------------------------------------------------------------- 1 | package classes.events 2 | { 3 | import flash.events.Event; 4 | /** 5 | * Dispatched by Characters to order the addition of a note. 6 | * @author Sbaf 7 | */ 8 | public final class NoteEvent extends Event 9 | { 10 | public static const NEW_NOTE:String = "newNote"; 11 | 12 | private var note:String; 13 | private var toAdd:Boolean; 14 | 15 | /** 16 | * Create a new NoteEvent. 17 | * @param The text of the note. 18 | * @param Wether the note should be added to (true), or replace the previous text (false). 19 | * @param If the event should bubble (true), or not (false). 20 | * @param If the event should be cancellable (true), or not (false). 21 | */ 22 | public function NoteEvent(noteText:String = "", isToAdd:Boolean = false, bubbles:Boolean = false, cancelable:Boolean = false) 23 | { 24 | super("newNote", bubbles, cancelable); 25 | note = noteText; 26 | toAdd = isToAdd; 27 | } 28 | 29 | /** 30 | * Returns a clone of the NoteEvent. 31 | * @return New NoteEvent. 32 | */ 33 | public override function clone():Event 34 | { 35 | return new NoteEvent(note, toAdd, bubbles, cancelable); 36 | } 37 | 38 | /** 39 | * Returns the text of the note. 40 | */ 41 | public function get noteText():String 42 | { 43 | return (note); 44 | } 45 | 46 | /** 47 | * Returns if the note is to be added or set. 48 | */ 49 | public function get isToAdd():Boolean 50 | { 51 | return (toAdd); 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /classes/save/AssClass.as: -------------------------------------------------------------------------------- 1 | package classes.save 2 | { 3 | public class AssClass 4 | { 5 | //constructor 6 | public function AssClass() 7 | { 8 | } 9 | //data 10 | //butt wetness 11 | public var analWetness:Number = 0; 12 | /*butt looseness 13 | 0 - virgin 14 | 1 - normal 15 | 2 - loose 16 | 3 - very loose 17 | 4 - gaping 18 | 5 - monstrous*/ 19 | public var analLooseness:Number = 0; 20 | //Used to determine thickness of knot relative to normal thickness 21 | //Used during sex to determine how full it currently is. For multi-dick sex. 22 | public var fullness:Number = 0; 23 | } 24 | } -------------------------------------------------------------------------------- /classes/save/BreastRowClass.as: -------------------------------------------------------------------------------- 1 | package classes.save 2 | { 3 | public class BreastRowClass 4 | { 5 | //constructor 6 | public function BreastRowClass() 7 | { 8 | } 9 | public var breasts:Number = 2; 10 | public var nipplesPerBreast:Number = 1; 11 | public var breastRating:Number = 0; 12 | public var lactationMultiplier = 0; 13 | //Fullness used for lactation....if 75 or greater warning bells start going off! 14 | //If it reaches 100 it reduces lactation multiplier. 15 | public var milkFullness = 0; 16 | public var fullness:Number = 0; 17 | public var fuckable:Boolean = false 18 | /* 19 | 0 - manchest 20 | 1 - A cup 21 | 2 - B cup 22 | 3 - C cup 23 | 4 - D cup 24 | 5 - DD cup 25 | 6 - E cup 26 | 7 - F cup 27 | 8 - G cup 28 | 9 - GG cup 29 | 10 - H 30 | 11 - HH cup 31 | 12 - HHH cup 32 | 13 - beachball sized 33 | 14 - ???*/ 34 | } 35 | } -------------------------------------------------------------------------------- /classes/save/ItemSlotClass.as: -------------------------------------------------------------------------------- 1 | package classes.save 2 | { 3 | public class ItemSlotClass 4 | { 5 | //constructor 6 | public function ItemSlotClass() 7 | { 8 | } 9 | //data 10 | public var quantity:Number = 0; 11 | public var shortName:String = ""; 12 | public var unlocked:Boolean = false; 13 | 14 | } 15 | } -------------------------------------------------------------------------------- /classes/save/KeyItemClass.as: -------------------------------------------------------------------------------- 1 | package classes.save 2 | { 3 | public class KeyItemClass 4 | { 5 | //constructor 6 | public function KeyItemClass() 7 | { 8 | } 9 | //data 10 | public var keyName:String = ""; 11 | //v1-v4 for storing extra stuff. 12 | public var value1:Number = 0; 13 | public var value2:Number = 0; 14 | public var value3:Number = 0; 15 | public var value4:Number = 0; 16 | } 17 | } -------------------------------------------------------------------------------- /classes/save/PerkClass.as: -------------------------------------------------------------------------------- 1 | package classes.save 2 | { 3 | public class PerkClass 4 | { 5 | //constructor 6 | public function PerkClass() 7 | { 8 | } 9 | //data 10 | public var perkName:String = ""; 11 | public var value2:Number = 0; 12 | public var value1:Number = 0; 13 | public var value3:Number = 0; 14 | public var value4:Number = 0; 15 | public var perkDesc:String = ""; 16 | //MEMBER FUNCTIONS 17 | } 18 | } -------------------------------------------------------------------------------- /classes/save/StatusAffectClass.as: -------------------------------------------------------------------------------- 1 | package classes.save 2 | { 3 | public class StatusAffectClass 4 | { 5 | //constructor 6 | public function StatusAffectClass() 7 | { 8 | } 9 | //data 10 | public var statusAffectName:String = ""; 11 | public var value2:Number = 0; 12 | public var value1:Number = 0; 13 | public var value3:Number = 0; 14 | public var value4:Number = 0; 15 | //MEMBER FUNCTIONS 16 | } 17 | } -------------------------------------------------------------------------------- /classes/save/VaginaClass.as: -------------------------------------------------------------------------------- 1 | package classes.save 2 | { 3 | public class VaginaClass 4 | { 5 | //constructor 6 | public function VaginaClass() 7 | { 8 | } 9 | //data 10 | //Vag wetness 11 | public var vaginalWetness:Number = 1; 12 | /*Vag looseness 13 | 0 - virgin 14 | 1 - normal 15 | 2 - loose 16 | 3 - very loose 17 | 4 - gaping 18 | 5 - monstrous*/ 19 | public var vaginalLooseness:Number = 0; 20 | //Type 21 | //0 - Normal 22 | //5 - Black bugvag 23 | public var type:int = 0; 24 | public var virgin:Boolean = true; 25 | //Used to determine thickness of knot relative to normal thickness 26 | //Used during sex to determine how full it currently is. For multi-dick sex. 27 | public var fullness:Number = 0; 28 | public var labiaPierced:Number = 0; 29 | public var labiaPShort:String = ""; 30 | public var labiaPLong:String = ""; 31 | public var clitPierced:Number = 0; 32 | public var clitPShort:String = ""; 33 | public var clitPLong:String = ""; 34 | 35 | 36 | public function wetnessFactor():Number 37 | { 38 | if(vaginalWetness == 0) return 1.25; 39 | if(vaginalWetness == 1) return 1; 40 | if(vaginalWetness == 2) return 0.8; 41 | if(vaginalWetness == 3) return 0.7; 42 | if(vaginalWetness == 4) return 0.6; 43 | if(vaginalWetness == 5) return 0.5; 44 | return .5; 45 | } 46 | public function capacity():Number 47 | { 48 | if(vaginalLooseness == 0) return 8; 49 | if(vaginalLooseness == 1) return 16; 50 | if(vaginalLooseness == 2) return 24; 51 | if(vaginalLooseness == 3) return 36; 52 | if(vaginalLooseness == 4) return 56; 53 | if(vaginalLooseness == 5) return 100; 54 | return 10000; 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /classes/utils/ArrayUtils.as: -------------------------------------------------------------------------------- 1 | package classes.utils 2 | { 3 | /** 4 | * ... 5 | * @author 6 | */ 7 | public class ArrayUtils 8 | { 9 | /** 10 | * Randomize an array's elements. 11 | * @param The array to randomize. 12 | * @return The input array, randomized. 13 | */ 14 | public static function randomize(array:Array):void 15 | { 16 | var temp:Object; 17 | var tempOffset:int; 18 | var len = array.length - 1; 19 | for (var i:int = len; i >= 0; i--) 20 | { 21 | tempOffset = Math.random() * i; 22 | temp = array[i]; 23 | array[i] = array[tempOffset]; 24 | array[tempOffset] = temp; 25 | } 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /classes/utils/BitmapUtils.as: -------------------------------------------------------------------------------- 1 | package classes.utils 2 | { 3 | import flash.display.BitmapData; 4 | import flash.geom.ColorTransform; 5 | /** 6 | * ... 7 | * @author 8 | */ 9 | public class BitmapUtils 10 | { 11 | /** 12 | * Analyse a background BitmapData instance, and mathematically deduce the lighting ColorTransform. 13 | * @param The background BitmapData. 14 | * @param The ID, to decide special behaviour. 15 | * @return 16 | */ 17 | public static function getBitmapAverageDeviation(bitmap:BitmapData, backgroundID:int):ColorTransform 18 | { 19 | if (backgroundID == 0) return (new ColorTransform()); 20 | 21 | var R:Number = 0; 22 | var G:Number = 0; 23 | var B:Number = 0; 24 | 25 | for (var i:int = 0; i < 100; i++) 26 | { 27 | var x:int = 200.5 + 12.240 * i; 28 | var y:int = 0.5 + 98.0 * (i % 10 + 0.5); 29 | 30 | var color:uint = bitmap.getPixel(x, y); 31 | 32 | R += color >> 16; 33 | G += (color & 0x00FF00) >> 8; 34 | B += (color & 0x0000FF); 35 | } 36 | 37 | 38 | R = (R / 100 / 126) / 2 + 0.5; 39 | G = (G / 100 / 126) / 2 + 0.5; 40 | B = (B / 100 / 126) / 2 + 0.5; 41 | 42 | return (new ColorTransform(R, G, B)); 43 | } 44 | } 45 | 46 | } -------------------------------------------------------------------------------- /classes/utils/MathUtils.as: -------------------------------------------------------------------------------- 1 | package classes.utils 2 | { 3 | /** 4 | * ... 5 | * @author 6 | */ 7 | public class MathUtils 8 | { 9 | /** 10 | * Returns a random value x, with 0 <= x and x < 1. 11 | * The value is more likely to be close to 0.5 than to 0 or 1. 12 | */ 13 | public static function randomCentered():Number 14 | { 15 | return (Math.pow((Math.random() - ​0.5) * ​2, ​3) / ​2 + ​0.5); 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /classes/utils/ObjectUtils.as: -------------------------------------------------------------------------------- 1 | package classes.utils 2 | { 3 | import flash.utils.ByteArray; 4 | /** 5 | * ... 6 | * @author 7 | */ 8 | public class ObjectUtils 9 | { 10 | /** 11 | * Clone the properties of every objects in sources to target. 12 | * @param The object to clear and set. 13 | * @param obj 14 | */ 15 | public static function setObject(target:Object, ...sources):void 16 | { 17 | var len:int = sources.length; 18 | 19 | for (var i:int = 0; i < len; i++) 20 | { 21 | var source:Object = sources[i]; 22 | 23 | for (var key:String in source) 24 | { 25 | target[key] = source[key]; 26 | } 27 | } 28 | } 29 | 30 | /** 31 | * Return a copy of any given object. 32 | * Every properties is cloned as well, but is casted as an Object. 33 | * @param Source object. 34 | * @return Cloned object. 35 | */ 36 | public static function cloneObject(target:Object):Object 37 | { 38 | var byte:ByteArray = new ByteArray(); 39 | var clone:Object = new Object(); 40 | 41 | byte.writeObject(target); 42 | byte.position = 0; 43 | clone = byte.readObject(); 44 | return (clone); 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /com/ColorJizz/CIELCh.as: -------------------------------------------------------------------------------- 1 | package com.ColorJizz 2 | { 3 | import com.ColorJizz.CIELab; 4 | import com.ColorJizz.CIELCh; 5 | import com.ColorJizz.CMY; 6 | import com.ColorJizz.CMYK; 7 | import com.ColorJizz.Hex; 8 | import com.ColorJizz.HSV; 9 | import com.ColorJizz.RGB; 10 | import com.ColorJizz.XYZ; 11 | import com.ColorJizz.Yxy; 12 | /** 13 | * ... 14 | * @author Mikee 15 | */ 16 | public class CIELCh extends AbstractColor 17 | { 18 | public var l:Number; 19 | public var c:Number; 20 | public var h:Number; 21 | public function CIELCh(l:Number, c:Number, h:Number ) 22 | { 23 | this.toSelf = "toCIELCh"; 24 | this.l = l; 25 | this.c = c; 26 | this.h = h<360?h:(h-360); 27 | } 28 | override public function toHex():Hex 29 | { 30 | return this.toCIELab().toHex(); 31 | } 32 | override public function toRGB():RGB 33 | { 34 | return this.toCIELab().toRGB(); 35 | } 36 | override public function toXYZ():XYZ 37 | { 38 | return this.toCIELab().toXYZ(); 39 | } 40 | override public function toYxy():Yxy 41 | { 42 | return this.toXYZ().toYxy(); 43 | } 44 | override public function toHSV():HSV 45 | { 46 | return this.toCIELab().toHSV(); 47 | } 48 | override public function toCMY():CMY 49 | { 50 | return this.toCIELab().toCMY(); 51 | } 52 | override public function toCMYK():CMYK 53 | { 54 | return this.toCIELab().toCMYK(); 55 | } 56 | override public function toCIELab():CIELab 57 | { 58 | var l:Number = this.l; 59 | var hradi:Number = this.h * (Math.PI/180); 60 | var a:Number = Math.cos(hradi) * this.c; 61 | var b:Number = Math.sin(hradi) * this.c; 62 | return new CIELab(l,a,b); 63 | } 64 | override public function toCIELCh():CIELCh 65 | { 66 | return this; 67 | } 68 | public function toString ():String 69 | { 70 | return this.l + ','+this.c +','+this.h; 71 | } 72 | } 73 | 74 | } 75 | 76 | -------------------------------------------------------------------------------- /com/ColorJizz/CMY.as: -------------------------------------------------------------------------------- 1 | package com.ColorJizz 2 | { 3 | import com.ColorJizz.CIELab; 4 | import com.ColorJizz.CIELCh; 5 | import com.ColorJizz.CMY; 6 | import com.ColorJizz.CMYK; 7 | import com.ColorJizz.Hex; 8 | import com.ColorJizz.HSV; 9 | import com.ColorJizz.RGB; 10 | import com.ColorJizz.XYZ; 11 | import com.ColorJizz.Yxy; 12 | /** 13 | * ... 14 | * @author Mikee 15 | */ 16 | public class CMY extends AbstractColor 17 | { 18 | public var c:Number; 19 | public var m:Number; 20 | public var y:Number; 21 | public function CMY(c:Number, m:Number, y:Number) 22 | { 23 | this.toSelf = "toCMY"; 24 | this.c = c; 25 | this.m = m; 26 | this.y = y; 27 | } 28 | override public function toHex():Hex 29 | { 30 | return this.toRGB().toHex(); 31 | } 32 | override public function toRGB():RGB 33 | { 34 | var R:int = (int)(( 1 - this.c ) * 255); 35 | var G:int = (int)(( 1 - this.m ) * 255); 36 | var B:int = (int)(( 1 - this.y ) * 255); 37 | return new RGB(R,G,B); 38 | } 39 | override public function toXYZ():XYZ 40 | { 41 | return this.toRGB().toXYZ(); 42 | } 43 | override public function toYxy():Yxy 44 | { 45 | return this.toXYZ().toYxy(); 46 | } 47 | override public function toHSV():HSV 48 | { 49 | return this.toRGB().toHSV(); 50 | } 51 | override public function toCMY():CMY 52 | { 53 | return this; 54 | } 55 | override public function toCMYK():CMYK 56 | { 57 | var var_K:Number = 1; 58 | var C:Number = this.c; 59 | var M:Number = this.m; 60 | var Y:Number = this.y; 61 | if ( C < var_K ) var_K = C; 62 | if ( M < var_K ) var_K = M; 63 | if ( Y < var_K ) var_K = Y; 64 | if ( var_K == 1 ) { 65 | C = 0; 66 | M = 0; 67 | Y = 0; 68 | } 69 | else { 70 | C = ( C - var_K ) / ( 1 - var_K ); 71 | M = ( M - var_K ) / ( 1 - var_K ); 72 | Y = ( Y - var_K ) / ( 1 - var_K ); 73 | } 74 | 75 | var K:Number = var_K; 76 | 77 | return new CMYK(C,M,Y,K); 78 | } 79 | override public function toCIELab():CIELab 80 | { 81 | return this.toRGB().toCIELab(); 82 | } 83 | override public function toCIELCh():CIELCh 84 | { 85 | return this.toCIELab().toCIELCh(); 86 | } 87 | public function toString():String 88 | { 89 | return this.c+','+this.m+','+this.y; 90 | } 91 | } 92 | 93 | } 94 | 95 | -------------------------------------------------------------------------------- /com/ColorJizz/CMYK.as: -------------------------------------------------------------------------------- 1 | package com.ColorJizz 2 | { 3 | import com.ColorJizz.CIELab; 4 | import com.ColorJizz.CIELCh; 5 | import com.ColorJizz.CMY; 6 | import com.ColorJizz.CMYK; 7 | import com.ColorJizz.Hex; 8 | import com.ColorJizz.HSV; 9 | import com.ColorJizz.RGB; 10 | import com.ColorJizz.XYZ; 11 | import com.ColorJizz.Yxy; 12 | /** 13 | * ... 14 | * @author Mikee 15 | */ 16 | public class CMYK extends AbstractColor 17 | { 18 | public var c:Number; 19 | public var m:Number; 20 | public var y:Number; 21 | public var k:Number; 22 | public function CMYK(c:Number, m:Number, y:Number, k:Number) 23 | { 24 | this.toSelf = "toCMYK"; 25 | this.c = c; 26 | this.m = m; 27 | this.y = y; 28 | this.k = k; 29 | } 30 | override public function toHex():Hex 31 | { 32 | return this.toRGB().toHex(); 33 | } 34 | override public function toRGB():RGB 35 | { 36 | return this.toCMY().toRGB(); 37 | } 38 | override public function toXYZ():XYZ 39 | { 40 | return this.toRGB().toXYZ(); 41 | } 42 | override public function toYxy():Yxy 43 | { 44 | return this.toXYZ().toYxy(); 45 | } 46 | override public function toHSV():HSV 47 | { 48 | return this.toRGB().toHSV(); 49 | } 50 | override public function toCMY():CMY 51 | { 52 | var C:Number = ( this.c * ( 1 - this.k ) + this.k ); 53 | var M:Number = ( this.m * ( 1 - this.k ) + this.k ); 54 | var Y:Number = ( this.y * ( 1 - this.k ) + this.k ); 55 | return new CMY(C,M,Y); 56 | } 57 | override public function toCMYK():CMYK 58 | { 59 | return this; 60 | } 61 | override public function toCIELab():CIELab 62 | { 63 | return this.toRGB().toCIELab(); 64 | } 65 | override public function toCIELCh():CIELCh 66 | { 67 | return this.toCIELab().toCIELCh(); 68 | } 69 | public function toString():String 70 | { 71 | return this.c+','+this.m+','+this.y+','+this.k; 72 | } 73 | } 74 | 75 | } 76 | 77 | -------------------------------------------------------------------------------- /com/ColorJizz/HSV.as: -------------------------------------------------------------------------------- 1 | package com.ColorJizz 2 | { 3 | import com.ColorJizz.CIELab; 4 | import com.ColorJizz.CIELCh; 5 | import com.ColorJizz.CMY; 6 | import com.ColorJizz.CMYK; 7 | import com.ColorJizz.Hex; 8 | import com.ColorJizz.HSV; 9 | import com.ColorJizz.RGB; 10 | import com.ColorJizz.XYZ; 11 | import com.ColorJizz.Yxy; 12 | /** 13 | * ... 14 | * @author Mikee 15 | */ 16 | public class HSV extends AbstractColor 17 | { 18 | public var h:Number; 19 | public var s:Number; 20 | public var v:Number; 21 | public function HSV(h:Number, s:Number, v:Number) 22 | { 23 | this.toSelf = "toHSV"; 24 | this.h = h; 25 | this.s = s; 26 | this.v = v; 27 | } 28 | override public function toHex():Hex 29 | { 30 | return this.toRGB().toHex(); 31 | } 32 | override public function toRGB():RGB 33 | { 34 | var h:Number = this.h / 360; 35 | var s:Number = this.s / 100; 36 | var v:Number = this.v / 100; 37 | var r:Number; 38 | var g:Number; 39 | var b:Number; 40 | var var_h:Number, var_i:Number, var_1:Number, var_2:Number, var_3:Number, var_r:Number, var_g:Number, var_b:Number; 41 | if (s == 0) { 42 | r = v * 255; 43 | g = v * 255; 44 | b = v * 255; 45 | } else { 46 | var_h = h * 6; 47 | var_i = Math.floor(var_h); 48 | var_1 = v * (1 - s); 49 | var_2 = v * (1 - s * (var_h - var_i)); 50 | var_3 = v * (1 - s * (1 - (var_h - var_i))); 51 | 52 | if (var_i == 0) {var_r = v; var_g = var_3; var_b = var_1} 53 | else if (var_i == 1) {var_r = var_2; var_g = v; var_b = var_1} 54 | else if (var_i == 2) {var_r = var_1; var_g = v; var_b = var_3} 55 | else if (var_i == 3) {var_r = var_1; var_g = var_2; var_b = v} 56 | else if (var_i == 4) {var_r = var_3; var_g = var_1; var_b = v} 57 | else {var_r = v; var_g = var_1; var_b = var_2}; 58 | 59 | r = var_r * 255; 60 | g = var_g * 255; 61 | b = var_b * 255; 62 | } 63 | return new RGB(Math.round(r), Math.round(g), Math.round(b)); 64 | } 65 | override public function toXYZ():XYZ 66 | { 67 | return this.toRGB().toXYZ(); 68 | } 69 | override public function toYxy():Yxy 70 | { 71 | return this.toXYZ().toYxy(); 72 | } 73 | override public function toHSV():HSV 74 | { 75 | return this; 76 | } 77 | override public function toCMY():CMY 78 | { 79 | return this.toRGB().toCMY(); 80 | } 81 | override public function toCMYK():CMYK 82 | { 83 | return this.toCMY().toCMYK(); 84 | } 85 | override public function toCIELab():CIELab 86 | { 87 | return this.toRGB().toCIELab(); 88 | } 89 | override public function toCIELCh():CIELCh 90 | { 91 | return this.toCIELab().toCIELCh(); 92 | } 93 | public function toString():String 94 | { 95 | return this.h+','+this.s+','+this.v; 96 | } 97 | } 98 | 99 | } 100 | 101 | -------------------------------------------------------------------------------- /com/ColorJizz/Hex.as: -------------------------------------------------------------------------------- 1 | package com.ColorJizz 2 | { 3 | import com.ColorJizz.CIELab; 4 | import com.ColorJizz.CIELCh; 5 | import com.ColorJizz.CMY; 6 | import com.ColorJizz.CMYK; 7 | import com.ColorJizz.Hex; 8 | import com.ColorJizz.HSV; 9 | import com.ColorJizz.RGB; 10 | import com.ColorJizz.XYZ; 11 | import com.ColorJizz.Yxy; 12 | /** 13 | * ... 14 | * @author Mikee 15 | */ 16 | public class Hex extends AbstractColor 17 | { 18 | public var hex:uint; 19 | public function Hex(hex:uint) 20 | { 21 | this.hex = hex; 22 | this.toSelf = "toHex"; 23 | } 24 | override public function toHex():Hex 25 | { 26 | return this; 27 | } 28 | override public function toRGB():RGB 29 | { 30 | var r:int = ((hex & 0xFF0000) >> 16); 31 | var g:int = ((hex & 0x00FF00) >> 8); 32 | var b:int = ((hex & 0x0000FF)); 33 | return new RGB(r,g,b); 34 | } 35 | override public function toXYZ():XYZ 36 | { 37 | return this.toRGB().toXYZ(); 38 | } 39 | override public function toYxy():Yxy 40 | { 41 | return this.toRGB().toYxy(); 42 | } 43 | override public function toHSV():HSV 44 | { 45 | return this.toRGB().toHSV(); 46 | } 47 | override public function toCMY():CMY 48 | { 49 | return this.toRGB().toCMY(); 50 | } 51 | override public function toCMYK():CMYK 52 | { 53 | return this.toCMY().toCMYK(); 54 | } 55 | override public function toCIELab():CIELab 56 | { 57 | return this.toXYZ().toCIELab(); 58 | } 59 | override public function toCIELCh():CIELCh 60 | { 61 | return this.toCIELab().toCIELCh(); 62 | } 63 | public function toString ():String 64 | { 65 | return this.hex.toString(16).toUpperCase(); 66 | } 67 | public static function fromString(str:String):Hex 68 | { 69 | if (str.substring(0, 1) == '#') str = str.substring(1, 7); 70 | str = "0x" + str; 71 | return new Hex(uint(str)); 72 | } 73 | } 74 | 75 | } 76 | 77 | -------------------------------------------------------------------------------- /com/ColorJizz/Yxy.as: -------------------------------------------------------------------------------- 1 | package com.ColorJizz 2 | { 3 | import com.ColorJizz.CIELab; 4 | import com.ColorJizz.CIELCh; 5 | import com.ColorJizz.CMY; 6 | import com.ColorJizz.CMYK; 7 | import com.ColorJizz.Hex; 8 | import com.ColorJizz.HSV; 9 | import com.ColorJizz.RGB; 10 | import com.ColorJizz.XYZ; 11 | import com.ColorJizz.Yxy; 12 | /** 13 | * ... 14 | * @author Mikee 15 | */ 16 | public class Yxy extends AbstractColor 17 | { 18 | public var Y:Number; 19 | public var x:Number; 20 | public var y:Number; 21 | public function Yxy(Y:Number, x:Number, y:Number) 22 | { 23 | this.toSelf = "toYxy"; 24 | this.Y = this.roundDec(Y, 3); 25 | this.x = this.roundDec(x, 3); 26 | this.y = this.roundDec(y, 3); 27 | } 28 | override public function toHex():Hex 29 | { 30 | return this.toXYZ().toHex(); 31 | } 32 | override public function toRGB():RGB 33 | { 34 | return this.toXYZ().toRGB(); 35 | } 36 | override public function toXYZ():XYZ 37 | { 38 | var X:Number = this.x * ( this.Y / this.y ); 39 | var Y:Number = this.Y; 40 | var Z:Number = ( 1 - this.x - this.y ) * ( this.Y / this.y ); 41 | return new XYZ(X, Y, Z); 42 | } 43 | override public function toYxy():Yxy 44 | { 45 | return this; 46 | } 47 | override public function toHSV():HSV 48 | { 49 | return this.toXYZ().toHSV(); 50 | } 51 | override public function toCMY():CMY 52 | { 53 | return this.toXYZ().toCMY(); 54 | } 55 | override public function toCMYK():CMYK 56 | { 57 | return this.toXYZ().toCMYK(); 58 | } 59 | override public function toCIELab():CIELab 60 | { 61 | return this.toXYZ().toCIELab(); 62 | } 63 | override public function toCIELCh():CIELCh 64 | { 65 | return this.toXYZ().toCIELCh(); 66 | } 67 | public function toString():String 68 | { 69 | return this.Y+','+this.x+','+this.y; 70 | } 71 | } 72 | 73 | } 74 | 75 | -------------------------------------------------------------------------------- /com/GTween_V2_01.swc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fenoxo/CharacterViewer/c43ceebe47241e30fe7639c3e9f7ed9205d0242a/com/GTween_V2_01.swc -------------------------------------------------------------------------------- /com/Miner.swc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fenoxo/CharacterViewer/c43ceebe47241e30fe7639c3e9f7ed9205d0242a/com/Miner.swc -------------------------------------------------------------------------------- /com/MonsterDebugger.swc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fenoxo/CharacterViewer/c43ceebe47241e30fe7639c3e9f7ed9205d0242a/com/MonsterDebugger.swc -------------------------------------------------------------------------------- /com/PNGEncoder2.swc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fenoxo/CharacterViewer/c43ceebe47241e30fe7639c3e9f7ed9205d0242a/com/PNGEncoder2.swc -------------------------------------------------------------------------------- /com/as3commons-collections-1.3.0.swc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fenoxo/CharacterViewer/c43ceebe47241e30fe7639c3e9f7ed9205d0242a/com/as3commons-collections-1.3.0.swc -------------------------------------------------------------------------------- /com/flexunit-0.90.swc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fenoxo/CharacterViewer/c43ceebe47241e30fe7639c3e9f7ed9205d0242a/com/flexunit-0.90.swc -------------------------------------------------------------------------------- /com/sibirjak/asdpc/button/ButtonEvent.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.button { 25 | import flash.events.Event; 26 | 27 | /** 28 | * Button event. 29 | * 30 | * @author jes 14.07.2009 31 | */ 32 | public class ButtonEvent extends Event { 33 | 34 | /** 35 | * Event type ROLL_OVER 36 | * 37 | * @eventType button_rollOver 38 | */ 39 | public static const ROLL_OVER : String = "button_rollOver"; 40 | 41 | /** 42 | * Event type ROLL_OUT 43 | * 44 | * @eventType button_rollOut 45 | */ 46 | public static const ROLL_OUT : String = "button_rollOut"; 47 | 48 | /** 49 | * Event type MOUSE_DOWN 50 | * 51 | * @eventType button_mouseDown 52 | */ 53 | public static const MOUSE_DOWN : String = "button_mouseDown"; 54 | 55 | /** 56 | * Event type CLICK 57 | * 58 | * @eventType button_click 59 | */ 60 | public static const CLICK : String = "button_click"; 61 | 62 | /** 63 | * Event type MOUSE_UP_OUTSIDE 64 | * 65 | * @eventType button_mouseUpOutside 66 | */ 67 | public static const MOUSE_UP_OUTSIDE : String = "button_mouseUpOutside"; 68 | 69 | /** 70 | * Event type SELECTION_CHANGED 71 | * 72 | * @eventType button_selectionChanged 73 | */ 74 | public static const SELECTION_CHANGED : String = "button_selectionChanged"; 75 | 76 | /** 77 | * ButtonEvent constructor. 78 | * 79 | * @param type The event type. 80 | */ 81 | public function ButtonEvent(type : String) { 82 | super(type); 83 | } 84 | 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/core/Container.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.core { 25 | import com.sibirjak.asdpc.core.managers.IStyleManagerClient; 26 | import com.sibirjak.asdpc.core.managers.StyleManager; 27 | 28 | import flash.display.Sprite; 29 | 30 | /** 31 | * Sprite with style inheritance support. 32 | * 33 | *

In order of a working style management the display list must not 34 | * be interrupted by non IStyleManagerClient instances such as Sprite is. 35 | * In all the cases we only need a lightweight display object container 36 | * we should use the Container then rather than the more heavy View.

37 | * 38 | * @author jes 15.12.2009 39 | */ 40 | public class Container extends Sprite implements IStyleManagerClient { 41 | 42 | /** 43 | * StyleManager instance. 44 | */ 45 | protected var _styleManager : StyleManager; 46 | 47 | /** 48 | * Container constructor. 49 | */ 50 | public function Container() { 51 | _styleManager = new StyleManager(this); 52 | } 53 | 54 | /* 55 | * IStyleManagerClient 56 | */ 57 | 58 | /** 59 | * @inheritDoc 60 | */ 61 | public final function get styleManager() : StyleManager { 62 | return _styleManager; 63 | } 64 | 65 | /** 66 | * @inheritDoc 67 | */ 68 | public function styleManagerStyleChangeHandler(property : String, value : *) : void { 69 | } 70 | 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/core/IBindableView.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.core { 25 | 26 | /** 27 | * BindableView public interface. 28 | * 29 | * @author jes 16.12.2009 30 | */ 31 | public interface IBindableView extends IView { 32 | 33 | /** 34 | * @copy com.sibirjak.asdpc.core.managers.BindingManager#bindProperty() 35 | */ 36 | function bindProperty(propertyName : String, listener : Object, listenerPropertyName : String = null) : void; 37 | 38 | /** 39 | * @copy com.sibirjak.asdpc.core.managers.BindingManager#unbindProperty() 40 | */ 41 | function unbindProperty(propertyName : String, listener : Object, listenerPropertyName : String = null) : void; 42 | 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/core/IControl.as: -------------------------------------------------------------------------------- 1 | package com.sibirjak.asdpc.core { 2 | 3 | /** 4 | * Marker interface for ADPDC components. 5 | * 6 | *

The interace is solely used to determine, if a View is 7 | * a main ASDPC control.

8 | * 9 | * @author jes 29.01.2010 10 | */ 11 | public interface IControl { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/core/IDataRendererSkin.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.core { 25 | 26 | /** 27 | * Data accepting programmatic skin interface. 28 | * 29 | *

Certain views accept skins, whose state depends on the current 30 | * view data. Such a skin can only be recognised, if it implements 31 | * this interface.

32 | * 33 | *

The skin owner will reset the skin data at any time its own data 34 | * changes or a data property changes. The skin is then in charge to 35 | * update its presentation.

36 | * 37 | * @author jes 13.08.2009 38 | */ 39 | public interface IDataRendererSkin extends ISkin { 40 | 41 | /** 42 | * Sets the data to the skin. 43 | * 44 | *

A ListItemRenderer would pass here the ListItemRendererData

45 | */ 46 | function set data(data : *) : void; 47 | 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/core/IDisplayObjectContainer.as: -------------------------------------------------------------------------------- 1 | package com.sibirjak.asdpc.core { 2 | import flash.display.DisplayObject; 3 | import flash.display.DisplayObjectContainer; 4 | 5 | /** 6 | * Interface to many of the native Flash DisplayObjectContainer methods. 7 | * 8 | * @author jes 27.01.2010 9 | */ 10 | public interface IDisplayObjectContainer extends IDisplayObject { 11 | 12 | /* 13 | * Mouse 14 | */ 15 | 16 | function set mouseChildren(mouseChildren : Boolean) : void; 17 | 18 | /* 19 | * Display hierarchy 20 | */ 21 | 22 | function addChild(child : DisplayObject) : DisplayObject; 23 | 24 | function addChildAt(child : DisplayObject, index : int) : DisplayObject; 25 | 26 | function removeChild(child : DisplayObject) : DisplayObject; 27 | 28 | function removeChildAt(index : int) : DisplayObject; 29 | 30 | function contains(child : DisplayObject) : Boolean; 31 | 32 | function getChildAt(index : int) : DisplayObject; 33 | 34 | function get parent() : DisplayObjectContainer; 35 | 36 | function get numChildren() : int; 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/core/ISkin.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.core { 25 | 26 | /** 27 | * Programmatic skin interface. 28 | * 29 | *

A programmatic skin should implement this interface in order to 30 | * get its methods invoked in a defined order.

31 | * 32 | * @author jes 14.08.2009 33 | */ 34 | public interface ISkin extends IDisplayObject { 35 | 36 | /** 37 | * Sets the skin dimensions. 38 | * 39 | *

The dimensions will initially be set from the owner view before the 40 | * skin is added to the display hierarchy.

41 | * 42 | * @param width The skin width. 43 | * @param height The skin height. 44 | */ 45 | function setSize(width : int, height : int) : void; 46 | 47 | /** 48 | * Commands the skin to draw its content. 49 | * 50 | *

The method is invoked after the skin has been added to the 51 | * parent display object and every time a skin should be updated, 52 | * e.g. if its size changed.

53 | * 54 | *

Updating a skin usually requires a full redraw. The drawSkin() method 55 | * of an ISkin implementor should therefore remove all content before 56 | * it redraws.

57 | */ 58 | function drawSkin() : void; 59 | 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/core/asdpc_internal.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.core { 25 | 26 | /** 27 | * Defines a namespace for framework internal access of non public methods. 28 | * 29 | * @author jes 17.08.2009 30 | */ 31 | public namespace asdpc_internal = "http://sibirjak.com/asdpc"; 32 | 33 | } 34 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/core/constants/Direction.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.core.constants { 25 | 26 | /** 27 | * Direction constants. 28 | * 29 | * @author jes 23.07.2009 30 | */ 31 | public class Direction { 32 | 33 | /** 34 | * Name constant for the horizontal direction. 35 | */ 36 | public static const HORIZONTAL : String = "horizontal"; 37 | 38 | /** 39 | * Name constant for the vertical direction. 40 | */ 41 | public static const VERTICAL : String = "vertical"; 42 | 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/core/constants/Position.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.core.constants { 25 | 26 | /** 27 | * Positions constants. 28 | * 29 | * @author jes 16.07.2009 30 | */ 31 | public class Position { 32 | 33 | /** 34 | * Name constant for the horizontal left position. 35 | */ 36 | public static const LEFT : String = "left"; 37 | 38 | /** 39 | * Name constant for the horizontal center position. 40 | */ 41 | public static const CENTER : String = "center"; 42 | 43 | /** 44 | * Name constant for the horizontal right position. 45 | */ 46 | public static const RIGHT : String = "right"; 47 | 48 | /** 49 | * Name constant for the vertical top position. 50 | */ 51 | public static const TOP : String = "top"; 52 | 53 | /** 54 | * Name constant for the vertical center position. 55 | */ 56 | public static const MIDDLE : String = "middle"; 57 | 58 | /** 59 | * Name constant for the vertical bottom position. 60 | */ 61 | public static const BOTTOM : String = "bottom"; 62 | 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/core/constants/Visibility.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.core.constants { 25 | 26 | /** 27 | * Visibility constants. 28 | * 29 | * @author jes 23.07.2009 30 | */ 31 | public class Visibility { 32 | 33 | /** 34 | * Name constant for visible. 35 | */ 36 | public static const VISIBLE : String = "visible"; 37 | 38 | /** 39 | * Name constant for an automatically calculated visibility. 40 | */ 41 | public static const AUTO : String = "auto"; 42 | 43 | /** 44 | * Name constant for hidden. 45 | */ 46 | public static const HIDDEN : String = "hidden"; 47 | 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/core/dataprovider/DataProviderEventDispatcher.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.core.dataprovider { 25 | import flash.events.EventDispatcher; 26 | 27 | /** 28 | * Convenient base class for event dispatching data source adapters. 29 | * 30 | * @author jes 29.07.2009 31 | */ 32 | public class DataProviderEventDispatcher extends EventDispatcher { 33 | 34 | /** 35 | * Dispatches a DataProviderEvent event of kind ITEM_ADDED. 36 | * 37 | * @param index The index where the items have been added. 38 | * @param numItems The number of items added. 39 | */ 40 | protected final function dispatchItemsAdded(index : uint, numItems : uint) : void { 41 | dispatchEvent(new DataProviderEvent( 42 | DataProviderEvent.ITEM_ADDED, index, numItems 43 | )); 44 | } 45 | 46 | /** 47 | * Dispatches a DataProviderEvent event of kind ITEM_REMOVED. 48 | * 49 | * @param index The index where the items have been removed. 50 | * @param numItems The number of items removed. 51 | */ 52 | protected final function dispatchItemsRemoved(index : uint, numItems : uint) : void { 53 | dispatchEvent(new DataProviderEvent( 54 | DataProviderEvent.ITEM_REMOVED, index, numItems 55 | )); 56 | } 57 | 58 | /** 59 | * Dispatches a DataProviderEvent event of kind RESET. 60 | */ 61 | protected final function dispatchReset() : void { 62 | dispatchEvent(new DataProviderEvent(DataProviderEvent.RESET)); 63 | } 64 | 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/core/dataprovider/IDataSourceAdapter.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.core.dataprovider { 25 | import org.as3commons.collections.framework.IDataProvider; 26 | 27 | /** 28 | * DataSourceAdapter interface. 29 | * 30 | * @author jes 23.11.2009 31 | */ 32 | public interface IDataSourceAdapter extends IDataProvider { 33 | 34 | /** 35 | * The adapted data source. 36 | */ 37 | function get dataSource() : *; 38 | 39 | /** 40 | * Cleans up all listeners to the adapted data source. 41 | * 42 | *

Binding a data source to a view component requires the adapter 43 | * to create event listeners to changes of the data source. If an item has 44 | * been removed from the data source, its listeners should also be removed 45 | * from the adapting object.

46 | */ 47 | function cleanUp() : void; 48 | 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/core/dataprovider/IMapAdapter.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.core.dataprovider { 25 | 26 | /** 27 | * Interface for map data providers. 28 | * 29 | * @author jes 03.11.2009 30 | */ 31 | public interface IMapAdapter { 32 | 33 | /** 34 | * Returns the key for the item at the given position. 35 | * 36 | * @return The key of the item or null, if the position is invalid. 37 | */ 38 | function getKeyAt(index : uint) : *; 39 | 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/core/dataprovider/adapter/ArrayAdapter.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.core.dataprovider.adapter { 25 | import com.sibirjak.asdpc.core.dataprovider.IDataSourceAdapter; 26 | 27 | /** 28 | * Array to IDataProvider adapter. 29 | * 30 | * @author jes 29.07.2009 31 | */ 32 | public class ArrayAdapter implements IDataSourceAdapter { 33 | 34 | /** 35 | * The adapted array. 36 | */ 37 | private var _array : Array; 38 | 39 | /** 40 | * ArrayAdapter constructor. 41 | * 42 | * @param array The array to adapt. 43 | */ 44 | public function ArrayAdapter(array : Array) { 45 | _array = array; 46 | } 47 | 48 | /* 49 | * IDataProvider 50 | */ 51 | 52 | /** 53 | * @inheritDoc 54 | */ 55 | public function itemAt(index : uint) : * { 56 | return _array[index]; 57 | } 58 | 59 | /** 60 | * @inheritDoc 61 | */ 62 | public function get size() : uint { 63 | return _array.length; 64 | } 65 | 66 | /* 67 | * IDataSourceAdapter 68 | */ 69 | 70 | /** 71 | * @inheritDoc 72 | */ 73 | public function get dataSource() : * { 74 | return _array; 75 | } 76 | 77 | /** 78 | * @inheritDoc 79 | */ 80 | public function cleanUp() : void { 81 | // no listener to clean up 82 | } 83 | 84 | /* 85 | * Info 86 | */ 87 | 88 | /** 89 | * toString() function. 90 | */ 91 | public function toString() : String { 92 | return "[ArrayAdapter] items:" + size; 93 | } 94 | 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/core/dataprovider/adapter/XMLAdapter.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.core.dataprovider.adapter { 25 | import com.sibirjak.asdpc.core.dataprovider.IDataSourceAdapter; 26 | 27 | /** 28 | * XML to IDataProvider adapter. 29 | * 30 | * @author jes 22.01.2010 31 | */ 32 | public class XMLAdapter implements IDataSourceAdapter { 33 | 34 | /** 35 | * The adapted XML. 36 | */ 37 | private var _xml : XML; 38 | 39 | /** 40 | * XMLAdapter constructor. 41 | * 42 | * @param xml The xml to adapt. 43 | */ 44 | public function XMLAdapter(xml : XML) { 45 | _xml = xml; 46 | } 47 | 48 | /* 49 | * IDataProvider 50 | */ 51 | 52 | /** 53 | * @inheritDoc 54 | */ 55 | public function itemAt(index : uint) : * { 56 | return _xml.children()[index]; 57 | } 58 | 59 | /** 60 | * @inheritDoc 61 | */ 62 | public function get size() : uint { 63 | return _xml.children().length(); 64 | } 65 | 66 | /* 67 | * IDataSourceAdapter 68 | */ 69 | 70 | /** 71 | * @inheritDoc 72 | */ 73 | public function get dataSource() : * { 74 | return _xml; 75 | } 76 | 77 | /** 78 | * @inheritDoc 79 | */ 80 | public function cleanUp() : void { 81 | // no listener to clean up 82 | } 83 | 84 | /* 85 | * Info 86 | */ 87 | 88 | /** 89 | * toString() function. 90 | */ 91 | public function toString() : String { 92 | return "[XMLAdapter] items:" + size; 93 | } 94 | 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/core/managers/IPopUpControl.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.core.managers { 25 | import com.sibirjak.asdpc.core.IView; 26 | 27 | /** 28 | * PopUpControl interface. 29 | * 30 | *

The IPopUpControl interface became necessary in conjunction with 31 | * the style management. Styles set to a popup trigger button (e.g. the 32 | * ColorPicker button or a SelectBox) should be available also to 33 | * the particular popup (ColorPicker color list, SelectBox list). Since 34 | * such popups are not direct children of their each trigger button, 35 | * the interfaces IPopUpControl and IPopUpControlPopUp tell the StyleManager 36 | * that style inheritance should respect also the trigger-popup relation.

37 | * 38 | * @author jes 10.12.2009 39 | */ 40 | public interface IPopUpControl extends IView { 41 | 42 | /** 43 | * The popup of an IPopUpControl view. 44 | */ 45 | function get popUp() : IPopUpControlPopUp; 46 | 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/core/managers/IPopUpControlPopUp.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.core.managers { 25 | import com.sibirjak.asdpc.core.IView; 26 | 27 | /** 28 | * PopUpControlPopUp interface. 29 | * 30 | *

The IPopUpControlPopUp interface became necessary in conjunction with 31 | * the style management. Styles set to a popup trigger button (e.g. the 32 | * ColorPicker button or a SelectBox) should be available also to 33 | * the particular popup (ColorPicker color list, SelectBox list). Since 34 | * such popups are not direct children of their each trigger button, 35 | * the interfaces IPopUpControl and IPopUpControlPopUp tell the StyleManager 36 | * that style inheritance should respect also the trigger-popup relation.

37 | * 38 | * @author jes 10.12.2009 39 | */ 40 | public interface IPopUpControlPopUp extends IView { 41 | 42 | /** 43 | * The owner of an IPopUpControlPopUp popup. 44 | */ 45 | function get popUpControl() : IPopUpControl; 46 | 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/core/managers/IStyleManagerClient.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.core.managers { 25 | import com.sibirjak.asdpc.core.IDisplayObject; 26 | 27 | /** 28 | * StyleManagerClient interface. 29 | * 30 | *

Any Flash display object can implement this interface an thus get styling 31 | * capabilities.

32 | * 33 | *

Each StyleManagerClient hosts its own distinctive StyleManager instance.

34 | * 35 | * @author jes 17.08.2009 36 | */ 37 | public interface IStyleManagerClient extends IDisplayObject { 38 | 39 | /** 40 | * The clients StyleManager instance. 41 | * 42 | *

This instance is usually set within the client's constructor.

43 | */ 44 | function get styleManager() : StyleManager; 45 | 46 | /** 47 | * Notifies the client about a change of a style value for that it 48 | * defines a default style. 49 | * 50 | *

To generally get notifications from the style manager, you need to 51 | * declare all particular styles via the StyleManager.setDefaultStyles() 52 | * method. You do this at best in the constructor of the client.

53 | * 54 | *

If this method has been called, you should update your client to 55 | * reflect the changes in its visualisation.

56 | * 57 | * @param property The style name. 58 | * @param value The style value. 59 | */ 60 | function styleManagerStyleChangeHandler(property : String, value : *) : void; 61 | 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/core/managers/IViewPropertyManagerClient.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.core.managers { 25 | 26 | /** 27 | * ViewPropertyManagerClient interface. 28 | * 29 | *

An IViewPropertyManagerClient can host an unlimited number of 30 | * property-value-pairs, which are accessible throughout the entire 31 | * display list.

32 | * 33 | *

Each ViewPropertyManagerClient hosts its own distinctive 34 | * ViewPropertyManager instance.

35 | * 36 | * @author jes 03.12.2009 37 | */ 38 | public interface IViewPropertyManagerClient { 39 | 40 | /** 41 | * The clients ViewPropertyManager instance. 42 | * 43 | *

The ViewPropertyManager instance is usually set 44 | * within the client's constructor.

45 | */ 46 | function get viewPropertyManager() : ViewPropertyManager; 47 | 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/listview/ListViewStyles.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.listview { 25 | 26 | /** 27 | * ListView style properties. 28 | * 29 | * @author jes 21.07.2009 30 | */ 31 | public class ListViewStyles { 32 | 33 | /* item */ 34 | 35 | /** 36 | * Style property defining the list item size. 37 | */ 38 | public const itemSize : String = "listView_itemSize"; 39 | 40 | /** 41 | * Style property defining the selected item size. 42 | */ 43 | public const selectedItemSize : String = "listView_selectedItemSize"; 44 | 45 | /* scroll bar */ 46 | 47 | /** 48 | * Style property defining the scrollbar size. 49 | */ 50 | public const scrollBarSize : String = "listView_scrollBarSize"; 51 | 52 | /** 53 | * Style property defining the scrollbar visibility. 54 | */ 55 | public const scrollBarVisibility : String = "listView_scrollBarVisibility"; 56 | 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/listview/renderer/ListItemIconStyles.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.listview.renderer { 25 | 26 | /** 27 | * ListItemIcon style properties. 28 | * 29 | * @author jes 13.01.2010 30 | */ 31 | public class ListItemIconStyles { 32 | 33 | /** 34 | * Style property defining the icon size. 35 | */ 36 | public const size : String = "listItemIcon_size"; 37 | 38 | /** 39 | * Style property defining the icon skin. 40 | */ 41 | public const iconSkin : String = "listItemIcon_iconSkin"; 42 | 43 | /** 44 | * Style property defining the icon skin function. 45 | * 46 | *

The icon skin function accepts ListItemData object and returns a class.

47 | * 48 | * 49 | [Embed(source="icon.png")] 50 | private var _icon : Class; 51 | [Embed(source="icon2.png")] 52 | private var _icon2 : Class; 53 | 54 | function iconSkinFunction(data : ListItemData) : Class { 55 | return Person(data.item).name == "Schmidt" ? _icon : _icon2; 56 | } 57 | * 58 | */ 59 | public const iconSkinFunction : String = "listItemIcon_iconSkinFunction"; 60 | 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/listview/renderer/assets/document.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fenoxo/CharacterViewer/c43ceebe47241e30fe7639c3e9f7ed9205d0242a/com/sibirjak/asdpc/listview/renderer/assets/document.png -------------------------------------------------------------------------------- /com/sibirjak/asdpc/scrollbar/ScrollBarStyles.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.scrollbar { 25 | 26 | /** 27 | * ScrollBar style properties. 28 | * 29 | * @author jes 17.07.2009 30 | */ 31 | public class ScrollBarStyles { 32 | 33 | /** 34 | * Style property defining the scroll button visibility. 35 | */ 36 | public const scrollButtonVisibility : String = "scrollBar_scrollButtonVisibility"; 37 | 38 | /** 39 | * Style property defining the mouse wheel mode. 40 | */ 41 | public const ctrlKeyWheel : String = "scrollBar_ctrlKeyWheel"; 42 | 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/scrollbar/ScrollEvent.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.scrollbar { 25 | import flash.events.Event; 26 | 27 | /** 28 | * ScrollBar event. 29 | * 30 | * @author jes 16.06.2009 31 | */ 32 | public class ScrollEvent extends Event { 33 | 34 | /** 35 | * Event type SCROLL. 36 | */ 37 | public static var SCROLL : String = "scrollBar_scroll"; 38 | 39 | /** 40 | * The current document position. 41 | */ 42 | private var _documentPosition : int; 43 | 44 | /** 45 | * ScrollEvent constructor. 46 | * 47 | * @param documentPosition The current document position. 48 | */ 49 | public function ScrollEvent(documentPosition : int) { 50 | super(SCROLL); 51 | 52 | _documentPosition = documentPosition; 53 | } 54 | 55 | /** 56 | * Returns the current document position. 57 | * 58 | * @return The current document position. 59 | */ 60 | public function get documentPosition() : int { 61 | return _documentPosition; 62 | } 63 | 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/textfield/ILabel.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.textfield { 25 | import com.sibirjak.asdpc.textfield.core.ITextField; 26 | 27 | /** 28 | * Label public interface. 29 | * 30 | * @author jes 14.07.2009 31 | */ 32 | public interface ILabel extends ITextField { 33 | 34 | /** 35 | *The width of the inner text field. 36 | */ 37 | function get innerWidth() : uint; 38 | 39 | /** 40 | * The height of the inner text field. 41 | */ 42 | function get innerHeight() : uint; 43 | 44 | /** 45 | * True, if the text has been chopped to fit the boundaries. 46 | */ 47 | function get textChopped() : Boolean; 48 | 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/textfield/ITextInput.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.textfield { 25 | import com.sibirjak.asdpc.textfield.core.ITextField; 26 | 27 | /** 28 | * TextInput public interface. 29 | * 30 | * @author jes 04.11.2009 31 | */ 32 | public interface ITextInput extends ITextField { 33 | 34 | /** 35 | * @private 36 | */ 37 | function set defaultText(text : String) : void; 38 | 39 | /** 40 | * Sets or returns the text that is displayed if the use has not added text yet. 41 | */ 42 | function get defaultText() : String; 43 | 44 | /** 45 | * Sets the focus into the TextInput instance. 46 | */ 47 | function setFocus() : void; 48 | 49 | /** 50 | * Removes the focus from the TextInput instance. 51 | */ 52 | function clearFocus() : void; 53 | 54 | /** 55 | * Preselects the text within the given range. 56 | * 57 | * @param startIndex The first char index. 58 | * @param startIndex The last char index. 59 | */ 60 | function setSelection(startIndex : uint, endIndex : uint) : void; 61 | 62 | /** 63 | * Scrolls the text of the internal text field horizontally. 64 | * 65 | * @param scrollPosition The index of the char to scroll to. 66 | */ 67 | function scrollTo(scrollPosition : uint) : void; 68 | 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/textfield/LabelEvent.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.textfield { 25 | import flash.events.Event; 26 | 27 | /** 28 | * Label event. 29 | * 30 | * @author jes 24.11.2009 31 | */ 32 | public class LabelEvent extends Event { 33 | 34 | /** 35 | * Event type INNER_SIZE_CHANGED 36 | * 37 | *

Dispatched, if the size of the inner text field has changed.

38 | */ 39 | public static const INNER_SIZE_CHANGED : String = "label_sizeChanged"; 40 | 41 | /** 42 | * True, if the text has been chopped in order to fit the label boundaries. 43 | */ 44 | public var chopped : Boolean; 45 | 46 | /** 47 | * LabelEvent constructor. 48 | * 49 | * @param type The event type. 50 | */ 51 | public function LabelEvent(type : String) { 52 | super(type); 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/textfield/LabelStyles.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.textfield { 25 | import com.sibirjak.asdpc.textfield.core.TextFieldBaseStyles; 26 | 27 | /** 28 | * Label style properties. 29 | * 30 | * @author jes 17.07.2009 31 | */ 32 | public class LabelStyles extends TextFieldBaseStyles { 33 | 34 | /** 35 | * Style property defining the text fitting mode. 36 | */ 37 | public const fittingMode: String = "label_fittingMode"; 38 | 39 | /** 40 | * Style property defining the horizontal align of the text within the label dimensions. 41 | */ 42 | public const horizontalAlign: String = "label_horizontalAlign"; 43 | 44 | /** 45 | * Style property defining the vertical align of the text within the label dimensions. 46 | */ 47 | public const verticalAlign: String = "label_verticalAlign"; 48 | 49 | /** 50 | * Style property defining the label border type. 51 | */ 52 | public const borderType : String = "label_borderType"; 53 | 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/textfield/TextInputEvent.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.textfield { 25 | import flash.events.Event; 26 | 27 | /** 28 | * TextInput event. 29 | * 30 | * @author jes 05.11.2009 31 | */ 32 | public class TextInputEvent extends Event { 33 | 34 | /** 35 | * Event type FOCUS_IN 36 | * 37 | *

Dispatched, if the user focuses the text input.

38 | */ 39 | public static const FOCUS_IN : String = "textInput_focusIn"; 40 | 41 | /** 42 | * Event type FOCUS_OUT 43 | * 44 | *

Dispatched, if the text input has lost the focus.

45 | */ 46 | public static const FOCUS_OUT : String = "textInput_focusOut"; 47 | 48 | /** 49 | * Event type CHANGED 50 | * 51 | *

Dispatched, after the text of the inner text field has changed.

52 | */ 53 | public static const CHANGED : String = "textInput_changed"; 54 | 55 | /** 56 | * Event type CANCEL. 57 | * 58 | *

Dispatched, if the user has pressed the ESC key.

59 | */ 60 | public static const CANCEL : String = "textInput_cancel"; 61 | 62 | /** 63 | * Event type SUBMIT. 64 | * 65 | *

Dispatched, if the user has pressed the ENTER key.

66 | */ 67 | public static const SUBMIT : String = "textInput_submit"; 68 | 69 | /** 70 | * TextInputEvent constructor. 71 | * 72 | * @param type The event type. 73 | */ 74 | public function TextInputEvent(type : String) { 75 | super(type); 76 | } 77 | 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/textfield/TextInputStyles.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.textfield { 25 | 26 | /** 27 | * TextInput style properties. 28 | * 29 | * @author jes 04.11.2009 30 | */ 31 | public class TextInputStyles extends LabelStyles { 32 | 33 | /** 34 | * Style property defining the default text color. 35 | */ 36 | public const defaultTextColor: String = "textInput_defaultTextColor"; 37 | 38 | /** 39 | * Style property defining the restricted chars. 40 | */ 41 | public const restrict : String = "textInput_restrict"; 42 | 43 | /** 44 | * Style property defining the maximum number of chars 45 | */ 46 | public const maxChars : String = "textInput_maxChars"; 47 | 48 | 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/textfield/core/ITextField.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.textfield.core { 25 | import com.sibirjak.asdpc.core.IControl; 26 | import com.sibirjak.asdpc.core.IView; 27 | 28 | /** 29 | * Base interface for all text fields. 30 | * 31 | * @author jes 04.11.2009 32 | */ 33 | public interface ITextField extends IView, IControl { 34 | 35 | /** 36 | * @private 37 | */ 38 | function set text(text : String) : void; 39 | 40 | /** 41 | * Sets or returns the current content of the internal text field. 42 | */ 43 | function get text() : String; 44 | 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/tooltip/core/ToolTipLabel.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.tooltip.core { 25 | import com.sibirjak.asdpc.textfield.Label; 26 | 27 | import flash.text.TextFieldAutoSize; 28 | 29 | /** 30 | * Self resizing label for the ToolTip component. 31 | * 32 | * @author jes 10.12.2009 33 | */ 34 | public class ToolTipLabel extends Label { 35 | 36 | /** 37 | * ToolTipLabel constructor. 38 | */ 39 | public function ToolTipLabel() { 40 | 41 | setDefaultStyles([ 42 | Label.style.size, 9 43 | ]); 44 | 45 | } 46 | 47 | /* 48 | * TextFieldBase protected 49 | */ 50 | 51 | /** 52 | * @inheritDoc 53 | */ 54 | override protected function setTextFieldProperties() : void { 55 | _tf.autoSize = TextFieldAutoSize.LEFT; 56 | _tf.multiline = false; 57 | _tf.wordWrap = false; 58 | } 59 | 60 | /** 61 | * @inheritDoc 62 | */ 63 | override protected function layoutTextField() : void { 64 | setTextFieldProperties(); 65 | 66 | if (_tf.width > _width) { 67 | _tf.multiline = true; 68 | _tf.wordWrap = true; 69 | _tf.width = _width; 70 | _tf.width = _tf.textWidth + 4; 71 | } 72 | } 73 | 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/treeview/ITreeView.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.treeview { 25 | import com.sibirjak.asdpc.listview.IListView; 26 | 27 | /** 28 | * TreeView public interface. 29 | * 30 | * @author jes 27.07.2009 31 | */ 32 | public interface ITreeView extends IListView { 33 | 34 | /* 35 | * Expand, collapse 36 | */ 37 | 38 | /** 39 | * Expands the node at the given index. 40 | * 41 | * @param listIndex The index of the node. 42 | * @param expandAll True, if the node should be expanded recursively. 43 | */ 44 | function expandNodeAt(listIndex : uint, expandAll : Boolean = false) : void; 45 | 46 | /** 47 | * Collapses the node at the given index. 48 | * 49 | * @param listIndex The index of the node. 50 | * @param collapseAll True, if the node should be collapsed recursively. 51 | */ 52 | function collapseNodeAt(listIndex : uint, collapseAll : Boolean = false) : void; 53 | 54 | } 55 | } 56 | 57 | 58 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/treeview/TreeNodeData.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.treeview { 25 | import com.sibirjak.asdpc.core.asdpc_internal; 26 | import com.sibirjak.asdpc.listview.ListItemData; 27 | import com.sibirjak.asdpc.treeview.core.ITreeNode; 28 | 29 | /** 30 | * Plain data object representing tree node data and tree node state. 31 | * 32 | * @author jes 12.01.2010 33 | */ 34 | public class TreeNodeData extends ListItemData { 35 | 36 | /** 37 | * The tree node adapting the data source item. 38 | */ 39 | private var _treeNode : ITreeNode; 40 | 41 | /** 42 | * True, if the node is expanded. 43 | */ 44 | public function get isExpanded() : Boolean { 45 | return _treeNode.isExpanded; 46 | } 47 | 48 | /* 49 | * ListItemData properties 50 | */ 51 | 52 | /** 53 | * @inheritDoc 54 | */ 55 | override public function get itemIndex() : uint { 56 | return _treeNode.itemIndex; 57 | } 58 | 59 | /** 60 | * @inheritDoc 61 | */ 62 | override public function get parentItem() : * { 63 | if (_treeNode.parentNode) { 64 | return _treeNode.parentNode.dataSource; 65 | } else { 66 | return null; 67 | } 68 | } 69 | 70 | /* 71 | * asdpc_internal 72 | */ 73 | 74 | /** 75 | * Sets the tree node. 76 | * 77 | * @param treeNode The tree node. 78 | */ 79 | asdpc_internal function setTreeNode_internal(treeNode : ITreeNode) : void { 80 | _treeNode = treeNode; 81 | } 82 | 83 | /** 84 | * Returns the tree node. 85 | */ 86 | asdpc_internal function get treeNode_internal() : ITreeNode { 87 | return _treeNode; 88 | } 89 | 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/treeview/TreeViewStyles.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.treeview { 25 | import com.sibirjak.asdpc.listview.ListViewStyles; 26 | 27 | /** 28 | * TreeView style properties. 29 | * 30 | * @author jes 09.11.2009 31 | */ 32 | public class TreeViewStyles extends ListViewStyles { 33 | 34 | /** 35 | * Style property defining the root node visibility. 36 | */ 37 | public const showRoot : String = "treeView_showRoot"; 38 | 39 | /** 40 | * Style property defining the max level for a recursive expansion. 41 | */ 42 | public const maxExpandAllLevel : String = "treeView_maxExpandAllLevel"; 43 | 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/treeview/constants/TreeNodeState.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.treeview.constants { 25 | 26 | /** 27 | * TreeNodeState contants. 28 | * 29 | * @author jes 03.11.2009 30 | */ 31 | public class TreeNodeState { 32 | 33 | /** 34 | * Name constant for a leaf node. 35 | */ 36 | public static const LEAF : String = "leaf"; 37 | 38 | /** 39 | * Name constant for closed branch node. 40 | */ 41 | public static const BRANCH_CLOSED : String = "branchClosed"; 42 | 43 | /** 44 | * Name constant for an open branch node. 45 | */ 46 | public static const BRANCH_OPEN : String = "branchOpen"; 47 | 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/treeview/core/ITreeNodeRenderer.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.treeview.core { 25 | import com.sibirjak.asdpc.listview.core.IListItemRenderer; 26 | 27 | /** 28 | * TreeNodeRenderer interface. 29 | * 30 | *

An ITreeNodeRenderer currently does not add functionality 31 | * to the IListItemRenderer.

32 | * 33 | * @author jes 07.08.2009 34 | */ 35 | public interface ITreeNodeRenderer extends IListItemRenderer { 36 | 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/treeview/renderer/DirectoryIconStyles.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.treeview.renderer { 25 | import com.sibirjak.asdpc.listview.renderer.ListItemIconStyles; 26 | 27 | /** 28 | * DirectoryIcon style properties. 29 | * 30 | * @author jes 13.01.2010 31 | */ 32 | public class DirectoryIconStyles extends ListItemIconStyles { 33 | 34 | /** 35 | * Style property defining the closed branch node icon skin. 36 | */ 37 | public const branchClosedIconSkin : String = "directoryIcon_branchClosedIconSkin"; 38 | 39 | /** 40 | * Style property defining the open branch node icon skin. 41 | */ 42 | public const branchOpenIconSkin : String = "directoryIcon_branchOpenIconSkin"; 43 | 44 | /** 45 | * Style property defining the leaf node icon skin. 46 | */ 47 | public const leafIconSkin : String = "directoryIcon_leafIconSkin"; 48 | 49 | /** 50 | * Style property defining the closed branch node icon skin name. 51 | */ 52 | public const branchClosedIconSkinName : String = "directoryIcon_branchClosedIconSkinName"; 53 | 54 | /** 55 | * Style property defining the open branch node icon skin name. 56 | */ 57 | public const branchOpenIconSkinName : String = "directoryIcon_branchOpenIconSkinName"; 58 | 59 | /** 60 | * Style property defining the leaf node icon skin name. 61 | */ 62 | public const leafIconSkinName : String = "directoryIcon_leafIconSkinName"; 63 | 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/treeview/renderer/IConnectorSkin.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.treeview.renderer { 25 | import com.sibirjak.asdpc.core.ISkin; 26 | 27 | /** 28 | * Connector skin interface. 29 | * 30 | * @author jes 15.01.2010 31 | */ 32 | public interface IConnectorSkin extends ISkin { 33 | 34 | /** 35 | * If this value is set, the bottom connector should start 36 | * at the specified position. 37 | */ 38 | function set bottomY(bottomY : uint) : void; 39 | 40 | /** 41 | * If this value is set, the bottom connector should reach 42 | * the _height + extendedHeight position. 43 | */ 44 | function set extendedHeight(extendedHeight : uint) : void; 45 | 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/treeview/renderer/TreeNodeRendererStyles.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.treeview.renderer { 25 | import com.sibirjak.asdpc.listview.renderer.ListItemRendererStyles; 26 | 27 | /** 28 | * TreeNodeRenderer style properties. 29 | * 30 | * @author jes 02.11.2009 31 | */ 32 | public class TreeNodeRendererStyles extends ListItemRendererStyles { 33 | 34 | /** 35 | * Style property defining the disclosure button visibility. 36 | */ 37 | public const disclosureButton : String = "treeNodeRenderer_disclosureButton"; 38 | 39 | /** 40 | * Style property defining the connector visibility. 41 | */ 42 | public const connectors : String = "treeNodeRenderer_connectors"; 43 | 44 | /** 45 | * Style property defining the double click behaviour. 46 | */ 47 | public const expandCollapseOnDoubleClick : String = "treeNodeRenderer_expandCollapseOnDoubleClick"; 48 | 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /com/sibirjak/asdpc/treeview/renderer/assets/document.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fenoxo/CharacterViewer/c43ceebe47241e30fe7639c3e9f7ed9205d0242a/com/sibirjak/asdpc/treeview/renderer/assets/document.png -------------------------------------------------------------------------------- /com/sibirjak/asdpc/treeview/renderer/assets/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fenoxo/CharacterViewer/c43ceebe47241e30fe7639c3e9f7ed9205d0242a/com/sibirjak/asdpc/treeview/renderer/assets/folder.png -------------------------------------------------------------------------------- /com/sibirjak/asdpc/treeview/renderer/assets/folder_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fenoxo/CharacterViewer/c43ceebe47241e30fe7639c3e9f7ed9205d0242a/com/sibirjak/asdpc/treeview/renderer/assets/folder_open.png -------------------------------------------------------------------------------- /com/sibirjak/asdpc/treeview/renderer/skins/SolidConnectorSkin.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpc.treeview.renderer.skins { 25 | 26 | /* 27 | * Styles 28 | */ 29 | 30 | /** 31 | * @copy SolidConnectorSkin#style_color 32 | */ 33 | [Style(name="solidConnectorSkin_color", type="uint", format="Color")] 34 | 35 | /** 36 | * Solid connector skin. 37 | * 38 | * @author jes 29.10.2009 39 | */ 40 | public class SolidConnectorSkin extends BaseConnectorSkin { 41 | 42 | /** 43 | * Style property defining the connector color. 44 | */ 45 | public static const style_color : String = "solidConnectorSkin_color"; 46 | 47 | /** 48 | * SolidConnectorSkin constructor. 49 | */ 50 | public function SolidConnectorSkin() { 51 | setDefaultStyles([ 52 | style_color, 0xCCCCCC, 53 | ]); 54 | } 55 | 56 | /* 57 | * BaseConnectorSkin protected 58 | */ 59 | 60 | /** 61 | * @inheritDoc 62 | */ 63 | override protected function drawVertical(x : int, y : int, height : int) : void { 64 | graphics.beginFill(getStyle(style_color)); 65 | graphics.drawRect(x, y, 1, height); 66 | } 67 | 68 | /** 69 | * @inheritDoc 70 | */ 71 | override protected function drawHorizontal(x : int, y : int, width : int) : void { 72 | graphics.beginFill(getStyle(style_color)); 73 | graphics.drawRect(x, y, width, 1); 74 | } 75 | 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/checkbox/skins/CheckBoxIconSkin.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpcbeta.checkbox.skins { 25 | import com.sibirjak.asdpc.button.Button; 26 | import com.sibirjak.asdpc.core.Skin; 27 | 28 | import flash.display.Shape; 29 | 30 | /** 31 | * @author jes 02.12.2009 32 | */ 33 | public class CheckBoxIconSkin extends Skin { 34 | 35 | public static const style_color : String = "checkBoxIconSkin_color"; 36 | public static const style_size : String = "checkBoxIconSkin_size"; 37 | 38 | public function CheckBoxIconSkin() { 39 | 40 | setDefaultStyles([ 41 | style_color, 0x666666, 42 | style_size, 6 43 | ]); 44 | } 45 | 46 | override protected function draw() : void { 47 | 48 | var isDown : Boolean = (name == Button.DOWN_ICON_SKIN_NAME || name == Button.SELECTED_DOWN_ICON_SKIN_NAME); 49 | var isDisabled : Boolean = (name == Button.DISABLED_ICON_SKIN_NAME || name == Button.SELECTED_DISABLED_ICON_SKIN_NAME); 50 | var alpha : Number = isDown || isDisabled ? .3 : 1; 51 | 52 | var size : uint = getStyle(style_size); 53 | var icon : Shape = new Shape(); 54 | 55 | with (icon.graphics) { 56 | lineStyle(2, getStyle(style_color), alpha); 57 | 58 | moveTo(0, Math.round(1 / 2 * size)); 59 | lineTo(Math.round(1 / 3 * size), size); 60 | lineTo(size, 0); 61 | 62 | } 63 | 64 | icon.x = Math.round((_width - size) / 2); 65 | icon.y = Math.round((_height - size) / 2); 66 | 67 | addChild(icon); 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/colorpicker/ColorPickerEvent.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpcbeta.colorpicker { 25 | import flash.events.Event; 26 | 27 | /** 28 | * @author jes 08.12.2009 29 | */ 30 | public class ColorPickerEvent extends Event { 31 | 32 | public static const COLOR_ROLL_OVER : String = "colorPicker_color_rollover"; 33 | public static const COLOR_SELECTED : String = "colorPicker_color_selected"; 34 | 35 | private var _selectedColor : uint; 36 | 37 | public function ColorPickerEvent(type : String) { 38 | super(type); 39 | } 40 | 41 | public function get selectedColor() : uint { 42 | return _selectedColor; 43 | } 44 | 45 | public function set selectedColor(selectedColor : uint) : void { 46 | _selectedColor = selectedColor; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/colorpicker/assets/button_open_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fenoxo/CharacterViewer/c43ceebe47241e30fe7639c3e9f7ed9205d0242a/com/sibirjak/asdpcbeta/colorpicker/assets/button_open_icon.png -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/colorpicker/assets/color_swatch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fenoxo/CharacterViewer/c43ceebe47241e30fe7639c3e9f7ed9205d0242a/com/sibirjak/asdpcbeta/colorpicker/assets/color_swatch.png -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/colorpicker/core/ColorPreview.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpcbeta.colorpicker.core { 25 | import com.sibirjak.asdpc.core.View; 26 | 27 | /** 28 | * @author jes 07.12.2009 29 | */ 30 | public class ColorPreview extends View { 31 | 32 | private var _color : uint; 33 | 34 | public function ColorPreview() { 35 | } 36 | 37 | public function set color(color : uint) : void { 38 | _color = color; 39 | 40 | draw(); 41 | } 42 | 43 | public function get color() : uint { 44 | return _color; 45 | } 46 | 47 | /* 48 | * View life cycle 49 | */ 50 | 51 | override protected function draw() : void { 52 | 53 | with (graphics) { 54 | clear(); 55 | 56 | beginFill(_color); 57 | drawRect(0, 0, _width, _height); 58 | endFill(); 59 | } 60 | } 61 | 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/colorpicker/core/ColorSwatch.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpcbeta.colorpicker.core { 25 | import flash.display.Sprite; 26 | 27 | /** 28 | * @author jes 04.12.2009 29 | */ 30 | public class ColorSwatch extends Sprite { 31 | 32 | public var color : int; 33 | public var hex : String; 34 | public var index : int; 35 | 36 | public function ColorSwatch(theColor : int, width : uint, height : uint, theIndex : uint) { 37 | color = theColor; 38 | hex = ColorUtil.hexToString(color, false); 39 | index = theIndex; 40 | 41 | with (graphics) { 42 | if (color > -1) { 43 | lineStyle(0, 0x000000); 44 | beginFill(color); 45 | drawRect(0, 0, width, height); 46 | } else { 47 | lineStyle(0, 0); 48 | beginFill(0xFFFFFF); 49 | drawRect(0, 0, width, height); 50 | 51 | lineStyle(0, 0xBBBBBB); 52 | moveTo(width, 1); 53 | lineTo(1, height); 54 | } 55 | 56 | } 57 | } 58 | 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/colorpicker/core/ColorSwatchBorder.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpcbeta.colorpicker.core { 25 | import flash.display.Sprite; 26 | 27 | /** 28 | * @author jes 08.12.2009 29 | */ 30 | public class ColorSwatchBorder extends Sprite { 31 | 32 | private var _color : uint; 33 | 34 | public function ColorSwatchBorder(width : uint, height : uint, borderColor : uint = 0xFFFFFF) { 35 | with (graphics) { 36 | clear(); 37 | lineStyle(1, borderColor); 38 | drawRect(0, 0, width, height); 39 | } 40 | 41 | mouseEnabled = false; 42 | } 43 | 44 | public function get color() : uint { 45 | return _color; 46 | } 47 | 48 | public function set color(color : uint) : void { 49 | _color = color; 50 | } 51 | 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/colorpicker/skins/ColorPickerIconSkin.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpcbeta.colorpicker.skins { 25 | import com.sibirjak.asdpc.core.Skin; 26 | 27 | import flash.display.Shape; 28 | 29 | /** 30 | * @author jes 08.12.2009 31 | */ 32 | public class ColorPickerIconSkin extends Skin { 33 | 34 | public static const style_color : String = "colorPickerIconSkin_color"; 35 | public static const style_size : String = "colorPickerIconSkin_size"; 36 | 37 | public function ColorPickerIconSkin() { 38 | setDefaultStyles([ 39 | style_color, 0x666666, 40 | style_size, 8, 41 | ]); 42 | } 43 | 44 | override protected function draw() : void { 45 | var icon : Shape = new Shape(); 46 | 47 | var size : uint = getStyle(style_size); 48 | 49 | with (icon.graphics) { 50 | beginFill(getStyle(style_color)); 51 | drawRect(0, 0, size, size - 4); 52 | } 53 | 54 | icon.x = Math.round((_width - size) / 2); 55 | icon.y = Math.round((_height - size) / 2); 56 | 57 | addChild(icon); 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/layout/GridLayoutStyles.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpcbeta.layout { 25 | 26 | /** 27 | * @author jes 07.12.2009 28 | */ 29 | public class GridLayoutStyles extends LayoutStyles { 30 | 31 | public const itemWidth : String = "gridLayout_itemWidth"; 32 | 33 | public const itemHeight : String = "gridLayout_itemHeight"; 34 | 35 | public const numItemsPerRow : String = "gridLayout_numItemsPerRow"; 36 | 37 | public const horizontalAlign : String = "gridLayout_horizontalAlign"; 38 | 39 | public const verticalAlign : String = "gridLayout_verticalAlign"; 40 | 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/layout/HLayoutStyles.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpcbeta.layout { 25 | 26 | /** 27 | * @author jes 07.12.2009 28 | */ 29 | public class HLayoutStyles extends LayoutStyles { 30 | 31 | public const verticalAlign : String = "hLayout_verticalAlign"; 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/layout/LayoutStyles.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpcbeta.layout { 25 | 26 | /** 27 | * @author jes 02.12.2009 28 | */ 29 | public class LayoutStyles { 30 | 31 | public const itemPadding : String = "layout_itemPadding"; 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/layout/VLayoutStyles.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpcbeta.layout { 25 | 26 | /** 27 | * @author jes 07.12.2009 28 | */ 29 | public class VLayoutStyles extends LayoutStyles { 30 | 31 | public const horizontalAlign : String = "vLayout_horizontalAlign"; 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/radiobutton/IRadioButton.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpcbeta.radiobutton { 25 | import com.sibirjak.asdpc.button.IButton; 26 | 27 | /** 28 | * @author jes 03.12.2009 29 | */ 30 | public interface IRadioButton extends IButton { 31 | 32 | function get value() : *; 33 | 34 | function set value(value : *) : void; 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/radiobutton/RadioButton.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpcbeta.radiobutton { 25 | import com.sibirjak.asdpc.button.Button; 26 | import com.sibirjak.asdpcbeta.checkbox.CheckBox; 27 | import com.sibirjak.asdpcbeta.radiobutton.skins.RadioButtonIconSkin; 28 | import com.sibirjak.asdpcbeta.radiobutton.skins.RadioButtonSkin; 29 | 30 | /** 31 | * @author jes 03.12.2009 32 | */ 33 | public class RadioButton extends CheckBox implements IRadioButton { 34 | 35 | public function RadioButton() { 36 | setDefaultStyles([ 37 | 38 | // only one background skin 39 | Button.style.upSkin, RadioButtonSkin, 40 | Button.style.disabledSkin, RadioButtonSkin, 41 | 42 | Button.style.downIconSkin, RadioButtonIconSkin, 43 | 44 | Button.style.selectedUpIconSkin, RadioButtonIconSkin, 45 | Button.style.selectedOverIconSkinName, Button.SELECTED_UP_ICON_SKIN_NAME, 46 | Button.style.selectedDownIconSkin, RadioButtonIconSkin, 47 | Button.style.selectedDisabledIconSkin, RadioButtonIconSkin 48 | 49 | ]); 50 | 51 | } 52 | 53 | override protected function allowedToChangeSelection() : Boolean { 54 | return !selected; 55 | } 56 | 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/radiobutton/RadioGroupEvent.as: -------------------------------------------------------------------------------- 1 | package com.sibirjak.asdpcbeta.radiobutton { 2 | 3 | import flash.events.Event; 4 | 5 | /** 6 | * @author Jens Struwe 26.07.2011 7 | */ 8 | public class RadioGroupEvent extends Event { 9 | 10 | public static var CHANGE : String = "slider_change"; 11 | 12 | private var _value : *; 13 | 14 | public function RadioGroupEvent(type : String, value : *) { 15 | _value = value; 16 | 17 | super(type); 18 | } 19 | 20 | public function get value() : * { 21 | return _value; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/radiobutton/skins/RadioButtonIconSkin.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpcbeta.radiobutton.skins { 25 | import com.sibirjak.asdpc.button.Button; 26 | import com.sibirjak.asdpc.core.Skin; 27 | 28 | import flash.display.Shape; 29 | 30 | /** 31 | * @author jes 03.12.2009 32 | */ 33 | public class RadioButtonIconSkin extends Skin { 34 | 35 | public static const style_color : String = "radioButtonIconSkin_color"; 36 | public static const style_size : String = "radioButtonIconSkin_size"; 37 | 38 | public function RadioButtonIconSkin() { 39 | 40 | setDefaultStyles([ 41 | style_color, 0x666666, 42 | style_size, 6 43 | ]); 44 | } 45 | 46 | override protected function draw() : void { 47 | 48 | var isDown : Boolean = (name == Button.DOWN_ICON_SKIN_NAME || name == Button.SELECTED_DOWN_ICON_SKIN_NAME); 49 | var isDisabled : Boolean = (name == Button.DISABLED_ICON_SKIN_NAME || name == Button.SELECTED_DISABLED_ICON_SKIN_NAME); 50 | var alpha : Number = isDown || isDisabled ? .3 : 1; 51 | 52 | var size : uint = getStyle(style_size); 53 | var icon : Shape = new Shape(); 54 | 55 | var radius : uint = size / 2; 56 | 57 | with (icon.graphics) { 58 | beginFill(getStyle(style_color), alpha); 59 | drawCircle(radius, radius, radius); 60 | } 61 | 62 | icon.x = Math.round((_width - size) / 2); 63 | icon.y = Math.round((_height - size) / 2); 64 | 65 | addChild(icon); 66 | 67 | } 68 | 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/scrollbar/IScrollPane.as: -------------------------------------------------------------------------------- 1 | package com.sibirjak.asdpcbeta.scrollbar { 2 | import com.sibirjak.asdpc.core.IView; 3 | 4 | import flash.display.DisplayObject; 5 | 6 | /** 7 | * ScrollPane public interface. 8 | * 9 | * @author jes 11.03.2010 10 | */ 11 | public interface IScrollPane extends IView { 12 | 13 | /** 14 | * @private 15 | */ 16 | function set document(document : DisplayObject) : void; 17 | 18 | /** 19 | * Sets or returns the document assigned to this ScrollPane. 20 | */ 21 | function get document() : DisplayObject; 22 | 23 | /** 24 | * Sets button, thumb and track scroll amounts. 25 | * 26 | * @param buttonScroll The amout of pixels to scroll by a single button click. 27 | * @param thumbScroll The minimal amout of pixels to scroll by moving the thumb. 28 | * @param trackScroll The amout of pixels to scroll by click onto the scroll track. 29 | */ 30 | function setScrollProperties(buttonScroll : uint, thumbScroll : uint, trackScroll : uint) : void; 31 | 32 | /** 33 | * Nofifies the ScrollPane that its document size has changed. 34 | * 35 | *

In response the ScrollPane displays or hides the scrollbars.

36 | */ 37 | function documentSizeChanged() : void; 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/scrollbar/ScrollPaneStyles.as: -------------------------------------------------------------------------------- 1 | package com.sibirjak.asdpcbeta.scrollbar { 2 | 3 | /** 4 | * @author jes 01.02.2010 5 | */ 6 | public class ScrollPaneStyles { 7 | 8 | /** 9 | * Style property defining the scrollbar visibility. 10 | */ 11 | public const scrollBarVisibility : String = "scrollPane_scrollBarVisibility"; 12 | 13 | /** 14 | * Style property defining the horizontal scrollbar availability. 15 | */ 16 | public const hScrollBar : String = "scrollPane_hScrollBar"; 17 | 18 | /** 19 | * Style property defining the vertical scrollbar availability. 20 | */ 21 | public const vScrollBar : String = "scrollPane_scrollBarVisibility"; 22 | 23 | /** 24 | * Style property defining the vertical scrollbar size. 25 | */ 26 | public const scrollBarSize : String = "scrollPane_scrollBarSize"; 27 | 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/selectbox/SelectBoxEvent.as: -------------------------------------------------------------------------------- 1 | package com.sibirjak.asdpcbeta.selectbox { 2 | 3 | import flash.events.Event; 4 | 5 | /** 6 | * @author Jens Struwe 30.03.2011 7 | */ 8 | public class SelectBoxEvent extends Event { 9 | 10 | public static const SELECTION_CHANGED : String = "selectBox_selection_changed"; 11 | 12 | private var _selectedIndex : uint; 13 | 14 | public function SelectBoxEvent(type : String) { 15 | super(type); 16 | } 17 | 18 | public function get selectedIndex() : uint { 19 | return _selectedIndex; 20 | } 21 | 22 | public function set selectedIndex(selectedIndex : uint) : void { 23 | _selectedIndex = selectedIndex; 24 | } 25 | 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/selectbox/SelectBoxStyles.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpcbeta.selectbox { 25 | 26 | /** 27 | * @author jes 09.12.2009 28 | */ 29 | public class SelectBoxStyles { 30 | 31 | public const maxVisibleItems : String = "selectBox_maxVisibleItems"; 32 | public const buttonSize : String = "selectBox_buttonSize"; 33 | public const popUpSize : String = "selectBox_popUpSize"; 34 | 35 | public const listItemRenderer : String = "selectBox_listItemRenderer"; 36 | public const listPadding : String = "selectBox_listPadding"; 37 | public const listItemSize : String = "selectBox_listItemSize"; 38 | 39 | public const button : String = "selectBox_button"; 40 | public const buttonClass : String = "selectBox_buttonClass"; 41 | public const openIcon : String = "selectBox_openIcon"; 42 | 43 | public const borderLightColor : String = "selectBox_borderLightColor"; 44 | public const borderDarkColor : String = "selectBox_borderDarkColor"; 45 | public const disabledBorderLightColor : String = "selectBox_disabledBorderLightColor"; 46 | public const disabledBorderDarkColor : String = "selectBox_disabledBorderDarkColor"; 47 | 48 | public const labelBorder : String = "selectBox_labelBorder"; 49 | public const labelBackground : String = "selectBox_labelBackground"; 50 | public const labelFunction : String = "selectBox_labelFunction"; 51 | 52 | public const toolTips : String = "selectBox_toolTips"; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/selectbox/assets/button_open_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fenoxo/CharacterViewer/c43ceebe47241e30fe7639c3e9f7ed9205d0242a/com/sibirjak/asdpcbeta/selectbox/assets/button_open_icon.png -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/selectbox/core/SelectBoxWindow.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpcbeta.selectbox.core { 25 | import com.sibirjak.asdpc.core.managers.IPopUpControl; 26 | import com.sibirjak.asdpc.core.managers.IPopUpControlPopUp; 27 | import com.sibirjak.asdpc.listview.IListView; 28 | import com.sibirjak.asdpc.listview.ListView; 29 | import com.sibirjak.asdpcbeta.selectbox.SelectBox; 30 | import com.sibirjak.asdpcbeta.window.Window; 31 | 32 | import flash.display.DisplayObject; 33 | 34 | /** 35 | * @author jes 08.01.2010 36 | */ 37 | public class SelectBoxWindow extends Window implements IPopUpControlPopUp { 38 | 39 | /* properties */ 40 | private var _selectBox : SelectBox; 41 | private var _list : IListView; 42 | 43 | public function SelectBoxWindow() { 44 | setStyles([ 45 | Window.style.titleBar, false, 46 | 47 | Window.style.restoreDuration, 0.1, 48 | Window.style.minimiseDuration, 0.1, 49 | Window.style.minimiseTweenProperties, Window.TWEEN_ALPHA, 50 | 51 | Window.style.padding, 1 52 | ]); 53 | 54 | minimiseOnClickOutside = true; 55 | 56 | _list = new ListView(); 57 | _list.deselect = false; 58 | document = _list as DisplayObject; 59 | } 60 | 61 | public function get list() : IListView { 62 | return _list; 63 | } 64 | 65 | public function set selectBox(selectBox : SelectBox) : void { 66 | _selectBox = selectBox; 67 | minimiseTriggerButton = _selectBox; 68 | } 69 | 70 | /* 71 | * IPopUpControlPopUp 72 | */ 73 | 74 | public function get popUpControl() : IPopUpControl { 75 | return _selectBox; 76 | } 77 | 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/selectbox/skins/SelectBoxListSkin.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpcbeta.selectbox.skins { 25 | import com.sibirjak.asdpc.core.skins.BackgroundSkin; 26 | 27 | /** 28 | * @author jes 21.12.2009 29 | */ 30 | public class SelectBoxListSkin extends BackgroundSkin { 31 | 32 | public static const style_backgroundLightColor : String = "colorPickerSkin_backgroundLightColor"; 33 | public static const style_backgroundDarkColor : String = "colorPickerSkin_backgroundDarkColor"; 34 | 35 | public static const style_borderLightColor : String = "colorPickerSkin_borderLightColor"; 36 | public static const style_borderDarkColor : String = "colorPickerSkin_borderDarkColor"; 37 | 38 | public function SelectBoxListSkin() { 39 | setDefaultStyles([ 40 | style_backgroundLightColor, 0xFFFFFF, 41 | style_backgroundDarkColor, 0xFFFFFF, 42 | 43 | style_borderLightColor, 0xCCCCCC, 44 | style_borderDarkColor, 0x666666 45 | ]); 46 | } 47 | 48 | override protected function backgroundColors() : Array { 49 | return [getStyle(style_backgroundLightColor), getStyle(style_backgroundDarkColor)]; 50 | } 51 | 52 | override protected function borderColors() : Array { 53 | return [getStyle(style_borderLightColor), getStyle(style_borderDarkColor)]; 54 | } 55 | 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/slider/SliderEvent.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpcbeta.slider { 25 | import flash.events.Event; 26 | 27 | /** 28 | * @author jes 01.12.2009 29 | */ 30 | public class SliderEvent extends Event { 31 | 32 | public static var CHANGE : String = "slider_change"; 33 | public static var RELEASE : String = "slider_release"; 34 | 35 | private var _value : Number; 36 | 37 | public function SliderEvent(type : String, value : Number) { 38 | super(type); 39 | 40 | _value = value; 41 | } 42 | 43 | public function get value() : Number { 44 | return _value; 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/slider/SliderStyles.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpcbeta.slider { 25 | 26 | /** 27 | * @author jes 02.12.2009 28 | */ 29 | public class SliderStyles { 30 | 31 | public const thumbHeight : String = "slider_thumbHeight";//sbaf 32 | 33 | public const thumbWidth : String = "slider_thumbWidth";//sbaf 34 | 35 | public const thumbSize : String = "slider_thumbSize"; 36 | 37 | public const thumbPadding : String = "slider_thumbPadding"; 38 | 39 | public const trackSize : String = "slider_trackSize"; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/slider/skins/SliderTrackSkin.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpcbeta.slider.skins { 25 | import com.sibirjak.asdpc.button.Button; 26 | import com.sibirjak.asdpc.core.skins.BackgroundSkin; 27 | 28 | /** 29 | * @author jes 01.12.2009 30 | */ 31 | public class SliderTrackSkin extends BackgroundSkin { 32 | 33 | public static const style_backgroundLightColor : String = "sliderTrackSkin_backgroundLightColor"; 34 | public static const style_backgroundDarkColor : String = "sliderTrackSkin_backgroundDarkColor"; 35 | public static const style_borderColor : String = "sliderTrackSkin_borderColor"; 36 | 37 | 38 | public function SliderTrackSkin() { 39 | setDefaultStyles([ 40 | style_backgroundLightColor, 0xEEEEEE, 41 | style_backgroundDarkColor, 0xCCCCCC, 42 | style_borderColor, 0xCCCCCC 43 | ]); 44 | } 45 | 46 | override protected function backgroundColors() : Array { 47 | if (name == Button.DISABLED_SKIN_NAME) { 48 | return [getStyle(style_backgroundLightColor)]; 49 | } else { 50 | return [getStyle(style_backgroundLightColor), getStyle(style_backgroundDarkColor)]; 51 | } 52 | 53 | } 54 | 55 | override protected function borderColors() : Array { 56 | return [getStyle(style_borderColor), getStyle(style_borderColor)]; 57 | } 58 | 59 | override protected function cornerRadius() : uint { 60 | return 0; 61 | } 62 | 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/tabbar/TabBarStyles.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpcbeta.tabbar { 25 | 26 | /** 27 | * @author jes 03.12.2009 28 | */ 29 | public class TabBarStyles { 30 | 31 | public const tabItemSkin : String = "tabBar_tabItemSkin"; 32 | 33 | public const selectedTabItemSkin : String = "tabBar_selectedTabItemSkin"; 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/window/WindowEvent.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpcbeta.window { 25 | import com.sibirjak.asdpcbeta.window.core.WindowPosition; 26 | 27 | import flash.events.Event; 28 | 29 | /** 30 | * @author jes 25.11.2009 31 | */ 32 | public class WindowEvent extends Event { 33 | 34 | public static const START_DRAG : String = "window_startDrag"; 35 | public static const STOP_DRAG : String = "window_stopDrag"; 36 | 37 | public static const AUTO_MINIMISE_START : String = "window_auto_minimise_start"; 38 | public static const MINIMISE_START : String = "window_minimise_start"; 39 | public static const MINIMISED : String = "window_minimised"; 40 | public static const RESTORE_START : String = "window_restore_start"; 41 | public static const RESTORED : String = "window_restored"; 42 | 43 | public var restorePosition : WindowPosition; 44 | 45 | public function WindowEvent(type : String) { 46 | super(type); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/window/WindowStyles.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpcbeta.window { 25 | 26 | /** 27 | * @author jes 26.11.2009 28 | */ 29 | public class WindowStyles { 30 | 31 | public const titleBar : String = "window_titleBar"; 32 | public const titleBarSize : String = "window_titleBarSize"; 33 | public const titleBarAlphaMoving : String = "window_titleBarAlphaMoving"; 34 | 35 | public const padding : String = "window_padding"; 36 | 37 | public const shadow : String = "window_shadow"; 38 | 39 | public const windowIcon : String = "window_windowIcon"; 40 | public const windowIconSkin : String = "window_windowIconSkin"; 41 | 42 | public const minimiseButton : String = "window_minimiseButton"; 43 | public const minimiseIconSkin : String = "window_minimiseIconSkin"; 44 | public const minimiseOnDoubleClick : String = "window_minimiseOnDoubleClick"; 45 | 46 | public const minimiseDuration : String = "window_minimiseDuration"; 47 | public const restoreDuration : String = "window_restoreDuration"; 48 | 49 | public const minimiseTweenProperties : String = "window_minimiseTweenProperties"; 50 | public const restoreTweenProperties : String = "window_restoreTweenProperties"; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/window/core/ITitleBar.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpcbeta.window.core { 25 | import com.sibirjak.asdpc.core.IView; 26 | import com.sibirjak.asdpcbeta.window.Window; 27 | 28 | /** 29 | * @author jes 26.11.2009 30 | */ 31 | public interface ITitleBar extends IView { 32 | 33 | function set window(window : Window) : void; 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/window/core/WindowPosition.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpcbeta.window.core { 25 | import flash.geom.Point; 26 | 27 | /** 28 | * @author jes 07.01.2010 29 | */ 30 | public class WindowPosition { 31 | 32 | private var _point : Point; 33 | private var _positionFunction : Function; 34 | 35 | public function WindowPosition(...args) { 36 | if (args.length) { 37 | if (args[0] is Point) _point = args[0]; 38 | else if (args[0] is Function) _positionFunction = args[0]; 39 | else _point = new Point(args[0], args[1]); 40 | } else { 41 | _point = new Point(); 42 | } 43 | } 44 | 45 | public function get point() : Point { 46 | if (_positionFunction != null) return _positionFunction(); 47 | return _point; 48 | } 49 | 50 | public function toString() : String { 51 | return point.toString(); 52 | } 53 | 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/window/skins/MinimiseIconSkin.as: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionScript Data Provider Controls 3 | * 4 | * Copyright (c) 2010 Jens Struwe, http://www.sibirjak.com/ 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | package com.sibirjak.asdpcbeta.window.skins { 25 | import com.sibirjak.asdpc.core.Skin; 26 | 27 | import flash.display.Shape; 28 | 29 | /** 30 | * @author jes 30.11.2009 31 | */ 32 | public class MinimiseIconSkin extends Skin { 33 | 34 | public static const style_color : String = "minimiseIconSkin_color"; 35 | public static const style_borderColor : String = "minimiseIconSkin_borderColor"; 36 | 37 | public function MinimiseIconSkin() { 38 | setDefaultStyles([ 39 | style_borderColor, 0x777777, 40 | style_color, 0xFCFCFC 41 | ]); 42 | } 43 | 44 | override protected function draw() : void { 45 | 46 | var color : uint = getStyle(style_color); 47 | var borderColor : uint = getStyle(style_borderColor); 48 | 49 | var icon : Shape = new Shape(); 50 | 51 | with (icon.graphics) { 52 | beginFill(borderColor); 53 | drawRect(0, 0, _width - 5, 4); 54 | 55 | beginFill(color); 56 | drawRect(1, 1, _width - 7, 2); 57 | } 58 | 59 | icon.x = 2; 60 | icon.y = 2; 61 | 62 | addChild(icon); 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/window/skins/minimise.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fenoxo/CharacterViewer/c43ceebe47241e30fe7639c3e9f7ed9205d0242a/com/sibirjak/asdpcbeta/window/skins/minimise.gif -------------------------------------------------------------------------------- /com/sibirjak/asdpcbeta/window/skins/window.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fenoxo/CharacterViewer/c43ceebe47241e30fe7639c3e9f7ed9205d0242a/com/sibirjak/asdpcbeta/window/skins/window.gif -------------------------------------------------------------------------------- /data/CoC_Defaulter.json: -------------------------------------------------------------------------------- 1 | { 2 | "arms": "1", 3 | "hand": "2", 4 | "hair": "2", 5 | "legs": "2", 6 | "face": "132", 7 | "horns": "1", 8 | "ears": "1", 9 | "ovi": "1", 10 | "eyes": "1", 11 | "tail": "1", 12 | "wings": "1", 13 | "body": "132", 14 | "cock": "1", 15 | "balls": "1" 16 | } -------------------------------------------------------------------------------- /data/DIC_BitsColor.json: -------------------------------------------------------------------------------- 1 | { 2 | "aphotic blue-black": "0x63309c", 3 | "ashen": "0xa47163", 4 | "blue": "0x7744cb", 5 | "dark green": "0x1e4731", 6 | "dark": "0xa25945", 7 | "ebony": "0x251006", 8 | "grayish-blue": "0x576a87", 9 | "green": "0x336544", 10 | "grey": "0x4d4d4d", 11 | "indigo": "0x63309c", 12 | "light": "0xfabdbd", 13 | "milky": "0xffd2cf", 14 | "olive": "0xd8826b", 15 | "orange": "0x993025", 16 | "pale white": "0xf7cec9", 17 | "pale yellow": "0xe1ac6e", 18 | "pale": "0xeed0b0", 19 | "pink": "0xee66aa", 20 | "purple": "0x5d256b", 21 | "red": "0x9d0f30", 22 | "rough gray": "0x6d717a", 23 | "sable": "0x874e4e", 24 | "shiney black": "0x2f2f2f", 25 | "silver": "0x9397a4", 26 | "tan": "0xc77c57", 27 | "tanned": "0xe99f94", 28 | "white": "0xf9d8d4", 29 | "yellow": "0x0dbb66" 30 | } -------------------------------------------------------------------------------- /data/DIC_ChildrenNames.json: -------------------------------------------------------------------------------- 1 | { 2 | "ears": {"SF":"fillbg", "SS":"shading"}, 3 | "head": {"SF":"fillbg", "SS":"shading"}, 4 | "arms": {"SF":"fillbg", "SS":"shading"}, 5 | "hand": {"SF":"fillbg", "SS":"shading"}, 6 | "body": {"SF":"fillbg", "SS":"shading"}, 7 | "hips": {"SF":"fillbg", "SS":"shading"}, 8 | "legs": {"SF":"fillbg", "SS":"shading"}, 9 | "face": {"SF":"fillbg", "SS":"shading", "BF":"lips", "BS":"lipsShading", "EF":"pupils"}, 10 | "cock": {"SF":"fillbg", "SS":"shading", "BF":"headFill", "BS":"headShade"}, 11 | "clit": {"BF":"fillbg", "BS":"shading", "SS":"skin"}, 12 | "tail": {"SF":"skinbg", "HF":"hairbg"}, 13 | "hair": {"HF":"hairbg", "HS":"shading"}, 14 | "boobs": {"SF":"fillbg", "SS":"shading", "BF":"areola", "BS":"areolaShading"}, 15 | "nipple": {"BF":"fillbg", "BS":"shading"}, 16 | "balls": {"SF":"fillbg", "SS":"shading"}, 17 | "ballsMC": {"SF":"fillbg", "SS":"shading"}, 18 | "butt": {"SS":"shading"}, 19 | "vag": {"SS":"shading"}, 20 | "shade": {}, 21 | "parent": {} 22 | } -------------------------------------------------------------------------------- /data/DIC_Cycler.json: -------------------------------------------------------------------------------- 1 | { 2 | "vag": 3 | { 4 | "0": "0,1,0", 5 | "1": "1,0,0" 6 | }, 7 | "arms": 8 | { 9 | "0": "0,1,0", 10 | "1": "1,0,0" 11 | }, 12 | "hair": 13 | { 14 | "0": "0,1,0", 15 | "1": "1,0,0" 16 | }, 17 | "legs": 18 | { 19 | "0": "1,0,0", 20 | "1": "0,1,0" 21 | }, 22 | "face": 23 | { 24 | "0": "1,0,0", 25 | "1": "0,1,0" 26 | }, 27 | "hips": 28 | { 29 | "0": "1,0,0", 30 | "1": "0,1,0" 31 | }, 32 | "butt": 33 | { 34 | "1": "1,0,0" 35 | }, 36 | "ears": 37 | { 38 | "1": "1,0,0" 39 | }, 40 | "hand": 41 | { 42 | "0": "1,0,0" 43 | }, 44 | "tail": 45 | { 46 | "1": "1,0,0" 47 | }, 48 | "head": 49 | { 50 | "1": "1,0,0" 51 | }, 52 | "body": 53 | { 54 | "0": "0,1,0", 55 | "1": "1,0,0" 56 | }, 57 | "cock": 58 | { 59 | "0": "1,0,0", 60 | "1": "0,1,0" 61 | }, 62 | "boobs": 63 | { 64 | "0": "0,0,1", 65 | "1": "0,1,0" 66 | }, 67 | "shade": 68 | { 69 | "1": "1,0,0" 70 | }, 71 | "balls": 72 | { 73 | "0": "1,0,0", 74 | "1": "0,0,1" 75 | }, 76 | "clit": 77 | { 78 | "1": "0,1,0" 79 | }, 80 | "nipple": 81 | { 82 | "1": "0,1,0" 83 | } 84 | } -------------------------------------------------------------------------------- /data/DIC_EyesColor.json: -------------------------------------------------------------------------------- 1 | { 2 | "black": "0x000000", 3 | "blue": "0x00CCFF", 4 | "brown": "0x6F4E37", 5 | "cloudy": "0xCCFFCC", 6 | "crimson": "0x990000", 7 | "dark blue": "0x000033", 8 | "glowing amber": "0x330033", 9 | "gold": "0xFFFF66", 10 | "green": "0x00CC33", 11 | "hazel": "0x666633", 12 | "pink": "0xFF00CC", 13 | "red": "0xFF0000", 14 | "silver": "0xCCCCCC", 15 | "violet": "0x9900FF" 16 | } -------------------------------------------------------------------------------- /data/DIC_HairColor.json: -------------------------------------------------------------------------------- 1 | { 2 | "amber": "0xcc9933", 3 | "auburn": "0x421804", 4 | "black": "0x2a2a2a", 5 | "blond": "0xfabc45", 6 | "blonde": "0xfabc45", 7 | "blue": "0x4a468e", 8 | "bright orange": "0xf87c32", 9 | "brown": "0x4e3120", 10 | "dark blue": "0x2a264e", 11 | "gray": "0x707070", 12 | "green": "0x2a892c", 13 | "midnight black": "0x191919", 14 | "neon pink": "0xff5193", 15 | "platinum blonde": "0xffdf99", 16 | "purple": "0x64109f", 17 | "red": "0xbd1a1a", 18 | "sandy blonde": "0x0f5bc79", 19 | "shiny black": "0x23232F", 20 | "silver": "0xb8b8b8", 21 | "strawberry blonde": "0xffcc66", 22 | "white": "0xf9f0eb", 23 | "yellow": "0xfabf49" 24 | } -------------------------------------------------------------------------------- /data/DIC_SkinColor.json: -------------------------------------------------------------------------------- 1 | { 2 | "aphotic blue-black": "0x32324f", 3 | "ashen": "0xb89880", 4 | "black": "0x1c0806", 5 | "blue": "0x2f78bd", 6 | "dark blue": "0x2d2b56", 7 | "dark green": "0x2d562b", 8 | "dark": "0x3a1a0b", 9 | "dark": "0xb5795c", 10 | "ebony": "0x3d1d0e", 11 | "fair": "0xfaf0e9", 12 | "grayish-blue": "0x708f84", 13 | "green": "0x2a892c", 14 | "grey": "0x707070", 15 | "indigo": "0x513bc1", 16 | "light": "0xffdac8", 17 | "milky": "0xffe3cf", 18 | "olive": "0xd89c6b", 19 | "orange": "0xb74d26", 20 | "pale white": "0xf4e4dc", 21 | "pale yellow": "0xead686", 22 | "pale": "0xffe5d0", 23 | "pink": "0xee88bb", 24 | "purple": "0x64109f", 25 | "red": "0xbd1a1a", 26 | "rough gray": "0x908f8a", 27 | "sable": "0x8d655a", 28 | "shiney black": "0x191919", 29 | "silver": "0xb8b8b8", 30 | "tan": "0xd09365", 31 | "tanned": "0xebbb99", 32 | "white": "0xf9f0eb", 33 | "yellow": "0x0dbb88" 34 | } -------------------------------------------------------------------------------- /data/Defaulter.txt: -------------------------------------------------------------------------------- 1 | // 2 | //race 3 | //type 4 | //race 5 | //expression, race, gender 6 | // 7 | //type 8 | // 9 | //race 10 | // 11 | //type 12 | // 13 | //race 14 | //race 15 | // 16 | //race 17 | // 18 | //type, fitness 19 | //race 20 | // 21 | //type 22 | // 23 | // 24 | // -------------------------------------------------------------------------------- /data/TiTS_Defaulter.json: -------------------------------------------------------------------------------- 1 | { 2 | "arms": "1", 3 | "hand": "2", 4 | "hair": "2", 5 | "legs": "2", 6 | "face": "132", 7 | "horns": "1", 8 | "ears": "1", 9 | "ovi": "1", 10 | "eyes": "1", 11 | "tail": "1", 12 | "wings": "1", 13 | "body": "132", 14 | "cock": "1", 15 | "balls": "1" 16 | } -------------------------------------------------------------------------------- /doc/Documention.odt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fenoxo/CharacterViewer/c43ceebe47241e30fe7639c3e9f7ed9205d0242a/doc/Documention.odt -------------------------------------------------------------------------------- /filters/AlphaMixer.pbj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fenoxo/CharacterViewer/c43ceebe47241e30fe7639c3e9f7ed9205d0242a/filters/AlphaMixer.pbj -------------------------------------------------------------------------------- /filters/AlphaShader.pbj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fenoxo/CharacterViewer/c43ceebe47241e30fe7639c3e9f7ed9205d0242a/filters/AlphaShader.pbj -------------------------------------------------------------------------------- /includes/communication.as: -------------------------------------------------------------------------------- 1 | //All those functions are called by the GUI and run the twin function inside the Character class. 2 | //Because Flash creates a new Function object every time a function is saved inside an object, 3 | //those functions are necessary, as they only need to be set once. 4 | 5 | //Contact me if you have a better solution. 6 | 7 | 8 | private function setWeapon(weaponClass:Class, armPos:int) 9 | { 10 | mainChar.setWeapon(weaponClass, armPos); 11 | } 12 | 13 | private function cycle(partNames:Array, ID:int, increment:int = 1):void 14 | { 15 | mainChar.cycle(partNames, ID, increment); 16 | } 17 | 18 | private function toggleItem(itemName:String):void 19 | { 20 | mainChar.toggleItem(itemName); 21 | } 22 | 23 | private function clearEquipment():void 24 | { 25 | mainChar.clearEquipment(); 26 | } 27 | 28 | private function setProperty(property:String, value:*) 29 | { 30 | mainChar[property] = value; 31 | } 32 | -------------------------------------------------------------------------------- /includes/screenshots.as: -------------------------------------------------------------------------------- 1 | /** 2 | * Takes and attempt to encode a high-resolution capture of the character. 3 | * The resolution of the picture is set by the resolution slider. 4 | * Huge pictures will result in a screenshot buttons lockdown. 5 | * The pictures are encoded asynchronously to avoid chrashes. 6 | * A high-res shader will be recreated if needed, to avoid pixelated goo-girls. 7 | * @param btnName 8 | */ 9 | private function characterCap():void 10 | { 11 | lockScreenshot(); 12 | 13 | if (mainChar.skinType == 3) 14 | { 15 | mainChar.addTemporaryGooShader(capScale); 16 | } 17 | 18 | var rect:Rectangle = mainChar.getBounds(mainChar); 19 | var matrix:Matrix = new Matrix(capScale, 0 , 0 , capScale, -rect.x * capScale, -rect.y * capScale); 20 | capBitmap = new BitmapData(rect.width * capScale, rect.height * capScale, true, 0x0); 21 | capBitmap.draw(mainChar, matrix); 22 | 23 | if (mainChar.skinType == 3) 24 | { 25 | mainChar.removeTemporaryShader(); 26 | } 27 | 28 | PNGEncoder = PNGEncoder2.encodeAsync(capBitmap); 29 | PNGEncoder.addEventListener(Event.COMPLETE, saveCap); 30 | } 31 | 32 | /** 33 | * Takes and attempt to encode a capture of the entire screen. 34 | * The panels are cropped out. 35 | * The pictures are encoded asynchronously to avoid chrashes. 36 | * @param btnName 37 | */ 38 | private function backgroundCap():void 39 | { 40 | lockScreenshot(); 41 | var matrix = new Matrix(1,0,0,1,-200,0); 42 | capBitmap = new BitmapData(1224, 980); 43 | capBitmap.draw(this, matrix); 44 | PNGEncoder = PNGEncoder2.encodeAsync(capBitmap); 45 | PNGEncoder.addEventListener(Event.COMPLETE, saveCap); 46 | } 47 | 48 | /** 49 | * Save a picture. 50 | * Triggered after a successfull PNG encoding. 51 | * @param Event 52 | */ 53 | private function saveCap(event:Event):void 54 | { 55 | PNGEncoder.removeEventListener(Event.COMPLETE, saveCap); 56 | try 57 | { 58 | var fileRef = new FileReference(); 59 | fileRef.save(PNGEncoder.png, mainChar.properties.playerName + ".png"); 60 | } 61 | catch (e:Error) 62 | { 63 | trace("Error:" + e); 64 | } 65 | 66 | PNGEncoder = null; 67 | capBitmap.dispose(); 68 | unlockScreenshot(); 69 | } --------------------------------------------------------------------------------