Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • デザイン
    Define_Com Class(#PRIM_DESN) Name(#DesignManager)
    Define_Com Class(#PRIM_DESN.Design) Name(#MobileDesign) Designmanager(#DesignManager) Width(600)
    Define_Com Class(#PRIM_DESN.Design) Name(#TabletDesign) Designmanager(#DesignManager) Width(1000)
     
  • アプリケーション
    Define_Com Class(#XKMAPP) Name(#Application) Scope(*APPLICATION)
     
    Evtroutine Handling(#Com_owner.DesignChanged) Design(#Design)
     
    #Application.DesignChanged( #Design )
     
    Endroutine
     
    関連するアプリケーション・オブジェクトは、次のように使用することで、DesignChanged イベントの処理を集中させることができます。
    Mthroutine Name(DesignChanged)
    Define_Map For(*input) Class(#Prim_desn.Design) Name(#Design) Pass(*By_reference)
     
    #ActiveDesign <= #Design
     
    If (#Design *Is *null)
     
    #Com_Owner.ActivateDesktopView
     
    Else
     
      If (#Design.Name = MobileDesign)
     
       #Com_Owner.ActivateMobileView
     
      Else
     
       #Com_Owner.ActivateTabletView
     
      Endif
     
    Endif
     
    Endroutine
     
    Mthroutine Name(ActivateMobileView)
     
      Signal Event(HideContent)
     
      #ActiveView := MOBILE
     
      Signal Event(MobileView)
     
      Signal Event(ShowContent)
     
    Endroutine
     
    Mthroutine Name(ActivateTabletView)
     
      Signal Event(HideContent)
     
      #ActiveView := TABLET
     
      Signal Event(TabletView)
     
      Signal Event(ShowContent)
     
    Endroutine
     
    Mthroutine Name(ActivateDesktopView)
     
      Signal Event(HideContent)
     
      #ActiveView := DESKTOP
     
      Signal Event(DesktopView)
     
      Signal Event(ShowContent)
     
    Endroutine
    効果的なリスポンシブ・デザインの実装方法の例については、「4.2 Web ページ・テンプレートの利用」時に生成されたコードを参照してください。