1
0
mirror of https://github.com/winscp/winscp.git synced 2026-10-24 02:28:55 +03:00
Files
winscp/source/windows/QueueController.h
Martin Prikryl 74fdf539de Clang imposed changes that should be noop and have no effect on classic compiler (2nd after 92ba1e3f0 + preceding commits)
Mostly
– explicit static global variables
– const, sign and down casts safety
– same-named variables in nested scopes
– incorrectly identified uninitialized variables
– semicolon after function implementation
– unused variables, fields, arguments and macros
– exact include filename case
– field initialization order
– typename use
– struct vs class declarations
– incorrectly identified uninitialized variables
– refactoring to solve Clang internal compiler error when using new variable in __finally block

Source commit: 3da995ff5169eefcfe3b3b7cc0d019c660096c07
2025-06-24 16:32:34 +02:00

58 lines
2.5 KiB
C++

//---------------------------------------------------------------------------
#ifndef QueueControllerH
#define QueueControllerH
//---------------------------------------------------------------------------
#include <ComCtrls.hpp>
//---------------------------------------------------------------------------
enum TQueueOperation { qoNone, qoGoTo, qoPreferences, qoItemUserAction,
qoItemQuery, qoItemError, qoItemPrompt, qoItemDelete, qoItemExecute,
qoItemUp, qoItemDown, qoItemPause, qoItemResume, qoItemSpeed, qoPauseAll, qoResumeAll,
qoOnceEmpty, qoDeleteAllDone, qoDeleteAll };
class TQueueItemProxy;
class TTerminalQueueStatus;
//---------------------------------------------------------------------------
class TQueueController
{
public:
__fastcall TQueueController(TCustomListView * ListView);
virtual __fastcall ~TQueueController();
TQueueOperation __fastcall DefaultOperation();
bool __fastcall AllowOperation(TQueueOperation Operation, unsigned long * Param = NULL);
void __fastcall ExecuteOperation(TQueueOperation Operation, unsigned long Param = 0);
void __fastcall UpdateQueueStatus(TTerminalQueueStatus * QueueStatus);
void __fastcall RefreshQueueItem(TQueueItemProxy * QueueItem);
static bool __fastcall QueueItemNeedsFrequentRefresh(TQueueItemProxy * QueueItem);
bool __fastcall NeedRefresh();
TQueueItemProxy * __fastcall GetFocusedPrimaryItem();
__property TNotifyEvent OnChange = { read = FOnChange, write = FOnChange };
__property bool Empty = { read = GetEmpty };
private:
TListView * FListView;
TTerminalQueueStatus * FQueueStatus;
TNotifyEvent FOnChange;
TFormatBytesStyle FFormatSizeBytes;
TQueueItemProxy * __fastcall QueueViewItemToQueueItem(TListItem * Item);
void __fastcall QueueViewDblClick(TObject * Sender);
void __fastcall QueueViewKeyDown(TObject * Sender, WORD & Key, TShiftState Shift);
void __fastcall QueueViewCustomDrawItem(TCustomListView * Sender, TListItem * Item,
TCustomDrawState State, bool & DefaultDraw);
virtual void __fastcall DoChange();
bool __fastcall GetEmpty();
void __fastcall RememberConfiguration();
static void __fastcall FillQueueViewItem(TListItem * Item,
TQueueItemProxy * QueueItem, bool Detail, bool OnlyLine);
TListItem * __fastcall InsertItemFor(TQueueItemProxy * QueueItem, int Index);
bool __fastcall UseDetailsLine(int ItemIndex, TQueueItemProxy * QueueItem);
static bool SimpleOperation(TQueueItemProxy * QueueItem);
};
//---------------------------------------------------------------------------
#endif