Difference between revisions of "How to use smart docking"

m
Line 4: Line 4:
 
https://eiffelsoftware.origo.ethz.ch/svn/es/trunk/Src/examples/docking
 
https://eiffelsoftware.origo.ethz.ch/svn/es/trunk/Src/examples/docking
  
  If you have checked out SVN codes, it's in your SVN_ROOT/examples/docking folder. After complied, it should looks like figure 1.
+
If you have checked out SVN codes, it's in your SVN_ROOT/examples/docking folder. After complied, it should looks like figure 1.
  
 
[[Image:How_to_use_smart_docking_figure_1.png]]
 
[[Image:How_to_use_smart_docking_figure_1.png]]
Line 12: Line 12:
 
The client programmer only care about 4 classes in DOCKING LIBRARY.
 
The client programmer only care about 4 classes in DOCKING LIBRARY.
 
*SD_DOCKING_MANAGER
 
*SD_DOCKING_MANAGER
  This is the class which control the whole SMART DOCKING library.
+
This is the class which control the whole SMART DOCKING library.
  Client programmer should use it like this:
+
Client programmer should use it like this:
  
    manager: SD_DOCKING_MANAGER
+
  manager: SD_DOCKING_MANAGER
 
     create manager.make (a_container_for_docking_manager, a_window_for_docking_manager)
 
     create manager.make (a_container_for_docking_manager, a_window_for_docking_manager)
  
Line 21: Line 21:
 
== SD_CONTENT ==
 
== SD_CONTENT ==
  
  This is the class which have the informations of client programmer want to put in the docking library.
+
This is the class which have the informations of client programmer want to put in the docking library.
  Client programmer should use it like this:
+
Client programmer should use it like this:
  
 
     content: SD_CONTENT
 
     content: SD_CONTENT
Line 37: Line 37:
  
 
*SD_ICONS_SINGLETON (deferred)
 
*SD_ICONS_SINGLETON (deferred)
  This is the class which provide docking library pixmaps for icons or dragging feedback.
+
This is the class which provide docking library pixmaps for icons or dragging feedback.
  Client programmer should inherit this class, to implement several once functions which provide EV_PIXMAPs
+
Client programmer should inherit this class, to implement several once functions which provide EV_PIXMAPs
  like this:
+
like this:
  
 
     arrow_indicator_up: EV_PIXMAP is
 
     arrow_indicator_up: EV_PIXMAP is
Line 61: Line 61:
 
----
 
----
 
* SD_ENUMERATION
 
* SD_ENUMERATION
  This class only contain enumerations of Smart Docking library, such as direciton eumeration, SD_CONTENT type enumeration.
+
This class only contain enumerations of Smart Docking library, such as direciton eumeration, SD_CONTENT type enumeration.
  
 
For more informations about SD_ENUMERATION, see [[How to use smart docking sd enumeration]]
 
For more informations about SD_ENUMERATION, see [[How to use smart docking sd enumeration]]

Revision as of 01:43, 10 April 2007

  • There is a simple docking project example, is in the SVN:

https://eiffelsoftware.origo.ethz.ch/svn/es/trunk/Src/examples/docking

If you have checked out SVN codes, it's in your SVN_ROOT/examples/docking folder. After complied, it should looks like figure 1.

How to use smart docking figure 1.png


The client programmer only care about 4 classes in DOCKING LIBRARY.

  • SD_DOCKING_MANAGER

This is the class which control the whole SMART DOCKING library. Client programmer should use it like this:

  manager: SD_DOCKING_MANAGER
   create manager.make (a_container_for_docking_manager, a_window_for_docking_manager)


SD_CONTENT

This is the class which have the informations of client programmer want to put in the docking library. Client programmer should use it like this:

   content: SD_CONTENT
   create content.make (create {USER_CONTENT}, "A_unique_title")
   content.set_short_title ("A short title")
   content.set_long_title ("A long title")
   manager.contents.extend (content)
   -- You should call the following feature, otherwise the content will not visible.
   content.set_top ({SD_ENUMERATION}.top)

For more information about SD_CONTENT, see How to use smart docking sd content


  • SD_ICONS_SINGLETON (deferred)

This is the class which provide docking library pixmaps for icons or dragging feedback. Client programmer should inherit this class, to implement several once functions which provide EV_PIXMAPs like this:

   arrow_indicator_up: EV_PIXMAP is
     once
       create Result.default_create
       Result.set_with_named_file (".\arrow.png")
     end
   arrow_indicator_left: EV_PIXMAP is
     once
       create Result.default_create
       Result.set_with_named_file (".\arrow_left.png")
     end
   arrow_indicator_center: EV_PIXMAP is
     once
       create Result.default_create
       Result.set_with_named_file (".\arrow_center.png")
     end
   ....
 And you should call 'init' feature in SD_ICONS_SINGLETON, normally you can call it in the creation method of the SD_ICONS_SINGLETON implementation class.

  • SD_ENUMERATION

This class only contain enumerations of Smart Docking library, such as direciton eumeration, SD_CONTENT type enumeration.

For more informations about SD_ENUMERATION, see How to use smart docking sd enumeration