From 3f0063cd32572f48ea65d4ff312e7739ade3f292 Mon Sep 17 00:00:00 2001 From: Jannes Konarski Date: Mon, 17 Jun 2024 11:20:12 +0200 Subject: [PATCH] added pollButton --- .../TCUChatPollEditor.class/README.md | 0 .../class/newFor.withBounds..st | 7 +++++++ .../instance/addTypeOption.st | 12 ++++++++++++ .../TCUChatPollEditor.class/instance/chat..st | 4 ++++ .../TCUChatPollEditor.class/instance/chat.st | 4 ++++ .../instance/initialize.st | 10 ++++++++++ .../instance/typeOption..st | 4 ++++ .../instance/typeOption.st | 4 ++++ .../TCUChatPollEditor.class/methodProperties.json | 10 ++++++++++ .../TCUChatPollEditor.class/properties.json | 15 +++++++++++++++ .../instance/addHiddenPollEditor.st | 8 ++++++++ .../TCUChatWindow.class/instance/addPollButton.st | 10 ++++++++++ .../instance/addTextInputField.st | 2 +- .../instance/createInputBar.st | 2 +- .../instance/newChatSelected..st | 6 ++++-- .../TCUChatWindow.class/instance/pollButton..st | 4 ++++ .../TCUChatWindow.class/instance/pollButton.st | 4 ++++ .../TCUChatWindow.class/instance/pollEditor..st | 4 ++++ .../TCUChatWindow.class/instance/pollEditor.st | 4 ++++ .../instance/showPollEditor.st | 4 ++++ .../TCUChatWindow.class/methodProperties.json | 15 +++++++++++---- .../TCUChatWindow.class/properties.json | 4 +++- 22 files changed, 128 insertions(+), 9 deletions(-) create mode 100644 packages/TelegramClient-UI.package/TCUChatPollEditor.class/README.md create mode 100644 packages/TelegramClient-UI.package/TCUChatPollEditor.class/class/newFor.withBounds..st create mode 100644 packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/addTypeOption.st create mode 100644 packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/chat..st create mode 100644 packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/chat.st create mode 100644 packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/initialize.st create mode 100644 packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/typeOption..st create mode 100644 packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/typeOption.st create mode 100644 packages/TelegramClient-UI.package/TCUChatPollEditor.class/methodProperties.json create mode 100644 packages/TelegramClient-UI.package/TCUChatPollEditor.class/properties.json create mode 100644 packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addHiddenPollEditor.st create mode 100644 packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addPollButton.st create mode 100644 packages/TelegramClient-UI.package/TCUChatWindow.class/instance/pollButton..st create mode 100644 packages/TelegramClient-UI.package/TCUChatWindow.class/instance/pollButton.st create mode 100644 packages/TelegramClient-UI.package/TCUChatWindow.class/instance/pollEditor..st create mode 100644 packages/TelegramClient-UI.package/TCUChatWindow.class/instance/pollEditor.st create mode 100644 packages/TelegramClient-UI.package/TCUChatWindow.class/instance/showPollEditor.st diff --git a/packages/TelegramClient-UI.package/TCUChatPollEditor.class/README.md b/packages/TelegramClient-UI.package/TCUChatPollEditor.class/README.md new file mode 100644 index 000000000..e69de29bb diff --git a/packages/TelegramClient-UI.package/TCUChatPollEditor.class/class/newFor.withBounds..st b/packages/TelegramClient-UI.package/TCUChatPollEditor.class/class/newFor.withBounds..st new file mode 100644 index 000000000..7f238ff84 --- /dev/null +++ b/packages/TelegramClient-UI.package/TCUChatPollEditor.class/class/newFor.withBounds..st @@ -0,0 +1,7 @@ +as yet unclassified +newFor: aChat withBounds: aRectangle + + ^ (super newBounds: aRectangle) + chat: aChat; + addTypeOption; + yourself \ No newline at end of file diff --git a/packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/addTypeOption.st b/packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/addTypeOption.st new file mode 100644 index 000000000..ee547ca91 --- /dev/null +++ b/packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/addTypeOption.st @@ -0,0 +1,12 @@ +as yet unclassified +addTypeOption + + self typeOption: (RectangleMorph new + color: Color red; + extent: 300@300; + useRoundedCorners; + yourself). + + self addMorph: self typeOption. + self typeOption center: self center. + \ No newline at end of file diff --git a/packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/chat..st b/packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/chat..st new file mode 100644 index 000000000..0fcab42a8 --- /dev/null +++ b/packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/chat..st @@ -0,0 +1,4 @@ +as yet unclassified +chat: aChat + + chat := aChat \ No newline at end of file diff --git a/packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/chat.st b/packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/chat.st new file mode 100644 index 000000000..cfd52aac7 --- /dev/null +++ b/packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/chat.st @@ -0,0 +1,4 @@ +as yet unclassified +chat + + ^ chat \ No newline at end of file diff --git a/packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/initialize.st b/packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/initialize.st new file mode 100644 index 000000000..9d04bd338 --- /dev/null +++ b/packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/initialize.st @@ -0,0 +1,10 @@ +as yet unclassified +initialize + + super initialize. + + self + color: (TCUDefaultValues colorLightGray alpha: 0.5); + borderWidth: 0; + on: #mouseUp send: #hide to: self. + \ No newline at end of file diff --git a/packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/typeOption..st b/packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/typeOption..st new file mode 100644 index 000000000..8cf40cd45 --- /dev/null +++ b/packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/typeOption..st @@ -0,0 +1,4 @@ +as yet unclassified +typeOption: aRectangleMorph + + typeOption := aRectangleMorph \ No newline at end of file diff --git a/packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/typeOption.st b/packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/typeOption.st new file mode 100644 index 000000000..66a8728d2 --- /dev/null +++ b/packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/typeOption.st @@ -0,0 +1,4 @@ +as yet unclassified +typeOption + + ^ typeOption \ No newline at end of file diff --git a/packages/TelegramClient-UI.package/TCUChatPollEditor.class/methodProperties.json b/packages/TelegramClient-UI.package/TCUChatPollEditor.class/methodProperties.json new file mode 100644 index 000000000..bafb8fc8b --- /dev/null +++ b/packages/TelegramClient-UI.package/TCUChatPollEditor.class/methodProperties.json @@ -0,0 +1,10 @@ +{ + "class" : { + "newFor:withBounds:" : "jkon 6/17/2024 11:14" }, + "instance" : { + "addTypeOption" : "jkon 6/17/2024 11:17", + "chat" : "jkon 6/17/2024 10:29", + "chat:" : "jkon 6/17/2024 10:29", + "initialize" : "jkon 6/17/2024 11:13", + "typeOption" : "jkon 6/17/2024 11:03", + "typeOption:" : "jkon 6/17/2024 11:03" } } diff --git a/packages/TelegramClient-UI.package/TCUChatPollEditor.class/properties.json b/packages/TelegramClient-UI.package/TCUChatPollEditor.class/properties.json new file mode 100644 index 000000000..f97b0a04e --- /dev/null +++ b/packages/TelegramClient-UI.package/TCUChatPollEditor.class/properties.json @@ -0,0 +1,15 @@ +{ + "category" : "TelegramClient-UI", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "chat", + "typeOption" ], + "name" : "TCUChatPollEditor", + "pools" : [ + ], + "super" : "RectangleMorph", + "type" : "normal" } diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addHiddenPollEditor.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addHiddenPollEditor.st new file mode 100644 index 000000000..123ec7795 --- /dev/null +++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addHiddenPollEditor.st @@ -0,0 +1,8 @@ +drawing +addHiddenPollEditor + + self + pollEditor: (TCUChatPollEditor newFor: self selectedChat withBounds: self bounds); + addMorphFront: self pollEditor. + + self pollEditor hide. \ No newline at end of file diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addPollButton.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addPollButton.st new file mode 100644 index 000000000..76a95903c --- /dev/null +++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addPollButton.st @@ -0,0 +1,10 @@ +drawing +addPollButton + + self pollButton: (TCUButton new + extent: 50 @ 30; + text: '|||'; + on: #mouseUp send: #showPollEditor to: self; + name: 'openPollEditor'; + yourself). + self inputBar addMorph: self pollButton. \ No newline at end of file diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addTextInputField.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addTextInputField.st index a80740cfd..46ca6796b 100644 --- a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addTextInputField.st +++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/addTextInputField.st @@ -5,7 +5,7 @@ addTextInputField borderWidth: 2; borderColor: TCUDefaultValues colorLightBlue; contentsWrapped: '' asText; - extent: ((self inputBar width - 240) @ self class defaultInputfieldHeight); + extent: ((self inputBar width - 280) @ self class defaultInputfieldHeight); crAction: [self buttonSendPressed]; yourself). diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/createInputBar.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/createInputBar.st index 0c8707ebe..eb739a772 100644 --- a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/createInputBar.st +++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/createInputBar.st @@ -13,6 +13,6 @@ createInputBar wrapCentering: #topLeft; layoutInset: 2; vResizing: #shrinkWrap; - cellInset: 12; + cellInset: 8; hide; yourself). \ No newline at end of file diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/newChatSelected..st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/newChatSelected..st index b1122570c..1ef39bc88 100644 --- a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/newChatSelected..st +++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/newChatSelected..st @@ -4,6 +4,7 @@ newChatSelected: aChat self welcomeMessage hide. self inputBar submorphsDo: #abandon. self addStickerButton. + self addPollButton. self addSendButton. self addTextInputField. self inputBar show. @@ -12,7 +13,8 @@ newChatSelected: aChat self selectedChat: aChat; addTitleBar; - addHiddenInfoPage. + addHiddenInfoPage; + addHiddenPollEditor. - self chatMessageList show. + self chatMessageList show. self chatMessageList displayChat: aChat. \ No newline at end of file diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/pollButton..st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/pollButton..st new file mode 100644 index 000000000..1051de4b2 --- /dev/null +++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/pollButton..st @@ -0,0 +1,4 @@ +accessing +pollButton: aTelegramButton + + pollButton := aTelegramButton \ No newline at end of file diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/pollButton.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/pollButton.st new file mode 100644 index 000000000..f512f0d04 --- /dev/null +++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/pollButton.st @@ -0,0 +1,4 @@ +accessing +pollButton + + ^ pollButton \ No newline at end of file diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/pollEditor..st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/pollEditor..st new file mode 100644 index 000000000..9cd44d911 --- /dev/null +++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/pollEditor..st @@ -0,0 +1,4 @@ +accessing +pollEditor: aPollEditor + + pollEditor := aPollEditor \ No newline at end of file diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/pollEditor.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/pollEditor.st new file mode 100644 index 000000000..d09ae164c --- /dev/null +++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/pollEditor.st @@ -0,0 +1,4 @@ +accessing +pollEditor + + ^ pollEditor \ No newline at end of file diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/showPollEditor.st b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/showPollEditor.st new file mode 100644 index 000000000..caeb3394c --- /dev/null +++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/instance/showPollEditor.st @@ -0,0 +1,4 @@ +event handling +showPollEditor + + self pollEditor show. \ No newline at end of file diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/methodProperties.json b/packages/TelegramClient-UI.package/TCUChatWindow.class/methodProperties.json index f45400a81..e7c75e595 100644 --- a/packages/TelegramClient-UI.package/TCUChatWindow.class/methodProperties.json +++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/methodProperties.json @@ -7,12 +7,14 @@ "addChatMessageList" : "JB 7/6/2021 14:03", "addChatTitle" : "RK 8/4/2021 12:06", "addHiddenInfoPage" : "per 6/15/2021 09:02", - "addInputBar" : "js 6/13/2020 17:59", + "addHiddenPollEditor" : "jkon 6/17/2024 10:25", + "addInputBar" : "jkon 6/17/2024 09:54", "addMemberCount" : "RK 8/4/2021 12:06", + "addPollButton" : "jkon 6/17/2024 10:19", "addReplyMessage" : "JS 5/22/2022 19:39", "addSendButton" : "ek 6/19/2022 19:07", "addStickerButton" : "JK 5/21/2024 10:07", - "addTextInputField" : "JK 5/21/2024 09:44", + "addTextInputField" : "jkon 6/17/2024 09:58", "addTitleBar" : "RS 5/29/2021 18:12", "addWelcomeMessage" : "RK 8/4/2021 12:07", "buttonSendPressed" : "ek 6/19/2022 19:07", @@ -21,19 +23,24 @@ "chatMessageList:" : "JB 7/6/2021 14:02", "clear" : "JK 5/29/2024 20:29", "core" : "js 8/2/2020 22:11", - "createInputBar" : "JS 5/20/2022 11:45", + "createInputBar" : "jkon 6/17/2024 09:59", "createTitleBar" : "ek 6/19/2022 19:08", "infoPage" : "RS 5/20/2021 21:14", "infoPage:" : "RS 5/20/2021 21:14", "initialize" : "RS 5/20/2021 19:29", "inputBar" : "rs 6/13/2020 10:38", "inputBar:" : "RK 8/4/2021 10:48", - "newChatSelected:" : "JK 5/21/2024 09:42", + "newChatSelected:" : "jkon 6/17/2024 10:27", + "pollButton" : "jkon 6/17/2024 09:51", + "pollButton:" : "jkon 6/17/2024 09:52", + "pollEditor" : "jkon 6/17/2024 10:03", + "pollEditor:" : "jkon 6/17/2024 10:03", "selectedChat" : "rs 6/13/2020 09:11", "selectedChat:" : "JS 5/26/2022 16:40", "sendButton" : "ek 6/19/2022 18:53", "sendButton:" : "ek 6/19/2022 18:53", "showInfoPage" : "per 5/30/2021 11:51", + "showPollEditor" : "jkon 6/17/2024 10:19", "stickerButton" : "JK 5/21/2024 10:04", "stickerButton:" : "JK 5/21/2024 10:04", "stickerWindow" : "JK 5/29/2024 14:46", diff --git a/packages/TelegramClient-UI.package/TCUChatWindow.class/properties.json b/packages/TelegramClient-UI.package/TCUChatWindow.class/properties.json index afa499484..0b1fc4584 100644 --- a/packages/TelegramClient-UI.package/TCUChatWindow.class/properties.json +++ b/packages/TelegramClient-UI.package/TCUChatWindow.class/properties.json @@ -14,7 +14,9 @@ "textInputField", "sendButton", "stickerButton", - "stickerWindow" ], + "stickerWindow", + "pollButton", + "pollEditor" ], "name" : "TCUChatWindow", "pools" : [ ],