From 5f07e35b1301ea7dfa6903e7a5c96f3b0ea27f87 Mon Sep 17 00:00:00 2001 From: AlexisCnockaert Date: Mon, 27 Jan 2025 11:18:48 +0100 Subject: [PATCH] Added clean class comment --- .../SpClosedWindowListPresenter.class.st | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/NewTools-WindowManager/SpClosedWindowListPresenter.class.st b/src/NewTools-WindowManager/SpClosedWindowListPresenter.class.st index e3d2d7e6..82bc84f8 100644 --- a/src/NewTools-WindowManager/SpClosedWindowListPresenter.class.st +++ b/src/NewTools-WindowManager/SpClosedWindowListPresenter.class.st @@ -1,3 +1,31 @@ +" +A SpClosedWindowListPresenter is a presenter that manages and displays a list of recently closed windows in the Pharo image. +It maintains a history of the last 5 closed windows and provides functionality to either +permanently close them or restore them to their previous state. + +Class Instance Variable: + + lastClosedWindows Collection holding up to 5 recently closed window + +Example usage: +```smalltalk +SpClosedWindowListPresenter new open +``` +Implementation Points: +- Uses a fixed-size ring buffer (max 5 elements) to track closed windows +- Windows can be restored to their original position and state +- Updates the list automatically when windows are closed or restored + +Public API: +- #addClosedWindow: aWindow Add a window to the history + + + + + + + +" Class { #name : 'SpClosedWindowListPresenter', #superclass : 'SpPresenter',