Browse Source

add doc appropriate comments

JimMarlowe 8 years ago
parent
commit
9fab10136b
2 changed files with 23 additions and 11 deletions
  1. 11 5
      Source/Atomic/UI/UIDockWindow.cpp
  2. 12 6
      Source/Atomic/UI/UIDockWindow.h

+ 11 - 5
Source/Atomic/UI/UIDockWindow.cpp

@@ -35,6 +35,7 @@ using namespace tb;
 namespace Atomic
 namespace Atomic
 {
 {
 
 
+/// UIDockWindow is the host for UI content which has been transferred from the main window.
 UIDockWindow::UIDockWindow(Context* context, bool createWidget, const String& title, UIWidget *contentptr, int minwidth, int minheight ) : UIWindow(context, false)
 UIDockWindow::UIDockWindow(Context* context, bool createWidget, const String& title, UIWidget *contentptr, int minwidth, int minheight ) : UIWindow(context, false)
 {
 {
     if (createWidget)
     if (createWidget)
@@ -50,7 +51,8 @@ UIDockWindow::~UIDockWindow()
 {
 {
 }
 }
 
 
-void UIDockWindow::SetDockOrigin( String dockid ) // where using the dock button returns the content to
+/// ID of the redock widget. If specified, pressing the dock button, will move the content there.
+void UIDockWindow::SetDockOrigin( String dockid )
 {
 {
     if (!widget_)
     if (!widget_)
         return;
         return;
@@ -59,7 +61,8 @@ void UIDockWindow::SetDockOrigin( String dockid ) // where using the dock button
 
 
 }
 }
 
 
-UIWidget *UIDockWindow::GetDockContent()  // the content that is being swapped around
+/// This returns a pointer to the docked content.
+UIWidget *UIDockWindow::GetDockContent()
 {
 {
     if (!widget_)
     if (!widget_)
         return NULL;
         return NULL;
@@ -75,7 +78,8 @@ UIWidget *UIDockWindow::GetDockContent()  // the content that is being swapped a
 
 
 }
 }
 
 
-bool UIDockWindow::HasDockContent() // is there content in the dockwindow
+/// Returns if the UIDockWindow contains docked content.
+bool UIDockWindow::HasDockContent()
 {
 {
     if (!widget_)
     if (!widget_)
         return false;
         return false;
@@ -83,7 +87,8 @@ bool UIDockWindow::HasDockContent() // is there content in the dockwindow
     return ((TBDockWindow*)widget_)->HasDockContent();
     return ((TBDockWindow*)widget_)->HasDockContent();
 }
 }
 
 
-void UIDockWindow::Dock( UIWidget *target ) // move the dock window content to somewhere else
+/// Transfers the dock content to the target widget
+void UIDockWindow::Dock( UIWidget *target )
 {
 {
     if (!widget_)
     if (!widget_)
         return;
         return;
@@ -94,7 +99,8 @@ void UIDockWindow::Dock( UIWidget *target ) // move the dock window content to s
     ((TBDockWindow*)widget_)->Dock( target->GetInternalWidget() );
     ((TBDockWindow*)widget_)->Dock( target->GetInternalWidget() );
 }
 }
 
 
-void UIDockWindow::Show( UIWidget *host, int xpos, int ypos ) // show the dock window
+/// Show the UIDockWindow, and optional position
+void UIDockWindow::Show( UIWidget *host, int xpos, int ypos )
 {
 {
     if (!widget_)
     if (!widget_)
         return;
         return;

+ 12 - 6
Source/Atomic/UI/UIDockWindow.h

@@ -35,15 +35,21 @@ class ATOMIC_API UIDockWindow : public UIWindow
     ATOMIC_OBJECT(UIDockWindow, UIWindow)
     ATOMIC_OBJECT(UIDockWindow, UIWindow)
 
 
     public:
     public:
-
+    /// UIDockWindow is the host for UI content which has been transferred from the main window.
+    /// Context is a required argument, this is the application context.
+    /// createWidget is if the UIDockWindow should be created, should be set to true.
+    /// title is the string in the titlebar of the UIDockWindow
+    /// contentptr is the pointer to the widget which the UIDockWindow will display
+    /// minwidth is the minimum width for the UIDockWindow
+    /// minheight is the minimum height for the UIDockWindow
     UIDockWindow(Context* context, bool createWidget = true, const String& title = String::EMPTY, UIWidget *contentptr = NULL, int minwidth = 800, int minheight=400 );
     UIDockWindow(Context* context, bool createWidget = true, const String& title = String::EMPTY, UIWidget *contentptr = NULL, int minwidth = 800, int minheight=400 );
     virtual ~UIDockWindow();
     virtual ~UIDockWindow();
 
 
-    void SetDockOrigin( String dockid );  // where using the dock button returns the content to
-    UIWidget *GetDockContent();  // the content that is being swapped around
-    bool HasDockContent();  // is there content in the dockwindow
-    void Dock( UIWidget *target );  // move the dock window content to somewhere else
-    void Show( UIWidget *host, int xpos = 50, int ypos = 50 ); // show the dock window
+    void SetDockOrigin( String dockid );  /// ID of the redock widget. If specified, pressing the dock button, will move the content there.
+    UIWidget *GetDockContent();  /// This returns a pointer to the docked content.
+    bool HasDockContent();  /// Returns if the UIDockWindow contains docked content.
+    void Dock( UIWidget *target );  /// Transfers the dock content to the target widget
+    void Show( UIWidget *host, int xpos = 50, int ypos = 50 ); /// Show the UIDockWindow, and optional position
 
 
 protected:
 protected: