Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

30
LINES

< > BotCompany Repo | #1016330 // Take screenshot of module (screen-shoot a module)

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 911K of libraries. Click here for Pure Java version (9316L/48K).

1  
!7
2  
3  
// class name not up to date anymore
4  
cmodule ScreenShootClosestModule > DynImageSurface {
5  
  S moduleIDAndName;
6  
  switchable bool withFrame = true;
7  
  
8  
  visual withCenteredButtons(northAndCenterWithMargins(
9  
    withCenteredTitle("Module to shoot:",
10  
      dm_moduleSelectorComboBox(dm_fieldLiveValue('moduleIDAndName))),
11  
    super),
12  
    dm_checkBox withFrame(), "Shoot!", rThread doIt);
13  
14  
  void doIt enter {
15  
    fO module = dm_getModuleFromComboBox(moduleIDAndName);     
16  
    if (module == null) ret;
17  
    setImage(dm_shootModule(module, withFrame));
18  
    dm_showModule();
19  
  }
20  
21  
  start {
22  
    dm_onAnyModulePopupMenu(voidfunc(JPopupMenu menu, S mod) enter {
23  
      addMenuItem(menu, "Take screenshot of module", rThread {
24  
        // TODO: select in combobox
25  
        setImage(dm_shootModule(mod, withFrame));
26  
        dm_showModule();
27  
      });
28  
    });
29  
  }
30  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1016330
Snippet name: Take screenshot of module (screen-shoot a module)
Eternal ID of this version: #1016330/23
Text MD5: bb2929c0086fb03ee70462c6eefd56c2
Transpilation MD5: 342c31efecbbe689916db92ceb86989d
Author: stefan
Category: javax / html
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-05-06 22:44:39
Source code size: 854 bytes / 30 lines
Pitched / IR pitched: No / No
Views / Downloads: 448 / 42402
Version history: 22 change(s)
Referenced in: [show references]