uicore-ts
Version:
UICore is a library to build native-like user interfaces using pure Typescript. No HTML is needed at all. Components are described as TS classes and all user interactions are handled explicitly. This library is strongly inspired by the UIKit framework tha
53 lines (52 loc) • 1.91 kB
TypeScript
import { UIBaseButton } from "./UIBaseButton";
import { UIColor } from "./UIColor";
import { UIImageView } from "./UIImageView";
import { ValueOf } from "./UIObject";
import { UITextView } from "./UITextView";
export interface UIButtonColorSpecifier {
titleLabel: UIButtonElementColorSpecifier;
background: UIButtonElementColorSpecifier;
}
export interface UIButtonElementColorSpecifier {
normal: UIColor;
hovered?: UIColor;
highlighted: UIColor;
focused?: UIColor;
selected: UIColor;
selectedAndHighlighted?: UIColor;
}
export declare class UIButton extends UIBaseButton {
_contentPadding: number;
_titleLabel: UITextView;
_imageView: UIImageView;
usesAutomaticTitleFontSize: boolean;
minAutomaticFontSize?: number;
maxAutomaticFontSize?: number;
colors: UIButtonColorSpecifier;
constructor(elementID?: string, elementType?: string, titleType?: string | ValueOf<typeof UITextView.type>);
get contentPadding(): number;
set contentPadding(contentPadding: number);
set hovered(hovered: boolean);
get hovered(): boolean;
set highlighted(highlighted: boolean);
get highlighted(): boolean;
set focused(focused: boolean);
get focused(): boolean;
set selected(selected: boolean);
get selected(): boolean;
updateContentForCurrentState(): void;
updateContentForNormalState(): void;
updateContentForHoveredState(): void;
updateContentForFocusedState(): void;
updateContentForHighlightedState(): void;
updateContentForSelectedState(): void;
updateContentForSelectedAndHighlightedState(): void;
set enabled(enabled: boolean);
get enabled(): boolean;
updateContentForCurrentEnabledState(): void;
addStyleClass(styleClassName: string): void;
get titleLabel(): UITextView;
get imageView(): UIImageView;
layoutSubviews(): void;
initViewStyleSelectors(): void;
}