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 804K of libraries. Click here for Pure Java version (8974L/47K).

!7

// class name not up to date anymore
cmodule ScreenShootClosestModule > DynImageSurface {
  S moduleIDAndName;
  switchable bool withFrame = true;
  
  visual withCenteredButtons(northAndCenterWithMargins(
    withCenteredTitle("Module to shoot:",
      dm_moduleSelectorComboBox(dm_fieldLiveValue('moduleIDAndName))),
    super),
    dm_checkBox withFrame(), "Shoot!", rThread doIt);

  void doIt enter {
    fO module = dm_getModuleFromComboBox(moduleIDAndName);     
    if (module == null) ret;
    setImage(dm_shootModule(module, withFrame));
    dm_showModule();
  }

  start {
    dm_onAnyModulePopupMenu(voidfunc(JPopupMenu menu, S mod) enter {
      addMenuItem(menu, "Take screenshot of module", rThread {
        // TODO: select in combobox
        setImage(dm_shootModule(mod, withFrame));
        dm_showModule();
      });
    });
  }
}

download  show line numbers  debug dex   

Travelled to 12 computer(s): aoiabmzegqzx, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, tslmcundralx, tvejysmllsmz, 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: c399042d2b270cc4e7965094512638a2
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: 204 / 27558
Version history: 22 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1016330 & http://1016330.tinybrain.de