ui unlimited: things you can do with the new cincom smalltalk user interface, by dirk verleysen...

Upload: cincom-smalltalk

Post on 14-Apr-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 UI Unlimited: Things You Can Do with the New Cincom Smalltalk User Interface, by Dirk Verleysen (ESUG'13)

    1/20

    1

    World Headquarters

    Cincinnati, Ohio

    UIUnlimited-

    Thingsyoucandowiththe

    New

    CincomSmalltalkUI

  • 7/29/2019 UI Unlimited: Things You Can Do with the New Cincom Smalltalk User Interface, by Dirk Verleysen (ESUG'13)

    2/20

  • 7/29/2019 UI Unlimited: Things You Can Do with the New Cincom Smalltalk User Interface, by Dirk Verleysen (ESUG'13)

    3/20

    Related Talks

    How and Where in Glorp Tutorial Niall Ross Pursuing Performance in Store Tom

    Robinson

    Cincom Smalltalk New Native GUI AndreasHiltner

    Cincom Smalltalk Roadmap Arden Thomas

    3

  • 7/29/2019 UI Unlimited: Things You Can Do with the New Cincom Smalltalk User Interface, by Dirk Verleysen (ESUG'13)

    4/20

    Intention and Goals

    Modernize the UI Controls / Widgets Eliminate Primitives and use DLLCC Easy to Maintain and Extend

    4

  • 7/29/2019 UI Unlimited: Things You Can Do with the New Cincom Smalltalk User Interface, by Dirk Verleysen (ESUG'13)

    5/20

    Questions - Usability

    How does the API work? Works for a regular business application? Performance? Extend the API?

    5

  • 7/29/2019 UI Unlimited: Things You Can Do with the New Cincom Smalltalk User Interface, by Dirk Verleysen (ESUG'13)

    6/20

    Demo 1

    6

  • 7/29/2019 UI Unlimited: Things You Can Do with the New Cincom Smalltalk User Interface, by Dirk Verleysen (ESUG'13)

    7/20

    7

    Launcher

  • 7/29/2019 UI Unlimited: Things You Can Do with the New Cincom Smalltalk User Interface, by Dirk Verleysen (ESUG'13)

    8/20

    Building the window

    self mainWindow: UIView new.

    self mainWindowposition: self position;

    extent: self extent;

    text: self title;

    backgroundBrush: self defaultBackgroundBrush;

    gdipBackgroundBrush: self defaultGdipBackgroundBrush;create;

    setDefaultEvents;

    setDefaultStyle;

    setIconTo: self icon;

    redisplay

    8

    15@15

    1200@800

    Whisky Launcher

    WndBrush newColor:

    RGBColor blue

    GdipLinearGradientBrush

    rect: (0 @ 0 extent: self extent)

    color1: ARGBColor navycolor2: ARGBColor lightSkyBlue

    mode: #LinearGradientModeVerticalself getIcon: #company using: 'c:

    \programdata\projects\comp.ico'

  • 7/29/2019 UI Unlimited: Things You Can Do with the New Cincom Smalltalk User Interface, by Dirk Verleysen (ESUG'13)

    9/20

    Creating Widgets - UIOwnerDrawButton

    widget := selfadd: #imgProducts

    class: UIOwnerDrawButton

    rect: #(883 0 300 150)

    options: ((IdentityDictionary new)at: #theme put: UIThemeData new;yourself)

    form: self mainWindow.

    widget filename: c:\...\productTile.png.widget setDefaultEvents

    9

  • 7/29/2019 UI Unlimited: Things You Can Do with the New Cincom Smalltalk User Interface, by Dirk Verleysen (ESUG'13)

    10/20

    Creating Widgets - UIEdit

    widget := UIEditnewRect: #(650 5 50 30)

    options: self optionsDictionary

    text:

    form: self tabInfo.

    widgettheme: UIThemeData new;

    presentation: self productNamePresentation.

    widget

    create;setDefaultEvents;updateWindow.

    10

    (IdentityDictionary new)at: #exStyle put: WS_EX_LTRREADING | WS_EX_RIGHTSCROLLBAR;at: #style put: WS_CHILD |;

    yourself

  • 7/29/2019 UI Unlimited: Things You Can Do with the New Cincom Smalltalk User Interface, by Dirk Verleysen (ESUG'13)

    11/20

    UIControl vs UIPresentation11

    Business Object

    UIEdit

    presentation

    object

    UIPresentationaccessPath

    setterPath

    formats

    decisionBlock

    imagePath

    align

    object:

    updateWindow

  • 7/29/2019 UI Unlimited: Things You Can Do with the New Cincom Smalltalk User Interface, by Dirk Verleysen (ESUG'13)

    12/20

    UIPresentation - accessPathsetterPath

    12

    accessPath setterPath

    #name#(name)

    [:obj | obj name]

    nil#name

    #(name)[:obj :value | obj name: value]

    widget presentationaccessPath: #name;

    setterPath: nil

  • 7/29/2019 UI Unlimited: Things You Can Do with the New Cincom Smalltalk User Interface, by Dirk Verleysen (ESUG'13)

    13/20

    UIPresentation - sortAccessPath

    13

    column presentationaccessPath: [:obj | obj volume printString , cl];

    sortAccessPath: [:obj | obj volume];

    align: #right

  • 7/29/2019 UI Unlimited: Things You Can Do with the New Cincom Smalltalk User Interface, by Dirk Verleysen (ESUG'13)

    14/20

    UIPresentation - imagePath14

    imageList := ImageList new.

    imageList

    create: 16y: 16

    mask: nil

    initial: 4

    grow: 4,

    imageList

    add: SingleMalt loadIcon.

    column presentation

    accessPath: [:obj | ];

    imagePath: [:obj | obj class iconNumber]

    1

  • 7/29/2019 UI Unlimited: Things You Can Do with the New Cincom Smalltalk User Interface, by Dirk Verleysen (ESUG'13)

    15/20

    UIPresentation decisionBlock15

    column presentationaccessPath: [ :obj | obj findCheapestSupplier

    ifNil []ifNotNil: [ :supplier | supplier companyName]];

    formats: ((IdentityDictionary new)at: #+ put: (UIControlFormat

    font: (Font newArray: #(#FontFace #Arial) #(#PointSize 14)))

    textColor: RGBColor green

    backgroundColor: RGBColor blue);at: #=. ;

    at: #-..;yourself);

    decisionBlock: [:obj | obj available asSymbol]

    16

  • 7/29/2019 UI Unlimited: Things You Can Do with the New Cincom Smalltalk User Interface, by Dirk Verleysen (ESUG'13)

    16/20

    UIPresentation - UIDropDownListBox

    16

    Product Brand0-*

    ddlbBrand

    object: self currentProduct;presentation list: Brand all.

    ddlbBrand presentationaccessPath: [:aProduct| aProduct brand]

    ddlbBrand presentation

    displayValue: [:aBrand | aBrand name]

    17

  • 7/29/2019 UI Unlimited: Things You Can Do with the New Cincom Smalltalk User Interface, by Dirk Verleysen (ESUG'13)

    17/20

    Graphics

    Object & Presentation Extra instance variables for Presentation likedougnutStyle: totalValueBlock: xTicksTextPath

    yTicksTextPath axisPen axisFont.

    Extra formats like UIBarChartFormat,UIPieChartFormat

    Array of accessPath and decisionBlock (BarChart)

    17

    18

  • 7/29/2019 UI Unlimited: Things You Can Do with the New Cincom Smalltalk User Interface, by Dirk Verleysen (ESUG'13)

    18/20

    Demo 2

    18

  • 7/29/2019 UI Unlimited: Things You Can Do with the New Cincom Smalltalk User Interface, by Dirk Verleysen (ESUG'13)

    19/20

    ContactInforma

  • 7/29/2019 UI Unlimited: Things You Can Do with the New Cincom Smalltalk User Interface, by Dirk Verleysen (ESUG'13)

    20/20

    Thanks for listening